/* LAST STAR is one fixed screen: a canvas for the board, and real words and buttons laid over it in pixel art.
   One pixel of the page's own pictures (frames, icons, faces) is 2px; a sprite is shown at a whole number of times
   its size and never smoothed; the letters are Jersey 15 at 27px and Jersey 10 at 18.67px and twice that, the sizes
   they were drawn for. On a large screen hud.js makes the whole layer 2 or 3 times as large (zoom). */
:root {
  --ink: #1a1326; --ink-2: #3a2d4d; --paper: #f8ecd0; --paper-2: #d6bc8c; --paper-3: #a8895c; --night: #141627;
  --gold: #ffc93c; --gold-d: #c9801a; --red: #e5484d; --red-d: #9c2433; --blue: #4aa8ff; --go: #4fc060; --go-d: #24803f; --gray: #b9b3a6; --gray-d: #6c6578;
  --top: 0px; --bot: 0px;
  --t: 27px; --t-line: 28px;            /* what is read: Jersey 15 at its own size */
  --s: 18.667px;                        /* a small name: Jersey 10 at its own size */
  --b: 37.333px;                        /* a big word on a button: Jersey 10, twice */
}
/* frames: written by tools/star/px/ui.mjs */
:root {
  --f-panel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAD1BMVEUAAAAaEyb47NDWvIwaEyaaaJDJAAAABXRSTlMA////WSNlII8AAAAgSURBVHjaY2BgBAEGBkYmEGDETTODAEghRD0DCwgwAAAKzABg9PB4iQAAAABJRU5ErkJggg==);
  --f-btn: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAElBMVEUAAAAaEyb////47NCoiVwaEyY/yALlAAAABnRSTlMA/////1lFzOYjAAAAJElEQVR42mNgYAQBBgZGJhBgZGBkBgEsNAsIgBRC1DOwggADAA1gAHnKMOPHAAAAAElFTkSuQmCC);
  --f-btn-down: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAACVBMVEUAAAAaEybWvIymTbKwAAAAA3RSTlMA//9EUNYhAAAAGElEQVR42mNgYAQBBgZGJhBgJEjD1EMBAAoYAEeZi5lTAAAAAElFTkSuQmCC);
  --f-go: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAElBMVEUAAAAaEyam7opPwGAkgD8aEyYOWkx9AAAABnRSTlMA/////1lFzOYjAAAAJElEQVR42mNgYAQBBgZGJhBgZGBkBgEsNAsIgBRC1DOwggADAA1gAHnKMOPHAAAAAElFTkSuQmCC);
  --f-go-down: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAACVBMVEUAAAAaEyYkgD8xlo7HAAAAA3RSTlMA//9EUNYhAAAAGElEQVR42mNgYAQBBgZGJhBgJEjD1EMBAAoYAEeZi5lTAAAAAElFTkSuQmCC);
  --f-off: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAADFBMVEUAAABsZXi5s6YaEyZow+HcAAAABHRSTlMA//9ZjJhGVQAAAB5JREFUeNpjYGAEAQYGRiYQYMRNM8IUQigGZhBgAAAJ8ABRxciZkAAAAABJRU5ErkJggg==);
  --f-gold: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAElBMVEUAAAAaEyb/8KD/yTzJgBoaEyaFH18RAAAABnRSTlMA/////1lFzOYjAAAAJElEQVR42mNgYAQBBgZGJhBgZGBkBgEsNAsIgBRC1DOwggADAA1gAHnKMOPHAAAAAElFTkSuQmCC);
  --f-dark: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAADFBMVEUAAAAaEyY6LU0aEyYFw2hAAAAABHRSTlMA//9ZjJhGVQAAAB5JREFUeNpjYGAEAQYGRiYQYMRNM8IUQigGZhBgAAAJ8ABRxciZkAAAAABJRU5ErkJggg==);
  --f-white: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAD1BMVEUAAAAaEyb///+5s6YaEyaBtee5AAAABXRSTlMA////WSNlII8AAAAgSURBVHjaY2BgBAEGBkYmEGDETTODAEghRD0DCwgwAAAKzABg9PB4iQAAAABJRU5ErkJggg==);
  --f-tag: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAACVBMVEUAAAD/yTw6LU045Ig7AAAAA3RSTlMA//9EUNYhAAAAGElEQVR42mNgYAQBBgZGJhBgJEjD1EMBAAoYAEeZi5lTAAAAAElFTkSuQmCC);
  --f-lit-a: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEX/////yTwAAADEbc8iAAAAA3RSTlP//wDXyg1BAAAAIklEQVR42mNgYGBkYmRgYGBgAgEQDwQYIVwmJjgfJg9VDwAHcABD+TqaxQAAAABJRU5ErkJggg==);
  --f-lit-b: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAABlBMVEUAAAD/yTwuqJ2iAAAAAnRSTlMA/1uRIrUAAAAXSURBVHjaY2BgBAEGBkYGEGAkSEPVAwACaAAV9zTUUgAAAABJRU5ErkJggg==);
  --i-arrow: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAACVBMVEUAAAAaEyb/yTwI+PHgAAAAA3RSTlMA//9EUNYhAAAAJUlEQVR42mNgYAQBBgYGRiYmJiSaEUwzgrkQAag8AyOEYmAAUQAH+AA5EfQTlQAAAABJRU5ErkJggg==);
  --i-more: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUaEyYAAAD/yTxvGz8sAAAAA3RSTlP/AP9p7B++AAAAIklEQVR42mNgYGBgZGRkZGBgYgKxQDSIBaGZGJD5EHmIegAFPgAvW6JzbwAAAABJRU5ErkJggg==);
}
/* /frames */
@font-face { font-family: 'Jersey 15'; src: url(art/font/jersey-15.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'Jersey 10'; src: url(art/font/jersey-10.woff2) format('woff2'); font-display: block; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--paper); overflow: hidden; overscroll-behavior: none; }
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* no pinch and no double-tap zoom: a zoomed board cannot be played */
body { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; font: 400 var(--t)/var(--t-line) 'Jersey 15', ui-monospace, Menlo, Consolas, monospace; -webkit-font-smoothing: none; font-smooth: never; }
#view { position: absolute; left: 0; top: 0; display: block; touch-action: none; outline: none; image-rendering: pixelated; }
#safe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

