/* Melbourne Maze. The interface borrows from tram-stop signage: navy boards, green route bullets, amber LED text. */
:root { --navy: #101820; --ink: #0a0f14; --green: #78be20; --amber: #ffab1a; --paper: #f3f1ea; --grey: #8b949c; --line: rgba(255,255,255,.12);
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "Barlow", system-ui, sans-serif; --led: "Doto", "Courier New", monospace; }
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: var(--ink); color: var(--paper); font-family: var(--body); -webkit-user-select: none; user-select: none; touch-action: none; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
kbd { font: 600 .75em var(--cond); padding: .1em .45em; border: 1px solid currentColor; border-radius: 3px; opacity: .7; margin-left: .4em; letter-spacing: .04em; }
button { font: 700 1.15rem var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--paper); background: rgba(16,24,32,.82); border: 1px solid var(--line); border-left: 6px solid var(--grey); padding: .7em 1.3em .7em 1em; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
button:hover, button:focus-visible { border-left-color: var(--green); background: var(--navy); transform: translateX(4px); outline: none; }
button.primary { border-left-color: var(--green); background: var(--navy); }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; z-index: 5; }
.loading { align-items: center; justify-content: center; gap: 1rem; background: var(--navy); z-index: 20; transition: opacity .6s; }
.loading.done { opacity: 0; pointer-events: none; }
.loading h1 { font: 800 clamp(2.4rem, 7vw, 4.5rem)/.9 var(--cond); text-transform: uppercase; letter-spacing: .02em; }
.loading p { font: 700 1rem var(--led); color: var(--amber); letter-spacing: .08em; min-height: 1.3em; }
.bar { width: min(320px, 60vw); height: 6px; background: rgba(255,255,255,.1); }
.bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.roundel { width: 74px; height: 74px; border-radius: 50%; border: 9px solid var(--green); display: grid; place-items: center; }
.roundel i { width: 96px; height: 16px; background: var(--paper); flex: none; }

.title { justify-content: flex-end; padding: clamp(1.5rem, 6vw, 5rem); gap: 2rem; background: linear-gradient(90deg, rgba(10,15,20,.88) 0%, rgba(10,15,20,.55) 38%, rgba(10,15,20,0) 70%); }
.title h1 { font: 800 clamp(4rem, 13vw, 10.5rem)/.82 var(--cond); text-transform: uppercase; letter-spacing: -.01em; margin: .25em 0 .15em; text-shadow: 0 4px 40px rgba(0,0,0,.5); }
.title .tag { font: 700 clamp(1rem, 2vw, 1.35rem) var(--led); color: var(--amber); letter-spacing: .04em; }
.title nav, .sheet nav, .result nav { display: flex; flex-direction: column; gap: .5rem; width: min(340px, 100%); }
.credit { font-size: .72rem; opacity: .55; }

