/* Tallinn D&D Hideout — ttrpg.ee
   Warm "forge" theme. Heritage: ember black, vermilion #ff6435 highlight and
   azure #3aa3ff secondary — the two colours of the brand logo.
   Fonts: Cinzel Decorative (wordmark/hero), Cinzel (headings), Lora (body),
   IBM Plex Mono (data: names, times, channels). */

:root {
  /* The site is natively dark. Declaring it (a) gives the browser dark
     scrollbars and form controls and (b) tells re-colouring extensions such as
     Dark Reader that this is not a light page that needs transforming. */
  color-scheme: dark;
  --bg: #0d0807;
  --card: #170f0c;
  --card-hi: #241612;
  --accent: #ff6435;        /* primary highlight: hotter and more vivid than the amber */
  --accent-hi: #ff8f63;     /* hover / brighter, also the hero highlight */
  --accent-2: #5cc0ff;      /* logo azure: links and secondary accents */
  --accent-2-hi: #8ed4ff;
  --text: #fbf2ea;
  --text-2: #d5bdac;
  --text-3: #a8907d;        /* dim metadata, still 5.8:1 on the darkest surface */
  --line: #5a3e2f;          /* borders: 2.05:1 on the page, 1.81:1 on cards */
  --scrim: rgba(10, 6, 5, .93);
  --live: #ff3d5c;
  --radius: 14px;
  --font-display: "Cinzel Decorative", serif;
  --font-head: "Cinzel", serif;
  --font-body: "Lora", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-2-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .01em; }
.dim { color: var(--text-3); }
.muted { color: var(--text-2); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: rgba(13, 8, 7, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 38px; height: 38px; }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: .04em; color: var(--text);
  white-space: nowrap;
}
.brand .wordmark small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: .14em; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--text-2); font-family: var(--font-mono); font-size: 13px;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover { color: var(--text); background: var(--card); }
.main-nav a.nav-live .dot { display: none; }
.main-nav a.nav-live.is-live .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); margin-right: 6px; animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.btn {
  display: inline-block; border-radius: 999px; cursor: pointer;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  padding: 10px 22px; border: 1px solid transparent; transition: all .15s ease-out;
}
.btn-primary { background: var(--accent); color: #2b0e02; }
.btn-primary:hover { background: var(--accent-hi); color: #2b0e02; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("../img/bkg.webp") center / cover no-repeat;
  opacity: .19; filter: saturate(.85) sepia(.32) hue-rotate(-10deg) brightness(1.06) contrast(1.04);
  mask-image: radial-gradient(120% 100% at 70% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 70% 0%, #000 0%, transparent 78%);
}
.hero .container {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
  padding-top: 88px; padding-bottom: 88px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5.4vw, 56px); line-height: 1.12;
  letter-spacing: .02em; margin: 0 0 20px;
}
/* Solid, bright highlight. It used to be a gradient clipped to the text, but a
   gradient is the text paint itself, so a re-colouring extension (Dark Reader)
   can invert it and leave the word invisible on the dark hero. */
.hero h1 .accent { color: var(--accent-hi); }
.hero .sub { font-size: 19px; color: var(--text-2); max-width: 46ch; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero .status-line { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }

/* Twitch player */
.player-box {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-box .offline {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
}
.player-box .offline .ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  color: var(--text-3); font-size: 26px;
}
.player-box .offline p { margin: 0; color: var(--text-2); max-width: 34ch; }
.player-box .offline .mono { color: var(--text-3); }
/* Offline: a recent session video plays in the same 16:9 frame. */
.player-box .offline.vid { padding: 0; }
.player-box .offline.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-pill {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(13, 8, 7, .82); border: 1px solid rgba(255, 61, 92, .5);
  border-radius: 999px; padding: 4px 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--live);
}
.live-pill .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 7px; animation: pulse 2s infinite; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }
/* keep anchor targets clear of the sticky header */
section[id] { scroll-margin-top: 76px; }
.sec-head { margin-bottom: 40px; }
.sec-head h2 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(24px, 3vw, 34px); letter-spacing: .02em; margin: 0 0 8px;
}
.sec-head .lede { color: var(--text-2); max-width: 60ch; margin: 0; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); margin-right: 10px; animation: pulse 2s infinite; vertical-align: baseline; }
.upd-stamp { margin-left: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; transition: transform .15s ease-out, border-color .15s ease-out;
}
.feature:hover { transform: translateY(-2px); border-color: rgba(255, 100, 53, .4); }
.feature .glyph { font-size: 26px; margin-bottom: 14px; display: block; }
.feature h3 { font-family: var(--font-head); font-size: 17px; margin: 0 0 8px; letter-spacing: .02em; }
.feature p { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.6; }

