/* Shared finishing layer. Artwork, state colours and palette choices retain their meaning. */
:root {
  --finish-line: color-mix(in srgb, var(--text, #f5f4ef) 14%, transparent);
  --finish-surface: var(--art-raised, var(--bg-raised, #191c20));
  --finish-accent: var(--art-link, var(--cyan-text, #b9c5b4));
}
body { line-height: 1.65; }
main { min-width: 0; }
main :is(h1, h2, h3) { overflow-wrap: break-word; }
main p { text-wrap: pretty; }
.container { width: 100%; }
:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--finish-accent);
  outline-offset: 4px;
}
:is(button, .btn, input, select, textarea) { touch-action: manipulation; }
:is(button, .btn):disabled { cursor: not-allowed; }
.breadcrumb { line-height: 1.6; }
.page-hero { padding-block: clamp(32px, 4vw, 64px) 32px; }
.page-hero .lede { line-height: 1.75; max-width: 58ch; }
.hero { padding-block: clamp(36px, 5vw, 72px); }
.hero-grid { gap: clamp(28px, 4vw, 64px); }
.hero .lede { max-width: 44ch; }
.lead-row { row-gap: 12px; }
/* Let the animated works carry the colour, with a quieter frame around them. */
html:not([data-art-mode=rgb]) .hero-secondary {
  background: color-mix(in srgb, var(--art-accent, #b9c5b4) 9%, var(--finish-surface));
  border: 1px solid color-mix(in srgb, var(--art-accent, #b9c5b4) 28%, transparent);
  padding: clamp(12px, 1.4vw, 20px);
  box-shadow: 0 16px 48px #0002;
}
.hero-game-tabs { margin-bottom: 12px; }
.hero-game-tab { min-height: 44px; }
.hero-art { gap: 8px; }
.site-header .nav-links a { transition: background-color .16s, border-color .16s; }
.site-header .nav-links a:hover { background-color: color-mix(in srgb, var(--text) 6%, transparent); }
.palette-row { min-height: 48px; }
.palette-menu { border-radius: 16px; margin-top: 8px; }
.btn { min-height: 46px; line-height: 1.45; }
.btn:not(:disabled):active { transform: translateY(1px); }
/* Use the same edges and rhythm in the public pages, member tools and admin. */
:is(.box, .card, .wallet-panel, .cr-panel, .tr-draw, .tr-result,
    .cir-feature, .member-registration, .workshop-rule, .workshop-art-card,
    .journey-card, .vote-blocked, .split-panel, .hub-cosmetics-group,
    .hub-cosmetic-card, .leaderboard-card, .admin-section, .admin-record,
    .admin-stat, .admin-shortcut, .admin-trames-card) {
  border-color: var(--finish-line);
}
:is(.box, .wallet-panel, .cr-panel, .tr-draw, .tr-result, .cir-feature) {
  padding: clamp(20px, 2.4vw, 32px);
}
:is(.box, .card, .journey-card, .workshop-art-card) > :first-child { margin-top: 0; }
:is(.box, .card, .journey-card, .workshop-art-card) > :last-child { margin-bottom: 0; }
:is(.num, .profile-stat-card, .hub-dash-stats > div, .pp-stats > div, .admin-stat) {
  font-variant-numeric: tabular-nums;
  border-color: var(--finish-line);
}
.empty-state { padding: clamp(24px, 4vw, 48px); line-height: 1.75; }
.empty-state p { max-width: 56ch; margin-inline: auto; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),
select, textarea {
  min-height: 46px;
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
  line-height: 1.5;
}
textarea { min-height: 120px; resize: vertical; }
/* Native file controls have an intrinsic width that can push admin grids off-screen. */
form label, .admin-settings-grid > * { min-width: 0; }
input[type=file] { width: 100%; max-width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
.field > label, .field > .label { line-height: 1.6; }
.at-switch[role=tablist] { gap: 6px; padding: 6px; border-radius: 18px; }
.at-switch[role=tablist] button { border-radius: 12px; padding: 16px 18px; }
.at-switch small { margin-top: 5px; }
.cir-type-card { padding: 22px; border-radius: 16px; }
.cir-type-card.is-selected { outline: 1px solid var(--finish-accent); outline-offset: -1px; }
.gallery-caption { padding-block: 14px 6px; line-height: 1.55; }
.gallery-caption span:last-child { font-size: 11px; }
.site-footer { border-top-width: 2px; }
.guide-dismiss, .guide-close { min-width: 40px; min-height: 40px; }
.guide-greeting { padding-right: 24px; }
.guide-greeting strong { padding-right: 36px; }
.guide-launcher { box-shadow: 0 8px 28px #0003; }
/* The floating player shares the normal widget layer; fullscreen keeps its own layer. */
.vc-radio.vc-radio-expanded:not(.vc-radio-fullscreen) { z-index: 170; }
/* The corner stays available without a greeting covering mobile content. */
@media (max-width: 650px) {
  .container { padding-inline: 20px; }
  .page-hero { padding-block: 30px 24px; }
  .page-hero h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.12; }
  .page-hero .lede { font-size: 16px; line-height: 1.75; }
  .hero { padding-top: 32px; }
  .hero .lead-row { flex-wrap: wrap; }
  .hero .lead-row .btn { flex: 1 1 145px; white-space: normal; text-align: center; }
  .eyebrow { line-height: 1.9; }
  :is(.box, .wallet-panel, .cr-panel, .tr-draw, .tr-result, .cir-feature) { padding: 20px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),
  select, textarea { font-size: 16px; }
  .at-switch[role=tablist] button { padding: 12px 10px; font-size: 12px; }
  .at-switch small { font-size: 11px; }
  .guide-launcher { width: 60px; height: 64px; border-radius: 16px; }
  .guide-launcher img { width: 52px; height: 43px; }
  .guide-launcher-label { font-size: 10px; }
  .guide-panel { bottom: 76px; max-height: calc(100dvh - 160px); }
  .guide-greeting { bottom: 76px; }
  .site-footer { padding-bottom: 100px; }
}
@media (max-width: 360px) {
  .container { padding-inline: 16px; }
  .at-switch[role=tablist] button { padding-inline: 7px; }
  .at-switch small { font-size: 10px; }
  .palette-source { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .site-header .nav-links a { transition: none; }
  .btn:not(:disabled):active { transform: none; }
}
