/* The look of the web page and the landing page (docs/art.md, "On the web page"). One style sheet for both pages; the
   pieces beside it in kit/ are drawn by art/web/build.py, whose "Nine-patches" constants give the slices and outsets
   used below. Sizes are CSS pixels, one dp each on the phone. Danger pink and target gold appear nowhere here. */

@font-face {
  font-family: GN;
  src: url(ShantellSans-Variable.ttf) format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute always wins: the page and its checks show and hide by it. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: #f6f8f4 url(paper.png) 0 0 / 240px 240px;
  color: #2a2b3a;
  font-family: GN, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  font-variation-settings: "INFM" 0, "BNCE" 0;
  -webkit-tap-highlight-color: transparent;
}

/* ---- type: the rows of docs/art.md "Type" ---------------------------------------------------------------------- */
.title { font-size: 26px; font-weight: 800; line-height: 1.1; font-variation-settings: "INFM" 100, "BNCE" 30; }
.h { font-size: 17px; font-weight: 700; line-height: 1.25; font-variation-settings: "INFM" 100, "BNCE" 20; }
.big { font-size: 21px; font-weight: 700; line-height: 1.2; font-variation-settings: "INFM" 100, "BNCE" 20; }
.code { font-size: 40px; font-weight: 800; letter-spacing: 5px; line-height: 1; font-variation-settings: "INFM" 100, "BNCE" 40; }
.name { font-size: 13px; font-weight: 700; font-variation-settings: "INFM" 60, "BNCE" 0; }
.cap { font-size: 11.5px; color: #5d6770; }
.c { text-align: center; }
/* Visually hidden: kept for the page's checks and for a screen reader (docs/art.md, "Lines the page keeps"). */
.sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- the marker's shapes (web/src/marker.ts) ----------------------------------------------------------------------
   An element with data-marker carries one inline SVG, drawn by the marker at the element's own size: `.shadow`, and the
   group `.face` with `.body` and `.ink`. These rules colour and move them by state. Nothing is a stretched bitmap. */
[data-marker] { position: relative; isolation: isolate; }
svg.mk { position: absolute; left: 0; top: 0; overflow: visible; z-index: -1; pointer-events: none; }
svg.mk .shadow { fill: #c7d3d6; transform: translate(var(--shadow), var(--shadow)); }
svg.mk .body { fill: #fff; }
svg.mk .ink { fill: none; stroke: #2a2b3a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.mk .tape { fill: #f1cb78; fill-opacity: 0.84; }
/* A button and a pad stand on an ink shadow with the line of kit.press. */
[data-marker="btn"] svg.mk .shadow, [data-marker="pad"] svg.mk .shadow { fill: #2a2b3a; }
[data-marker="btn"] svg.mk .ink, [data-marker="pad"] svg.mk .ink { stroke-width: 2; }

/* ---- buttons: the four kinds (docs/art.md, "Buttons, four kinds") ------------------------------------------------ */
/* Pressed, the body moves onto its shadow and the label moves with it while the touch area stays. Disabled: no shadow,
   no fill, a dashed soft-ink line and a caption-grey label. */
.btn {
  appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 42px; width: 100%; padding: 0 16px;
  font: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.15; color: #2a2b3a;
  font-variation-settings: "INFM" 0, "BNCE" 0;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn::after { content: ""; position: absolute; inset: -3px 0; } /* the touch area: 48 dp around a body of 42 */
.btn:active:not(:disabled) { padding: 3px 13px 0 19px; }
.btn:active:not(:disabled) svg.mk .face { transform: translate(3px, 3px); }
.btn:active:not(:disabled) svg.mk .shadow { display: none; }
.btn.main { color: #fff; }
.btn.main svg.mk .body { fill: #2f7fc4; }
.btn:disabled { cursor: default; color: #5d6770; }
.btn:disabled svg.mk .shadow, .btn:disabled svg.mk .body { display: none; }
.btn:disabled svg.mk .ink { stroke: #9aa8ae; stroke-width: 1.7; stroke-dasharray: 6 4.5; }
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px dashed #2f7fc4; outline-offset: 5px; }

/* The quiet word: caption grey with no body; pressed, the blue marker underline under its descenders. */
.quiet {
  appearance: none; background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 11.5px; color: #5d6770; min-height: 48px; padding: 0 0 0 16px; position: relative;
  touch-action: manipulation;
}
.quiet:active::after {
  content: ""; position: absolute; left: 16px; right: 0; bottom: 10px; height: 8px;
  background: url(underline.png) center / 100% 100% no-repeat;
}

/* ---- paper pieces: kit.panel's shape, a grey shadow 4 dp; the picked one 6 dp with the emphasis line ------------- */
.panel { padding: 14px 16px; }
.panel-tape { padding: 18px 16px 16px; }
.underline { height: 12px; background: url(underline.png) center / 150px 12px no-repeat; }

/* ---- the text entry (docs/art.md, "A text entry"): a panel; with the focus, the picked card's line and shadow ------ */
.entry { display: block; }
.entry:focus-within svg.mk .ink { stroke-width: 4; }
.entry:focus-within svg.mk .shadow { transform: translate(6px, 6px); }
.field {
  appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 52px; padding: 0 16px;
  background: none; border: 0; border-radius: 0; outline: none;
  color: #2a2b3a; font: inherit; font-size: 16px; /* 16 px: a phone does not zoom into it */
}
.field::placeholder { color: #9aa8ae; opacity: 1; }
.field-code {
  height: 60px; text-align: center; text-transform: uppercase;
  font-size: 23px; font-weight: 800; letter-spacing: 6px;
  font-variation-settings: "INFM" 100, "BNCE" 20;
}
.field-code::placeholder { letter-spacing: 1px; font-size: 16px; font-weight: 400; text-transform: none; font-variation-settings: "INFM" 0, "BNCE" 0; }

/* ===================================================================================================================
   The companion (join.html)
   =================================================================================================================== */
.companion .screen {
  position: relative; display: flex; flex-direction: column;
  max-width: 420px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.companion .head { flex: none; height: 72px; padding-top: 36px; }
.companion .view { flex: 1 0 auto; display: flex; flex-direction: column; }
.head-right { position: absolute; top: 22px; right: 16px; }
.bottom { margin-top: auto; }
.refusal { font-weight: 700; font-variation-settings: "INFM" 60, "BNCE" 0; margin: 8px 0; }
.refusal:empty, .line:empty, .state:empty { display: none; }
.line { margin: 6px 0; }
#page-state { text-align: center; }

/* the join screen */
/* The fields take the screen; the refusal, the state line and Join stand at its bottom, Join where the frames' main button is. */
.join-fields { flex: 1 0 auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.join-fields label { margin-top: 14px; }
#join-note { margin-top: 22px; text-align: center; padding: 0 12px; }
#join-view .refusal { text-align: center; margin: 12px 0; }
#join-state { margin: 0 0 12px; }

/* the waiting room: the room frame as a guest sees it */
.room-card { display: flex; flex-direction: column; }
#label-room { margin-top: 4px; font-size: 12px; }
#status-room-code { margin-top: 4px; }
.room-card .underline { margin: 2px auto 0; width: 150px; }
#roster-count { margin-top: 26px; }
.roster { display: grid; grid-template-columns: repeat(3, 101px); justify-content: center; row-gap: 4px; margin-top: 2px; }
.member { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 18px; min-height: 120px; }
.member .box {
  width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; padding: 0 3px 3px 0;
  background: url(avatar.png) 0 0 / 72px 72px no-repeat; color: var(--pen);
  font-size: 30px; font-weight: 800; font-variation-settings: "INFM" 100, "BNCE" 30; line-height: 1;
}
.member .name { color: var(--pen); margin-top: 4px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* a long name ends at a glyph and an ellipsis */
.member .you { line-height: 1.1; }
.member.host::before {
  content: ""; position: absolute; top: 1px; left: calc(50% - 18px); width: 36px; height: 19px;
  background: url(crown.png) 0 0 / 36px 19px no-repeat;
}
.member.away .box { background-image: url(avatar-away.png); color: #9aa8ae; }
.member.away .name { color: #9aa8ae; }
.game-card { margin: 18px 0 8px; }
#status-game { margin-top: 2px; }
#status-game-line { font-size: 12.5px; margin-top: 4px; }
.guest-line { margin-top: auto; min-height: 42px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 8px; }

/* A controller takes the screen: the room card gives way to it. */
#status-view:has(> .widget:not([hidden])) > .room-card { display: none; }
#status-view:has(> #tel-widget:not([hidden])) > .guest-line,
#status-view:has(> #loop-widget:not([hidden])) > .guest-line { display: none; }
#status-view:has(> .pads:not([hidden])) > .guest-line { margin-top: 4px; min-height: 0; padding: 4px 8px 8px; }

.widget { flex: 1 0 auto; display: flex; flex-direction: column; }
.widget > .h { margin-top: 2px; }
/* A widget with no view open (waiting, the reveal) says its line in the middle of the screen. */
.widget:not(.pads):not(:has(> .view:not([hidden]))) { justify-content: center; text-align: center; padding-bottom: 80px; }
.widget:not(.pads):not(:has(> .view:not([hidden]))) > .line { margin-top: 10px; }

/* the drawing step (the frame "draw") */
#tel-widget:has(> #draw-view:not([hidden])) > #tel-heading {
  font-size: 11.5px; font-weight: 400; color: #5d6770; text-align: center; font-variation-settings: "INFM" 0, "BNCE" 0;
  margin: 0 0 14px;
}
.prompt-card { margin: 6px 4px 0; min-height: 76px; display: flex; align-items: center; justify-content: center; }
.prompt-card .big { overflow-wrap: anywhere; }
/* The canvas lies inside its frame's line: the frame's ink is never under the canvas. */
.canvas-frame { margin-top: 16px; padding: 3px; line-height: 0; }
.canvas-frame:has(> canvas[hidden]) { display: none; }
.canvas-frame canvas { display: block; width: 100%; height: auto; border-radius: 8px; touch-action: none; }
.tools { display: flex; justify-content: space-between; margin-top: 10px; }
.tool {
  appearance: none; border: 0; cursor: pointer; width: 48px; height: 48px; flex: none;
  background: center / 46px 46px no-repeat; font-size: 0; color: transparent; touch-action: manipulation;
}
.tool:focus { outline: none; }
#tool-small { background-image: url(tool-size-s.png); }
#tool-small[aria-pressed="true"] { background-image: url(tool-size-s-on.png); }
#tool-medium { background-image: url(tool-size-m.png); }
#tool-medium[aria-pressed="true"] { background-image: url(tool-size-m-on.png); }
#tool-large { background-image: url(tool-size-l.png); }
#tool-large[aria-pressed="true"] { background-image: url(tool-size-l-on.png); }
#tool-eraser { background-image: url(tool-eraser.png); }
#tool-eraser[aria-pressed="true"] { background-image: url(tool-eraser-on.png); }
#tool-undo { background-image: url(tool-undo.png); }
#tool-undo:disabled { background-image: url(tool-undo-off.png); cursor: default; }
#tool-undo:active:not(:disabled) { background-position: 1.5px 1.5px; }
body[data-pen="0"] #tool-pen { background-image: url(tool-pen-0.png); } body[data-pen="0"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-0-on.png); }
body[data-pen="1"] #tool-pen { background-image: url(tool-pen-1.png); } body[data-pen="1"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-1-on.png); }
body[data-pen="2"] #tool-pen { background-image: url(tool-pen-2.png); } body[data-pen="2"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-2-on.png); }
body[data-pen="3"] #tool-pen { background-image: url(tool-pen-3.png); } body[data-pen="3"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-3-on.png); }
body[data-pen="4"] #tool-pen { background-image: url(tool-pen-4.png); } body[data-pen="4"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-4-on.png); }
body[data-pen="5"] #tool-pen { background-image: url(tool-pen-5.png); } body[data-pen="5"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-5-on.png); }
body[data-pen="6"] #tool-pen { background-image: url(tool-pen-6.png); } body[data-pen="6"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-6-on.png); }
body[data-pen="7"] #tool-pen { background-image: url(tool-pen-7.png); } body[data-pen="7"] #tool-pen[aria-pressed="true"] { background-image: url(tool-pen-7-on.png); }
#tel-pen-line { margin-top: 4px; font-size: 12.5px; }
#draw-view .bottom { margin-top: auto; }
#tel-pen-line { margin-bottom: 10px; }
#describe-view .entry { margin-top: 18px; }
#describe-view .canvas-frame:has(> canvas[hidden]) + .entry { margin-top: 10px; }

/* loop telephone (docs/art.md, "Loop telephone on the web") */
#loop-shown { margin: 4px 0 14px; }
/* The four pages of the grid are cards with the whole quarter drawn small on them: a bar per note, the player's in their
   pen colour and the layer below's in far colours (the app's strip of quarters, docs/art.md "Loop telephone"). The page
   on show is the picked card with the pick mark. */
.loop-pages, .loop-insts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
.page {
  appearance: none; background: none; border: 0; cursor: pointer; min-height: 48px; padding: 5px 8px 6px;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; font: inherit; touch-action: manipulation;
}
.page:focus { outline: none; }
.page .pg-label { font-size: 11.5px; line-height: 1; color: #5d6770; text-align: left; }
.page .pg-map { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(8, 3px); gap: 1px 3px; grid-auto-flow: column dense; }
.page .pg-map i { display: block; border-radius: 1px; }
.page .pg-map i.below { background: #b9dedb; }
.page .pg-map i.on { background: var(--pen, #2a2b3a); }
.page .pg-map i:nth-child(8n+1) { grid-row: 8; } .page .pg-map i:nth-child(8n+2) { grid-row: 7; }
.page .pg-map i:nth-child(8n+3) { grid-row: 6; } .page .pg-map i:nth-child(8n+4) { grid-row: 5; }
.page .pg-map i:nth-child(8n+5) { grid-row: 4; } .page .pg-map i:nth-child(8n+6) { grid-row: 3; }
.page .pg-map i:nth-child(8n+7) { grid-row: 2; } .page .pg-map i:nth-child(8n+8) { grid-row: 1; }
.page[aria-pressed="true"] svg.mk .ink { stroke-width: 4; }
.page[aria-pressed="true"] svg.mk .shadow { transform: translate(6px, 6px); }
.page[aria-pressed="true"] .pg-label { color: #2a2b3a; font-weight: 700; }
.page[aria-pressed="true"]::after {
  content: ""; position: absolute; top: -11px; right: -10px; width: 24px; height: 24px;
  background: url(pick.png) 0 0 / 24px 24px no-repeat;
}
.chip { min-height: 40px; padding: 0 4px; font-size: 14px; }
.chip::after { inset: -4px 0; }
.loop-insts { margin-top: 10px; }
.loop-insts .chip[aria-pressed="true"] { color: #fff; }
.loop-insts .chip[aria-pressed="true"] svg.mk .body { fill: #2f7fc4; }
.loop-steps { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 10px; line-height: 1; }
#loop-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(8, 48px);
  grid-auto-flow: column dense; margin-top: 2px;
}
#loop-grid input {
  appearance: none; -webkit-appearance: none; display: none; margin: 0; width: 100%; height: 48px; cursor: pointer;
  background: url(cell.png) center / 46px 46px no-repeat; touch-action: manipulation;
}
#loop-grid input:focus { outline: none; }
#loop-grid input.below:not(:checked) { background-image: url(cell-far.png); }
#loop-grid[data-page="0"] input:nth-child(-n+32),
#loop-grid[data-page="1"] input:nth-child(n+33):nth-child(-n+64),
#loop-grid[data-page="2"] input:nth-child(n+65):nth-child(-n+96),
#loop-grid[data-page="3"] input:nth-child(n+97) { display: block; }
/* the highest degree on top: cell (s, d) is child 8s + d + 1 */
#loop-grid input:nth-child(8n+1) { grid-row: 8; } #loop-grid input:nth-child(8n+2) { grid-row: 7; }
#loop-grid input:nth-child(8n+3) { grid-row: 6; } #loop-grid input:nth-child(8n+4) { grid-row: 5; }
#loop-grid input:nth-child(8n+5) { grid-row: 4; } #loop-grid input:nth-child(8n+6) { grid-row: 3; }
#loop-grid input:nth-child(8n+7) { grid-row: 2; } #loop-grid input:nth-child(8n+8) { grid-row: 1; }
body[data-pen="0"] #loop-grid input:checked { background-image: url(cell-0.png); }
body[data-pen="1"] #loop-grid input:checked { background-image: url(cell-1.png); }
body[data-pen="2"] #loop-grid input:checked { background-image: url(cell-2.png); }
body[data-pen="3"] #loop-grid input:checked { background-image: url(cell-3.png); }
body[data-pen="4"] #loop-grid input:checked { background-image: url(cell-4.png); }
body[data-pen="5"] #loop-grid input:checked { background-image: url(cell-5.png); }
body[data-pen="6"] #loop-grid input:checked { background-image: url(cell-6.png); }
body[data-pen="7"] #loop-grid input:checked { background-image: url(cell-7.png); }
#loop-layer-view .bottom { margin-top: auto; }
/* Handed in (or on its way): the grid, its pages and the sounds give way to the waiting line; only the dashed Send stays. */
#loop-layer-view:has(> #loop-submit:disabled) > :not(#loop-submit) { display: none; }
#loop-widget:has(#loop-submit:disabled):not(:has(#loop-vote-view:not([hidden]))) { justify-content: center; text-align: center; }
.loop-insts { margin-bottom: 12px; }
#loop-vote-view { gap: 8px; margin-top: 10px; }
.song { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.song .tally { order: -1; flex: 1; }
.thumb { width: 56px; flex: none; min-height: 42px; font-size: 0; color: transparent; }
.thumb::before { content: ""; width: 34px; height: 34px; background: center / 34px 34px no-repeat; }
.thumb.up::before { background-image: url(thumb-up.png); }
.thumb.down::before { background-image: url(thumb-down.png); }
.thumb:disabled::before { opacity: 0.45; }

/* pen trails and a boss fight: the pads */
.pads { padding-top: 4px; }
.pads > .refusal { text-align: center; }
.pad-row { flex: 1 0 auto; display: flex; gap: 14px; min-height: 260px; }
.pad {
  appearance: none; background: none; border: 0; cursor: pointer; flex: 1; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 15.5px; font-weight: 700; color: #2a2b3a;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.pad::before { content: ""; width: 80px; height: 80px; background: center / 80px 80px no-repeat; }
.pad.turn-left::before { background-image: url(arrow-turn-left.png); }
.pad.turn-right::before { background-image: url(arrow-turn-right.png); }
.pad.left::before { background-image: url(arrow-left.png); }
.pad.right::before { background-image: url(arrow-right.png); }
.pad.up::before { background-image: url(arrow-up.png); }
/* Held (the page marks a pad from the finger's down to its up), or on its way to the host (the page disables it until the
   echo lands): on its shadow, never dashed. */
.pad.held, .pad:active, .pad:disabled { padding: 3px 0 0 3px; }
.pad.held svg.mk .face, .pad:active svg.mk .face, .pad:disabled svg.mk .face { transform: translate(3px, 3px); }
.pad.held svg.mk .shadow, .pad:active svg.mk .shadow, .pad:disabled svg.mk .shadow { display: none; }
.pad.held svg.mk .ink, .pad:active svg.mk .ink, .pad:disabled svg.mk .ink { stroke-width: 4; }
.pad:focus { outline: none; }
.pad.wide { flex: none; min-height: 150px; margin-bottom: 14px; }
.pen-line { text-align: center; font-weight: 700; margin: 0 0 10px; }
/* The pen's colour as a pen head beside the line: a light colour (lime) stays readable as ink text. */
.pen-line::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 8px -2px 0; border-radius: 50%;
  background: var(--pen, #2a2b3a); box-shadow: 0 0 0 2px #2a2b3a;
}
#pen-out, #boss-down { display: none; text-align: center; font-weight: 700; }
#pen-widget[data-motion="out"] #pen-out, #boss-widget[data-down="true"] #boss-down { display: block; }
.hearts { display: none; justify-content: center; gap: 6px; margin: 2px 0 10px; }
#boss-widget[data-hearts] .hearts { display: flex; }
.heart { width: 26px; height: 26px; background: center / 26px 26px no-repeat; }
body[data-pen="0"] .heart { background-image: url(heart-0.png); }
body[data-pen="1"] .heart { background-image: url(heart-1.png); }
body[data-pen="2"] .heart { background-image: url(heart-2.png); }
body[data-pen="3"] .heart { background-image: url(heart-3.png); }
body[data-pen="4"] .heart { background-image: url(heart-4.png); }
body[data-pen="5"] .heart { background-image: url(heart-5.png); }
body[data-pen="6"] .heart { background-image: url(heart-6.png); }
body[data-pen="7"] .heart { background-image: url(heart-7.png); }
#boss-widget[data-hearts="0"] .heart,
#boss-widget[data-hearts="1"] .heart:nth-child(n+2),
#boss-widget[data-hearts="2"] .heart:nth-child(n+3) { background-image: url(heart-empty.png); }

/* ===================================================================================================================
   The landing page (site/index.html), after the concept frames site-phone and site-desktop (art/frames/site.py)
   =================================================================================================================== */
.landing .site { max-width: 420px; margin: 0 auto; padding: 30px 16px calc(40px + env(safe-area-inset-bottom)); }
.landing a.btn { text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); }
.brand { display: flex; align-items: center; gap: 6px; margin-left: -4px; }
.brand img { width: 44px; height: 44px; }
.tagline { margin-top: 22px; }
.sub { margin-top: 2px; }
.friends { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 2px; margin: 14px -5px 0; }
.friends figure:nth-child(even) { margin-top: 10px; }
.friends img { display: block; width: 100%; height: auto; }
.friends figcaption { display: none; }
.hero .apk { margin-top: 26px; }
.apk-note { margin-top: 12px; }
.join-h { margin-top: 30px; }
.join-p { margin-top: 4px; }
.hero .join { margin-top: 20px; }
.how { margin-top: 38px; }
.steps { list-style: none; margin-top: 12px; display: grid; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps .num {
  flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 2px 2px 0;
  background: url(avatar.png) 0 0 / 44px 44px no-repeat; color: #2f7fc4;
  font-size: 21px; font-weight: 700; font-variation-settings: "INFM" 100, "BNCE" 20;
}
.games-section { margin-top: 40px; }
.games { display: grid; gap: 22px; margin-top: 16px; }
.game { padding: 10px 16px 16px; }
.game img { display: block; width: 150px; height: auto; margin: 0 auto 6px; }
.game h3 { display: flex; align-items: center; gap: 8px; }
.game p { font-size: 12.5px; color: #5d6770; margin-top: 4px; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #2a2b3a; }
.again { margin-top: 40px; display: grid; gap: 16px; }
.landing footer { margin-top: 40px; }

/* A desktop width: the hero's text on the left and the room of friends on the right, the steps three across, the games
   three by two (site-desktop). */
@media (min-width: 900px) {
  .landing .site { max-width: 1088px; padding: 54px 48px 60px; }
  .join-p, .steps p { font-size: 16px; }
  .landing .h { font-size: 21px; }
  .landing .title { font-size: 44px; }
  .brand img { width: 64px; height: 64px; }
  .hero {
    grid-template-columns: 560px 1fr; column-gap: 48px;
    grid-template-areas: "brand friends" "tag friends" "sub friends" "apk friends" "note friends" "joinh friends" "joinp friends" "join friends";
    align-items: start;
  }
  .brand { grid-area: brand; } .landing .tagline { grid-area: tag; font-size: 26px; } .sub { grid-area: sub; font-size: 18px; }
  .hero .apk { grid-area: apk; width: 320px; min-height: 48px; font-size: 18px; }
  .apk-note { grid-area: note; font-size: 14px; max-width: 520px; } .join-h { grid-area: joinh; }
  .join-p { grid-area: joinp; } .hero .join { grid-area: join; width: 320px; min-height: 48px; font-size: 17px; }
  .friends {
    grid-area: friends; display: grid; grid-template-columns: repeat(3, 104px); column-gap: 20px; row-gap: 18px;
    justify-content: end; margin: 30px 0 0;
  }
  .friends figure:nth-child(even) { margin-top: 16px; }
  .friends img { width: 104px; }
  .friends figcaption { display: block; text-align: center; font-size: 17px; margin-top: -2px; }
  .how { margin-top: 64px; }
  .landing section > .h { font-size: 23px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 18px; }
  .steps li { align-items: flex-start; }
  .steps .num { width: 56px; height: 56px; background-size: 56px 56px; font-size: 26px; }
  .steps p { padding-top: 6px; }
  .games-section { margin-top: 56px; }
  .games { grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 20px; }
  .game { padding: 16px 20px 20px; }
  .game img { width: 100%; max-width: 270px; }
  .game p { font-size: 15px; }
  .again { margin-top: 56px; justify-items: start; } .again .btn { width: 320px; min-height: 48px; font-size: 17px; }
  .landing footer { margin-top: 56px; font-size: 14px; }
}
#log { top: 0; left: 0; } /* kept for the checks; it must not lengthen the page */
