* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2b1d14; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fffefa; touch-action: none; user-select: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.startng-card { position: fixed; top: 12px; left: 12px; display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; background: #292a23; color: #fffefa; z-index: 5; }
.startng-card img { width: 44px; height: 44px; border-radius: 50%; background: #d8fd71; object-fit: cover; }
.startng-card b { display: block; font-size: 15px; }
.startng-card span { font-size: 12px; opacity: .7; }
.startng-card button { margin-left: 6px; border: 0; border-radius: 999px; padding: 6px 12px; background: #d8fd71; color: #292a23; font-weight: 700; cursor: pointer; }

#stats { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; z-index: 5; }
#stats div { background: #292a23; border-radius: 14px; padding: 6px 14px; text-align: center; min-width: 78px; }
#stats small { display: block; font-size: 10px; letter-spacing: .1em; opacity: .65; }
#stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
#stats.low #time { color: #ff6b5e; }

#orders { position: fixed; top: 66px; left: 12px; right: 12px; display: flex; gap: 8px; z-index: 4; overflow: hidden; pointer-events: none; }
.order { background: #fffefa; color: #292a23; border-radius: 12px; padding: 6px 10px 8px; min-width: 128px; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.order .n { font-weight: 700; font-size: 13px; white-space: nowrap; }
.order .e { font-size: 26px; line-height: 1.1; }
.order .bar { height: 6px; border-radius: 3px; background: #ddd; margin-top: 5px; overflow: hidden; }
.order .bar i { display: block; height: 100%; background: #2f9e44; width: 100%; }
.order.warn .bar i { background: #e8590c; }
.order.late .bar i { background: #e03131; }

#holding { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: #292a23; border-radius: 999px; padding: 8px 18px; font-size: 15px; z-index: 5; white-space: nowrap; }
#prompt { position: fixed; left: 50%; bottom: 62px; transform: translateX(-50%); background: #d8fd71; color: #292a23; font-weight: 700; border-radius: 999px; padding: 7px 16px; font-size: 15px; z-index: 5; white-space: nowrap; }
#toast { position: fixed; left: 50%; top: 38%; transform: translate(-50%, 0); font-size: 28px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 #000a; opacity: 0; pointer-events: none; z-index: 6; transition: opacity .25s, transform .6s; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, -24px); }

#stick { position: fixed; left: 22px; bottom: 28px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.3); z-index: 6; }
#knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.55); }
#act { position: fixed; right: 26px; bottom: 40px; width: 96px; height: 96px; border-radius: 50%; border: 0; background: #d8fd71; color: #292a23; font-weight: 800; font-size: 18px; z-index: 6; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
#act:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }

.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(30,18,10,.62); z-index: 10; padding: 16px; overflow: auto; }
.overlay[hidden] { display: none; }
.panel { background: #292a23; border-radius: 22px; padding: 26px 28px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 10px 0 rgba(0,0,0,.3); }
.panel h1 { margin: 0; font-size: 42px; color: #d8fd71; letter-spacing: -.02em; }
.panel h3 { margin: 16px 0 6px; font-size: 14px; letter-spacing: .1em; opacity: .7; }
.tag { opacity: .8; margin: 6px 0 14px; }
.how { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; font-size: 14px; line-height: 1.9; }
.how b { display: inline-block; min-width: 76px; color: #d8fd71; }
.how span { display: inline-block; min-width: 76px; }
button.big { border: 0; border-radius: 999px; padding: 13px 28px; background: #d8fd71; color: #292a23; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #8ba62f; }
button.big:active { transform: translateY(2px); box-shadow: 0 2px 0 #8ba62f; }
button.ghost { border: 2px solid #d8fd71; background: transparent; color: #d8fd71; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 15px; cursor: pointer; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.result { display: flex; gap: 12px; justify-content: center; }
.result div { background: #1c1d18; border-radius: 14px; padding: 8px 22px; }
.result small { display: block; font-size: 10px; letter-spacing: .1em; opacity: .6; }
.result b { font-size: 30px; }
#board { text-align: left; margin: 0; padding: 0; list-style: none; font-size: 14px; max-height: 190px; overflow: auto; }
#board li { display: flex; gap: 10px; padding: 5px 10px; border-radius: 8px; }
#board li span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#board li.me { background: #d8fd71; color: #292a23; font-weight: 700; }

@media (max-width: 640px) {
  .panel h1 { font-size: 34px; }
  #stats b { font-size: 18px; }
  #stats div { min-width: 64px; padding: 5px 10px; }
  .startng-card img { width: 36px; height: 36px; }
  .order { min-width: 108px; }
  #holding { bottom: 160px; }
  #prompt { bottom: 206px; }
}
