/* The existing counter gets a single scrolling queue; no extra board row. */
.orders[data-mode="queue"] .order-queue{scroll-snap-type:x proximity;align-items:flex-end}
.orders[data-mode="queue"] .order-queue .order{min-width:86px;flex:0 0 calc((100% - 2*var(--counter-gap))/3)}
.orders[data-mode="queue"] .order-queue .paired-order{min-width:110px;flex-basis:calc((100% - var(--counter-gap))/2)}
.orders[data-mode="queue"] .order-shop{flex:0 0 66px}
.orders[data-mode="queue"] .counter-mode::after{content:none}
.counter-mode button{width:100%;min-height:44px;border:2px solid #97ac7c;border-radius:13px;background:linear-gradient(#fff7e4,#e4eacb);color:#768b57;font-size:11px;font-weight:800;box-shadow:0 2px 0 #617e4933;cursor:pointer}
.counter-mode button span{font-size:17px;margin-left:4px}
.queue-kind{position:absolute;top:2px;left:3px;z-index:2;background:#fff2d8e6;border:1px solid #d5bb85;border-radius:7px;padding:2px 5px;color:#9b7c4d;font-size:8px;line-height:10px;pointer-events:none}
.orders .patron-order .order-guest{bottom:calc(var(--order-card-h) - 1px)}
.orders .patron-order .guest-deliver-label{bottom:-2px}
.festival-queue-deliver{position:absolute;bottom:calc(var(--order-card-h) + 2px);left:0;right:0;height:var(--guest-size);min-height:44px;display:grid;grid-template-columns:1fr 36px;grid-template-rows:1fr 1fr;gap:1px 2px;align-items:center;padding:4px 6px;border:1px solid #b8c28f;border-radius:12px;background:#f4f4dce8;color:#89985f;cursor:pointer;font:inherit}
.festival-queue-deliver>span{grid-column:1/3;font-size:9px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.festival-queue-deliver i{width:28px;height:28px;grid-row:2;grid-column:2}
.festival-queue-deliver i>svg,.festival-queue-deliver .machine-art{width:100%;height:100%}
.festival-queue-deliver small{grid-row:2;grid-column:1;font-size:9px;font-weight:800}
.festival-queue-deliver.ready{border-color:#74964d;background:linear-gradient(#a8bf7e,#7e9b59);color:#fffce4;box-shadow:0 2px #526e3933}
.orders .extra-food-card.multiple-foods{gap:2px;padding:1px 3px}
.orders .multiple-foods .counter-food{min-width:44px}
.festival-prize-track{display:flex;gap:5px;align-items:stretch;margin:8px 0}
.festival-prize-track>div{flex:1;min-width:0;padding:5px 2px 7px;border:1px solid #dbc99f;border-radius:10px;background:#f4e9cd;text-align:center}
.festival-prize-track small{display:block;font-size:8px;color:#a08c65;line-height:12px}
.festival-prize-track .festival-prize-art{display:block;width:40px;height:41px;margin:3px auto}
.festival-prize-art>svg,.festival-prize-art .machine-art{width:100%;height:100%}
.festival-prize-track b{display:block;font-size:9px;color:#8d754d;line-height:13px}
.festival-prize-track .final-prize{border:2px solid #9eaf72;background:linear-gradient(#f8f2d6,#e3ebcb);box-shadow:0 2px #80955522}
.festival-rewards h4{font-size:12px;margin:10px 0 4px;color:#8d7651}
.festival-rewards>p{font-size:10px;line-height:1.7;color:#968363;margin:5px 0}
.festival-next-prize{display:flex;align-items:center;gap:9px;padding:9px;background:#ecf0d7;border:1px solid #b9c792;border-radius:13px;margin:8px 0}
.festival-next-prize .festival-prize-art{width:48px;height:49px;flex-shrink:0}
.festival-next-prize small{display:block;color:#8e9b6e;font-size:9px}.festival-next-prize b{font-size:12px;color:#758f53}.festival-next-prize p{font-size:9px;line-height:1.5;color:#9c8864;margin:4px 0 0}
#display-install{border:1px solid #809851;background:linear-gradient(#a4bc7d,#7e9b58);color:#fffbea;font-weight:800;min-height:48px}
#display-install:disabled{opacity:.6;box-shadow:none}
.install-step-card{background:#f2ebd5;border:1px solid #d8c69a;border-radius:14px;padding:13px;margin-top:12px;font-size:12px;line-height:1.8}
.install-step-card>b{font-size:14px;color:#788d55}.install-step-card ol{margin:8px 0;padding-left:21px}.install-step-card li{margin:5px 0}.install-step-card p{font-size:11px;color:#9c8766;margin:8px 0 0}
.install-chrome-link{display:block;text-align:center;min-height:44px;padding:9px 12px;margin-top:10px;border:1px solid #adbb8c;border-radius:10px;background:#e4edcf;color:#758852;font-weight:800;text-decoration:none}
.install-guide details{margin-top:14px;font-size:12px}.install-guide summary{min-height:44px;padding:8px 0;cursor:pointer}
.board-frame{position:relative}.board-effect-layer{position:absolute;inset:0;z-index:7;pointer-events:none;overflow:hidden;border-radius:inherit;contain:layout style}
.board-fx{position:absolute;display:block;pointer-events:none;will-change:transform,opacity}
.board-fx-flight{filter:drop-shadow(0 2px 2px #a58c5333);transform-origin:50% 50%}
.board-fx-flight>svg,.board-fx-flight>.machine-art{width:100%;height:100%;display:block}
.board-fx-ring{border:2px solid #f3d49c;border-radius:50%;background:radial-gradient(ellipse,#fff1cc44,transparent 60%);box-shadow:0 0 4px #fff4d79c}
.board-fx-spark{width:9px;height:9px;background:var(--spark-color,#f4c96b);clip-path:polygon(50% 0,63% 37%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%);filter:drop-shadow(0 1px #fff4d5)}
.board-fx-spark.round-spark{width:5px;height:5px;clip-path:none;border-radius:50%;background:#fff5c6}
@media(max-width:350px){.orders[data-mode="queue"] .order-shop{flex-basis:54px}.counter-mode button{font-size:10px}.queue-kind{font-size:7px;padding:1px 3px}.festival-prize-track{gap:3px}.festival-prize-track .festival-prize-art{width:32px;height:35px}}
@media(orientation:landscape) and (max-height:600px) and (min-width:520px){.orders[data-mode="queue"] .order-queue{scroll-snap-type:y proximity;justify-content:flex-start;overflow-y:auto}.orders[data-mode="queue"] .order-queue .order{flex:0 0 64px;min-height:64px;min-width:0}.orders[data-mode="queue"] .order-queue .paired-order{flex-basis:106px;min-height:106px}.orders[data-mode="queue"] .order-shop{flex:0 0 66px}.orders[data-mode="queue"] .order-shop .shop-entry{display:none}.orders[data-mode="queue"] .counter-mode{top:0;bottom:auto;height:44px}.orders .patron-order .order-guest{bottom:3px}.orders .paired-order .order-guest{bottom:31px}.queue-kind{display:none}.festival-queue-deliver{left:0;right:auto;bottom:3px;width:44px;height:97px;display:flex;flex-direction:column;padding:3px;justify-content:center}.festival-queue-deliver>span{font-size:8px;white-space:normal;line-height:11px}.festival-queue-deliver small{font-size:8px}.festival-queue-deliver i{width:28px;height:28px}.orders .multiple-foods .counter-food{min-width:0}}
@media(prefers-reduced-motion:reduce){.board-effect-layer{display:none}}

/* Keep the main screen for play; records and audio belong in settings. */
#save-status[hidden],#item-info[hidden]{display:none}
#save-status{justify-content:center;text-align:center;color:#a56343;font-size:10px;padding:3px 5px}
.item-panel.idle{border-color:transparent;background:transparent;box-shadow:none;justify-content:flex-end}

.home-heading{min-height:30px;height:30px;align-items:center}
.home-heading h1{margin:0}
.home-decor-preview{min-height:0}
.play-records{margin-top:15px;border-top:1px solid #d9caa8;padding-top:5px;font-size:12px}
.play-records summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#8e7a58}
.play-records summary::after{content:'＋';margin-left:auto}
.play-records[open] summary::after{content:'−'}
.play-records dl{margin:0;padding:5px 0 0}
.play-records dl>div{display:flex;justify-content:space-between;gap:10px;padding:6px 0}
.play-records dt{color:#9b896d}.play-records dd{margin:0;font-weight:700}
@media(orientation:portrait){.orders[data-mode="queue"]{right:14px}}

.visitor-album{margin-top:18px;border:1px solid #d6c19a;border-radius:14px;background:#f3ead4;padding:4px 9px}
.visitor-album summary{min-height:48px;cursor:pointer;font-size:13px;font-weight:800;color:#7d7656;align-content:center}
.visitor-album summary small{font-size:10px;font-weight:400;margin-left:7px;color:#9d8970}
.visitor-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:5px 0 8px}
.visitor-card{min-width:0;border:1px solid #ddccaa;border-radius:12px;background:#fff8e9;padding:7px 4px;text-align:center}
.visitor-card>span{display:block;height:110px;width:100%;margin-bottom:3px}
.visitor-card svg{display:block;width:100%;height:100%}
.visitor-card strong{display:block;font-size:12px;color:#78654e}.visitor-card small{display:block;font-size:8px;line-height:1.5;color:#9d8b70;margin-top:3px;word-break:keep-all}
@media(max-width:350px){.visitor-card>span{height:95px}.visitor-card strong{font-size:11px}.visitor-card small{font-size:7px}}

/* A calm, shared tray surface lets the illustrations describe their family. */
.board .cell{--tile-surface:linear-gradient(135deg,#f4e3c6,#efdbbd);padding:0}
.board .cell:nth-child(even){--tile-surface:linear-gradient(135deg,#eedbc0,#e7d0af)}
.board .cell,.board .cell.generator-cell{background:var(--tile-surface);box-shadow:inset 1px 1px 0 #fffcf08c,inset -1px -1px 0 #caa87c33}
.board .cell>.illustration,.board .cell>.machine-art,.board .cell>.assembly-art{width:84%;height:84%;flex-shrink:0;filter:drop-shadow(0 3px 2px #71503540)}
.board .cell>.machine-art svg,.board .cell>.assembly-art svg{width:100%;height:100%;filter:none}
.board .cell>.coin-illustration{filter:drop-shadow(0 1px 1px #71503526)}
.board .cell .machine-grade,.drag-ghost .machine-grade{display:none}
.board .cell.selected,.board .cell.drop{background:linear-gradient(135deg,#fff0d1,#f1dfbf);box-shadow:inset 0 0 0 2px #879f69,inset 1px 1px 0 #fffaf2}
.board .cell.match{background:linear-gradient(#f5efd4,#e3e8c7);box-shadow:inset 0 0 0 2px #a0b77b}
.board .cell.order-focus:not(.selected):not(.match){background:linear-gradient(#fff4d7,#f4e3b8);box-shadow:inset 0 0 0 2px #ccab65}
.board .cell:focus-visible{outline:2px solid #6e8f52;outline-offset:-3px}

.hud .coin-icon{background:none;border:0;box-shadow:none;font-size:0;width:36px;height:36px;top:50%;transform:translateY(-50%);left:-8px;text-shadow:none}
.hud .coin-icon>svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1px #7c55262b)}

/* Food and coin maximum-rank markers. Generators have no shimmer nodes. */
.max-rank-glints{position:absolute;inset:0;pointer-events:none;z-index:2;--max-delay:-.8s}
.max-rank-glints i{position:absolute;left:17%;top:18%;width:11px;height:11px;background:#fffefa;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%);filter:drop-shadow(0 0 1px #bca977);opacity:.3;animation:max-rank-twinkle 6s ease-in-out infinite;animation-delay:var(--max-delay)}
.max-rank-glints i:nth-child(2){left:auto;right:16%;top:65%;width:7px;height:7px;animation-delay:calc(var(--max-delay) - 2.4s)}
.cell:nth-child(even) .max-rank-glints{--max-delay:-2.9s}
@keyframes max-rank-twinkle{0%,48%,100%{opacity:.12;transform:scale(.65)}62%{opacity:.95;transform:scale(1)}78%{opacity:.2;transform:scale(.7)}}
@media(prefers-reduced-motion:reduce){.max-rank-glints i{animation:none;opacity:.8;transform:none}.max-rank-glints i:nth-child(2){opacity:.45}}

/* Equipment merge arrows remain still. */
.generator-merge-hint{position:absolute;bottom:3%;left:50%;translate:-50% 0;width:23px;height:13px;border-radius:8px;background:#fff8e9e8;box-shadow:0 1px 2px #5a6b4333;display:flex;align-items:center;justify-content:center;gap:6px;pointer-events:none;z-index:3}
.generator-merge-hint i{width:5px;height:5px;border-top:2px solid #6b874e;border-right:2px solid #6b874e;rotate:45deg}
.generator-merge-hint i+i{rotate:-135deg}

/* After 3 seconds idle, just one pair breathes in sync without moving the art. */
.idle-merge-ring{position:absolute;inset:3px;border:2px solid #bd873c;border-radius:inherit;box-shadow:0 0 0 1px #fff9df,inset 0 0 8px #f5d17d90;pointer-events:none;z-index:4;opacity:.8;animation:idle-merge-breathe 1.8s ease-in-out infinite}
@keyframes idle-merge-breathe{0%,100%{opacity:.65;scale:.96}50%{opacity:1;scale:1}}
@media(prefers-reduced-motion:reduce){.idle-merge-ring{animation:none;opacity:.85}}

/* Badges stay separate so selecting a cell preserves its painted SVG. */
.cell-marks{display:contents;pointer-events:none}

/* Generator hints are static even after selection or the idle timer. */
.board .generator-cell .idle-merge-ring{animation:none;opacity:.8}
.board .cell:not(.selected) .max-rank-glints i{animation:none}
.board .max-rank-glints i{opacity:.65}
.board .max-rank-glints i:nth-child(n+2){display:none}
