/* STILLS — the stylesheet of 17m (it began as 17's, shared with 17b–d).
   ONE MODULE: a square (--s) and one 8px gutter (--g). The board is 6 × 3 modules fitted to the screen and centred: six light
   squares (the reference's 3 × 2 block, top left) and twelve text squares wrapping them in an L. One canvas paints the whole
   board (light squares, text squares and their dark spots); the text is real HTML on top, laid out once.
   Every square: a heading block 8px from the top-left, a data block 8px from the bottom. One family, one size (11/13 caps).
   Red only on price + add. */
:root { --bg:#d3d3d1; --fg:#1b2029; --dim:rgba(27,32,41,.48); --ink:#f5f7fa; --g:8px; --pad:8px;
        --s: min(calc((100vw - 64px - 5 * var(--g)) / 6), calc((100vh - 64px - 2 * var(--g)) / 3)); }
body { background: var(--bg); color: var(--fg); font: 500 11px/13px "Inter Tight", Arial, sans-serif; letter-spacing: .01em; text-transform: uppercase; }
.page { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.board { position: relative; display: grid; grid-template-columns: repeat(6, var(--s)); grid-template-rows: repeat(3, var(--s)); gap: var(--g); }
.board > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.imgs { grid-column: 1 / 4; grid-row: 1 / 3; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: var(--g); }
.sq { position: relative; color: var(--ink); cursor: pointer; }
.sq p { position: absolute; max-width: calc(66.66% - var(--pad)); }
.t { top: var(--pad); } .b { bottom: var(--pad); } .l { left: var(--pad); } .r { right: var(--pad); text-align: right; }
.l3 { left: 33.333%; } .t3 { top: 33.333%; }
.cell { position: relative; z-index: 1; color: var(--fg); }
.cell > .a, .cell > .z { position: absolute; left: var(--pad); right: var(--pad); }
.cell > .a { top: var(--pad); } .cell > .z { bottom: var(--pad); }
.cell > .zr { text-align: right; }
.dim { color: var(--dim); }
.cell button { text-transform: inherit; letter-spacing: inherit; }
.cell button:hover { text-decoration: underline; text-underline-offset: 2px; }
.cell [aria-pressed="true"], .cell a[aria-current] { text-decoration: underline; text-underline-offset: 2px; }
[data-nav] { column-gap: 6px; }
.buy, .tp, [data-sel-add] { color: var(--verm); }
.sel-saved [data-sel-add] { opacity: .55; }
.ctl { display: flex; justify-content: space-between; }
.it { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 12px; column-gap: 6px; height: 13px; cursor: pointer; color: var(--dim); }
.it .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .pr, .it [data-add] { text-align: right; }
.it:hover, .it[aria-current="true"] { color: var(--fg); }
.it.is-playing .nm::before { content: "● "; }
.it.is-saved [data-add] { color: var(--verm); }
.si { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 6px; height: 13px; color: var(--dim); }
.si .pa { white-space: nowrap; }   /* known issue 1: at 375px the text needs up to 96.8px of 96px; it may run <1px into the 6px gap instead of wrapping into the next row */
#another { text-decoration: underline; text-underline-offset: 2px; color: var(--fg); }
/* 17d · dusk: dark text squares, light type */
.v-dusk .cell { --fg:#e8ebee; --dim:rgba(232,235,238,.56); }
.v-dusk .buy, .v-dusk [data-sel-add], .v-dusk .it.is-saved [data-add] { color: #ff7d69; }
/* 17m: the square stops growing at 254.5px (the size the user picked at 1631 × 1077), so the empty
   page above and below always has room for the star clusters */
.has-pstars { --s: min(calc((100vw - 64px - 5 * var(--g)) / 6), calc((100vh - 64px - 2 * var(--g)) / 3), 254.5px); }
/* 17m views (round 13), switched by all / beats / packs: ALL keeps the 6 lights and 3 list squares (2 of beats, 1 of
   packs); BEATS and PACKS (body.view-list) shrink the light to one row of 3 and give the freed squares to the list, 6 list
   squares. The right half never moves. */
#c-l1 { grid-column: 1; grid-row: 3; } #c-l2 { grid-column: 2; grid-row: 3; } #c-l3 { grid-column: 3; grid-row: 3; }
#c-l4 { grid-column: 1; grid-row: 3; } #c-l5 { grid-column: 2; grid-row: 3; } #c-l6 { grid-column: 3; grid-row: 3; }
#c-l4, #c-l5, #c-l6 { display: none; }
.view-list .imgs { grid-row: 1 / 2; grid-template-rows: 1fr; }
.view-list .sq:nth-child(n+4) { display: none; }
.view-list #c-l1 { grid-row: 2; } .view-list #c-l2 { grid-row: 2; } .view-list #c-l3 { grid-row: 2; }
.view-list #c-l4, .view-list #c-l5, .view-list #c-l6 { display: block; }
.view-list .si:nth-child(n+4) { display: none; }
.pgturn { position: absolute; top: 0; right: 0; }   /* the page turn sits top right of the first list square, level with its heading */
@media (max-width: 639px) {
  :root, .has-pstars { --s: calc((100vw - 32px - var(--g)) / 2); }
  .page { padding: 16px; place-items: start center; }
  .board { grid-template-columns: repeat(2, var(--s)); grid-template-rows: none; grid-auto-rows: var(--s); }
  .imgs { grid-column: 1 / 3; grid-row: span 3; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .cell { grid-column: auto !important; grid-row: auto !important; }
  #c-now { order: 1; } #c-buy { order: 2; } #c-info { order: 3; } #c-l1 { order: 4; } #c-l2 { order: 5; } #c-l3 { order: 6; }
  #c-idx { order: 7; } #c-key { order: 8; } #c-id { order: 9; } #c-cart { order: 10; } #c-col { order: 11; } #c-help { order: 12; }
  #c-l4, #c-l5, #c-l6 { order: 6; }
  .view-list .imgs { grid-row: span 1; grid-template-rows: 1fr; }
  .view-list .sq:nth-child(n+3) { display: none; }
}
