/* Queue counter: the one-handed counting pad (shared page styles: /tools/tools.css + /tools/tool-page.css) */
.qc-app { background: var(--asphalt); color: #fff; border-radius: 18px; padding: 12px; display: grid; gap: 10px; margin-bottom: 18px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.qc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qc-clock { display: grid; gap: 1px; min-width: 0; }
.qc-clock small { color: #aab0ba; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.qc-clock b { font-family: var(--display); font-size: 2.1rem; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.qc-clock span { color: #cfd3da; font-size: .8rem; font-weight: 600; }
.qc-ctl { display: flex; gap: 8px; flex: none; }
.qc-ctl button { min-height: 52px; min-width: 76px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; }
.qc-ctl .qc-run { background: var(--yellow); border-color: var(--yellow); color: var(--asphalt); }
.qc-ctl .qc-run.is-on { background: transparent; color: var(--yellow); }
.qc-ctl button:disabled { opacity: .4; cursor: default; }

.qc-dirs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qc-dir { display: grid; gap: 8px; align-content: start; padding: 8px; border-radius: 16px; background: rgba(255,255,255,.04); border: 2px solid transparent; transition: background .2s, border-color .2s; min-width: 0; }
.qc-dir.is-warn { border-color: #fb923c; background: rgba(251,146,60,.14); }
.qc-dir.is-alert { border-color: #ef4444; background: rgba(239,68,68,.22); animation: qcPulse 1.2s ease-in-out infinite; }
@keyframes qcPulse { 50% { background: rgba(239,68,68,.38); } }
.qc-dir-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qc-name { flex: 1; min-width: 0; height: 36px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-weight: 800; font-size: .9rem; padding: 0 8px; }
.qc-name:focus { outline: none; border-color: var(--yellow); }
.qc-total { flex: none; font-family: var(--display); font-size: 1.3rem; color: var(--yellow); min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }

.qc-tap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; min-height: 84px; padding: 10px 12px; border: 0; border-radius: 16px; font: inherit; text-align: left; cursor: pointer; color: var(--asphalt); box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .06s; }
.qc-tap:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.qc-tap b { grid-column: 1; font-size: 1.12rem; font-weight: 800; line-height: 1.15; }
.qc-tap small { grid-column: 1; font-size: .74rem; font-weight: 700; opacity: .75; }
.qc-tap span { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.qc-tap.light { background: var(--yellow); }
.qc-tap.heavy { background: var(--orange); color: #fff; }
.qc-tap.bdouble { background: #e5e7eb; }
.qc-tap.flash { animation: qcFlash .25s ease-out; }
@keyframes qcFlash { from { filter: brightness(1.35); } to { filter: none; } }
.qc-tap[hidden] { display: none; }

.qc-stop { display: grid; gap: 2px; min-height: 64px; padding: 8px; border-radius: 16px; border: 2px solid #ef4444; background: rgba(239,68,68,.16); color: #fff; font: inherit; cursor: pointer; text-align: center; }
.qc-stop span { font-family: var(--display); font-size: 1.35rem; letter-spacing: .06em; color: #fecaca; }
.qc-stop small { font-size: .72rem; color: #e5e7eb; font-weight: 600; }
.qc-stop.is-stopped { border-color: #22c55e; background: rgba(34,197,94,.2); }
.qc-stop.is-stopped span { color: #bbf7d0; }

.qc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.qc-wake { margin: 0; font-size: .78rem; color: #aab0ba; flex: 1 1 220px; }
.qc-reset { border: 1px solid rgba(255,255,255,.2); background: transparent; color: #cfd3da; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 40px; }
.qc-reset.confirm { border-color: #ef4444; color: #fecaca; background: rgba(239,68,68,.16); }

@media (max-width: 400px) {
  .qc-app { padding: 8px; margin-left: -6px; margin-right: -6px; }
  .qc-dirs { gap: 6px; }
  .qc-dir { padding: 6px; }
  .qc-tap { min-height: 80px; padding: 8px 9px; }
  .qc-tap b { font-size: 1rem; }
  .qc-tap span { font-size: 1.7rem; }
  .qc-ctl button { min-width: 64px; padding: 0 10px; }
}
