/* Components — moved from the approved mockup (buttons, chips, tag, tiles, cards,
   shapes, band) and designed in its language where the mockup had none (fields,
   accordions, tables, notes). Values only from tokens.css. */

.icon { width: 20px; height: 20px; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* ── buttons ── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: var(--radius-pill);
  font: 700 .95rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-base) var(--spring), box-shadow var(--dur-base), background var(--dur-base), color var(--dur-base);
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--red { background: var(--color-brand-strong); color: #fff; box-shadow: 0 6px 0 var(--color-brand-shadow); }
.btn--red:hover { background: var(--color-brand-hover); }
.btn--red:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--color-brand-shadow); }
.btn--ink { background: var(--color-text); color: var(--color-bg); }
.btn--ink:hover { background: #2a2a35; }
.btn--line { border: 1.5px solid var(--color-text); color: var(--color-text); background: transparent; }
.btn--line:hover { background: var(--color-text); color: var(--color-bg); }
.btn--ghost { background: transparent; color: var(--color-text); text-decoration: underline; text-underline-offset: 4px; }
.btn--sun { background: var(--color-sun); color: var(--color-text); box-shadow: 0 6px 0 #C99A24; }
.btn--sun:active { transform: translateY(4px); box-shadow: 0 2px 0 #C99A24; }
.btn--paper { background: var(--color-bg); color: var(--color-text); }
.btn--ghost-light { border: 1.5px solid rgb(255 255 255 / .6); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: rgb(255 255 255 / .12); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .86rem; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.linkbtn { position: relative; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn::after { content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%; height: 100%; min-height: 24px; }
.round { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--color-text); color: var(--color-bg); cursor: pointer; transition: transform var(--dur-base) var(--spring), opacity var(--dur-base); }
.round:hover { transform: scale(1.08) rotate(-6deg); }
.round:disabled { opacity: .3; cursor: default; transform: none; }
.round--line { background: transparent; color: var(--color-text); border: 1.5px solid var(--color-text); width: 46px; height: 46px; }
.round--line:hover { background: var(--color-text); color: var(--color-bg); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:focus-visible, .round:focus-visible, .chip:focus-visible { box-shadow: var(--focus-ring); }

/* ── type helpers ── */
.eyebrow { display: inline-block; font: 800 .78rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--color-brand-strong); margin-bottom: 14px; }
.eyebrow--sun { color: var(--color-sun); }
.h2 { font: 800 var(--fs-h2)/1 var(--font-display); letter-spacing: var(--tracking-h2); text-wrap: balance; }
.h2 sup { font-size: .4em; vertical-align: super; letter-spacing: 0; color: var(--color-brand-strong); margin-left: 4px; }
.h3 { font: 800 var(--fs-h3)/1.15 var(--font-display); letter-spacing: -.035em; }
.lead { font-size: var(--fs-lead); color: var(--color-muted); max-width: 40rem; text-wrap: pretty; }

/* ── sections ── */
.sec { position: relative; padding-block: var(--section-pad) 0; }
.sec__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec__head > div { max-width: 46rem; }
.sec__lead { max-width: 30rem; color: var(--color-muted); margin-top: 10px; }
.sec-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.sec-bg picture, .sec-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sec-bg::after { content: ""; position: absolute; inset: 0; }
.sec-bg--dark::after { background: linear-gradient(90deg, rgb(22 22 29 / .9), rgb(22 22 29 / .62) 60%, rgb(22 22 29 / .35)); }
.sec-bg--cobalt::after { background: linear-gradient(100deg, rgb(39 71 214 / .96), rgb(39 71 214 / .82) 55%, rgb(39 71 214 / .45)); }

/* ── shapes (signature: triangle-gable, drum circle, ribbon bar) ── */
.shape { position: absolute; pointer-events: none; }
.shape--tri { background: var(--color-sun); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape--circ { border-radius: 50%; background: var(--color-brand); }
.shape--bar { border-radius: var(--radius-pill); background: var(--color-cobalt); }
.t-cut { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }

/* ── tag, pills, badges ── */
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface-2); border-radius: var(--radius-pill); font-weight: 700; font-size: .82rem; box-shadow: var(--shadow-card); }
.tag__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-mint); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(31 158 122 / .5); } 70% { box-shadow: 0 0 0 7px rgb(31 158 122 / 0); } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: var(--fs-small); font-weight: 600; box-shadow: var(--shadow-card); text-decoration: none; }
.pill .icon { width: 16px; height: 16px; color: var(--color-brand-strong); }
.pill--link:hover { background: var(--color-text); color: var(--color-bg); }
.badge18 { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--color-brand-strong); color: #fff; font: 800 .72rem/1 var(--font-display); letter-spacing: -.02em; }
.badge18--xl { width: 64px; height: 64px; font-size: 1.15rem; }
.tagpill { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 10px; border-radius: var(--radius-pill); font: 800 .64rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.tagpill--new { background: var(--color-sun); color: var(--color-text); }
.tagpill--top { background: var(--color-text); color: var(--color-bg); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: var(--fs-small); font-weight: 700; }
.status .icon { width: 16px; height: 16px; }
.status--ok { background: color-mix(in srgb, var(--color-success) 14%, white); color: var(--color-success); }
.status--warn { background: var(--color-warning-bg); color: #7a5300; }
.status--bad { background: color-mix(in srgb, var(--color-error) 12%, white); color: var(--color-error); }
.status--info { background: color-mix(in srgb, var(--color-cobalt) 12%, white); color: var(--color-cobalt); }

/* ── chips & segmented ── */
/* one swipeable row, like an app — no orphan chip on a second line */
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 4px; margin: -4px; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chips > * { flex: none; scroll-snap-align: start; }
.chips > :last-child { margin-right: 24px; }
.chip { position: relative; padding: 8px 15px; border: 1.5px solid var(--color-border); border-radius: var(--radius-pill); background: transparent; font: 700 .84rem/1.2 var(--font-body); color: var(--color-text); cursor: pointer; transition: all var(--dur-base) var(--spring); }
.chip::after { content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%; min-height: 24px; height: 100%; }
.chip:hover { border-color: var(--color-text); transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.chip--sm { padding: 6px 12px; font-size: .8rem; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 4px; border: 0; background: var(--surface-3); border-radius: var(--radius-pill); }
.seg button, .seg label span { display: block; padding: 9px 15px; border: 0; border-radius: var(--radius-pill); background: none; font: 700 .84rem/1.1 var(--font-body); color: var(--color-muted); cursor: pointer; transition: background var(--dur-base), color var(--dur-base); white-space: nowrap; }
.seg button:hover, .seg label:hover span { color: var(--color-text); }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--color-text); color: var(--color-bg); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg input:focus-visible + span { box-shadow: var(--focus-ring); }
.seg--form { display: flex; flex-wrap: wrap; overflow: visible; margin-bottom: 14px; }
.seg--form legend { width: 100%; padding: 6px 10px 2px; }
.seg--form .field__error { width: 100%; padding: 0 10px 6px; }

/* ── search ── */
.search { display: flex; align-items: center; gap: 10px; max-width: 460px; padding: 6px 6px 6px 18px; background: var(--surface-2); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); transition: box-shadow var(--dur-base); }
.search:focus-within { box-shadow: var(--shadow-card), 0 0 0 3px var(--color-cobalt); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1rem; padding: 10px 0; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search--lg { max-width: 640px; padding-right: 18px; }
.search__count { font-size: var(--fs-small); color: var(--color-muted); white-space: nowrap; }

/* ── fields ── */
.field { display: grid; gap: 6px; align-content: start; }
.field__label { font-weight: 700; font-size: .88rem; }
.field__hint { font-size: var(--fs-tiny); color: var(--color-muted); }
.field__error { font-size: .82rem; font-weight: 600; color: var(--color-error); }
.input { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--surface-2); font-size: 1rem; transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.input:hover { border-color: rgb(22 22 29 / .35); }
.input:focus { outline: none; border-color: var(--color-cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-cobalt) 18%, transparent); }
.input:disabled { opacity: .55; cursor: not-allowed; }
textarea.input { resize: vertical; min-height: 140px; }
.has-error .input, .input[aria-invalid="true"] { border-color: var(--color-error); background: color-mix(in srgb, var(--color-error) 4%, white); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-eye { position: absolute; right: 4px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--color-muted); cursor: pointer; }
.input-eye[aria-pressed="true"] { color: var(--color-cobalt); }
.select { position: relative; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select .icon { position: absolute; right: 14px; top: 50%; translate: 0 -50%; pointer-events: none; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.field--check .field__error { grid-column: 1 / -1; }
.field--check label { font-size: .9rem; line-height: 1.45; cursor: pointer; }
.check { appearance: none; width: 24px; height: 24px; margin-top: 1px; border: 1.5px solid var(--color-text); border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; transition: background var(--dur-base); }
.check::after { content: ""; width: 12px; height: 7px; border: 2.5px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -2px; transform: scale(0); transition: transform var(--dur-base) var(--spring); }
.check:checked { background: var(--color-cobalt); border-color: var(--color-cobalt); }
.check:checked::after { transform: scale(1); }
.has-error .check { border-color: var(--color-error); }
.switch { appearance: none; position: relative; width: 50px; height: 28px; flex: none; border-radius: var(--radius-pill); background: var(--surface-3); cursor: pointer; transition: background var(--dur-base); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-card); transition: transform var(--dur-base) var(--spring); }
.switch:checked { background: var(--color-cobalt); }
.switch:checked::after { transform: translateX(22px); }
.amount { display: flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--surface-2); overflow: hidden; }
.amount:focus-within { border-color: var(--color-cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-cobalt) 18%, transparent); }
.amount span { padding: 0 6px 0 16px; font-weight: 800; color: var(--color-muted); }
.amount .input { border: 0; box-shadow: none; font-size: 1.15rem; font-weight: 700; }
.has-error .amount { border-color: var(--color-error); }
.range { width: 100%; accent-color: var(--color-cobalt); }
.range--sun { accent-color: var(--color-sun); }
.meter-bar, .usage__bar, .kpi__bar { height: 10px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.meter-bar i, .usage__bar i, .kpi__bar i { display: block; height: 100%; border-radius: inherit; background: var(--color-cobalt); transition: width var(--dur-slow) var(--spring); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meter i { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background var(--dur-base); }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--color-error); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--color-sun); }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--color-cobalt); }
.meter[data-level="4"] i { background: var(--color-success); }
.form__error { padding: 12px 14px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-error) 10%, white); color: var(--color-error); font-weight: 600; font-size: var(--fs-small); }
.hp { position: absolute; left: -9999px; width: 0; height: 0; overflow: hidden; }

