/* Coastal Academy: cartoon kiosk theme, modeled on the Coquille drive-thru.
   White plank walls, dark-stained wood shelves, marble counter with oak edge, chunky outlined buttons. */
.academy {
  --navy: #1F3B4D; --teal: #3FA9C9; --gold: #C9912E; --ink: #2a1a10; --wood: #5a3a22; --wood2: #3e2716;
  --paper: #fffdf7; --wall: #f3eee4; --ceiling: #2b2f36;
  position: fixed; inset: 0; z-index: 20; background: var(--wall); color: var(--ink); display: flex; flex-direction: column; overflow: hidden;
  font-family: 'Avenir Next', 'Nunito', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.academy[hidden] { display: none; }
.academy button { font-family: inherit; }
.ac-brand { font-weight: 900; letter-spacing: .16em; color: var(--gold); font-size: 15px; text-shadow: 0 1px 0 rgba(0,0,0,.25); }

/* Ceiling bar (dark like the kiosk ceiling) with string lights */
.ac-top { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 16px 14px; gap: 12px; background: var(--ceiling); color: #fff;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 9px); }
.ac-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; pointer-events: none;
  background: radial-gradient(circle at 10px 4px, #ff5a4a 0 3px, transparent 4px) 0 0 / 34px 12px repeat-x; filter: drop-shadow(0 0 4px rgba(255,90,74,.8)); }
.ac-top > :last-child { justify-self: end; }
.ac-topr { display: flex; gap: 8px; align-items: center; justify-self: end; }
.ac-back { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: #cfe7f1; padding: 8px 10px; border-radius: 10px; }
.ac-back svg { width: 20px; height: 20px; stroke: #cfe7f1; stroke-width: 2.6; }
.ac-title { display: flex; align-items: center; gap: 12px; }
.ac-clock { font: 900 26px/1 ui-monospace, Menlo, monospace; color: #fff; background: #000; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--teal); }
.ac-count { color: #e6e6e6; font-size: 15px; font-weight: 700; }
.ac-combo { background: #ff6a2a; color: #fff; font-weight: 900; padding: 4px 10px; border-radius: 999px; animation: combo .6s ease; }
@keyframes combo { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.ac-who, .ac-icon-btn { color: #fff; font-size: 14px; font-weight: 700; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.12); }
.ac-icon-btn { font-size: 18px; padding: 6px 10px; }

/* Plank wall background */
.kiosk-bg, .academy .wall {
  background-color: var(--wall);
  background-image: linear-gradient(90deg, rgba(0,0,0,.07) 0 2px, transparent 2px), linear-gradient(180deg, rgba(255,255,255,.6), rgba(0,0,0,.02));
  background-size: 46px 100%, 100% 100%;
}
.ac-hub { flex: 1; overflow: auto; padding: 22px 24px 40px; }
.ac-lede { max-width: 860px; margin: 14px auto 18px; text-align: center; color: #4a3a2a; font-size: 17px; line-height: 1.45; }

/* Chunky cartoon buttons */
.ac-btn { min-height: 52px; padding: 0 20px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 17px; font-weight: 800;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .06s, box-shadow .06s; }
.ac-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.ac-btn.small { min-height: 40px; font-size: 15px; padding: 0 14px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
.ac-top .ac-btn.small { border-color: #000; }
.ac-btn.go { background: var(--teal); color: #04161f; }
.ac-btn.big { min-height: 62px; font-size: 21px; }
.ac-btn.warn { background: #ffe9e2; color: #8a2a12; }
.ac-btn.wide { width: 100%; }
.ac-btn.half.on { background: var(--gold); color: #1b1203; }
.ac-btn:disabled { opacity: .5; }

/* Player card */
.ac-player { display: flex; align-items: center; gap: 16px; max-width: 980px; margin: 0 auto; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; box-shadow: 0 6px 0 var(--ink); }
.ac-avatar { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7fd0f0, var(--teal) 60%, #1f6f8a); border: 3px solid var(--ink); display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--ink); flex: none; }
.ac-pmain { flex: 1; min-width: 0; }
.ac-pname { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-lvl { font-size: 13px; color: #fff; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 900; white-space: nowrap; }
.ac-xpbar { height: 14px; background: #e8e2d6; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.ac-xpbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #7fe3a0); transition: width .6s; }
.ac-pstats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #5a4a3a; font-weight: 700; }

/* Station cards: stickers on the wall */
.ac-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; max-width: 1240px; margin: 0 auto; }
.ac-station { text-align: left; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 0 0 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; transition: transform .1s; color: var(--ink); }
.ac-station:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.ac-hero { background: color-mix(in srgb, var(--sc) 22%, #fff); border-bottom: 3px solid var(--ink); padding: 10px 16px 4px; }
.hero-art { width: 100%; height: 96px; }
.ac-sname { font-size: 22px; font-weight: 900; padding: 4px 14px 0; }
.ac-sblurb { color: #5a4a3a; font-size: 14px; line-height: 1.35; flex: 1; padding: 0 14px; }
.ac-meter { height: 10px; background: #e8e2d6; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin: 4px 14px 0; }
.ac-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.ac-sstats { display: flex; justify-content: space-between; font-size: 13px; color: #5a4a3a; font-weight: 800; padding: 0 14px; }

/* Modes */
.ac-mode-hero { max-width: 560px; margin: 0 auto 18px; text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 12px 16px; box-shadow: 0 5px 0 var(--ink); }
.ac-mode-hero .hero-art { height: 110px; }
.ac-mode-hero p { margin: 6px 0 0; color: #4a3a2a; }
.ac-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 980px; margin: 0 auto; }
.ac-mode { position: relative; text-align: left; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 6px; min-height: 170px; box-shadow: 0 6px 0 var(--ink); border-top: 12px solid var(--sc); }
.ac-mode:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.ac-mode i { font-style: normal; font-size: 34px; }
.ac-mode b { font-size: 26px; }
.ac-mode span { color: #4a3a2a; line-height: 1.4; }
.ac-mode em { position: absolute; top: 14px; right: 14px; font-style: normal; font-weight: 900; font-size: 13px; background: var(--gold); color: #fff; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.ac-mode.locked { opacity: .65; filter: grayscale(.6); }

.ac-center { flex: 1; display: grid; place-items: center; padding: 20px; overflow: auto; }
.ac-card { background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; padding: 26px; width: min(600px, 94vw); text-align: center; box-shadow: 0 7px 0 var(--ink); }
.ac-card h2 { margin: 8px 0 6px; font-size: 28px; }
.ac-logo .hero-art { height: 80px; }
.ac-muted { color: #6a5a4a; }
.ac-card .big-input { width: 100%; margin: 14px 0; padding: 14px; font-size: 20px; border-radius: 14px; border: 3px solid var(--ink); background: #fff; color: var(--ink); box-sizing: border-box; }
.ac-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* Badges */
.ac-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; max-width: 980px; margin: 18px auto; }
.ac-badge { background: var(--paper); border: 3px dashed #b8ab98; border-radius: 18px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; filter: grayscale(1); opacity: .6; }
.ac-badge.got { border: 3px solid var(--ink); filter: none; opacity: 1; box-shadow: 0 5px 0 var(--ink); }
.ac-badge .bd-icon { font-size: 40px; }
.ac-badge span { font-size: 13px; color: #5a4a3a; }
.ac-levels { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 980px; margin: 0 auto; }
.ac-levels > div { width: 120px; text-align: center; opacity: .45; display: flex; flex-direction: column; align-items: center; }
.ac-levels > div.got { opacity: 1; }
.ac-levels span { font-size: 12px; color: #6a5a4a; }
.medal { width: 40px; height: 48px; }

/* ---------- Build screen ---------- */
.ac-bar { flex: 1; display: grid; grid-template-columns: 290px 270px minmax(0, 1fr); gap: 0; min-height: 0; }
.ac-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px 12px; background: #e9e2d4; border-right: 3px solid var(--ink); }
.ac-mid { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px 12px; }
.ac-mid.counter { background: linear-gradient(115deg, #b9b2a8 0%, #d8d2c8 18%, #a9a298 32%, #cfc9bf 48%, #9f988e 63%, #d2ccc2 80%, #aaa398 100%); border-right: 6px solid #a8743a; box-shadow: inset -4px 0 0 #6b4520; }

/* Drive-thru window with the waiting car */
.ac-window { position: relative; background: linear-gradient(#0d1726, #22344a); border: 6px solid #f6f2ea; outline: 3px solid var(--ink); border-radius: 6px; padding: 8px 8px 6px; }
.ac-window.honk { animation: honk .3s 3; }
@keyframes honk { 50% { transform: translateX(-4px) rotate(-1deg); } }
.ac-car .car-art { width: 100%; height: 78px; }
.ac-patience { height: 12px; background: #333; border-radius: 99px; overflow: hidden; border: 2px solid #000; margin-top: 2px; }
.ac-patience span { display: block; height: 100%; transition: width .25s linear; }
.ac-patience .ok { background: #5fd38a; } .ac-patience .warn { background: #ffb340; } .ac-patience .bad { background: #ff5a4a; }
.ac-rail { display: flex; gap: 5px; margin-top: 6px; }
.ac-rail span { flex: 1; text-align: center; padding: 3px 0; border-radius: 6px; background: #1c2633; color: #6e7f90; font-weight: 900; font-size: 13px; }
.ac-rail span.done { background: #1d4a2e; color: #7fe3a0; }
.ac-rail span.miss { background: #4a1d1d; color: #ffb8a4; }
.ac-rail span.now { background: var(--teal); color: #04161f; }

/* KDS ticket, like the KDS screens on the bar */
.ac-ticket { background: #1c1c1e; color: #fff; border-radius: 12px; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.kds-h { display: flex; justify-content: space-between; align-items: center; font: 800 13px/1 -apple-system, sans-serif; color: #a1a1a6; padding: 8px 10px; }
.kds-tag { background: #f07a2a; color: #fff; padding: 4px 10px; border-radius: 6px; }
.kds-name { font-size: 22px; font-weight: 900; line-height: 1.15; padding: 0 12px 4px; }
.kds-mods { padding: 0 12px 10px; font-size: 16px; font-weight: 700; color: #ffd28a; }
.kds-car { padding: 0 12px 10px; font-size: 14px; color: #cfe7f1; }

/* Laminated recipe card */
.ac-recipe { background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; overflow: auto; flex: 1; min-height: 0; box-shadow: 0 4px 0 var(--ink); }
.rc-h { display: flex; justify-content: space-between; font-weight: 900; color: var(--navy); letter-spacing: .06em; font-size: 13px; text-transform: uppercase; }
.rc-bar { height: 8px; background: #eee; border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.rc-bar span { display: block; height: 100%; background: #5fd38a; transition: width .3s; }
.ac-recipe ol { margin: 0; padding-left: 22px; }
.ac-recipe li { padding: 4px 0; font-size: 15px; font-weight: 600; }
.ac-recipe li.ok { color: #2f8a5a; text-decoration: line-through; text-decoration-color: rgba(47,138,90,.5); }
.ac-recipe li.qty { color: #c46a00; }
.ac-tip { background: #fff4d6; border: 3px solid var(--gold); color: #5a3a0a; border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.35; font-weight: 600; }
.ac-memo { color: #5a4a3a; font-size: 15px; line-height: 1.4; padding: 10px 4px; }
.ac-memo b { color: var(--ink); }

/* The cup on the counter */
.ac-cup { height: 230px; display: grid; place-items: center; filter: drop-shadow(0 8px 0 rgba(0,0,0,.25)); }
.cup-svg { height: 100%; width: auto; }
.ac-cup.pull { animation: pull .5s ease; }
.ac-cup.shake { animation: shake .6s ease; }
@keyframes pull { 0% { transform: translateY(0); } 30% { transform: translateY(5px) scaleY(.97); } 100% { transform: translateY(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-3deg); } 40% { transform: translateX(6px) rotate(3deg); } 60% { transform: translateX(-4px) rotate(-2deg); } 80% { transform: translateX(4px) rotate(2deg); } }
.ac-steps { flex: 1; min-height: 0; overflow: auto; margin: 0; background: #fffdf7; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 8px 8px 30px; box-shadow: 0 4px 0 var(--ink); }
.ac-steps li { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 15px; font-weight: 600; border-bottom: 1px dashed #d8cfc0; }
.ac-steps li span { flex: 1; }
.ac-steps li.empty { color: #8a7a6a; list-style: none; margin-left: -20px; border: 0; }
.ac-steps .mini { width: 30px; height: 30px; border-radius: 8px; background: #f0ebe2; border: 2px solid var(--ink); font-size: 15px; font-weight: 900; flex: none; color: var(--ink); }
.ac-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ac-actions.two { grid-template-columns: 1fr 1fr; }
.ac-actions .ac-btn { padding: 0 6px; font-size: 15px; min-height: 46px; }

/* The wall of shelves */
.ac-shelves { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 18px; padding: 14px 16px 30px; }
.shelf { position: relative; padding: 2px 4px 16px; flex: none; }
.shelf-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.shelf-h .sign { background: #e9d2a8; color: #4a2a10; border: 2px solid #8a6440; font-weight: 900; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; box-shadow: 0 2px 0 #8a6440; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px 12px; align-items: start; position: relative; z-index: 1; }
/* wood plank under each row */
.shelf.wood .item::after, .shelf.cups .item::after, .shelf.lids .item::after { content: ''; position: absolute; left: -7px; right: -7px; top: 82px; height: 14px; z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 3px, transparent 3px 40px), linear-gradient(180deg, #6b4428 0%, #4a2e18 60%, #2e1c0e 100%);
  box-shadow: 0 5px 0 rgba(0,0,0,.18); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.shelf.fridge { background: linear-gradient(160deg, #e8ebee, #b8bec5 40%, #d8dde2 70%, #a8aeb5); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 10px 12px; box-shadow: 0 5px 0 var(--ink); }
.shelf.fridge::before { content: 'Beverage-Air'; position: absolute; bottom: 8px; right: 14px; font: italic 900 12px/1 Georgia, serif; color: #2a2a2a; background: #ddd; border: 1px solid #555; padding: 2px 6px; }
.shelf.steel, .shelf.machine { background: linear-gradient(180deg, #d8dde2, #a9b0b7); border: 3px solid var(--ink); border-radius: 14px; padding: 10px; box-shadow: 0 5px 0 var(--ink); }
.shelf.machine { background: linear-gradient(180deg, #c9ced3 0%, #eef1f3 30%, #9aa1a8 100%); }
.shelf.machine::before { content: 'GRINDMASTER'; position: absolute; bottom: 10px; right: 14px; background: #d8263a; color: #fff; font-weight: 900; font-size: 11px; letter-spacing: .1em; padding: 2px 6px; border: 1px solid #000; }
.seg { display: inline-flex; flex-wrap: wrap; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 2px; margin-left: auto; }
.seg button { padding: 6px 10px; border-radius: 7px; font-size: 13px; font-weight: 800; color: #5a4a3a; }
.seg button.on { background: var(--teal); color: #04161f; }

.item { position: relative; z-index: 0; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 2px 2px 0; border-radius: 12px; border: 3px solid transparent; transition: transform .08s; color: var(--ink); }
.item-art { width: 72px; height: 82px; display: grid; place-items: end center; }
.item-art .art { width: 72px; height: 82px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.18)); }
.item span { position: relative; z-index: 1; font-size: 12px; font-weight: 800; line-height: 1.1; color: var(--ink); background: #fffdf7; border: 1.5px solid #8a6440; padding: 2px 6px; border-radius: 5px; margin: 4px 0 8px; text-align: center; max-width: 100%; }
.shelf.fridge .item span, .shelf.steel .item span, .shelf.machine .item span { margin-bottom: 2px; }
.item:active { transform: scale(.92); }
.item.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-4deg); } 100% { transform: scale(1); } }
.item.hint { border-color: var(--gold); background: rgba(255,214,120,.35); animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(201,145,46,.35); transform: translateY(-3px); } }
.floater { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #04161f; font-weight: 900; font-size: 14px; padding: 2px 8px; border-radius: 999px; border: 2px solid var(--ink); pointer-events: none; animation: float .7s ease-out forwards; z-index: 3; margin: 0 !important; }
@keyframes float { to { transform: translate(-50%, -34px); opacity: 0; } }

/* Sheets (cheat sheet, results) */
.ac-sheet { position: absolute; inset: 0; background: rgba(20,14,8,.55); display: grid; place-items: center; z-index: 5; padding: 20px; }
.ac-sheet-card { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; width: min(980px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 0 var(--ink); }
.ac-sheet-card.tall { height: 92vh; }
.ac-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 3px solid var(--ink); font-size: 20px; background: #e9e2d4; }
.ac-sheet-head .x svg { width: 26px; height: 26px; stroke: var(--ink); stroke-width: 2.6; }
.sheet-tabs { margin: 0 auto; }
.ac-sheet-body { overflow: auto; padding: 16px 18px 24px; }
.sheet-img { display: block; width: 100%; max-width: 760px; margin: 0 auto; border-radius: 12px; border: 3px solid var(--ink); cursor: zoom-in; }
.sheet-img.zoom { max-width: none; width: 170%; cursor: zoom-out; }
.acs-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.acs-block, .acs-card { background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; text-align: left; }
.acs-h { font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.acs-note { color: #6a5a4a; font-size: 13px; margin: 4px 0; }
.acs-block table { width: 100%; border-collapse: collapse; }
.acs-block td { padding: 4px 0; border-bottom: 1px dashed #d8cfc0; }
.acs-block td:last-child { text-align: right; font-weight: 800; }
.acs-block ul, .acs-card ol { margin: 0; padding-left: 18px; line-height: 1.45; }

.result { padding: 18px 24px 22px; text-align: center; overflow: auto; width: min(640px, 94vw); }
.result.good { background: linear-gradient(#e9fbef, var(--paper) 40%); }
.result.bad { background: linear-gradient(#fff0ea, var(--paper) 40%); }
.res-big { font-size: 42px; font-weight: 900; line-height: 1.1; }
.result.good .res-big { color: #1f8a4a; }
.result.bad .res-big { color: #c4462a; }
.res-sub { color: #5a4a3a; margin: 4px 0 10px; font-weight: 700; }
.res-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.chip { color: var(--ink); font-weight: 900; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.chip.xp { background: #7fe3a0; animation: combo .5s ease; }
.chip.combo { background: #ff8a4a; color: #fff; }
.chip.score { background: var(--gold); color: #fff; }
.res-level { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; margin: 8px auto; box-sizing: border-box; }
.res-level .ac-xpbar { flex: 1; margin: 0; }
.res-issues { text-align: left; margin: 10px 0; padding-left: 22px; color: #8a2a12; line-height: 1.5; font-weight: 600; }
.res-ok { color: #2a4a5a; font-weight: 600; }
.result .acs-card { margin: 10px 0; }
.res-q { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 12px; margin: 10px 0; font-weight: 700; }
.res-qa { margin-top: 8px; font-weight: 900; }
.res-qa.ok { color: #1f8a4a; } .res-qa.no { color: #c46a00; }
.stars { display: flex; justify-content: center; gap: 6px; font-size: 40px; line-height: 1; }
.stars span { color: #d8cfc0; -webkit-text-stroke: 2px #2a1a10; }
.stars span.on { color: #ffc93a; animation: star .5s both cubic-bezier(.3,1.6,.5,1); }
.stars.big { font-size: 64px; }
@keyframes star { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(0); } }
.res-list { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.res-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); margin-bottom: 6px; font-weight: 700; }
.res-list li.ok span:first-child { color: #1f8a4a; }
.res-list li.no span:first-child { color: #a8341a; }
.res-list small { display: block; color: #6a5a4a; font-size: 13px; font-weight: 600; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
body > .confetti { position: fixed; }

/* Level / badge banners */
.ac-banner { position: fixed; top: calc(70px + var(--slot, 0) * 84px + env(safe-area-inset-top)); left: 50%; width: max-content; max-width: 90vw; transform: translate(-50%, -20px); opacity: 0; z-index: 60; display: flex; align-items: center; gap: 12px; background: #fffdf7; color: #2a1a10; border: 3px solid #2a1a10; border-radius: 18px; padding: 10px 18px; box-shadow: 0 6px 0 #2a1a10; animation: bannerIn .4s forwards; font-family: 'Avenir Next', -apple-system, sans-serif; }
.ac-banner b { display: block; font-size: 18px; }
.ac-banner div span { display: block; font-size: 14px; color: #5a4a3a; }
.ac-banner .bd-icon { font-size: 38px; }
.ac-banner.level { background: #fff4d6; }
.ac-banner.out { animation: bannerOut .5s forwards; }
@keyframes bannerIn { to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes bannerOut { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -20px); opacity: 0; } }

/* Register Menu button */
.big-btn.train { background: linear-gradient(90deg, #1F3B4D, #2a6f88); color: #fff; }

/* ---------- Order Taker coach (sits on the real register) ---------- */
.ot-coach { flex: none; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 132px; gap: 12px; align-items: stretch; background: #fffdf7; color: #2a1a10; border: 3px solid #2a1a10; border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 0 #3FA9C9; }
.ot-main { min-width: 0; }
.ot-head { display: flex; justify-content: space-between; align-items: center; color: #6a5a4a; font-size: 13px; font-weight: 700; margin-bottom: 2px; gap: 8px; }
.ot-car { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.ot-carart .car-art { width: 72px; height: 44px; display: block; }
.ot-pay { margin-left: auto; font-size: 14px; color: #1F3B4D; font-weight: 700; }
.ot-bubble { position: relative; background: #e6f4fb; color: #111; border: 2px solid #2a1a10; border-radius: 14px; padding: 7px 10px; margin-top: 4px; font-size: 16px; line-height: 1.3; font-weight: 600; }
.ot-checks { list-style: none; padding: 0; margin: 0; font-size: 14px; align-self: center; font-weight: 600; }
.ot-checks li { padding: 3px 0 3px 22px; position: relative; }
.ot-checks li::before { content: '○'; position: absolute; left: 2px; color: #8a7a6a; }
.ot-checks li.ok { color: #1f8a4a; }
.ot-checks li.ok::before { content: '✓'; color: #1f8a4a; font-weight: 900; }
.ot-checks small { display: block; color: #c46a00; font-size: 12px; }
.ot-btns { display: flex; flex-direction: column; gap: 6px; }
.ot-btns button { flex: 1; min-height: 36px; border-radius: 10px; background: #fff; color: #2a1a10; border: 2px solid #2a1a10; box-shadow: 0 3px 0 #2a1a10; font-weight: 800; font-size: 14px; }
.ot-coach .stars { justify-content: flex-start; font-size: 26px; }
.ot-miss { color: #a8341a; padding: 2px 0; font-weight: 600; }
.ot-ok { color: #1f8a4a; padding: 2px 0; font-size: 18px; font-weight: 800; }
.ot-next { color: #6a5a4a; margin-top: 4px; }
.ot-cash { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 20px; }
.ot-cash-card { background: #fffdf7; color: #2a1a10; border: 3px solid #2a1a10; border-radius: 22px; padding: 22px; width: min(720px, 96vw); text-align: center; box-shadow: 0 8px 0 #2a1a10; font-family: 'Avenir Next', -apple-system, sans-serif; }
.ot-cash-card .ac-brand { color: #C9912E; font-weight: 900; letter-spacing: .16em; }
.ot-cash-card .ac-muted { color: #6a5a4a; }
.ot-cash-card .ac-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ot-cash-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.ot-cash-top div { background: #fff; border: 2px solid #2a1a10; border-radius: 12px; padding: 10px; }
.ot-cash-top small { display: block; color: #6a5a4a; font-weight: 700; }
.ot-cash-top b { font-size: 28px; }
.ot-cash-top b.ok { color: #1f8a4a; }
.ot-tray { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0; padding: 12px; background: #1c1c1e; border-radius: 14px; border: 3px solid #2a1a10; }
.ot-tray button { position: relative; height: 90px; border-radius: 8px; font-size: 22px; font-weight: 900; transition: transform .06s; }
.ot-tray button:active { transform: translateY(3px); }
.ot-tray .bill { background: linear-gradient(135deg, #a9c79a, #6f8f5e); color: #1e3a18; border: 3px solid #2a1a10; box-shadow: inset 0 0 0 5px rgba(255,255,255,.25); }
.ot-tray .coin { background: radial-gradient(circle at 40% 35%, #f4f4f4, #9a9a9a); color: #333; border-radius: 50%; width: 90px; justify-self: center; border: 3px solid #2a1a10; }
.ot-tray i { position: absolute; top: -10px; right: -10px; background: #C9912E; color: #fff; font-style: normal; font-size: 15px; min-width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; border: 2px solid #2a1a10; }
.ot-cash-card .ac-btn { min-height: 52px; padding: 0 20px; border-radius: 14px; background: #fff; color: #2a1a10; font-size: 17px; font-weight: 800; border: 3px solid #2a1a10; box-shadow: 0 4px 0 #2a1a10; }
.ot-cash-card .ac-btn.go { background: #3FA9C9; }
.ot-msg { color: #c46a00; margin: 6px 0; font-weight: 700; }
.ot-countback { font-size: 20px; line-height: 1.45; color: #1F3B4D; font-weight: 600; }

/* While coaching, tighten the voice box so the category tiles keep their size. */
body.coaching .voice:not(.collapsed) { padding: 8px 12px; gap: 12px; }
body.coaching .voice:not(.collapsed) .mic { width: 64px; height: 64px; }
body.coaching .voice:not(.collapsed) .mic svg { width: 32px; height: 32px; }
body.coaching .mic-label { font-size: 17px; }
body.coaching .transcript, body.coaching .timing { display: none; }
body.coaching .type-form { margin-top: 6px; }
body.coaching .layout .left { gap: 8px; }

@media (max-width: 1000px) {
  .ac-bar { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr); overflow: auto; }
  .ac-shelves { grid-column: 1 / -1; overflow: visible; }
  .ac-cup { height: 180px; }
}
@media (prefers-reduced-motion: reduce) { .academy *, .ac-banner { animation: none !important; } }

/* Multi-drink KDS ticket + level note */
.kds-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0 6px; border-top: 1px solid #333; opacity: .55; }
.kds-item:first-of-type { border-top: 0; }
.kds-item.now { opacity: 1; background: rgba(63,169,201,.14); }
.kds-item.done { opacity: .4; }
.kds-item.done .kds-name { text-decoration: line-through; }
.kds-n { flex: none; margin: 4px 0 0 10px; width: 24px; height: 24px; border-radius: 50%; background: #3a3a3c; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.kds-item.now .kds-n { background: var(--teal); color: #04161f; }
.kds-item .kds-name { font-size: 20px; }
.lvl-note { margin-top: 10px; font-size: 14px; color: #4a3a2a; font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- Espresso machine ---------- */
.esp-card { width: min(1040px, 97vw); }
.esp-hint { padding: 10px 16px; font-size: 20px; font-weight: 700; background: #fff7dc; border-bottom: 2px solid var(--ink); }
.esp-hint.warn { background: #ffe3dc; color: #8a2210; }
.esp-body { display: grid; grid-template-columns: 190px 1fr 1.1fr; gap: 14px; padding: 14px; overflow: auto; }
.esp-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.esp-h { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; opacity: .7; }
.esp-handle { display: grid; gap: 2px; text-align: left; padding: 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; font-size: 18px; cursor: pointer; }
.esp-handle small { font-size: 14px; opacity: .75; }
.esp-handle .esp-hi { font-size: 26px; }
.esp-handle.sel { background: var(--gold); box-shadow: 0 4px 0 var(--ink); }
.esp-handle.st-grinding, .esp-handle.st-pulling { background: #e8e1d3; }
.esp-handle.st-ready { background: #d9f2d6; }
.esp-station, .esp-group { border: 3px solid var(--ink); border-radius: 16px; background: #f3efe5; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.esp-station.busy { background: #e8e1d3; }
.esp-open { border: 2px dashed rgba(0,0,0,.35); border-radius: 12px; padding: 18px 8px; text-align: center; opacity: .6; font-size: 17px; }
.esp-open.on { opacity: 1; border-style: solid; background: #fff; font-weight: 700; }
.esp-bar { height: 22px; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.esp-bar span { display: block; height: 100%; width: 0; background: #7a5236; }
.esp-timer { font-size: 16px; text-align: center; opacity: .8; }
.esp-tampwrap { display: flex; gap: 14px; align-items: stretch; }
.esp-gauge { position: relative; width: 56px; height: 190px; border: 3px solid var(--ink); border-radius: 12px; background: linear-gradient(#f8d4cc 0 18%, #fff 18% 100%); overflow: visible; flex: none; }
.esp-zone { position: absolute; left: 0; right: 0; background: #7ed37a; border-top: 2px solid #2d7a2a; border-bottom: 2px solid #2d7a2a; }
.esp-fill { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(60,40,24,.75); height: 0; }
.esp-lbl { position: absolute; left: 64px; font-size: 13px; white-space: nowrap; opacity: .75; }
.esp-lbl.lo { bottom: 0; } .esp-lbl.hi { top: 0; } .esp-lbl.ok { top: 50%; font-weight: 800; color: #2d7a2a; transform: translateY(-50%); }
.esp-hold { flex: 1; min-height: 190px; margin-left: 64px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; font-size: 22px; font-weight: 800; touch-action: none; user-select: none; -webkit-user-select: none; }
.esp-hold small { display: block; font-size: 14px; font-weight: 600; opacity: .7; }
.esp-hold.down { background: var(--gold); }
.esp-groups { display: grid; gap: 12px; }
.esp-group.has { background: #fff; }
.esp-gh { font-weight: 800; }
.esp-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.esp-btn { padding: 12px 4px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; font-size: 22px; font-weight: 800; }
.esp-btn small { display: block; font-size: 12px; font-weight: 600; opacity: .7; }
.esp-btn:disabled { opacity: .35; }
.esp-cupfill { height: 18px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; position: relative; }
.esp-cupfill span { display: block; height: 100%; width: 0; background: #4a2c18; }
.esp-pour { display: grid; gap: 8px; }
.esp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-top: 3px solid var(--ink); background: #e9e2d4; }
@media (max-width: 900px) { .esp-body { grid-template-columns: 1fr; } }
