/* Touch and narrow-screen adjustments for the base layout */
@media (pointer: coarse) {
  .chip button,
  .btn {
    padding: 6px 12px;
    min-height: 40px; /* s1-pace: a finger's 40 px (was 34) */
    min-width: 40px;
  }
  .tab {
    padding: 9px 14px;
  }
  .dev button {
    padding: 6px 9px;
  }
}
@media (max-width: 700px) {
  .logo,
  .wide,
  .wide2,
  .chip small {
    display: none;
  }
  .mob,
  .ico {
    display: inline-flex;
  }
  .hud {
    gap: 5px;
  }
  .chip {
    padding: 4px 8px;
    font-size: 14px;
  }
  .side {
    top: auto;
    bottom: calc(100% - var(--dockT, 80%) + 8px);
    width: auto;
    left: max(16px, env(safe-area-inset-left, 0px));
    max-height: min(42vh, calc(var(--dockT, 80vh) - var(--hudB, 64px) - 16px));
    overflow: auto;
  }
  .goal,
  .hint {
    display: none;
  }
  .item {
    width: 84px;
  }
  .item img,
  .tool-ico {
    height: 44px;
  }
  .item b {
    font-size: 11.5px;
  }
  .items {
    padding: 6px;
    gap: 6px;
  }
  .panel {
    max-height: calc(100% - 220px);
  }
  .dev {
    width: calc(100% - 32px);
    max-height: 40vh;
  }
  .card h3 {
    font-size: 17px;
  }
  .card p {
    font-size: 13px;
  }
  body.incamp .side {
    top: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-height: 52vh !important;
  }
  body.incamp .campCard {
    width: auto;
    max-width: none;
  }
}
#afk {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(30, 20, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
#afk[hidden] {
  display: none;
}
#afk .afkBox {
  background: #f6eedc;
  border: 3px solid #3a2414;
  border-radius: 20px;
  padding: 20px 24px;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 6px 0 #241509;
}
#afk h3 {
  margin: 0 0 8px;
}
#afk .btn {
  margin-top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .t {
    animation: none;
  }
}