/* ── notes, done ── */
.note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-1); border: 1px solid var(--color-border); font-size: var(--fs-small); }
.note .icon { color: var(--color-cobalt); margin-top: 1px; }
.note--warn { background: var(--color-warning-bg); border-color: #F0D68C; }
.note--warn .icon { color: #8a5d00; }
.note--rg .badge18 { width: 28px; height: 28px; font-size: .62rem; }
.done { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-success) 10%, white); color: var(--color-success); font-weight: 600; }
.done--big { flex-direction: column; align-items: flex-start; gap: 10px; padding: 32px; color: var(--color-text); font-weight: 400; }
.done--big h3 { font: 800 1.4rem/1.1 var(--font-display); letter-spacing: -.03em; }
.done__ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-success); color: #fff; animation: popIn var(--dur-slow) var(--spring) both; }
.done__ic .icon { width: 30px; height: 30px; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
.empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 32px; border: 2px dashed var(--color-border); border-radius: var(--radius-lg); color: var(--color-muted); }

/* ── cards ── */
.card-paper { position: relative; padding: 28px; background: var(--surface-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-ink { padding: 24px; background: var(--color-text); color: var(--color-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-dock); }

/* ── facts (dl), lists, tables ── */
.facts { display: grid; gap: 0; margin: 8px 0 18px; }
.facts > div { display: grid; grid-template-columns: minmax(140px, .9fr) 1.6fr; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--color-border); }
.facts dt { color: var(--color-muted); font-size: var(--fs-small); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.facts--tight > div { padding: 8px 0; }
.list { display: grid; gap: 8px; padding-left: 0; margin: 12px 0 18px; }
ul.list > li { position: relative; padding-left: 26px; }
ul.list > li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 10px; background: var(--color-brand); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
ol.list { counter-reset: n; }
ol.list > li { position: relative; padding-left: 36px; counter-increment: n; }
ol.list > li::before { content: counter(n); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-sun); font: 800 .72rem/1 var(--font-display); }
.list--check > li::before { width: 14px; height: 14px; top: .35em; border-radius: 50%; clip-path: none; background: var(--color-mint); }
.table-wrap { overflow-x: auto; margin: 14px 0 20px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--surface-2); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table th { text-align: left; padding: 12px 14px; background: var(--surface-3); font-weight: 800; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--color-border); vertical-align: top; }
.table code { font-size: .85em; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }

