:root {
  --sand: #f3d9a4;
  --gold: #ffc94a;
  --ink: #2a1a08;
  --night: #140b05;
  --panel: rgba(28, 17, 8, 0.92);
  --line: rgba(255, 210, 120, 0.35);
  --good: #8cff9a;
  --bad: #ff7a6a;
  --warn: #ffcf5a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--sand); font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; font-weight: 500; word-break: keep-all; overflow-wrap: anywhere; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; font-weight: 700; color: var(--ink); background: linear-gradient(#ffe7a8, #f2b950); border: 2px solid #7a4a14; border-radius: 14px; padding: 10px 16px; cursor: pointer; box-shadow: 0 3px 0 #7a4a14; }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a4a14; }
button:disabled { opacity: 0.45; cursor: default; }
button.big { font-size: 1.15rem; padding: 14px 20px; }
button.party { background: linear-gradient(#b9f0ff, #4cb6e8); }
button.danger { background: linear-gradient(#ffc0b0, #e8604c); }
button.ghostbtn { background: rgba(255, 230, 170, 0.12); color: var(--sand); border-color: var(--line); box-shadow: none; }
button.back { margin-top: 14px; background: rgba(255, 230, 170, 0.15); color: var(--sand); border-color: var(--line); box-shadow: none; width: 100%; }
input, select { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid #7a4a14; background: #fff8e6; color: var(--ink); margin-top: 4px; }
label { display: block; margin: 10px 0; font-size: 0.95rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
.mini { font-size: 0.85rem; opacity: 0.85; line-height: 1.6; }
.msg { min-height: 1.4em; color: var(--warn); }
.ok { color: var(--good); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
b.g { color: var(--good); } b.y { color: var(--gold); }

/* 画面 */
.screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.screen.on { display: flex; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 20px; padding: 20px 22px; width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.panel.scroll { width: min(680px, 100%); }
.panel.center { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { margin: 0 0 10px; color: var(--gold); font-weight: 900; }
.panel h2 small { font-size: 0.75rem; color: var(--sand); opacity: 0.8; font-weight: 500; }
.panel h3 { margin: 14px 0 6px; color: var(--gold); font-size: 1rem; }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tabs button { flex: 1; background: rgba(255, 230, 170, 0.12); color: var(--sand); border-color: var(--line); box-shadow: none; }
.tabs button.on { background: linear-gradient(#ffe7a8, #f2b950); color: var(--ink); }
.grp { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }

/* タイトル */
#title { align-items: flex-end; justify-content: flex-start; padding: 24px; background: linear-gradient(90deg, rgba(20, 10, 4, 0.75), rgba(20, 10, 4, 0) 60%); }
.title-box { max-width: 460px; }
.kicker { margin: 0; font-size: 0.85rem; color: var(--warn); letter-spacing: 0.06em; }
h1 { margin: 4px 0 6px; font-size: clamp(2.4rem, 8vw, 4.2rem); line-height: 1; font-weight: 900; color: #ffe08a; text-shadow: 0 4px 0 #7a3a0a, 0 0 30px rgba(255, 170, 60, 0.6); }
h1 > span { display: block; font-size: 0.72em; color: #fff3d0; transform: rotate(-3deg); transform-origin: left; text-shadow: 0 4px 0 #6a2a0a, 0 0 20px rgba(255, 90, 60, 0.6); }
.lead { line-height: 1.7; text-shadow: 0 2px 4px #000; }
.col { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.note { font-size: 0.85rem; opacity: 0.85; text-shadow: 0 1px 3px #000; }

/* あそびかた */
.keys { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 8px 0; }
.keys td, .keys th { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; }
#how ul { padding-left: 1.2em; line-height: 1.7; }

/* ランキング */
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 2.5em 1fr auto 3em; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); align-items: center; }
.rank li.me { background: rgba(255, 201, 74, 0.18); border-radius: 8px; }
.rank b { color: var(--gold); } .rank em { font-style: normal; font-weight: 700; } .rank small { opacity: 0.7; }

/* 部屋 */
#partyCode { display: block; font-size: 2.6rem; letter-spacing: 0.12em; color: var(--gold); text-align: center; margin: 6px 0 10px; }
.party-join { border-top: 1px solid var(--line); margin-top: 14px; }
#partyMembers { margin: 12px 0; display: grid; gap: 6px; }
.member { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-weight: 700; border-left: 6px solid; }
.member.s0 { border-color: #ff8a3d; } .member.s1 { border-color: #3dc2ff; } .member.s2 { border-color: #ff5fa8; } .member.s3 { border-color: #8fe05a; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.hud-top { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 14px; align-items: flex-start; }
#clock { font-size: 1.8rem; font-weight: 900; color: #fff3d0; background: rgba(0, 0, 0, 0.35); padding: 2px 12px; border-radius: 10px; }
#clock.late { color: var(--bad); animation: pulse 1s infinite; }
#hudQuota { background: rgba(0, 0, 0, 0.35); padding: 4px 12px; border-radius: 10px; }
#hudQuota b { color: var(--gold); font-size: 1.2rem; }
#hudQuota small { display: block; font-size: 0.75rem; opacity: 0.85; }
#where { margin-left: auto; font-size: 0.85rem; background: rgba(0, 0, 0, 0.35); padding: 4px 10px; border-radius: 10px; }
#exitDir { display: flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, 0.35); padding: 2px 10px; border-radius: 10px; font-weight: 900; }
#exitDir::before { content: "🚪"; }
#exitDir i { font-style: normal; display: inline-block; font-size: 1.25rem; color: #9fffb0; }
#depart { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); font-size: 2rem; font-weight: 900; color: var(--bad); animation: pulse 0.5s infinite; }
#cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 240, 200, 0.7); }
#prompt { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); background: rgba(0, 0, 0, 0.55); padding: 6px 14px; border-radius: 10px; font-weight: 700; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#centerMsg { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -10px); width: min(92vw, 720px); text-align: center; font-size: 1.35rem; font-weight: 900; opacity: 0; transition: opacity 0.3s, transform 0.3s; color: #fff3d0; }
#centerMsg.show { opacity: 1; transform: translate(-50%, 0); }
#centerMsg.warn { color: var(--warn); } #centerMsg.dead { color: #cfd8ff; }
#feed { position: absolute; left: 12px; top: 84px; display: flex; flex-direction: column; gap: 4px; width: min(420px, 70vw); }
.feedline { background: rgba(0, 0, 0, 0.45); padding: 4px 10px; border-radius: 8px; font-size: 0.92rem; transition: opacity 1s; }
.feedline.fade { opacity: 0; }
.feedline.scream { color: #ffb0a0; font-weight: 900; font-size: 1.05rem; }
.feedline.talk { color: #fff3d0; }
.feedline.warn { color: var(--warn); } .feedline.good { color: var(--good); } .feedline.bad { color: var(--bad); } .feedline.dead { color: #cfd8ff; }
.hud-bottom { position: absolute; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.bars { display: grid; gap: 4px; width: 180px; }
.bar { display: grid; grid-template-columns: 4.2em 1fr; align-items: center; font-size: 0.75rem; }
.bar i { height: 9px; background: rgba(0, 0, 0, 0.5); border-radius: 5px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); }
.bar b { display: block; height: 100%; width: 100%; background: #ff6a5a; transition: width 0.2s; }
#stamBar { background: #ffd34a; } #stamBar.tired { background: #ff6a4a; animation: pulse 0.6s infinite; } #batBar { background: #8cd8ff; }
.bar b.low { animation: pulse 0.6s infinite; }
#inv { display: flex; gap: 6px; margin-left: auto; pointer-events: auto; }
.slot { cursor: pointer; }
.slot { width: 82px; height: 58px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 230, 170, 0.25); padding: 4px 6px; position: relative; font-size: 0.72rem; line-height: 1.2; }
.slot.sel { border-color: var(--gold); background: rgba(80, 50, 10, 0.6); }
.slot i { position: absolute; top: 2px; right: 6px; font-style: normal; opacity: 0.6; }
.slot b { display: block; margin-top: 10px; }
.slot small { color: var(--gold); }
#weight { font-size: 0.8rem; }
#hud.ghost { filter: hue-rotate(180deg) saturate(0.5); }
#clickHint { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.6); padding: 10px 18px; border-radius: 12px; font-weight: 700; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* しゃべる */
#talkWheel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 8px; width: min(440px, 92vw); }
#talkWheel button { text-align: left; font-size: 1rem; }
#talkWheel b { display: inline-block; width: 1.6em; color: #7a4a14; }

/* 重なる画面 */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); }
#shopList { display: grid; gap: 8px; }
#shopList button { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; }
#shopList small { grid-column: 1 / -1; font-weight: 500; font-size: 0.82rem; }
.report { width: min(720px, 100%); }
.rep-money { display: flex; gap: 10px; }
.rep-money div { flex: 1; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 8px 12px; }
.rep-money span { display: block; font-size: 0.8rem; opacity: 0.8; }
.rep-money b { font-size: 1.8rem; color: var(--gold); }
.rep-sold, .rep-dead { margin: 6px 0; padding-left: 1.2em; line-height: 1.6; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.award { display: flex; gap: 8px; align-items: center; background: rgba(255, 201, 74, 0.12); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.award i { font-style: normal; font-size: 1.8rem; }
.award b { display: block; color: var(--gold); }
.award span { display: block; font-weight: 900; font-size: 1.05rem; }
.award small { opacity: 0.8; }
.boss { margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: #fff3d6; color: var(--ink); font-weight: 700; }
.boss p { margin: 4px 0; }
.big-num { font-size: 1.2rem; } .big-num b { color: var(--gold); font-size: 2rem; }
.runs { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 10px 0; }
.runs td, .runs th { border-bottom: 1px solid var(--line); padding: 5px; text-align: left; }

/* スマホ */
#touch { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#lookArea { position: absolute; right: 0; top: 0; width: 60%; height: 100%; pointer-events: auto; }
#stick { position: absolute; left: 24px; bottom: 90px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.25); pointer-events: auto; }
#knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 230, 170, 0.6); }
.tbtns { position: absolute; right: 10px; bottom: 90px; display: grid; grid-template-columns: repeat(6, 38px); gap: 6px; pointer-events: auto; }
.tb { padding: 2px; font-size: 1rem; line-height: 1; border-radius: 12px; opacity: 0.85; min-height: 44px; grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tb span { font-size: 0.62rem; }
.tb.main { grid-column: span 2; min-height: 64px; font-size: 1.4rem; opacity: 0.95; }
.tb.main span { font-size: 0.8rem; font-weight: 900; }
.tb.off { opacity: 0.4; }
.tb.ready { background: linear-gradient(#c8ffb0, #5ccf5a); animation: ready 0.9s ease-in-out infinite; opacity: 1; }
@keyframes ready { 50% { transform: scale(1.08); box-shadow: 0 0 18px #9dff8a; } }
.tb.on { background: linear-gradient(#b9f0ff, #4cb6e8); }
#prompt b { color: #9dff8a; }
#guide:not(.hidden) ~ #feed { top: 104px; }
@media (pointer: coarse) {
  .hud-bottom { bottom: 6px; }
  .slot { width: 64px; height: 48px; }
  #feed { top: 70px; font-size: 0.8rem; }
  #cross { display: none; }
}
@media (max-width: 640px) {
  .hud-top { flex-wrap: wrap; gap: 6px; }
  #where { display: none; }
  #exitDir { margin-left: auto; }
  #clock { font-size: 1.3rem; }
  .bars { width: 130px; }
}

#loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--night); z-index: 50; font-size: 1.2rem; color: var(--gold); }

/* マイク */
button.mic { width: 100%; margin: 4px 0; background: rgba(255, 230, 170, 0.15); color: var(--sand); border-color: var(--line); box-shadow: none; }
button.mic.on, #hudMic.on { background: linear-gradient(#c8ffb0, #5ccf5a); color: var(--ink); }
button.mic.off, #hudMic.off { background: linear-gradient(#ffc0b0, #e8604c); color: var(--ink); }
#hudMic { position: absolute; right: 12px; top: 50px; pointer-events: auto; font-size: 1.3rem; padding: 6px 10px; border-radius: 50%; }

/* あそびかた（文字を へらした 版） */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.steps div { text-align: center; background: rgba(255, 201, 74, 0.12); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; position: relative; }
.steps div:not(:last-child)::after { content: "▶"; position: absolute; right: -9px; top: 40%; color: var(--gold); font-size: 0.7rem; }
.steps i { display: block; font-style: normal; font-size: 1.8rem; }
.steps b { display: block; color: var(--gold); }
.steps small { opacity: 0.8; }
.center-note { text-align: center; }
.danger-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 10px; }
.danger-list li { display: flex; gap: 8px; align-items: center; }
.danger-list i { font-style: normal; font-size: 1.4rem; }
.danger-list b { color: var(--gold); margin-right: 4px; }
#guide { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); background: rgba(255, 201, 74, 0.9); color: var(--ink); text-shadow: none; font-weight: 900; padding: 6px 16px; border-radius: 20px; white-space: nowrap; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 4px); } }

/* はじめの 絵の画面 */
#splash { padding: 0; background: #22170d url("images/title-adventure.webp") center / cover no-repeat; }
#btnEnter { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding: max(24px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); box-shadow: none; background: linear-gradient(0deg,rgba(7,17,20,.85),transparent 28%,rgba(12,17,18,.10) 70%,rgba(7,17,20,.45)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff8d7; }
#btnEnter:active { transform: none; }
#btnEnter:focus-visible { outline: 4px solid #77fff0; outline-offset: -8px; }
.splash-kicker { font-size: clamp(.8rem,2vw,1.2rem); letter-spacing: .15em; text-shadow: 0 2px 5px #081c24; margin-bottom: 14px; }
.splash-logo { font-size: clamp(2.5rem,7vw,6.4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.04em; color: #ffe99b; -webkit-text-stroke: 2px #57300e; paint-order: stroke fill; text-shadow: 0 5px 0 #64350e,0 8px 0 #182d30,0 12px 24px #0009; transform: rotate(-3deg); }
.splash-logo > span { display: block; color: #fff9e6; font-size: .86em; }
.splash-prompt { position: absolute; bottom: max(10%,56px); padding: 12px 30px; border: 1px solid #ffe8a77a; border-radius: 40px; background: #10292bdb; font-size: clamp(1rem,2.5vw,1.4rem); box-shadow: 0 5px 25px #0005; }
.splash-prompt small { display: block; font-size: .58em; font-weight: 500; margin-top: 3px; opacity: .8; }
.splash-credit { position: absolute; bottom: max(15px,env(safe-area-inset-bottom)); font-size: .72rem; letter-spacing: .12em; }
#title { overflow-y: auto; }
@media (max-width:600px) and (orientation:portrait) {
  #splash { background-size: auto 100%; background-position: 46% center; }
  .splash-logo { font-size: clamp(2.6rem,11vw,4rem); }
  .splash-kicker { font-size: .78rem; }
  #title { padding-bottom: max(20px,env(safe-area-inset-bottom)); }
}
@media (max-height:450px) { .splash-logo { font-size: clamp(2.2rem,8vh,3.5rem); } .splash-kicker { margin-bottom: 5px; } .splash-prompt { bottom: 35px; padding: 7px 24px; } }

/* ことばと よみがな */
.language-control { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: #fff5cf; }
.language-control select { width: auto; min-width: 130px; margin: 0; padding: 7px 10px; font-size: .85rem; background: #133335; color: #fff8de; border: 1px solid #cfae66; }
#splash > .language-control { position: absolute; z-index: 2; top: max(12px,env(safe-area-inset-top)); right: max(12px,env(safe-area-inset-right)); border-radius: 12px; padding: 8px 12px; margin: 0; background: #10292be8; }
#title .language-control { justify-content: flex-start; margin: 10px 0 0; }
html[data-language="ruby"] ruby { ruby-align: center; }
html[data-language="ruby"] rt { font-size: .55em; font-weight: 500; }
html[data-language="ruby"] .lead, html[data-language="ruby"] .mini, html[data-language="ruby"] .panel label { line-height: 2; }
html[data-language="ruby"] button { line-height: 1.8; }
#title .title-box { flex-shrink: 0; padding-top: 12px; }
@media(max-height:620px) { #title { align-items: flex-start; } }
@media(max-width:600px) {
  #splash > .language-control { font-size: .7rem; max-width: calc(100% - 24px); gap: 5px; }
  .language-control select { min-width: 112px; max-width: 160px; }
  #prompt { white-space: normal; text-align: center; font-size: .9rem; }
  .hud-top { gap: 5px; flex-wrap: wrap; }
  #where { max-width: 48vw; font-size: .72rem; }
  #tbUse span, #tbThrow span, #tbItem span { font-size: .8rem; }
}

#title .title-box { width: min(460px, 100%); max-width: 100%; min-width: 0; }
#title .lead, #title .note { white-space: normal; overflow-wrap: anywhere; }
.language-control, .language-control select { max-width: 100%; }

/* Compact planning display; never covers the centre or the mobile controls. */
#haulStatus {position:absolute;top:60px;left:12px;max-width:calc(100% - 24px);padding:6px 10px;border-radius:9px;background:#171a20bf;font-size:12px;line-height:1.5}
#crewBoard {position:fixed;right:12px;top:118px;max-width:min(320px,calc(100% - 24px));padding:10px;background:#10232dee;border:1px solid #70cedc;border-radius:12px;font-size:12px;line-height:1.7;pointer-events:auto;z-index:7}
#crewBoard small {display:block;max-width:260px;line-height:1.4} #crewBoard button {font-size:12px;padding:5px 9px;margin:5px 0}
#crewRows b {display:inline-block;max-width:110px;overflow:hidden;vertical-align:bottom;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){#haulStatus{top:100px;font-size:10px}#crewBoard{top:169px;font-size:10px;padding:7px;max-width:245px}#crewBoard button{font-size:11px}#crewBoard small{max-width:230px}}

#hud #guide ~ #feed{top:120px}
@media(max-width:600px){#hud #guide ~ #feed{top:310px;max-width:calc(100% - 24px);max-height:100px;overflow:hidden;font-size:11px}#centerMsg{top:43%}}

.friend-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0;padding:10px;border:1px solid var(--line);border-radius:10px}.friend-row b{overflow-wrap:anywhere;word-break:break-all}.friend-row button{font-size:12px;padding:6px 10px}#friendSearch{display:flex;flex-wrap:wrap;gap:8px;align-items:end}#friendSearch label{flex:1;min-width:160px}#friendsMsg{min-height:1.5em}

/* Preferences and keyboard/touch accessibility. */
#settings label{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 0}#settings label span{max-width:65%}#settings input[type=range],#settings select{width:32%;min-width:90px}#settings input[type=checkbox]{width:24px;height:24px}#settings{z-index:65}#practiceGuide{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(90vw,520px);z-index:70;pointer-events:auto}#practiceGuide p{font-size:16px}#performanceInfo{position:fixed;bottom:2px;left:8px;z-index:90;background:#000c;color:#d9ffb1;font:12px monospace;pointer-events:none}#performanceInfo[hidden]{display:none}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #6ce7b5;outline-offset:3px}.tbtns{transform:scale(var(--touch-scale,1));transform-origin:bottom right}.left-handed .tbtns{right:auto;left:16px;transform-origin:bottom left}.left-handed #stick{left:auto;right:25px}.left-handed #lookArea{left:0;right:auto}.screen .panel,.overlay .panel{font-size:calc(16px * var(--text-scale,1))}.reduce-motion *{scroll-behavior:auto!important}.reduce-motion .fade{animation:none!important}body{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}

#touch .tbtns{right:max(10px,env(safe-area-inset-right));bottom:max(90px,env(safe-area-inset-bottom))}.left-handed #touch .tbtns{right:auto;left:max(10px,env(safe-area-inset-left))}@media(max-width:600px) and (orientation:portrait){#stick{bottom:235px;width:110px;height:110px}.tbtns{max-width:calc(100vw - 24px)}#crewBoard{max-width:45vw;font-size:11px}}

#errorNotice{position:fixed;z-index:120;bottom:18px;left:50%;transform:translateX(-50%);max-width:90vw}#practiceGuide{pointer-events:none}#practiceGuide button{pointer-events:auto}

#settings label span{min-width:0;overflow-wrap:anywhere}#settings .panel{overflow-x:hidden}
