/* Portrait cabinet. The same illustrated materials frame the native kiosk screens. */
body.machine-shop {
  background: radial-gradient(ellipse at 50% 38%,#16474d 0,#0a252e 43%,#031017 92%);
  display:grid; place-items:center; height:100dvh; min-height:0; overflow:hidden;
  color:#f4fbf7; --accent:#d8fa35; --mint:#69edc5;
}
.machine-shop .cabinet {
  position:relative; width:min(100%, 56.25lvh, 540px); height:min(100dvh, 177.7778vw, 960px, var(--ime-height, 100dvh));
  display:flex; flex-direction:column; overflow:hidden; isolation:isolate;
  background:#022630 url("shop-kiosk/board-field.webp") center/100% 100%;
  box-shadow:0 0 0 1px #296566,0 0 56px #010c14;
}
body.machine-shop:has(.cabinet.ime-open) {height:var(--ime-height,100dvh);}
.machine-shop .screen { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#26645e transparent; padding:clamp(14px,3vh,30px) clamp(15px,4%,28px) max(24px,env(safe-area-inset-bottom)); }
.fascia { position:relative; flex:none; display:grid; place-items:center; min-height:clamp(66px,9svh,108px); background:url("header-fascia.webp") center/100% 100%; }
.fascia h1 { font:900 clamp(1.35rem,3.2svh,2.35rem)/1.12 var(--display); color:#fff; padding:0 60px; text-align:center; }
.return-key,.machine-key b {display:grid; place-items:center; background:url("shop-kiosk/selector-key.png") center/contain no-repeat; color:white; line-height:1; font-family:system-ui,sans-serif;}
.return-key {position:absolute; left:3%; width:44px; height:44px; font-size:2rem; padding-bottom:4px;}
.machine-shop .standby .screen {display:flex; flex-direction:column; position:relative; overflow:hidden; padding:0; background:#022a2c url("shop-kiosk/attract.webp") center/cover;}
.start-screen {display:flex; position:relative; flex:1; flex-direction:column; align-items:center; justify-content:space-between; padding:clamp(28px,6svh,76px) 5% 2.2svh; isolation:isolate;}
.start-screen::before {content:""; position:absolute; pointer-events:none; inset:0; z-index:-1; background:radial-gradient(ellipse at 50% 64%,transparent 51%,#32fed114 80%,transparent); animation:standby-light 3.4s ease-in-out infinite alternate;}
.neon-sign {display:grid; place-items:center; width:81%; aspect-ratio:3.24; background:url("shop-kiosk/marquee.png") center/100% 100%; animation:sign-glow 3s ease-in-out infinite alternate;}
.neon-sign img {width:70%;height:auto;}
.machine-shop button:not(.paper,.rack-card,.rack-close):not(#pages button),.start-key {border:1px solid #e2ffc3; border-bottom:3px solid #83a822; border-radius:8px; color:#101f17; font-weight:900; background:linear-gradient(#e9ff62,#cdf321); box-shadow:0 3px 0 #102d26,0 7px 14px #001a2280;}
.machine-shop button:not(:disabled):hover,.start-key:hover {filter:brightness(1.07);}
.start-key {display:flex; align-items:center; justify-content:center; gap:.65em; width:93%; padding:.65em .3em; font:900 clamp(1.25rem,3.2svh,2rem)/1.3 var(--display);}
.start-key img {height:1.65em; width:auto;}
.apk-download {align-self:center; display:flex; align-items:center; gap:6px; padding:7px 14px; margin-bottom:max(12px,env(safe-area-inset-bottom)); border-radius:20px; color:white; background:#012727e8; font-weight:700; font-size:.9rem;}
.machine-list {display:grid; gap:clamp(16px,3svh,32px);}
.machine-key,.machine-shop .product,.machine-shop #rewards .prize,.machine-shop .sheet .award-face {overflow:hidden; border:2px solid #88b8a4; border-radius:8px; background:linear-gradient(145deg,#16484b,#062732 74%); color:white; box-shadow:inset 0 0 0 3px #10353b,0 4px 0 #011419,0 9px 20px #00181c80;}
.machine-key {display:grid; grid-template-columns:34% 1fr 38px; align-items:center; gap:12px; padding-right:12px;}
.machine-key img {width:100%; height:clamp(94px,14svh,146px);object-fit:cover;}
.machine-key strong,.machine-key small {display:block; line-height:1.3;}
.machine-key strong {font:900 clamp(1.15rem,2.8svh,1.8rem)/1.25 var(--display);}
.machine-key small {color:#99e7c2; font-size:.92rem; margin-bottom:5px;}
.machine-key b {height:38px; font-size:1.6rem;}
.machine-shop .section-head {margin:0 0 14px; color:white;}
.machine-shop .section-head h2 {font-size:1.22rem;}
.machine-shop .section-icon {background:#0e584d; border:1px solid #5caa90; width:36px;height:36px;}
.machine-shop .shelf {display:grid; grid-template-columns:1fr; gap:clamp(20px,3.5svh,38px);}
.machine-shop .product {display:block; padding:0 0 14px;}
.machine-shop .poster-face {display:block;}
.machine-shop .viewer-banner-frame .art {max-height:180px; background:#062732;}
.machine-shop .card-body {padding:10px 15px 4px;}
.machine-shop .card-body h2,.machine-shop .hero h2 {color:white; font-size:clamp(1.12rem,2.4svh,1.6rem);margin:5px 0;}
.machine-shop .price,.machine-shop .viewer-counts [data-grades] {color:#ffe964;}
.machine-shop .viewer-counts,.machine-shop .hero #remaining {color:#d8e9df;}
.machine-shop .viewer-counts [data-remaining] {color:#78f1c4;}
.machine-shop .viewer-counts b {font-size:1.3rem;}
.machine-shop .product .actions,.machine-shop .product > small,.machine-shop .product > .state:not(:empty),.machine-shop .product > .stock-hold {margin:8px 15px 0; color:#dcf6ed;}
.machine-shop .product .actions button {min-width:118px;}
.machine-shop button.secondary {background:#cbe4de!important; color:#12372f!important;border-color:#92c1ad!important;}
.machine-shop button:disabled:not(.paper) {background:#526562!important;color:#cbd3cb!important;border-color:#697d73!important;box-shadow:none!important;}
.machine-shop .empty,.machine-shop .panel,.machine-shop .controls {background:#07363acc; color:#f4fbf7; border-color:#508777; box-shadow:0 5px 12px #001b2288;}
.machine-shop .empty p,.machine-shop .footnote,.machine-shop .state {color:#d5efe4;}
.machine-shop .screen :is(#errors,[role=alert]) {color:#ffa89c;}
.machine-shop #errors:empty,.machine-shop #end-note:empty,.machine-shop .footnote:empty {display:none;}
.machine-shop .hero {display:block; background:#07383b; border:1px solid #599989; border-radius:8px; padding:8px; color:white;}
.machine-shop .hero > img {width:100%;max-height:15svh;border-radius:4px;}
.machine-shop #rewards {display:grid; grid-template-columns:1fr; gap:10px;}
.machine-shop #rewards .prize,.machine-shop .sheet .award-face {padding:10px; margin:0 0 10px;}
.machine-shop #rewards .prize,.machine-shop .sheet .award-face > :is(label,div) {display:grid; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:12px; text-align:left;}
.machine-shop #rewards .prize img,.machine-shop .award-face img {width:64px;height:72px;object-fit:contain;}
.machine-shop .award-face :is(strong,small,b) {display:block;overflow-wrap:break-word;word-break:keep-all;}
.machine-shop .award-face b,.machine-shop #rewards .stamp {color:#78f1c4;}
.machine-shop .award-face input[type=checkbox] {width:24px;height:24px;}
.machine-shop .prize h3 {font-size:.89rem;}
.machine-shop .viewer-prize-art {height:clamp(62px,10svh,104px);}
.machine-shop .prize img {object-fit:contain;}
.machine-shop .grade-stock {display:block;}
.machine-shop .stock-tickets {margin:.2rem 0;}
.machine-shop .controls {margin:10px 0; padding:10px;}
.machine-shop #draw,.machine-shop #again,.machine-shop #confirm {display:block; margin:16px auto; min-width:65%;}
.machine-shop .quantity-dial {display:flex;align-items:center;justify-content:center;gap:8px;margin:20px 0;}
.machine-shop #purchase {text-align:center; padding:22px; border:3px ridge #8cb8a9;}
.machine-shop #purchase label {font:900 1.5rem var(--display);}
.machine-shop #quantity {width:4em;text-align:center;}
.machine-shop #quantity-back {margin:0 8px 8px 0;}
.cabinet[data-scene="quantity"] .screen,.cabinet[data-scene="payment"] .screen {background:url("shop-kiosk/checkout-field.webp") center/100% 100%;}
.cabinet:is([data-scene="quantity"],[data-scene="payment"],[data-scene="tickets"],[data-scene="reveal"]) :is(#board > .hero,.shop-product-mast,#detail) {display:none;}
.cabinet[data-scene="quantity"] #purchase,.cabinet[data-scene="payment"] .controls {margin-top:clamp(40px,14svh,155px);}
.machine-shop #pages {display:flex;flex-wrap:wrap; gap:4px;}
.machine-shop #pages button {min-height:34px; min-width:27px; padding:3px 7px;}
.ticket-tools,.tear-actions {display:flex; gap:8px; justify-content:center; margin:12px 0;}
.machine-shop #tickets {display:grid;grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px 4px;}
.machine-shop #tickets .paper {min-width:0;min-height:0;aspect-ratio:1.52; padding:0; background:#082034 url("shop-kiosk/ticket-front.webp") center/100% 100%;border:1px solid #d0d9ca;border-radius:1px;}
.machine-shop #tickets .paper[aria-pressed="true"] {outline:3px solid var(--accent); transform:translateY(-2px);}
.machine-shop #tickets .paper:disabled[aria-pressed="false"] {opacity:.46;}
.machine-shop #result {background:transparent;border:0;box-shadow:none;padding:0;}
.machine-shop .checkout-panel form:not(#verify-form) {margin:12px 0;}
.machine-shop .checkout-panel label {color:inherit;}
.machine-shop .checkout-panel input {max-width:100%;}
@keyframes sign-glow {to{filter:drop-shadow(0 0 9px #6effab96);transform:translateY(-3px)}}
@keyframes standby-light {to{opacity:.25;transform:scale(1.08)}}
@media(prefers-reduced-motion:reduce){.machine-shop *,.machine-shop *::before{animation:none!important;transition:none!important;}}
.quantity-actions {display:none;}
.quantity-actions:has(#choose-quantity:not([hidden])) {
  position:sticky; bottom:max(6px,env(safe-area-inset-bottom)); z-index:2;
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:stretch; gap:10px;
  margin:16px auto 10px; max-width:25rem; padding:6px 7px 8px;
  border:1px solid #527e70; border-radius:10px; background:#092f32;
  box-shadow:inset 0 1px 0 #77988c59,0 3px 8px #00181f88;
}
.machine-shop #choose-quantity {width:100%; min-width:0; min-height:50px; margin:0; padding:6px 10px; white-space:nowrap;}
.machine-shop #select {background:#092e35;color:white;border:2px solid #47736b;border-radius:6px;padding:10px 8px;box-shadow:0 4px 0 #021e20;}
.machine-shop #select > .section-head,.machine-shop #result > .section-head {display:none;}
.machine-shop #pages button {width:auto;}
.machine-shop #pages:has(button:only-child) {display:none;}

.account-key{display:block;width:fit-content;margin:14px auto 0;color:#ddfff2;background:#104a46;border:1px solid #6bb898;border-radius:6px;padding:8px 18px;font-weight:700}