/* ── accordion ── */
.acc { display: grid; gap: 10px; }
.acc__item { background: var(--surface-2); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; transition: box-shadow var(--dur-base); }
.acc__btn { overflow-wrap: anywhere; hyphens: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 18px 20px; border: 0; background: none; text-align: left; font: 700 1.02rem/1.35 var(--font-body); cursor: pointer; }
.acc__btn:hover { color: var(--color-brand-strong); }
.acc__ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--surface-3); transition: transform var(--dur-slow) var(--spring), background var(--dur-base), color var(--dur-base); }
.acc__btn[aria-expanded="true"] .acc__ic { transform: rotate(135deg); background: var(--color-brand-strong); color: #fff; }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease); }
.acc__panel > .acc__inner { min-height: 0; overflow: hidden; visibility: hidden; padding: 0 20px; transition: visibility 0s var(--dur-slow), padding var(--dur-slow); }
.acc__panel.is-open { grid-template-rows: 1fr; }
.acc__panel.is-open > .acc__inner { visibility: visible; padding-bottom: 18px; transition-delay: 0s; }

/* ── prose ── */
.prose { max-width: 70ch; overflow-wrap: break-word; hyphens: auto; }
.prose > * + * { margin-top: 14px; }
.prose h3 { font: 800 1.12rem/1.25 var(--font-display); letter-spacing: -.02em; margin-top: 26px; }
.prose a:not(.btn), .note a, .field--check a, .modal a:not(.btn), .done a:not(.btn) { color: var(--color-cobalt); font-weight: 600; text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--color-cobalt-hover); }
/* inline links get an outline ring: a box-shadow does not follow a wrapped line */
a:not(.btn):focus-visible { outline: 2px solid var(--color-cobalt); outline-offset: 2px; box-shadow: none; border-radius: 2px; }
.prose strong { font-weight: 800; }

