@font-face { font-family: Bangers; src: url(fonts/bangers.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Rubik; font-weight: 400; src: url(fonts/rubik-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Rubik; font-weight: 500; src: url(fonts/rubik-500.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Rubik; font-weight: 700; src: url(fonts/rubik-700.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Rubik; font-weight: 800; src: url(fonts/rubik-800.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Rubik; font-weight: 900; src: url(fonts/rubik-900.woff2) format('woff2'); font-display: swap; }
:root { --gold: #ffd23f; --red: #e8453c; --ink: #1c140d; --panel: rgba(20, 14, 10, 0.8); }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; background: #1c140d; color: #fff; font-family: Rubik, system-ui, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui .click, #ui button, #ui .btn, #ui input, #ui select, #ui a { pointer-events: auto; }
.hide { display: none !important; }
.bang { font-family: Bangers, Impact, sans-serif; letter-spacing: 0.04em; font-weight: 400; }
.panel { background: var(--panel); border: 2px solid rgba(255,255,255,0.18); border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(120% 90% at 50% 40%, #3a2a1c, #120c08); pointer-events: auto; }
.logo { font-size: clamp(64px, 14vw, 140px); line-height: .86; color: var(--gold); -webkit-text-stroke: 6px #7a1200; paint-order: stroke fill; text-shadow: 0 9px 0 #7a1200, 0 16px 28px rgba(0,0,0,.4); text-align: center; transform: rotate(-4deg); }
#loadMsg { font-weight: 700; letter-spacing: .14em; opacity: .8; font-size: 13px; text-transform: uppercase; }

/* phase strip */
#phases { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
#phases span { padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; letter-spacing: .14em; background: rgba(0,0,0,.45); color: rgba(255,255,255,.55); }
#phases span.on { background: var(--gold); color: #2a1600; box-shadow: 0 0 0 3px rgba(255,210,63,.35); }
#sceneTag { position: absolute; top: 12px; left: 12px; padding: 9px 14px; max-width: min(440px, 46vw); }
#sceneTag .t { font-family: Bangers; font-size: 24px; color: var(--gold); letter-spacing: .05em; line-height: 1.05; }
#sceneTag .v { font-size: 13px; opacity: .9; margin-top: 3px; font-weight: 500; }

/* box office */
#topCenter { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); text-align: center; }
.bill-label { font-weight: 800; font-size: 12px; letter-spacing: .18em; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.bill { font-family: Bangers; font-size: clamp(44px, 6.5vw, 64px); line-height: 1; color: #ffc93c; -webkit-text-stroke: 3px #4a2a00; paint-order: stroke fill; text-shadow: 0 5px 0 rgba(60,30,0,.55), 0 10px 24px rgba(0,0,0,.45); letter-spacing: .03em; }
.bill.bump { animation: bump .25s ease-out; }
@keyframes bump { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.combo { font-family: Bangers; font-size: 30px; color: var(--gold); -webkit-text-stroke: 2px #3a1a00; paint-order: stroke fill; min-height: 34px; }
.pips { display: flex; gap: 5px; justify-content: center; margin-top: 2px; }
.pips i { width: 22px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.3); }
.pips i.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* marks */
.marks { position: absolute; top: 12px; left: 12px; padding: 10px 14px; width: min(330px, 44vw); }
.marks h4 { font-family: Bangers; font-weight: 400; font-size: 21px; letter-spacing: .06em; color: var(--gold); margin-bottom: 4px; }
.mark { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; margin: 5px 0; line-height: 1.2; }
.box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid rgba(255,255,255,.7); flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.box.ok { background: #2ecc71; border-color: #2ecc71; color: #06280f; }
.box.bad { background: #e8453c; border-color: #e8453c; color: #fff; }
.mark .st { color: var(--gold); width: 40px; flex: none; font-size: 13px; }

/* clapboard */
#clap { position: absolute; top: 12px; right: 12px; width: 120px; }
#clap .top { height: 18px; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(-45deg, #111 0 12px, #f4f4f4 12px 24px); transform: rotate(-7deg); transform-origin: left bottom; }
#clap .body { background: #1b1b1b; border-radius: 0 0 8px 8px; padding: 5px 10px 7px; border: 2px solid #f4f4f4; border-top: none; }
#clap .lbl { font-size: 10px; font-weight: 800; letter-spacing: .2em; color: #bbb; }
#clap .num { font-family: Bangers; font-size: 32px; line-height: 1; }

/* name tags */
.tag { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 999px; background: rgba(15,12,10,.78); font-weight: 800; font-size: 12px; white-space: nowrap; }
.tag i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tag small { font-size: 9px; letter-spacing: .12em; opacity: .75; }
.tag.talk i { box-shadow: 0 0 0 3px #fff, 0 0 10px #fff; }

/* pops */
.pop { position: absolute; font-family: Bangers; font-size: 30px; color: #fff; -webkit-text-stroke: 2px #6b2d00; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0,0,0,.35); white-space: nowrap; animation: pop 1.6s ease-out forwards; transform: translate(-50%, -50%); }
.pop.crew { color: var(--gold); font-size: 36px; }
.pop.ovation { color: var(--gold); font-size: 42px; }
.pop.style { font-size: 24px; color: #bfe8ff; }
.pop.mark { color: #7dffa8; font-size: 30px; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6) rotate(-6deg); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(-4deg); } 25% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120%) rotate(-4deg); } }

/* shot list card */
#shot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-1.5deg); width: min(520px, 92vw); pointer-events: auto; }
.card { background: #fffdf5; color: #2a1d10; border-radius: 8px; padding: 18px 20px; box-shadow: 0 16px 40px rgba(0,0,0,.45); border: 10px solid #a8763e; }
.card h2 { font-family: Bangers; font-size: 38px; color: #c0392b; line-height: 1; letter-spacing: .03em; }
.card .sub { font-weight: 800; font-size: 12px; letter-spacing: .14em; opacity: .65; margin: 4px 0 10px; }
.card .note { font-style: italic; font-size: 15px; margin: 8px 0 12px; line-height: 1.35; }
.card .row { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 6px 0; font-weight: 500; }
.card .row .st { color: #d4a000; width: 44px; font-weight: 800; }
.card .go { margin-top: 14px; }

/* buttons */
.btn { font-family: Bangers; letter-spacing: .06em; border-radius: 14px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.35); cursor: pointer; border: none; padding: 10px 18px 6px; font-size: 26px; transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.btn.go { background: var(--gold); color: #2a1600; border: 3px solid #fff; }
.btn.alt { background: rgba(255,255,255,.14); color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn.dark { background: rgba(0,0,0,.55); color: #fff; border: 2px solid rgba(255,255,255,.4); }
.btn.sm { font-size: 18px; padding: 8px 14px 5px; }
.key { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 6px; background: #fff; color: #222; font-weight: 800; font-size: 12px; box-shadow: 0 3px 0 #999; margin: 0 2px; }

/* tray */
#tray { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; max-width: 96vw; }
#tray .head { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
#tray .head .bang { font-size: 20px; color: var(--gold); }
#tray .items { display: flex; gap: 10px; }
.titem { width: 112px; height: 74px; border-radius: 12px; border: 2px solid rgba(255,255,255,.3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 800; font-size: 12px; cursor: pointer; pointer-events: auto; background: rgba(255,255,255,.06); }
.titem.sel { border: 3px solid var(--gold); background: rgba(255,210,63,.18); box-shadow: 0 0 16px rgba(255,210,63,.45); }
.titem.used { opacity: .45; }
.titem .ico { width: 54px; height: 26px; border-radius: 6px; }

/* aim */
#aimBox { position: absolute; bottom: 14px; right: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
#aimBox .gauges { padding: 10px 14px; display: flex; gap: 16px; align-items: center; }
.gauge { width: 120px; }
.gauge .lab { font-size: 11px; font-weight: 800; letter-spacing: .14em; opacity: .8; }
.gauge .bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 4px; }
.gauge .bar div { height: 100%; background: linear-gradient(90deg, #ffd23f, #ff7a1a); }
#aimHelp { position: absolute; bottom: 14px; left: 14px; padding: 9px 14px; font-size: 13px; font-weight: 600; line-height: 1.5; }

/* touch */
#touch .tbtn { position: absolute; bottom: 22px; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-family: Bangers; font-size: 26px; letter-spacing: .06em; background: rgba(255,255,255,.16); border: 3px solid rgba(255,255,255,.7); text-shadow: 0 2px 4px rgba(0,0,0,.6); pointer-events: auto; }
#tTuck { left: 22px; } #tGrab { right: 22px; }
#touch .tbtn.hot { background: rgba(255,210,63,.88); color: #2a1600; border-color: #fff; text-shadow: none; box-shadow: 0 0 0 8px rgba(255,210,63,.3), 0 0 30px rgba(255,210,63,.7); }

/* cut */
#cutbar { position: absolute; inset: 0; }
#cutbar .lb { position: absolute; left: 0; right: 0; height: 9vh; background: #000; }
#cutbar .chips { position: absolute; top: 2vh; left: 18px; display: flex; gap: 8px; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
#cutbar .skip { position: absolute; top: 2vh; right: 18px; font-weight: 700; font-size: 14px; opacity: .9; pointer-events: auto; cursor: pointer; }
#meter { position: absolute; bottom: calc(9vh + 12px); left: 50%; transform: translateX(-50%); width: min(560px, 90vw); padding: 8px 14px 10px; }
.meterRow { display: flex; justify-content: space-between; font-weight: 800; font-size: 12px; letter-spacing: .14em; margin-bottom: 5px; }
.meterRow b { font-family: Bangers; font-size: 20px; color: var(--gold); letter-spacing: .04em; font-weight: 400; }
.meterBar { height: 14px; border-radius: 8px; background: rgba(255,255,255,.18); overflow: hidden; border: 2px solid rgba(255,255,255,.6); }
#meterFill { height: 100%; width: 0; background: linear-gradient(90deg, #ff9f1a, #ffd23f); transition: width .2s; }

/* wrap card */
#wrap { position: absolute; inset: 0; pointer-events: auto; }
#wrap .side { position: absolute; left: 0; top: 0; bottom: 0; width: min(470px, 100vw); background: radial-gradient(120% 80% at 30% 40%, #3a2a1c, #1c140dee); box-shadow: 6px 0 18px rgba(0,0,0,.45); display: flex; flex-direction: column; align-items: center; padding: 12px 18px; overflow-y: auto; }
.clip { margin: 0 auto -12px; width: 120px; height: 28px; border-radius: 8px; background: linear-gradient(#c9ced6, #8d949e); border: 2px solid #5d636b; position: relative; z-index: 2; }
.board { background: #a8763e; border-radius: 18px; padding: 14px 12px 12px; box-shadow: 0 14px 30px rgba(0,0,0,.45); width: 100%; max-width: 400px; transform: rotate(-1deg); }
.paper { background: #fffdf5; color: #2a1d10; border-radius: 6px; padding: 12px 14px 10px; font-size: 13px; }
.paper .ln { display: flex; justify-content: space-between; margin: 2px 0; }
.paper .tot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; border-top: 2px solid #2a1d10; padding-top: 5px; }
.paper .stars { text-align: center; font-size: 30px; letter-spacing: 6px; margin: 2px 0 0; }
.paper .stars .on { color: #f1b800; text-shadow: 0 2px 0 #8a6500; } .paper .stars .off { color: #ddd2bd; }
.paper .grade { font-style: italic; font-size: 12px; text-align: center; opacity: .8; margin-bottom: 6px; }
.paper .who { border-top: 1px dashed #b9a98f; padding-top: 6px; font-size: 12px; line-height: 1.5; }
.wbtns { width: 100%; max-width: 400px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wbtns .r { display: flex; gap: 6px; } .wbtns .r .btn { flex: 1; font-size: 16px; padding: 8px 0 5px; }
.small { font-size: 12px; opacity: .8; }

/* menus */
#menu { position: absolute; inset: 0; pointer-events: auto; display: flex; align-items: flex-start; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px 16px; background: linear-gradient(180deg, rgba(10,6,3,.35), rgba(10,6,3,.65)); overflow-y: auto; }
.mcard { width: min(560px, 100%); margin: auto; }
.mcard .logo { font-size: clamp(56px, 11vw, 110px); margin-bottom: 8px; }
.mcard .tagline { text-align: center; font-family: Bangers; font-size: 22px; letter-spacing: .08em; margin-bottom: 18px; color: #fff; -webkit-text-stroke: 1px #7a1200; paint-order: stroke fill; }
.mbtns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.mbtns .btn { font-size: 28px; }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-top: 10px; }
.scn { background: #fffdf5; color: #2a1d10; border-radius: 10px; padding: 10px; cursor: pointer; border: 3px solid transparent; }
.scn:hover { border-color: var(--gold); }
.scn.lock { opacity: .45; cursor: default; }
.scn .num { font-family: Bangers; font-size: 18px; color: #c0392b; }
.scn .nm { font-weight: 800; font-size: 13px; line-height: 1.2; min-height: 32px; }
.scn .st { color: #f1b800; font-size: 16px; letter-spacing: 2px; }
#toast { position: absolute; bottom: 18%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .3s; white-space: nowrap; max-width: 94vw; }
#toast.on { opacity: 1; }
#hint { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: rgba(15,12,10,.82); font-weight: 800; font-size: 16px; display: flex; gap: 8px; align-items: center; }
/* comic panels */
#comic { position: absolute; inset: 0; background: #f3e6c8; display: flex; align-items: center; justify-content: center; pointer-events: auto; padding: 18px; }
#comic .strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: min(1100px, 100%); }
#comic .pnl { background: #fff; border: 5px solid #1d1a16; border-radius: 6px; aspect-ratio: 3/4; position: relative; overflow: hidden; box-shadow: 6px 6px 0 #1d1a16; }
#comic .pnl canvas { width: 100%; height: 100%; display: block; }
#comic .bub { position: absolute; left: 8%; right: 8%; top: 5%; background: #fff; border: 3px solid #1d1a16; border-radius: 16px; padding: 8px 10px; font-family: Bangers; font-size: clamp(14px, 1.6vw, 20px); color: #1d1a16; letter-spacing: .03em; text-align: center; }
#comic .cap { position: absolute; left: 6%; right: 6%; bottom: 5%; background: #ffe9a8; border: 3px solid #1d1a16; padding: 6px 8px; font-family: Bangers; font-size: clamp(12px, 1.3vw, 17px); color: #1d1a16; box-shadow: 3px 3px 0 #1d1a16; }
#comic .skip { position: absolute; top: 12px; right: 14px; }
@media (max-width: 700px) {
  #comic .strip { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  #comic .pnl { aspect-ratio: 4/3; }
  .marks { top: auto; bottom: 130px; width: 60vw; font-size: 12px; }
  #sceneTag { max-width: 60vw; }
  #topCenter { top: 44px; }
  #wrap .side { width: 100vw; }
}
.vote { position: absolute; right: 12px; top: 80px; width: 290px; padding: 12px 14px; }
.vote .opt { position: relative; margin: 6px 0; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.1); font-weight: 700; font-size: 14px; padding: 6px 10px; display: flex; justify-content: space-between; }
.vote .opt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(145,70,255,.55); z-index: 0; transition: width .3s; }
.vote .opt b, .vote .opt em { position: relative; z-index: 1; font-style: normal; }
.twitch { color: #c9a7ff; font-weight: 800; font-size: 12px; letter-spacing: .12em; }
input.txt { font: inherit; padding: 10px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,.4); background: rgba(0,0,0,.35); color: #fff; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; width: 100%; }

/* comic panels */
#comic { position: fixed; inset: 0; background: rgba(20, 14, 8, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 60; padding: 16px; cursor: pointer; }
#comic.hide, #slam.hide { display: none; }
#comic .cpanel { width: min(880px, 100%, calc((100vh - 120px) * 4 / 3)); background: #fff; box-shadow: 10px 10px 0 #000; transform: rotate(-.6deg); }
#comic .cpanel svg { display: block; width: 100%; height: auto; }
#comic .cbar { display: flex; gap: 10px; align-items: center; color: #f4efe6; flex-wrap: wrap; justify-content: center; }
#comic .cbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pop-in { animation: popin .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes popin { from { transform: scale(.7) rotate(-4deg); opacity: 0; } to { transform: scale(1) rotate(-.6deg); opacity: 1; } }
#slam { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 61; background: radial-gradient(circle, rgba(246, 200, 52, .95), rgba(232, 69, 60, .95)); animation: slam .5s cubic-bezier(.2, 1.8, .4, 1); }
#slam .logo { font-size: min(22vw, 190px); line-height: .85; color: #fff; text-shadow: 8px 8px 0 #1e1c1a; text-align: center; -webkit-text-stroke: 4px #1e1c1a; }
#slam .tagline { margin-top: 18px; font-weight: 900; letter-spacing: .2em; color: #1e1c1a; font-size: 18px; text-align: center; }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* crew lobby */
.roster { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.rrow { display: flex; align-items: center; gap: 8px; background: rgba(42, 29, 16, .08); border-radius: 10px; padding: 8px 10px; font-size: 16px; }
.rrow i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid #1e1c1a; }
.invite { display: flex; gap: 6px; margin-top: 6px; }
.invite input, .txt { flex: 1; min-width: 0; font: 700 15px Rubik, sans-serif; padding: 9px 10px; border-radius: 10px; border: 3px solid #2a1d10; background: #fffaf0; color: #2a1d10; }
.txt { width: 100%; box-sizing: border-box; margin-top: 4px; }
.card input.txt, .invite input { background: #fffaf0; color: #2a1d10; letter-spacing: .03em; text-transform: none; border: 3px solid #2a1d10; }
@media (max-width: 700px) {
  .marks { top: 64px; bottom: auto; width: 56vw; font-size: 12px; padding: 8px 10px; }
  .marks h4 { font-size: 16px; }
  #aimHelp { display: none; }
  #aimBox { bottom: 10px; right: 10px; }
  #tags .tag { font-size: 11px; }
}
@media (max-width: 700px) { body[data-phase="ACTION"] .marks { display: none; } }

/* ================================================================ phones and tablets */
#ui button, #ui .btn, .titem, .tbtn, .scn { touch-action: manipulation; }
#c { touch-action: none; }
#tray .tools { display: flex; gap: 6px; }
.gauge .bar.click { cursor: pointer; touch-action: none; }
html.touch .kbd { display: none !important; }
html.touch .gauge .bar { height: 22px; border-radius: 11px; border: 2px solid rgba(255,255,255,.45); }
html.touch .gauge { width: 132px; }
html.touch #hint { white-space: normal; text-align: center; max-width: 88vw; justify-content: center; flex-wrap: wrap; }
html.touch #toast { white-space: normal; text-align: center; border-radius: 16px; }
#touch .tbtn { bottom: calc(22px + env(safe-area-inset-bottom)); }
#tTuck { left: calc(22px + env(safe-area-inset-left)); } #tGrab { right: calc(22px + env(safe-area-inset-right)); }
#aimBox { bottom: calc(14px + env(safe-area-inset-bottom)); right: calc(14px + env(safe-area-inset-right)); }
#tray { bottom: calc(12px + env(safe-area-inset-bottom)); }

/* narrow (phone portrait) */
@media (max-width: 700px) {
  #phases { display: none; }
  #clap { width: 84px; top: 8px; right: 8px; }
  #clap .num { font-size: 24px; } #clap .top { height: 13px; }
  #sceneTag { top: 8px; left: 8px; max-width: calc(100vw - 108px); padding: 7px 10px; }
  #sceneTag .t { font-size: 19px; } #sceneTag .v { font-size: 12px; }
  #topCenter { top: 8px; }
  .bill { font-size: 42px; }
  .marks { top: 8px; left: 8px; width: calc(100vw - 108px); }
  #shot { width: 94vw; max-height: 86dvh; overflow-y: auto; }
  #tray { width: 96vw; padding: 8px 10px; }
  #tray .head { flex-direction: column; align-items: flex-start; gap: 2px; }
  #tray .items { flex-wrap: wrap; gap: 8px; align-items: center; }
  .titem { width: 96px; height: 64px; font-size: 11px; }
  #touch .tbtn { width: 92px; height: 92px; font-size: 24px; }
  #cutbar .chips { left: 10px; gap: 5px; } #cutbar .chips .chip:nth-child(3) { display: none; }
  #cutbar .skip { right: 10px; padding: 6px 10px; background: rgba(255,255,255,.15); border-radius: 999px; }
  #wrap .side { width: 100vw; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .mcard .logo { font-size: 64px; }
  .scn { padding: 8px; } .scn .nm { font-size: 12px; min-height: 28px; }
  #comic { padding: 10px; }
}

/* short (phone landscape) */
@media (max-height: 520px) {
  #phases { display: none; }
  #clap { width: 76px; top: 6px; right: calc(8px + env(safe-area-inset-right)); }
  #clap .num { font-size: 20px; } #clap .top { height: 11px; } #clap .lbl { font-size: 8px; }
  #sceneTag { top: 6px; left: calc(8px + env(safe-area-inset-left)); max-width: 40vw; padding: 6px 10px; }
  #sceneTag .t { font-size: 17px; } #sceneTag .v { font-size: 11px; }
  .marks { top: 6px; left: calc(8px + env(safe-area-inset-left)); width: min(280px, 38vw); padding: 6px 10px; font-size: 11px; }
  .marks h4 { font-size: 15px; }
  body[data-phase="ACTION"] .marks { display: none; }
  #topCenter { top: 4px; } .bill { font-size: 36px; } .bill-label { font-size: 10px; } .combo { font-size: 22px; min-height: 24px; }
  #touch .tbtn { width: 84px; height: 84px; font-size: 22px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  #shot { width: min(560px, 80vw); max-height: 94dvh; overflow-y: auto; }
  #shot .card { padding: 10px 14px; } #shot h2 { font-size: 26px; }
  #tray { padding: 6px 10px; gap: 4px; } #tray .head .bang { font-size: 16px; }
  .titem { height: 56px; width: 96px; }
  #aimBox { gap: 6px; } #aimBox .gauges { padding: 6px 10px; }
  #fireBtn { font-size: 26px !important; padding: 8px 22px 4px !important; }
  #aimHelp { display: none; }
  #hint { top: 22%; font-size: 14px; padding: 7px 12px; }
  #wrap .side { width: 100vw; flex-direction: row; align-items: center; justify-content: center; gap: 16px; padding: 8px calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); overflow: hidden; }
  #wrap .clip, #wrap .side > .small { display: none; }
  #wrap .board { width: min(430px, 56vw); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 8px; transform: none; }
  #wrap .paper { font-size: 12px; padding: 8px 10px; }
  #wrap .wbtns { width: min(260px, 36vw); margin-top: 0; }
  #wrap .wbtns #wRetake { font-size: 24px !important; }
  #meter { bottom: calc(9vh + 4px); padding: 4px 10px 6px; }
  .mcard .logo { font-size: 56px; margin-bottom: 4px; } .mcard .tagline { font-size: 16px; margin-bottom: 8px; }
  .mbtns .btn { padding-top: 6px; padding-bottom: 3px; }
  #comic .cpanel { width: min(880px, calc((100dvh - 70px) * 4 / 3)); }
  #comic { gap: 6px; }
}
html, body { -webkit-touch-callout: none; }
#menu, #wrap .side, #wrap .board, #shot, #comic { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