.sheet { padding: clamp(1rem, 5vw, 4rem); background: rgba(10,15,20,.9); backdrop-filter: blur(6px); overflow-y: auto; }
.sheet.small { align-items: center; justify-content: center; gap: 1.5rem; }
.sheet header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 4px solid var(--green); padding-bottom: .8rem; }
.sheet.small header { border: 0; margin: 0; }
.sheet h2 { font: 800 clamp(2rem, 5vw, 3.2rem) var(--cond); text-transform: uppercase; }
.sheet .x { border-left-width: 1px; font-size: .9rem; }
#levelList { list-style: none; padding: 0; display: grid; gap: 2px; max-width: 980px; }
#levelList li { display: grid; grid-template-columns: 3.4rem 1fr auto auto; gap: 1rem; align-items: center; padding: .65rem 1rem .65rem .6rem; background: rgba(255,255,255,.04); cursor: pointer; border-left: 6px solid transparent; transition: background .12s, border-color .12s; }
#levelList li:hover { background: rgba(255,255,255,.1); border-left-color: var(--green); }
#levelList li.locked { opacity: .35; cursor: default; }
#levelList li.locked:hover { background: rgba(255,255,255,.04); border-left-color: transparent; }
#levelList b { font: 700 1.3rem var(--cond); text-transform: uppercase; letter-spacing: .03em; display: block; }
#levelList small { opacity: .65; font-size: .85rem; }
#levelList .wx { font-size: 1.1rem; letter-spacing: .15em; }
#levelList .st { font: 700 1.1rem var(--led); color: var(--amber); letter-spacing: .1em; min-width: 4.2em; text-align: right; }
.bullet { display: inline-grid; place-items: center; min-width: 2.5em; height: 1.75em; padding: 0 .35em; font: 800 1.15rem var(--cond); color: #fff; background: var(--green); border-radius: 4px; }
.how { max-width: 640px; font-size: 1.05rem; line-height: 1.55; display: grid; gap: 1rem; }
.how ul { display: grid; gap: .55rem; padding-left: 1.1rem; } .how kbd { margin: 0 .15em 0 0; }

.brief { justify-content: flex-end; padding: clamp(1.5rem, 6vw, 5rem); gap: .7rem; background: linear-gradient(0deg, rgba(10,15,20,.92), rgba(10,15,20,0) 65%); }
.brief small, .result small { font: 700 .95rem var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.brief h2, .result h2 { font: 800 clamp(2.6rem, 8vw, 6rem)/.88 var(--cond); text-transform: uppercase; }
.brief p { max-width: 560px; font-size: 1.1rem; line-height: 1.45; }
.brief .go { font: 700 1rem var(--led); color: var(--amber); margin-top: .6rem; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* The stop's passenger information display. */
.pid { background: #050607; border: 1px solid #23282d; border-top: 5px solid var(--green); font-family: var(--led); color: var(--amber); padding: .55rem .8rem .6rem; min-width: 300px; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.pid header { font: 700 .68rem var(--cond); letter-spacing: .18em; text-transform: uppercase; color: var(--grey); margin-bottom: .35rem; }
.pid .row { display: flex; align-items: center; gap: .7rem; font-size: 1.35rem; font-weight: 900; }
.pid .dest { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.pid .mins { font-size: 1.7rem; text-align: right; min-width: 3.4em; }
.pid .mins.now { animation: blink .6s steps(2) infinite; }
.pid footer { font: 600 .82rem var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--paper); opacity: .8; margin-top: .35rem; }
.pid.big { display: inline-flex; align-items: center; gap: .8rem; font-size: 1.3rem; font-weight: 900; width: fit-content; text-transform: uppercase; }
.pid.big em { font: 600 .9rem var(--cond); color: var(--paper); font-style: normal; letter-spacing: .06em; opacity: .8; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#hud .pid { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 14px; }
.seasons { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; background: rgba(16,24,32,.82); border: 1px solid var(--line); padding: .5rem .7rem .55rem; width: 232px; }
.seasons header { font: 700 .68rem var(--cond); letter-spacing: .18em; text-transform: uppercase; color: var(--grey); margin-bottom: .35rem; }
#seasonRow { display: flex; gap: 3px; }
#seasonRow span { flex: 1; height: 34px; display: grid; place-items: center; font-size: 1.05rem; background: rgba(255,255,255,.06); position: relative; overflow: hidden; filter: grayscale(1) opacity(.55); }
#seasonRow span.on { filter: none; background: rgba(120,190,32,.22); outline: 1px solid var(--green); }
#seasonRow span.done { filter: grayscale(1) opacity(.25); }
#seasonRow span i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--green); }
#seasonNote { font: 600 .85rem var(--cond); letter-spacing: .03em; margin-top: .4rem; min-height: 1.1em; }
.way { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; background: rgba(16,24,32,.82); border: 1px solid var(--line); padding: .35rem .9rem .35rem .5rem; font: 700 1.05rem var(--cond); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.way i { width: 26px; height: 26px; background: var(--green); clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%); transition: transform .12s linear; }
.way b { font: 900 1.2rem var(--led); color: var(--amber); }
.way span { opacity: .8; font-weight: 600; }
.lungs { position: absolute; bottom: max(26px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(280px, 46vw); height: 8px; background: rgba(0,0,0,.5); border: 1px solid var(--line); }
.lungs i { display: block; height: 100%; width: 100%; background: var(--green); transition: background .2s; }
.lungs.low i { background: #e5484d; }
.toast { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); font: 700 1.25rem var(--cond); letter-spacing: .05em; text-transform: uppercase; background: var(--amber); color: var(--ink); padding: .35rem .9rem; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.toast.show { opacity: 1; }
#map { position: absolute; left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 190px; height: 190px; background: rgba(16,24,32,.85); border: 1px solid var(--line); border-bottom: 5px solid var(--green); }
#map.big { width: min(78vh, 78vw); height: min(78vh, 78vw); left: 50%; bottom: 50%; transform: translate(-50%, 50%); }
.street { position: absolute; left: 214px; bottom: max(14px, env(safe-area-inset-bottom)); font: 700 1rem var(--cond); letter-spacing: .08em; text-transform: uppercase; background: #1d4f91; color: #fff; padding: .2rem .7rem; border: 2px solid #fff; border-radius: 3px; }
.street:empty { display: none; }
#hail { position: fixed; inset: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 120px 30px rgba(220,235,255,.0); transition: box-shadow .2s; }
#hail.on { box-shadow: inset 0 0 140px 40px rgba(220,235,255,.55); }
.touch { display: none; }

.result { align-items: flex-start; justify-content: center; padding: clamp(1.5rem, 6vw, 5rem); gap: .8rem; background: linear-gradient(90deg, rgba(10,15,20,.92), rgba(10,15,20,.3)); }
.result.lost small { color: #e5484d; }
.result p { max-width: 520px; font-size: 1.1rem; line-height: 1.45; }
.stars { font: 900 2.6rem var(--led); color: var(--amber); letter-spacing: .2em; margin: .2rem 0 .8rem; }
.stars s { text-decoration: none; opacity: .2; }

/* Music player, bottom right. */
.music { position: fixed; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; max-width: min(360px, calc(100% - 28px)); background: rgba(16,24,32,.88); border: 1px solid var(--line); border-bottom: 5px solid var(--green); }
.music .eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; flex: none; }
.music .eq i { width: 3px; background: var(--green); animation: eq .9s ease-in-out infinite; }
.music .eq i:nth-child(2) { animation-delay: -.3s; } .music .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.music .mt { display: grid; min-width: 0; margin: 0 6px 0 8px; line-height: 1.15; }
.music .mt b { font: 700 1rem var(--cond); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music .mt small { font-size: .72rem; color: var(--grey); white-space: nowrap; }
.music button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: .8rem; text-align: center; letter-spacing: 0; flex: none; }
.music button:hover, .music button:focus-visible { background: rgba(255,255,255,.12); transform: none; }
.music.off { border-bottom-color: var(--grey); }
.music.off .eq i { animation: none; height: 3px; background: var(--grey); }
@media (prefers-reduced-motion: reduce) { .music .eq i { animation: none; height: 8px; } }

/* Perks, quests, myki money. */
.bal { float: right; font: 900 1rem var(--led); color: var(--amber); }
.sheet header .myki { margin-left: auto; margin-right: 1.2rem; text-align: right; line-height: 1; }
.myki small { display: block; font: 700 .68rem var(--cond); letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
.myki b { font: 900 1.9rem var(--led); color: var(--amber); }
.sheet .lead { max-width: 640px; margin-bottom: 1.2rem; opacity: .85; line-height: 1.5; }
#perkList { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; max-width: 980px; }
#perkList li { background: rgba(255,255,255,.05); border-top: 5px solid var(--green); padding: .9rem 1rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: start; }
#perkList .ic { font-size: 2rem; grid-row: span 2; line-height: 1; }
#perkList b { font: 700 1.3rem var(--cond); text-transform: uppercase; letter-spacing: .03em; }
#perkList p { font-size: .9rem; opacity: .8; line-height: 1.35; }
#perkList footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
#perkList .own { font: 700 .85rem var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
#perkList .own.has { color: var(--green); }
#perkList button { font-size: .95rem; padding: .45em .9em; border-left-width: 4px; }
#perkList button:disabled { opacity: .35; cursor: default; transform: none; border-left-color: var(--grey); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button, .chips span { font: 700 .95rem var(--cond); letter-spacing: .04em; text-transform: uppercase; padding: .35em .7em; background: rgba(16,24,32,.85); border: 1px solid var(--line); border-left: 4px solid var(--grey); color: var(--paper); }
.chips button.on { border-left-color: var(--green); background: rgba(120,190,32,.25); }
.chips button small { opacity: .6; margin-left: .4em; }
.chips.live { position: absolute; top: 118px; left: 14px; }
.chips.live span { border-left-color: var(--green); font-size: .85rem; }
.quests { position: absolute; top: 118px; left: 14px; width: 300px; background: rgba(16,24,32,.82); border: 1px solid var(--line); padding: .5rem .7rem .6rem; }
.quests header { font: 700 .68rem var(--cond); letter-spacing: .18em; text-transform: uppercase; color: var(--grey); margin-bottom: .3rem; }
.quests ol { list-style: none; padding: 0; display: grid; gap: .35rem; }
.quests li { display: grid; grid-template-columns: 1fr auto; gap: 0 .6rem; font: 600 .92rem var(--cond); letter-spacing: .03em; }
.quests li b { text-transform: uppercase; }
.quests li em { font: 900 .85rem var(--led); color: var(--amber); font-style: normal; }
.quests li small { grid-column: 1 / -1; font: 400 .74rem var(--body); opacity: .65; line-height: 1.25; }
.quests li.done { opacity: .45; } .quests li.done em { color: var(--green); }
.prompt { position: absolute; bottom: 104px; left: 50%; transform: translateX(-50%); font: 700 1.15rem var(--cond); letter-spacing: .05em; text-transform: uppercase; background: rgba(16,24,32,.9); border: 1px solid var(--line); border-left: 5px solid var(--green); padding: .4rem .9rem; white-space: nowrap; }
.prompt kbd { margin: 0 .5em 0 0; color: var(--amber); opacity: 1; }

.music .mt small kbd { margin: 0 .2em 0 0; padding: 0 .35em; font-size: .9em; }

.quests header { display: flex; justify-content: space-between; } .quests header kbd { margin: 0 .3em 0 0; }
#map { pointer-events: auto; cursor: pointer; } #map.big { z-index: 6; box-shadow: 0 20px 80px rgba(0,0,0,.6); }

/* Credit and feedback. */
.credit b { font: 700 .95rem var(--cond); letter-spacing: .1em; text-transform: uppercase; opacity: 1; color: var(--paper); }
.title .credit { opacity: .8; line-height: 1.7; }
.loading .by { font: 700 .8rem var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin-top: 1.2rem; }
.fb { display: grid; gap: 1.1rem; max-width: 620px; }
.fb fieldset { border: 0; padding: 0; }
.fb legend, .fb .field { font: 700 .8rem var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.fb legend { margin-bottom: .45rem; } .fb legend small, .fb .field small { opacity: .7; letter-spacing: .06em; }
.fb .field { display: grid; gap: .45rem; }
.fb input[type=text], .fb textarea { font: 400 1rem var(--body); color: var(--paper); background: rgba(255,255,255,.06); border: 1px solid var(--line); border-left: 4px solid var(--grey); padding: .65rem .8rem; -webkit-user-select: text; user-select: text; resize: vertical; text-transform: none; letter-spacing: 0; }
.fb input[type=text]:focus, .fb textarea:focus { outline: none; border-left-color: var(--green); background: rgba(255,255,255,.1); }
.chips.pick label { cursor: pointer; } .chips.pick input { position: absolute; opacity: 0; pointer-events: none; }
.chips.pick input:checked + span { border-left-color: var(--green); background: rgba(120,190,32,.25); }
.chips.pick input:focus-visible + span { outline: 2px solid var(--green); }
.chips.pick span { display: block; }
.fb .send { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#fbStatus { font: 600 1rem var(--cond); letter-spacing: .04em; } #fbStatus.good { color: var(--green); } #fbStatus.bad { color: #ff8a80; }

/* ---------- Phones and tablets ---------- */
.tapped { display: none; }
.sheet, .title { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.title { overflow-y: auto; }
html.is-touch .keyed, html.is-touch kbd { display: none; } html.is-touch .tapped { display: inline; }
html.is-touch .touch { display: block; }
html.is-touch .street { display: none; }
/* Touch controls: stick bottom left, sprint and board bottom right, pause and map up the right-hand side. */
html.is-touch #stick { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(26px, env(safe-area-inset-bottom)); width: 124px; height: 124px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: rgba(16,24,32,.25); pointer-events: auto; touch-action: none; }
html.is-touch #stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255,255,255,.45); }
html.is-touch .touch button { position: absolute; pointer-events: auto; touch-action: none; border-radius: 50%; padding: 0; text-align: center; background: rgba(16,24,32,.6); font-size: .95rem; letter-spacing: .04em; -webkit-tap-highlight-color: transparent; }
html.is-touch .touch button:hover { transform: none; }
html.is-touch #tSprint { right: max(22px, env(safe-area-inset-right)); bottom: max(30px, env(safe-area-inset-bottom)); width: 98px; height: 98px; border: 2px solid var(--green); }
html.is-touch #tSprint:active { background: rgba(120,190,32,.45); }
html.is-touch #tAct { right: calc(max(22px, env(safe-area-inset-right)) + 112px); bottom: max(30px, env(safe-area-inset-bottom)); width: 78px; height: 78px; border: 2px solid var(--amber); color: var(--amber); }
html.is-touch #tPause, html.is-touch #tMap { right: max(14px, env(safe-area-inset-right)); width: 46px; height: 46px; border: 1px solid var(--line); font-size: .75rem; }
html.is-touch #tPause { top: 96px; } html.is-touch #tMap { top: 150px; }
/* The map moves up out of the thumb's way; the music player shrinks to its buttons during play. */
html.is-touch #map { left: 50%; bottom: auto; top: max(10px, env(safe-area-inset-top)); width: 116px; height: 116px; transform: translateX(-50%); border-bottom-width: 3px; opacity: .92; }
html.is-touch #map.big { top: 50%; width: min(92vw, 92vh); height: min(92vw, 92vh); transform: translate(-50%, -50%); opacity: 1; }
html.is-touch .way { top: calc(max(10px, env(safe-area-inset-top)) + 124px); font-size: .9rem; padding: .25rem .7rem .25rem .4rem; }
html.is-touch .way i { width: 20px; height: 20px; } html.is-touch .way b { font-size: 1rem; }
html.is-touch .lungs { bottom: max(12px, env(safe-area-inset-bottom)); width: min(220px, 34vw); }
html.is-touch .toast { bottom: 40px; font-size: 1rem; white-space: normal; text-align: center; max-width: 70vw; }
html.is-touch .prompt { bottom: 150px; font-size: 1rem; }
html.is-touch .music { top: auto; bottom: calc(max(30px, env(safe-area-inset-bottom)) + 112px); right: max(14px, env(safe-area-inset-right)); padding: 3px; border-bottom-width: 3px; }
html.is-touch.playing .music .mt, html.is-touch.playing .music .eq, html.is-touch.playing .music #musPrev { display: none; }
html.is-touch:not(.playing) .music { bottom: max(14px, env(safe-area-inset-bottom)); }
html.is-touch .music .mt small { display: none; }
html.is-touch .pid { min-width: 0; max-width: 40vw; padding: .4rem .6rem .45rem; border-top-width: 4px; left: max(12px, env(safe-area-inset-left)) !important; }
html.is-touch .pid .row { font-size: 1.05rem; gap: .45rem; } html.is-touch .pid .mins { font-size: 1.25rem; min-width: 2.8em; } html.is-touch .pid footer { font-size: .7rem; } html.is-touch .pid header { display: none; }
html.is-touch .bullet { font-size: .95rem; }
html.is-touch .seasons { width: auto; max-width: 30vw; padding: .35rem .45rem; right: calc(max(14px, env(safe-area-inset-right)) + 56px); }
html.is-touch .seasons header, html.is-touch #seasonNote { display: none; }
html.is-touch #seasonRow span { height: 28px; min-width: 26px; font-size: .9rem; }
html.is-touch .quests { top: 84px; width: 190px; padding: .35rem .5rem .45rem; left: max(12px, env(safe-area-inset-left)); }
html.is-touch .quests li { font-size: .8rem; } html.is-touch .quests li small { display: none; }
html.is-touch .chips.live { top: 84px; left: max(12px, env(safe-area-inset-left)); }
html.is-touch .chips.live span { font-size: .72rem; padding: .25em .5em; }
html.is-touch button { padding: .75em 1.2em .75em .9em; }
html.is-touch #levelList li { grid-template-columns: 3rem 1fr auto; } html.is-touch #levelList .wx { display: none; }
/* Narrow screens (a phone held upright): give the board the width, tuck the seasons under it. */
@media (max-width: 620px) {
  html.is-touch .pid { max-width: calc(100vw - 150px); }
  html.is-touch .seasons { top: calc(max(14px, env(safe-area-inset-top)) + 70px); right: auto; left: max(12px, env(safe-area-inset-left)); max-width: 60vw; }
  html.is-touch #map { left: auto; right: max(12px, env(safe-area-inset-right)); transform: none; width: 104px; height: 104px; }
  html.is-touch #map.big { left: 50%; right: auto; }
  html.is-touch #tPause { top: 126px; } html.is-touch #tMap { top: 180px; }
  html.is-touch .way { top: calc(max(14px, env(safe-area-inset-top)) + 118px); left: max(12px, env(safe-area-inset-left)); transform: none; max-width: calc(100vw - 90px); overflow: hidden; }
  html.is-touch .quests, html.is-touch .chips.live { top: 168px; }
  .title h1 { font-size: clamp(3.2rem, 20vw, 6rem); } .brief h2, .result h2 { font-size: clamp(2.2rem, 13vw, 4rem); }
  .sheet header { flex-wrap: wrap; gap: .5rem; } #perkList { grid-template-columns: 1fr; }
}
/* Short screens (a phone on its side): the title and its menu have to share very little height. */
@media (max-height: 520px) {
  .title { justify-content: flex-start; gap: .8rem; padding: 1rem clamp(1rem, 5vw, 3rem); }
  .title h1 { font-size: clamp(2.4rem, 16vh, 4.5rem); margin: 0; } .title h1 br { display: none; }
  .title nav { display: grid; grid-template-columns: 1fr 1fr 1fr; width: min(640px, 100%); gap: .4rem; }
  .title nav button { font-size: .95rem; padding: .6em .7em; } .title .tag { font-size: .9rem; } .title .credit { font-size: .65rem; line-height: 1.4; }
  .brief, .result { padding: 1rem clamp(1rem, 5vw, 3rem); gap: .4rem; } .brief h2, .result h2 { font-size: clamp(1.8rem, 12vh, 3.2rem); } .brief p, .result p { font-size: .95rem; }
  .result nav { flex-direction: row; width: auto; } .stars { font-size: 1.8rem; margin: 0; }
  .sheet { padding: .8rem clamp(.8rem, 4vw, 2rem); } .sheet h2 { font-size: 1.7rem; } .sheet header { margin-bottom: .8rem; padding-bottom: .5rem; }
  html.is-touch .quests { max-height: 46vh; overflow: hidden; }
  html.is-touch #tSprint { width: 86px; height: 86px; } html.is-touch #stick { width: 112px; height: 112px; }
}