/* ── game card: the frame follows the 1:1 cover, the cover is never cropped ── */
.game { position: relative; min-width: 0; transition: transform var(--dur-slow) var(--spring); }
.game__media { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-card); }
.game .cover img { width: 100%; height: auto; aspect-ratio: 1; transition: transform .6s var(--ease); }
.game:hover { transform: translateY(-6px) rotate(-.8deg); }
.game:hover .cover img { transform: scale(1.05); }
.game__play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: rgb(22 22 29 / .45); opacity: 0; cursor: pointer; transition: opacity var(--dur-base); }
.game__play span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--color-brand-strong); color: #fff; transform: scale(.7); transition: transform var(--dur-slow) var(--spring); box-shadow: 0 5px 0 var(--color-brand-shadow); }
.game__play .icon { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.game:hover .game__play, .game__play:focus-visible { opacity: 1; }
.game:hover .game__play span, .game__play:focus-visible span { transform: scale(1); }
.game__name { margin-top: 10px; font: 700 .95rem/1.25 var(--font-body); text-wrap: balance; overflow-wrap: anywhere; }
.game__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; margin-top: 2px; font-size: .76rem; color: var(--color-muted); }
.fav { position: absolute; top: 8px; right: 8px; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgb(22 22 29 / .55); color: #fff; backdrop-filter: blur(6px); cursor: pointer; transition: transform var(--dur-base) var(--spring), background var(--dur-base); }
.fav .icon { width: 18px; height: 18px; transition: transform var(--dur-slow) var(--spring); }
.fav:hover { transform: scale(1.1); }
.fav[aria-pressed="true"] { background: var(--color-brand-strong); }
.fav[aria-pressed="true"] .icon { fill: currentColor; animation: heart .5s var(--spring); }
@keyframes heart { 30% { transform: scale(1.4); } }
.game.is-hidden { display: none; }
.grid-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 16px; }