/* ---------- creators ---------- */
.creators { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.creator-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .15s ease-out, border-color .15s ease-out;
}
.creator-card:hover { transform: translateY(-2px); border-color: rgba(255, 100, 53, .4); }
.creator-card .avatar { width: 84px; height: 84px; border-radius: 50%; flex: 0 0 auto; border: 1px solid var(--line); }
.creator-card h3 { font-family: var(--font-head); font-size: 20px; margin: 4px 0 8px; }
.creator-card .tag { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); }
.creator-card p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
.creator-card .links { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-yt { border-color: rgba(255, 32, 68, .5); color: #ff5c74; background: rgba(255, 0, 60, .07); }
.btn-yt:hover { border-color: #ff2044; color: #ff8093; background: rgba(255, 0, 60, .14); }
.creator-join {
  background: rgba(255, 100, 53, .05); border: 1px dashed rgba(255, 100, 53, .35);
  border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.creator-join h3 { font-family: var(--font-head); font-size: 20px; margin: 0; }
.creator-join p { margin: 0 0 8px; color: var(--text-2); font-size: 15px; }

/* ---------- games ---------- */
.games-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.games-list { display: grid; gap: 16px; }
.game-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s ease-out; }
.game-card:hover { border-color: rgba(255, 100, 53, .35); }
.gc-top { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.gc-top .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gc-top h3 { font-family: var(--font-head); font-size: 18px; margin: 0; letter-spacing: .01em; }
.gc-stamp { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.gc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
  background: var(--card-hi); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; display: inline-block;
}
a.chip { transition: border-color .15s ease-out, color .15s ease-out; }
a.chip:hover { border-color: rgba(58, 163, 255, .5); color: var(--accent-2); }
.gc-feed {
  display: grid; gap: 10px; padding: 16px 20px 20px;
  /* the last 30 posts live in a scroll box that opens at the newest message */
  max-height: 420px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gc-feed::-webkit-scrollbar { width: 10px; }
.gc-feed::-webkit-scrollbar-track { background: transparent; }
.gc-feed::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
.gc-feed::-webkit-scrollbar-thumb:hover { background: var(--accent-2); background-clip: content-box; }
.msg { background: var(--card-hi); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; }
.msg .who { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.msg .who .name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--text); }
.msg .who time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); white-space: nowrap; }
/* Tiny userpic of whoever posted the message or the photo */
.ava {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--card-hi); object-fit: cover;
  vertical-align: -4px;
}
.msg .who .who-l { display: flex; align-items: center; gap: 7px; min-width: 0; }
.msg .who .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .body { font-size: 14.5px; color: var(--text-2); word-wrap: break-word; }
.msg .body a { color: var(--accent-2); }
.msg .body .mention { color: var(--accent-2); font-family: var(--font-mono); font-size: 13px; }
.msg .body .role { color: #c79af0; font-family: var(--font-mono); font-size: 13px; }
.msg .body .event-chip {
  display: inline-block; margin: 4px 0; padding: 6px 12px;
  background: rgba(255, 100, 53, .07); border: 1px solid rgba(255, 100, 53, .3);
  border-radius: 8px; color: var(--text); font-family: var(--font-mono); font-size: 13px;
}
.msg .body .event-chip small { color: var(--accent); margin-left: 8px; }

/* compressed state for tables quiet for more than 5 days */
.gc-stamp.gc-stale { color: var(--text-3); font-style: italic; }
.game-card.collapsed .gc-feed,
.game-card.collapsed .empty-note { display: none; }
.game-card.collapsed .gc-top { border-bottom: 0; }
.gc-toggle {
  display: block; width: 100%; border: 0; border-top: 1px solid var(--line);
  background: var(--card-hi); color: var(--text-3);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding: 11px 20px; cursor: pointer; text-align: left;
  transition: color .15s ease-out, border-color .15s ease-out;
}
.gc-toggle:hover { color: var(--accent-2); border-top-color: rgba(58, 163, 255, .35); }
.gc-toggle .tg-close { display: none; }
.game-card:not(.collapsed) .gc-toggle .tg-open { display: none; }
.game-card:not(.collapsed) .gc-toggle .tg-close { display: inline; }
.msg .thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.msg .thumbs a { display: block; }
.msg .thumbs img { height: 72px; width: auto; max-width: 160px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #000; }

.invites { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inv-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.inv-head h3 { font-family: var(--font-head); font-size: 17px; margin: 0 0 6px; }
.inv-head .src { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.inv-head p { margin: 8px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.invite-row { display: block; position: relative; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.invite-row:last-child { border-bottom: 0; }
.invite-row:hover { background: var(--card-hi); }
.invite-row .t { color: var(--text); font-size: 14.5px; line-height: 1.45; margin-bottom: 4px; padding-right: 18px; }
.invite-row:hover .t { color: var(--accent-2); }
.invite-row .s { font-size: 13px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.invite-row .m { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.invite-row .arrow { position: absolute; top: 16px; right: 16px; color: var(--text-3); }
.invite-row:hover .arrow { color: var(--accent-2); }
/* "+ N more open threads" footer of the panel */
.invite-more {
  display: block; padding: 12px 20px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-2);
  background: var(--card-hi);
}
a.invite-more:hover { color: var(--accent-2-hi); }
.empty-note { color: var(--text-3); font-size: 14px; padding: 12px 4px; }

/* ---------- gallery teaser ---------- */
.teaser-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 26px; }
.teaser-strip a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.teaser-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease-out; }
.teaser-strip a:hover img { transform: scale(1.06); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background:
  radial-gradient(60% 120% at 50% 0%, rgba(255, 100, 53, .09), transparent 70%); }
.cta-band h2 { font-family: var(--font-head); font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px; }
.cta-band p { color: var(--text-2); max-width: 52ch; margin: 0 auto 26px; }
.cta-band .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 34px; color: var(--text-3); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; margin-bottom: 22px; }
.site-footer h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 6px 0; font-size: 14px; }
.site-footer .legal { font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer .legal-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }

/* footer visit counter: eye icon + total, breakdown in the tooltip */
.visits {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3); cursor: default;
}
.visits[hidden] { display: none; }
.visits .eye { width: 16px; height: 16px; transition: color .15s ease-out; }
.visits:hover .eye, .visits:focus-visible .eye { color: var(--accent-2); }
.visits:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.visits .n { color: var(--text-2); }
.visits-tip {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20;
  display: flex; flex-direction: column; gap: 3px; white-space: nowrap;
  padding: 9px 11px; border-radius: 8px;
  background: var(--card-hi); border: 1px solid var(--line); color: var(--text-2);
  font-size: 11.5px; box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(3px);
  transition: opacity .15s ease-out, transform .15s ease-out, visibility .15s;
}
.visits:hover .visits-tip, .visits:focus-visible .visits-tip, .visits:focus-within .visits-tip {
  opacity: 1; visibility: visible; transform: none;
}
.visits-tip b { color: var(--text); font-weight: 600; }

/* ---------- gallery page ---------- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 50px); margin: 0 0 10px; letter-spacing: .02em; }
.page-head p { color: var(--text-2); margin: 0; max-width: 60ch; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.g-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 4/3; display: block; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease-out; }
.g-item:hover img { transform: scale(1.05); }
.g-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 12px 9px;
  background: linear-gradient(transparent, rgba(10, 6, 5, .92));
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  display: flex; flex-direction: column; gap: 3px;
}
/* line 1: the poster's userpic and name; line 2: the channel, then the time.
   Both lines stay on one line and are cut with an ellipsis when they run out. */
.g-item .cap-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.g-item .cap-who .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item .cap-meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.g-item .cap .ch {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-2);
}
.g-item .cap time { flex: 0 0 auto; margin-left: auto; color: var(--text-3); font-size: 11px; }
.g-item .cap .ava { width: 18px; height: 18px; }
.gallery-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-3); margin-bottom: 20px; }

