/* LAST FERRY is one fixed screen: a canvas of whole pixels, with real buttons laid over the ones it draws. */
html, body { margin: 0; height: 100%; background: #141627; color: #fff4dc; 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: 16px/1.4 ui-monospace, Menlo, Consolas, monospace; }
#view { position: absolute; left: 0; top: 0; display: block; image-rendering: crisp-edges; image-rendering: pixelated; touch-action: none; outline: none; }
/* the buttons' words are drawn on the canvas; these take the press, the keys and the focus ring */
#ui button { position: absolute; margin: 0; padding: 0; border: 0; background: none; color: transparent; font-size: 1px; overflow: hidden; cursor: pointer; touch-action: none; -webkit-appearance: none; appearance: none; }
#ui button[hidden] { display: none; }
#ui button:disabled { cursor: default; }
#ui button:focus-visible { outline: 2px solid #ffd866; outline-offset: -2px; }
/* the phone's own edges, measured by main.js */
#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); }
/* HOW TO PLAY: a page of sentences over the game, which scrolls by itself. Its pictures are the game's own, shown at whole pixels. */
.guide { position: fixed; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; background: #141627; -webkit-user-select: text; user-select: text; font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.guide[hidden] { display: none; }
.guide .page { max-width: 34em; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px 24px; }
.guide h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; color: #ffd866; outline: none; }
.guide h2 { margin: 32px 0 8px; font-size: 20px; line-height: 1.25; color: #ffd866; }
.guide p, .guide ol, .guide ul { margin: 0 0 12px; }
.guide ol, .guide ul { padding-left: 1.3em; }
.guide li { margin: 0 0 8px; }
.guide img, .guide canvas { display: block; max-width: 100%; height: auto; image-rendering: crisp-edges; image-rendering: pixelated; border: 2px solid #2c3054; }
.guide figure { margin: 16px 0 20px; }
.guide figcaption { margin-top: 6px; font-size: 15px; color: #b9b3a6; }
.guide .marks { list-style: none; padding: 0; }
.guide .marks li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; margin: 0 0 18px; }
.guide .marks img, .guide .marks canvas { flex: none; }
.guide .marks p { flex: 1 1 11em; margin: 0; }
.guide .play { position: sticky; bottom: 0; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #141627; border-top: 2px solid #2c3054; text-align: center; }
.guide .play button { min-width: 180px; min-height: 48px; padding: 0 24px; border: 2px solid #1e1626; border-radius: 4px; background: #f4cf47; color: #1e1626; font: 700 18px/1 ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.guide .play button.plain { min-width: 0; margin-left: 10px; padding: 0 14px; font-size: 15px; background: #474d7c; color: #fff4dc; }
.guide .play button:focus-visible { outline: 3px solid #fff4dc; outline-offset: 2px; }