#hud { position: fixed; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
:where(#hud, .guide) button { font: inherit; color: inherit; margin: 0; border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-appearance: none; appearance: none; pointer-events: auto; border-radius: 0; }
:where(#hud) button:disabled { cursor: default; }
#hud button:focus-visible, .guide button:focus-visible { outline: 4px solid #fff; outline-offset: 2px; }
#hud [hidden] { display: none !important; }
#hud canvas, .pic { image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }

/* a sprite cut from the sheet: hud.js sets its size and where in the sheet it is */
.pic { display: inline-block; flex: none; background-repeat: no-repeat; vertical-align: middle; }

/* a frame: a small picture whose corners stay and whose sides stretch */
.bubble, .card, .btn, .pick, .sign, .tag, .plate, .stat > span, .boss b, .bubble .who, .help .word, .cost, .sea i {
  box-sizing: border-box; border-style: solid; border-color: transparent; border-width: 4px 4px 6px; border-image: var(--f-panel) 2 2 3 2 fill / 4px 4px 6px; image-rendering: pixelated; }

/* what can be pressed looks like this, and nothing else does */
.btn { position: relative; min-width: 44px; min-height: 44px; padding: 0 10px 2px; border-image-source: var(--f-btn); color: var(--ink); line-height: 1; white-space: nowrap; }
.btn:active, .btn.down { border-image-source: var(--f-btn-down); padding-top: 3px; padding-bottom: 0; }
.btn.go { border-image-source: var(--f-go); color: #fff; text-shadow: 0 2px 0 var(--go-d); font: 400 var(--b)/1 'Jersey 10', monospace; }
.btn.go:active { border-image-source: var(--f-go-down); }
.btn.off, .btn:disabled, .btn.off:active { border-image-source: var(--f-off); color: var(--gray-d); text-shadow: none; padding-top: 0; padding-bottom: 2px; }

/* "look here": a frame that blinks in steps round the thing, and over a thing to tap an arrow that hops */
.lit { position: relative; }
.lit::after, .lamp, .spot.lit::after { content: ''; position: absolute; inset: -10px -8px; border: 6px solid transparent; border-image: var(--f-lit-a) 3 / 6px; image-rendering: pixelated; pointer-events: none; animation: lit 0.7s steps(1) infinite; }
@keyframes lit { 0% { border-image-source: var(--f-lit-a); inset: -10px -8px; } 50% { border-image-source: var(--f-lit-b); inset: -6px -4px; } }
.btn.lit::before, .pick.lit::before, .help.lit::before, .spot.lit::before, .plate.lit::before { content: ''; position: absolute; left: 50%; top: -34px; width: 14px; height: 16px; margin-left: -7px; background: var(--i-arrow) 0 0 / 14px 16px no-repeat; image-rendering: pixelated; pointer-events: none; animation: hop 0.6s steps(1) infinite; }
@keyframes hop { 0% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.card.lit::after { inset: 2px; }
@keyframes lit-in { 0% { border-image-source: var(--f-lit-a); } 50% { border-image-source: var(--f-lit-b); } }
.card.lit::after { animation-name: lit-in; }
/* the sign and a line of a card are lit inside their own edge, so the frame is not cut off and does not cover what is near */
.sign.lit::after, .card p.lit::after { inset: 0; animation-name: lit-in; }
.card p.lit { padding: 6px 8px; }

/* the top bar: each piece shows once its idea has been taught */
.bar { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--top) + 8px) 8px 0; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 44px 32px; gap: 4px 6px; align-items: center; }
.bar .menu { grid-column: 1; }
.bar .ask { grid-column: 3; }
.hearts { grid-column: 2; grid-row: 1; justify-self: center; display: flex; gap: 2px; }
.stat { grid-column: 1 / 4; grid-row: 2; display: flex; justify-content: center; gap: 6px; white-space: nowrap; }
.stat > span { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 6px 1px; border-width: 4px; border-image: var(--f-dark) 2 2 2 2 fill / 4px; color: #fff; line-height: 1; }
.stat .lit::after { inset: -8px; }
.stat .troves { padding: 0 4px 1px; }
.stat .troves .big { display: inline-flex; gap: 2px; }
.stat .troves .small { display: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column; gap: 1px; }
.stat .got .pic { transform: translateY(-3px); }
/* a screen narrower than 660px has no room for the bar at Jersey 15 (a far sea's strip is long): it is Jersey 10 at
   its own size. Under 540px a FAR VOYAGE's number is left out and the TREASURES are marks one pixel a pixel in two
   rows; under 370px there is no room for them (ASK lists them). */
@media (max-width: 659px) { .stat { gap: 4px; } .stat > span { gap: 4px; padding: 0 5px 1px; font: 400 var(--s)/1 'Jersey 10', monospace; } }
@media (max-width: 539px) { .stat .voyage { display: none; } .stat .troves .big { display: none; } .stat .troves .small { display: inline-grid; } }
@media (max-width: 369px) { .stat .troves { display: none; } }
.strip { display: inline-flex; gap: 2px; align-items: center; }
.strip .on { animation: blink 0.7s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* who is playing */
.plate { position: absolute; left: 50%; transform: translateX(-50%); min-height: 44px; padding: 0 12px 2px; border-image-source: var(--f-btn); color: var(--ink); line-height: 1; white-space: nowrap; }
.plate.his { border-image-source: var(--f-gold); }
.plate.low { margin-top: 56px; }

/* Everest's line: one bubble, always in the same place; its name stands on its top edge */
.bubble { position: absolute; left: 8px; right: 8px; display: grid; grid-template-columns: 68px 1fr; gap: 10px; align-items: center; min-height: 110px; padding: 6px 12px 6px 6px; color: var(--ink); text-align: left; }
.bubble .face { position: relative; width: 64px; height: 64px; border: 2px solid var(--ink); background-color: #ffd98a; align-self: start; margin-top: 4px; }
.bubble .mood { position: absolute; right: -8px; top: -8px; }
.bubble .who { position: absolute; left: 6px; top: -24px; height: 26px; padding: 0 6px; border-width: 4px 4px 0; border-image: var(--f-dark) 2 2 0 2 fill / 4px 4px 0; color: #fff; font: 400 var(--s)/18px 'Jersey 10', monospace; letter-spacing: 0; }
.bubble .say { display: block; }
.bubble .say .pic { margin: -4px 3px; }      /* a picture beside a word does not make its line taller */
.bubble .say .nm { white-space: nowrap; }
.bubble .on { position: absolute; right: 8px; bottom: 6px; width: 14px; height: 14px; }
.bubble.tap .on { background: var(--i-more) 0 0 / 14px 14px no-repeat; image-rendering: pixelated; animation: nod 0.7s steps(1) infinite; }
@keyframes nod { 50% { transform: translateX(4px); } }
.bubble.turn { border-image-source: var(--f-white); }

/* the row under the bubble: who can HELP, what the next WAVE brings, FAST, GO */
.row { position: absolute; left: 8px; right: 8px; height: 72px; display: flex; align-items: center; gap: 8px; }
.helps { display: flex; gap: 6px; flex: none; }
.help { position: relative; flex: none; width: 72px; height: 72px; }
.help canvas { display: block; width: 72px; height: 72px; }
.help .word { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); height: 22px; padding: 0 5px; border-width: 4px; border-image: var(--f-dark) 2 2 2 2 fill / 4px; color: #fff; font: 400 var(--s)/14px 'Jersey 10', monospace; }
.help.off .word { color: var(--gray); }
.sign { margin-left: auto; flex: 0 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 6px; border-width: 4px; border-image: var(--f-dark) 2 2 2 2 fill / 4px; color: #fff; }
.sign .f { position: relative; display: flex; align-items: flex-end; gap: 2px; }
.sign .f.fresh { outline: 2px solid var(--gold); outline-offset: 2px; }
.sign .n { line-height: 1; margin: 0 4px 0 2px; }
.row .go { flex: none; min-width: 92px; height: 64px; }
.row .go small { display: block; margin-top: 1px; font: 400 var(--s)/1 'Jersey 10', monospace; text-shadow: none; }
.row .fast { flex: none; min-width: 64px; height: 64px; }
.row .fast.down { border-image-source: var(--f-gold); padding-top: 3px; padding-bottom: 0; }

/* a SPOT takes the press where the board draws it */
.spot { position: absolute; }
.spot.lit::after { inset: 0; animation-name: lit-in; }
.spot.lit::before { top: -22px; }
.tag { position: absolute; transform: translate(-50%, -100%); height: 34px; padding: 0 8px 1px; border-width: 4px; border-image: var(--f-tag) 2 2 2 2 fill / 4px; color: #fff; line-height: 26px; white-space: nowrap; }
.hand { position: absolute; left: 0; top: 0; margin: 0 0 0 -9px; pointer-events: none; }
.hand.ghost { opacity: 0.85; }

/* the BOSS's name and what is left of it */
.boss { position: absolute; left: 50%; transform: translateX(-50%); width: min(78%, 420px); display: grid; gap: 2px; justify-items: center; pointer-events: none; }
.boss b { font-weight: 400; height: 34px; padding: 0 8px 1px; border-width: 4px; border-image: var(--f-dark) 2 2 2 2 fill / 4px; color: #fff; line-height: 26px; white-space: nowrap; }
.boss .left { position: relative; display: block; box-sizing: border-box; width: 100%; height: 18px; border: 4px solid var(--ink); background: var(--ink-2); }
.boss .left i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); box-shadow: inset 0 4px 0 #ff9c9c, inset 0 -2px 0 var(--red-d); }
.boss .left u { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--ink); left: 33.33%; }
.boss .left u + u { left: 66.66%; }
/* while the boss's head is under it: to one side, or seen through */
.boss.to-l { left: 8px; transform: none; }
.boss.to-r { left: auto; right: 8px; transform: none; }
.boss.thin { opacity: 0.4; }

/* the light on a thing of the board, and a picture held up over it */
.lamp { inset: auto; animation-name: lit-in; }
.peek { position: absolute; pointer-events: none; }

/* a card over the board: the world holds while one is open */
.shade { position: absolute; inset: 0; background: rgba(20, 22, 39, 0.3); pointer-events: auto; }
.card { position: absolute; padding: 6px 8px 8px; color: var(--ink); pointer-events: auto; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.card h2 { margin: 0 4px 4px; min-height: 44px; display: flex; align-items: center; font: 400 var(--b)/1 'Jersey 10', monospace; }
.card .x { position: absolute; right: 6px; top: 6px; height: 44px; z-index: 1; }
.card .x ~ h2, .card .x ~ .head { margin-right: 80px; }
.card .head { display: flex; align-items: center; gap: 10px; margin: 0 4px 6px 2px; min-height: 48px; }
.card .head b, .pick b, .card p b { font-weight: 400; }
.card .head b { display: block; font: 400 var(--b)/1 'Jersey 10', monospace; margin-bottom: 2px; }
.card .head span.l { display: block; }
.card p { margin: 2px 4px 8px; }
.card p b { display: block; color: #8a3a12; }
.card h3 { margin: 12px 4px 2px; font: inherit; color: #8a3a12; }
.pick { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 0 10px; align-items: center; width: 100%; min-height: 72px; margin-top: 6px; padding: 4px 8px 4px 6px; border-image-source: var(--f-btn); color: var(--ink); text-align: left; }
.pick:active { border-image-source: var(--f-btn-down); }
.pick .art { grid-row: 1 / span 3; display: flex; align-items: center; justify-content: center; min-width: 56px; align-self: start; padding-top: 2px; }
.pick .art .pic + .pic { margin-left: -18px; margin-top: 10px; }
.pick b { grid-column: 2; align-self: center; font: 400 var(--b)/1 'Jersey 10', monospace; padding: 4px 0 2px; }
.pick b.long { font: 400 var(--t)/1 'Jersey 15', monospace; padding-top: 6px; }
.pick .l { grid-column: 2 / 4; }
.pick .cost { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 1px; border-width: 4px; border-image: var(--f-gold) 2 2 2 2 fill / 4px; line-height: 1; white-space: nowrap; }
.pick.off, .pick.off:active { border-image-source: var(--f-off); color: var(--gray-d); }
.pick.off .art { filter: grayscale(1); opacity: 0.75; }
.pick.off .cost { border-image-source: var(--f-off); }
.pick .why { grid-column: 2 / 4; color: var(--red-d); }
/* on the card of an empty SPOT a kind's lines run the whole width under its picture, so three kinds fit on a phone */
.card.spot .pick .art { grid-row: 1; }
.card.spot .pick .l, .card.spot .pick .why { grid-column: 1 / -1; }
.card .l.note { color: #8a3a12; }
.card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card .acts .btn { flex: 1 1 120px; min-height: 56px; }
.card .foot { color: #6b5a48; }
.card.page { -webkit-user-select: text; user-select: text; }
.card.title { border: 0; border-image: none; background: none; padding: 0; overflow: visible; text-align: center; }
.card.title .logo { display: block; margin: 0 auto 4px; animation: hop 1.2s steps(1) infinite; }
.card h1 { margin: 0 0 18px; font: 400 112px/0.78 'Jersey 10', monospace; letter-spacing: 0; word-spacing: 100vw; text-align: center; color: var(--gold);
  text-shadow: 6px 0 var(--ink), -6px 0 var(--ink), 0 6px var(--ink), 0 -6px var(--ink), 6px 6px var(--ink), -6px 6px var(--ink), 6px -6px var(--ink), -6px -6px var(--ink), 0 12px var(--ink), 6px 12px var(--ink), -6px 12px var(--ink); }
.card.title .acts, .card.sure .acts, .card.lost .acts, .card.map .acts, .card.end .acts { justify-content: center; }
.card.title .acts { width: min(100%, 300px); margin: 0 auto; }
.card.title .acts .btn { flex: 1 1 100%; min-height: 72px; }
.card.title .acts .btn:not(.go) { min-height: 56px; }
/* the way back to the rest of the site, under the first screen */
.home { position: fixed; left: 50%; bottom: calc(var(--bot) + 6px); transform: translateX(-50%); display: flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: #fff; text-decoration: none; text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink), 0 4px var(--ink); }
.home[hidden] { display: none; }
.home:focus-visible { outline: 4px solid #fff; outline-offset: 2px; }
/* a phone on its side: the name beside the buttons, so the whole first screen is on the screen */
@media (max-height: 500px) {
  .card.title { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 24px; }
  .card.title .logo { grid-area: 1 / 1; }
  .card.title h1 { grid-area: 2 / 1; margin: 0 0 12px; font-size: 80px; }
  .card.title .acts { grid-area: 1 / 2 / 3 / 3; width: 220px; margin: 0; }
}
.card.menu .acts .btn { flex: 1 1 100%; }
.card.menu { padding-top: 56px; }
/* the map: the five SEAS one under the other, and home at the end */
.card .seas { display: grid; gap: 4px; margin: 6px 4px 8px; }
.card .sea { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--gray-d); }
.card .sea i { flex: none; width: 36px; height: 36px; border-width: 4px; border-image: var(--f-off) 2 2 2 2 fill / 4px; font: 400 var(--b)/26px 'Jersey 10', monospace; text-align: center; color: var(--gray-d); }
.card .sea.done { color: var(--ink); }
.card .sea.done i { border-image-source: var(--f-go); color: #fff; }
.card .sea.next { color: var(--ink); }
.card .sea.next i { border-image-source: var(--f-gold); color: var(--ink); }
.card .sea.home i { border: 0; border-image: none; display: flex; align-items: center; justify-content: center; }
/* a page of the story: a picture, and a tap turns it */
.scene { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background: var(--night); cursor: pointer; pointer-events: auto; }
.scene canvas { display: block; position: absolute; left: 0; top: 0; }

.wide .bubble { right: auto; width: min(54%, 640px); }
.wide .row { left: auto; width: min(44%, 560px); justify-content: flex-end; }
.wide .sign { margin-left: 0; }
/* a phone on its side: the top bar in one row, the BOSS's name beside its bar, who plays at the left of the board */
.short .bar { grid-template-columns: auto auto 1fr auto; grid-template-rows: 44px; }
.short .bar .ask { grid-column: 4; }
.short .stat { grid-column: 3; grid-row: 1; gap: 4px; }
.short .stat > span { gap: 4px; padding: 0 5px 1px; font: 400 var(--s)/1 'Jersey 10', monospace; }   /* room for VOYAGE beside SEA */
.short .bubble { min-height: 94px; }
.short .boss { grid-template-columns: auto 1fr; align-items: center; gap: 6px; width: min(42%, 400px); }
.short .boss.to-l { left: 150px; }
.short .plate { left: 8px; transform: none; }
.short .plate.low { margin-top: 0; }
.short .card .c1, .short .card .c2 { min-width: 0; }
.short .card.end, .short .card.lost, .short .card.map { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; align-items: start; }
.short .card.gift, .short .card.treasure, .short .card.spot, .short .card.across { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); column-gap: 8px; align-items: stretch; padding-top: 4px; padding-bottom: 4px; }
.short .card.gift > :not(.pick), .short .card.treasure > :not(.pick), .short .card.spot > :not(.pick), .short .card.across > :not(.pick) { grid-column: 1 / -1; }
/* each pick a column: its picture beside its name and price, what it does under them in the small type */
.short .card.gift .pick, .short .card.treasure .pick, .short .card.spot .pick, .short .card.across .pick { min-width: 0; min-height: 0; align-content: start; grid-template-columns: auto minmax(0, 1fr); gap: 0 6px; margin-top: 4px; padding: 4px 6px; }
.short .card.gift .pick .art, .short .card.treasure .pick .art, .short .card.spot .pick .art, .short .card.across .pick .art { grid-row: 1 / span 2; min-width: 40px; }
.short .card.spot .pick .cost, .short .card.across .pick .cost { grid-column: 2; grid-row: 2; justify-self: start; height: 28px; font: 400 var(--s)/1 'Jersey 10', monospace; }
.short .card.gift .pick .l, .short .card.treasure .pick .l, .short .card.spot .pick .l, .short .card.spot .pick .why, .short .card.spot > p, .short .card.across .pick .l, .short .card.across .pick .why, .short .card.across > p { grid-column: 1 / -1; font: 400 var(--s)/18px 'Jersey 10', monospace; }
.short .card.gift .pick b, .short .card.treasure .pick b, .short .card.spot .pick b, .short .card.across .pick b { font: 400 var(--t)/1 'Jersey 15', monospace; padding: 2px 0 0; }
.short .card.spot > p { margin: 0 4px 2px; }
.short .card.spot .pick .art .pic + .pic { margin-left: -14px; margin-top: 8px; }
.short .card .c2 > .acts:first-child, .short .card .c2 > .pick:first-child { margin-top: 0; }
.short .card .sea { min-height: 30px; }
.short .card.menu .acts .btn { flex: 1 1 30%; }
.short .card .sea i { width: 30px; height: 30px; line-height: 20px; }

/* MOM aims: while her ring is on the board a tap anywhere is hers */
.aimpad { position: absolute; inset: 0; pointer-events: auto; cursor: crosshair; touch-action: none; }
.help.down { outline: 4px solid var(--gold); outline-offset: -2px; }
/* BIG WAVE, over the board where no SPOT is */
.bigwave { position: absolute; left: 50%; box-sizing: border-box; height: 56px; padding: 0 16px 2px; border: 4px solid transparent; border-width: 4px 4px 6px; border-image: var(--f-dark) 2 2 3 2 fill / 4px 4px 6px;
  image-rendering: pixelated; color: var(--gold); font: 400 var(--b)/44px 'Jersey 10', monospace; white-space: nowrap; text-shadow: 0 3px 0 var(--gold-d); pointer-events: none; }
.bigwave.going { opacity: 0.5; }
/* STARS: three places, gold for each one a SEA gave, filling one by one */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.stars .st { position: relative; display: inline-flex; }
.stars .gold { position: absolute; left: 0; top: 0; }
.stars .st.pop .gold { animation: hop 0.3s steps(1) 1; }
.card .stars.won { display: flex; justify-content: center; gap: 8px; margin: 4px 4px 8px; }
.card .sea .stars { margin-left: auto; }
.card .sea .stars.best { opacity: 0.55; }
.card .seastars { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: 4px 4px 8px; }
.card .seastars i { margin-right: 4px; font-style: normal; color: #8a3a12; }

@media (prefers-reduced-motion: reduce) {
  .stars .st.pop .gold { animation: none; }
  .lit::after, .lamp, .spot.lit::after, .btn.lit::before, .pick.lit::before, .help.lit::before, .spot.lit::before, .plate.lit::before, .bubble.tap .on, .strip .on, .card.title .logo { animation: none; }
  .stat .got .pic { transform: none; }
}

/* HOW TO PLAY: a plain page over the game. Without JavaScript it is the whole page. */
.guide { position: fixed; inset: 0; z-index: 5; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; background: var(--paper); color: var(--ink); -webkit-user-select: text; user-select: text; }
.guide .page { max-width: 560px; margin: 0 auto; padding: calc(var(--top) + 18px) 18px 104px; }
.guide h1 { margin: 0 0 12px; font: 400 56px/1 'Jersey 10', monospace; outline: none; }
.guide h2 { margin: 22px 0 4px; font: 400 var(--b)/1 'Jersey 10', monospace; color: #8a3a12; }
.guide p { margin: 0 0 6px; }
.guide .credit { margin-top: 28px; color: #6b5a48; }
.guide a { color: #1f4f9e; }
.guide .play { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 18px calc(var(--bot) + 12px); text-align: center; background: var(--paper); border-top: 4px solid var(--ink); }
.guide .play .btn { min-width: 160px; height: 64px; }
.guide[hidden] { display: none; }