/* lightbox */
#lightbox { border: 0; background: transparent; padding: 0; max-width: none; }
#lightbox::backdrop { background: var(--scrim); }
.lb-stage { position: relative; width: min(94vw, 1400px); margin: 0 auto; }
.lb-stage img { display: block; max-width: 94vw; max-height: 82vh; margin: 0 auto; border-radius: 6px; }
.lb-cap { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); text-align: center; padding: 12px 0 0; }
.lb-cap a { color: var(--accent-2); }
.lb-btn {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 100;
  background: rgba(13, 8, 7, .72); border: 1px solid var(--line); color: var(--text);
  border-radius: 50%; width: 46px; height: 46px; font-size: 20px; cursor: pointer;
}
.lb-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close { top: 16px; right: 16px; transform: none; font-size: 16px; }

/* ---------- arrival animation ---------- */
/* Whatever the polls bring in fades in where it belongs instead of snapping. */
@keyframes item-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.is-new, .g-item.is-new { animation: item-in .4s ease-out both; }

/* ---------- scrollbars ---------- */
/* Themed, thin, and only visible as a hint until hovered. */
html { scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 999px;
  border: 3px solid var(--bg); background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); background-clip: content-box; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .games-wrap { grid-template-columns: 1fr; gap: 16px; }
  .creators { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .teaser-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  /* Header: brand + join button on the first row, the nav as a scrollable
     second row (below this width it used to disappear completely). */
  .site-header { height: auto; }
  .site-header .container { flex-wrap: wrap; gap: 8px 12px; padding-top: 9px; padding-bottom: 9px; }
  .main-nav { display: flex; order: 3; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  section[id] { scroll-margin-top: 104px; }
  .hero .container { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; padding-bottom: 48px; }
  .player-box { order: -1; }
}
@media (max-width: 760px) {
  section { padding: 60px 0; }
  .sec-head { margin-bottom: 28px; }
  .page-head { padding: 44px 0 30px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .site-header .container { padding: 9px 16px; }
  .brand { gap: 10px; }
  .brand img { width: 34px; height: 34px; }
  .brand .wordmark { font-size: 14px; }
  .brand .wordmark small { display: none; }
  section { padding: 52px 0; }
  .sec-head { margin-bottom: 24px; }
  .upd-stamp { display: block; margin: 6px 0 0; }
  .hero .container { gap: 22px; padding-top: 34px; padding-bottom: 40px; }
  .hero h1 { margin-bottom: 14px; }
  .hero .sub { font-size: 17px; margin-bottom: 22px; }
  .hero .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero .actions .btn { text-align: center; }
  .features { grid-template-columns: 1fr; }
  .feature { padding: 20px 18px; }
  .creator-card { padding: 20px; gap: 16px; }
  .creator-card .avatar { width: 64px; height: 64px; }
  .creator-join { padding: 20px; }
  .gc-top { padding: 16px 16px 14px; }
  .gc-feed { padding: 14px 16px 16px; gap: 8px; max-height: 330px; }
  .inv-head { padding: 16px 16px 12px; }
  .invite-row { padding: 13px 16px; }
  .invite-more { padding: 12px 16px; }
  .teaser-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .g-item .cap { font-size: 10.5px; padding: 10px 8px 7px; gap: 2px; }
  .g-item .cap .ava { width: 16px; height: 16px; }
  .g-item .cap time { display: none; }
  .cta-band .row { flex-direction: column; gap: 10px; }
  .cta-band .row .btn { width: 100%; text-align: center; }
  .site-footer { padding: 32px 0 26px; }
  .site-footer .cols { flex-direction: column; gap: 20px; }
  .site-footer .legal { flex-direction: column; gap: 4px; }
  .lb-btn { width: 40px; height: 40px; font-size: 18px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