/* shelf: horizontal snap slider */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 15.5vw, 196px); gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 6px 4px 22px; margin-inline: -4px; scrollbar-width: none; cursor: grab; }
.shelf::-webkit-scrollbar { display: none; }
.shelf.is-drag { cursor: grabbing; scroll-snap-type: none; }
.shelf.is-drag .game { pointer-events: none; }
.shelf > .game { scroll-snap-align: start; }
.shelf-prog { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.shelf-prog i { display: block; height: 100%; width: 24%; border-radius: inherit; background: var(--color-brand); transition: transform .15s linear; }
.shelf-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.arrows { display: flex; gap: 8px; }

/* ── payment chips ── */
.paychip { display: inline-grid; place-items: center; min-height: 40px; min-width: 72px; padding: 4px 10px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-card); }
.paychip img { height: 20px; width: auto; }
.paychip__word { font: 800 .78rem/1.1 var(--font-body); color: var(--color-text); letter-spacing: -.01em; text-align: center; overflow-wrap: anywhere; }
.paychip__word--twint { color: #000; }
.paychip__word--postfinance { color: #000; }
.paychip__word--postfinance::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: #FFCC00; border-radius: 2px; vertical-align: -1px; }
.paychip__word--yapeal { color: #1b1b1b; letter-spacing: .04em; }
.paychip--lg { height: 56px; min-width: 100%; }
.paychip--lg img { height: 26px; }

/* ── band (diagonal marquee, from the mockup) ── */
.band-clip { position: relative; z-index: 3; overflow: clip; padding-block: 40px; margin-block: -40px; }
.band { background: var(--color-brand); color: #fff; transform: rotate(-2.5deg); margin: 0 -20px; padding: 18px 0; box-shadow: var(--shadow-card); }
.band__t { display: flex; gap: 40px; width: max-content; animation: marq 36s linear infinite; font: 800 clamp(1.2rem, .8rem + 1.6vw, 2.2rem)/1 var(--font-display); letter-spacing: -.03em; text-transform: uppercase; }
.band__t span { display: flex; align-items: center; gap: 40px; }
.band__t span::after { content: ""; width: 22px; height: 22px; background: var(--color-sun); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.band:hover .band__t { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ── breadcrumbs ── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-size: var(--fs-small); color: var(--color-muted); }
.crumbs a { position: relative; color: inherit; text-decoration: none; }
.crumbs a::after { content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%; min-height: 24px; height: 100%; }
.crumbs a:hover { color: var(--color-text); text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .card-paper { padding: 20px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .shelf { grid-auto-columns: 42vw; gap: 12px; }
  .grid-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .btn--lg { min-height: 50px; padding: 0 22px; }
  .table--stack thead { display: none; }
  .sec__head { margin-bottom: 24px; }
}

/* ── game dialog ── */
.modal--game { width: min(820px, calc(100% - 24px)); padding: 0; }
.gm { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.gm__cover { position: relative; display: grid; place-items: center; background: var(--color-text); }   /* the cover is centred, never stretched or cropped */
.gm__cover img { width: 100%; height: auto; aspect-ratio: 1; }
.gm__body { display: grid; align-content: start; gap: 14px; padding: 34px 30px; }
.gm__body .eyebrow { margin: 0; }
.gm__title { font: 800 clamp(1.5rem, 1rem + 1.6vw, 2.1rem)/1.05 var(--font-display); letter-spacing: -.045em; padding-right: 40px; }
.gm__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gm__facts div { padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.gm__facts dt { font-size: var(--fs-tiny); color: var(--color-muted); }
.gm__facts dd { margin: 2px 0 0; font-weight: 800; }
.gm__acts { display: flex; gap: 10px; align-items: center; }
.gm__acts .fav { position: static; width: 54px; height: 54px; background: var(--surface-3); color: var(--color-text); }
.gm__acts .fav[aria-pressed="true"] { background: var(--color-brand-strong); color: #fff; }
.gm__msg { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius-md); background: var(--color-warning-bg); border: 1px solid #F0D68C; animation: popIn var(--dur-slow) var(--spring) both; }
.gm__msg p { font-size: var(--fs-small); }
.gm__msg-acts { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.gm__rg { font-size: var(--fs-tiny); color: var(--color-muted); }
.gm__rg a { color: inherit; }

/* ── registration form ── */
.reg { display: grid; gap: 18px; }
.reg__set { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--surface-2); }
.reg__set legend { display: flex; align-items: center; gap: 8px; padding: 0 8px; font: 800 .82rem/1 var(--font-display); letter-spacing: -.01em; }
.reg__set legend span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-sun); font-size: .66rem; }
.reg .field--full { grid-column: 1 / -1; }
.reg__checks { display: grid; gap: 12px; }

@media (max-width: 760px) {
  .gm { grid-template-columns: 1fr; }
  .gm__cover { display: grid; place-items: center; overflow: hidden; }
  .gm__cover img { max-height: 40vh; width: auto; }
  .gm__body { padding: 22px 20px 26px; }
  .reg__set { grid-template-columns: 1fr; padding: 14px; }
}
