/* Midnight Cipher: night navy, candle gold, Cinzel + Lora. Mirrors the game's menu palette. */

@font-face { font-family: "Cinzel"; src: url("../fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
    --night-0: #03060b;
    --night-1: #060c16;
    --night-2: #0b1526;
    --panel: rgba(6, 11, 20, .88);
    --gold: #ebc773;
    --gold-bright: #ffeab8;
    --gold-dim: rgba(235, 199, 115, .55);
    --gold-line: rgba(235, 199, 115, .26);
    --ink: #e6ebf0;
    --muted: rgba(184, 199, 219, .74);
    --blue: #8fb6ec;
    --danger: #f28d7a;
    --ok: #9fd6a6;
    --radius: 4px;
    --wrap: 1180px;
    --display: "Cinzel", "Trajan Pro", Georgia, serif;
    --text: "Lora", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--night-0);
    color: var(--ink);
    font: 400 1.0625rem/1.7 var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
body::before { /* a faint blue pool of light behind everything */
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% -10%, rgba(30, 58, 100, .38), transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(235, 199, 115, .05), transparent 70%),
        linear-gradient(180deg, var(--night-1), var(--night-0) 60%);
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-color: var(--gold-line); text-underline-offset: .2em; transition: color .2s; }
a:hover { color: var(--gold-bright); }
::selection { background: rgba(235, 199, 115, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: .08em; line-height: 1.2; margin: 0 0 .6em; color: var(--gold); text-transform: uppercase; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: .9rem; display: block; }
.lede { font-size: 1.2rem; font-style: italic; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.rule { height: 1px; border: 0; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }

/* ---------- buttons ---------- */
.btn {
    --b: var(--gold-dim);
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    font: 700 .9rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
    color: var(--gold); background: rgba(235, 199, 115, .04);
    border: 1px solid var(--b); border-radius: var(--radius);
    padding: 1.05rem 1.7rem; min-height: 3.2rem; cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s, transform .2s;
}
.btn:hover { background: rgba(235, 199, 115, .14); border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 28px rgba(235, 199, 115, .16); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(180deg, #f3d58c, #d9b160); color: #1a1204; border-color: #f3d58c; box-shadow: 0 0 34px rgba(235, 199, 115, .22); }
.btn--primary:hover { background: linear-gradient(180deg, #ffe7ac, #ebc773); color: #1a1204; box-shadow: 0 0 46px rgba(235, 199, 115, .38); }
.btn--small { padding: .65rem 1rem; min-height: 2.4rem; font-size: .72rem; letter-spacing: .16em; }
.btn--danger { --b: rgba(242, 141, 122, .5); color: var(--danger); }
.btn--danger:hover { background: rgba(242, 141, 122, .12); border-color: var(--danger); color: var(--danger); box-shadow: none; }
.btn--ghost { border-color: transparent; background: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--gold); cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: .2em; }
button.link:hover { color: var(--gold-bright); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(3, 6, 11, .94), rgba(3, 6, 11, .78)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--gold-line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.4rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--gold); font: 700 1rem var(--display); letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.brand img { width: 2.4rem; height: 2.4rem; filter: drop-shadow(0 0 10px rgba(235, 199, 115, .35)); }
.nav { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.nav a, .nav .nav-user > summary { font: 700 .74rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: .9rem .8rem; border-radius: var(--radius); position: relative; transition: color .2s; cursor: pointer; list-style: none; }
.nav a::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .45rem; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .3s; }
.nav a:hover, .nav a[aria-current="page"], .nav .nav-user > summary:hover { color: var(--gold); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { padding: .7rem 1rem; min-height: 0; font-size: .72rem; margin-left: .5rem; }
.nav .btn::after { display: none; }
.nav-user { position: relative; }
.nav-user > summary::-webkit-details-marker { display: none; }
.nav-user[open] > summary { color: var(--gold); }
.nav-user .menu { position: absolute; right: 0; top: calc(100% + .3rem); min-width: 12rem; background: var(--night-1); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: .4rem; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); display: grid; }
.nav-user .menu a, .nav-user .menu button { text-align: left; padding: .8rem; }
.nav-user .menu button { background: none; border: 0; font: 700 .74rem var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.nav-user .menu button:hover { color: var(--gold); }
.nav-toggle { display: none; margin-left: auto; flex: none; width: 2.8rem; height: 2.8rem; background: none; border: 1px solid var(--gold-line); border-radius: var(--radius); cursor: pointer; padding: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 1.2rem; height: 1px; background: var(--gold); margin: 0; position: relative; transition: transform .25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -.4rem; } .nav-toggle span::after { top: .4rem; }
#nav-check { display: none; }

@media (max-width: 920px) {
    .nav-toggle { display: grid; place-items: center; }
    .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; margin: 0; padding: .6rem 1.25rem 1.2rem; gap: 0; background: rgba(3, 6, 11, .97); border-bottom: 1px solid var(--gold-line); display: none; }
    #nav-check:checked ~ .nav { display: flex; }
    #nav-check:checked ~ .nav-toggle span { background: transparent; }
    #nav-check:checked ~ .nav-toggle span::before { transform: translateY(.4rem) rotate(45deg); }
    #nav-check:checked ~ .nav-toggle span::after { transform: translateY(-.4rem) rotate(-45deg); }
    .nav a, .nav .nav-user > summary { padding: 1rem .4rem; border-bottom: 1px solid rgba(235, 199, 115, .08); }
    .nav a::after { display: none; }
    .nav .btn { margin: .8rem 0 0; }
    .nav-user .menu { position: static; border: 0; box-shadow: none; padding: 0 0 0 1rem; background: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: min(92vh, 56rem); display: flex; align-items: center; isolation: isolate; border-bottom: 1px solid var(--gold-line); }
.hero__bg { position: absolute; inset: 0; z-index: -4; background: var(--night-0) url("../img/title_bg.webp") 72% center / cover no-repeat; animation: drift 40s ease-in-out infinite alternate; }
.hero::after { /* fade to the page below, and darken the text side */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(3, 6, 11, .96) 0%, rgba(3, 6, 11, .72) 38%, rgba(3, 6, 11, .05) 75%),
        linear-gradient(180deg, transparent 70%, var(--night-0) 100%);
}
.hero__rain, .hero__fog { position: absolute; inset: -10%; pointer-events: none; z-index: -2; }
.hero__rain { background: url("../img/rain.png") 0 0 / 420px; opacity: .28; animation: rain 1.1s linear infinite; transform: rotate(0deg); mix-blend-mode: screen; }
.hero__fog { background: url("../img/fog.png") 0 0 / 900px; opacity: .13; animation: fog 90s linear infinite; mix-blend-mode: screen; }
.hero__fog--b { background-size: 1300px; opacity: .09; animation-duration: 140s; animation-direction: reverse; z-index: -3; }
.hero__inner { padding: 6rem 0 7rem; max-width: 40rem; }
.hero__emblem { width: clamp(4.5rem, 9vw, 6.5rem); margin-bottom: 1.5rem; animation: glow 6s ease-in-out infinite; }
.hero h1 { font-size: clamp(2.6rem, 7.4vw, 5rem); letter-spacing: .14em; margin-bottom: .3em; background: linear-gradient(180deg, #fff1c9 0%, var(--gold) 55%, #b98d3e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 28px rgba(235, 199, 115, .22)); }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #cbd6e6; margin-bottom: 2rem; }
.hero .btn-row { margin-bottom: 2.2rem; }
.rating-chip { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--muted); font-size: .95rem; padding: .5rem .9rem; border: 1px solid var(--gold-line); border-radius: 999px; background: rgba(3, 6, 11, .55); backdrop-filter: blur(4px); }
.rating-chip:hover { border-color: var(--gold-dim); color: var(--ink); }
.rating-chip strong { color: var(--gold); font-family: var(--display); letter-spacing: .06em; }
.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 1px; height: 3rem; background: linear-gradient(var(--gold), transparent); opacity: .6; animation: cue 2.4s ease-in-out infinite; }

@keyframes drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.1) translateX(-1.5%); } }
@keyframes rain { from { background-position: 0 0; } to { background-position: -110px 420px; } }
@keyframes fog { from { background-position: 0 0; } to { background-position: 900px 120px; } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 12px rgba(235, 199, 115, .25)); } 50% { filter: drop-shadow(0 0 30px rgba(235, 199, 115, .6)); } }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .2; } 50% { transform: scaleY(1); opacity: .7; } }

/* ---------- sections & panels ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section__head { text-align: center; max-width: 44rem; margin: 0 auto 3.2rem; }
.section__head .lede { margin-inline: auto; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }
.panel::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(235, 199, 115, .09); border-radius: 2px; pointer-events: none; }
.panel > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* feature cards */
.feature { text-align: center; padding-block: 2.2rem; }
.feature__icon { width: 3.4rem; height: 3.4rem; margin: 0 auto 1.2rem; background: var(--gold); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; filter: drop-shadow(0 0 10px rgba(235, 199, 115, .35)); }
.feature h3 { font-size: 1rem; letter-spacing: .16em; }
.feature p { color: var(--muted); font-size: .98rem; margin: 0; }

/* the headline case */
.case-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.case-feature__art { position: relative; border: 1px solid var(--gold-line); padding: 8px; background: var(--night-1); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 80px rgba(60, 110, 200, .12); }
.case-feature__art img { width: 100%; aspect-ratio: 704 / 800; object-fit: cover; }
.case-feature__art::after { content: ""; position: absolute; inset: 8px; box-shadow: inset 0 0 60px rgba(3, 6, 11, .55); pointer-events: none; }
.facts { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; grid-template-columns: repeat(3, auto); gap: 1rem 2rem; justify-content: start; }
.facts li { display: grid; gap: .1rem; }
.facts b { font: 700 1.6rem var(--display); color: var(--gold); letter-spacing: .05em; }
.facts span { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-family: var(--display); }
@media (max-width: 820px) { .case-feature { grid-template-columns: 1fr; } .case-feature__art { max-width: 26rem; margin-inline: auto; } }

/* case file cards */
.cases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.case { position: relative; border: 1px solid var(--gold-line); background: var(--panel); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s, border-color .35s, box-shadow .35s; }
.case__art { position: relative; aspect-ratio: 4 / 4.2; overflow: hidden; }
.case__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.case__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--panel)); }
.case__body { padding: 1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.case__no { font: 700 .68rem var(--display); letter-spacing: .24em; color: var(--gold); text-transform: uppercase; }
.case__title { font: 700 .95rem/1.35 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0; }
.case__tag { font-size: .85rem; line-height: 1.5; color: var(--muted); margin: 0; }
.case--open { border-color: var(--gold-dim); box-shadow: 0 0 40px rgba(235, 199, 115, .08); }
.case--open:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 50px rgba(235, 199, 115, .16); }
.case--open:hover img { transform: scale(1.06); }
.case--sealed .case__art img { filter: grayscale(.85) brightness(.5) blur(1px); }
.case--sealed .case__no, .case--sealed .case__title { color: var(--gold-dim); }
.case--sealed { border-color: rgba(235, 199, 115, .12); }
.stamp { position: absolute; z-index: 2; top: .8rem; right: .8rem; font: 700 .62rem var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-dim); background: rgba(3, 6, 11, .75); padding: .35rem .6rem; border-radius: 2px; }
.case--sealed .stamp { color: var(--muted); border-color: rgba(184, 199, 219, .3); }
@media (max-width: 1100px) { .cases { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .cases { grid-template-columns: 1fr; } }

/* quotes */
.quote { display: flex; flex-direction: column; gap: 1rem; }
.quote p { font-style: italic; font-size: 1.05rem; color: #d5dde8; }
.quote footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .88rem; color: var(--muted); }
.quote footer b { font: 700 .8rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.cta { text-align: center; background: radial-gradient(ellipse at center, rgba(30, 58, 100, .28), transparent 70%); }
.cta h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }

/* ---------- stars ---------- */
.stars { --size: 1.15rem; position: relative; display: inline-block; width: calc(var(--size) * 5); height: var(--size); vertical-align: middle; flex: none; }
.stars__bg, .stars__fill { position: absolute; left: 0; top: 0; height: 100%; -webkit-mask: url("../img/star.svg") 0 0 / var(--size) var(--size) repeat-x; mask: url("../img/star.svg") 0 0 / var(--size) var(--size) repeat-x; }
.stars__bg { width: 100%; background: rgba(235, 199, 115, .2); }
.stars__fill { background: linear-gradient(180deg, #ffe7ac, var(--gold)); filter: drop-shadow(0 0 4px rgba(235, 199, 115, .5)); }
.stars--lg { --size: 1.9rem; }

.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { width: 2.6rem; height: 2.6rem; cursor: pointer; background: rgba(235, 199, 115, .2); -webkit-mask: url("../img/star.svg") center / 100% no-repeat; mask: url("../img/star.svg") center / 100% no-repeat; transition: background .15s, transform .15s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { background: var(--gold); }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.star-word { display: block; min-height: 1.6rem; margin-top: .3rem; font-style: italic; color: var(--gold-dim); }

/* rating summary */
.summary { display: grid; grid-template-columns: auto 1fr; gap: 1rem 2.5rem; align-items: center; }
.summary__score { text-align: center; }
.summary__score b { display: block; font: 700 clamp(3.2rem, 8vw, 4.6rem)/1 var(--display); color: var(--gold-bright); text-shadow: 0 0 30px rgba(235, 199, 115, .3); }
.summary__score small { display: block; margin-top: .4rem; color: var(--muted); }
.bars { display: grid; gap: .45rem; min-width: 0; }
.bar { display: grid; grid-template-columns: 1.6rem 1fr 2rem; align-items: center; gap: .7rem; font-size: .85rem; color: var(--muted); font-family: var(--display); letter-spacing: .1em; }
.bar__track { height: .5rem; background: rgba(235, 199, 115, .1); border-radius: 99px; overflow: hidden; }
.bar__track i { display: block; height: 100%; background: linear-gradient(90deg, #b98d3e, var(--gold)); border-radius: 99px; }
.bar span:last-child { text-align: right; }
@media (max-width: 560px) { .summary { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.3rem; }
.field { display: grid; gap: .45rem; }
.field label, .field legend, .label { font: 700 .72rem var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dim); padding: 0; }
.field .hint { font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%; font: inherit; color: var(--ink); background: rgba(2, 5, 10, .7);
    border: 1px solid var(--gold-line); border-radius: var(--radius); padding: .85rem 1rem; min-height: 3rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { min-height: 8rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(184, 199, 219, .38); font-style: italic; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: rgba(2, 5, 10, .95); box-shadow: 0 0 0 3px rgba(235, 199, 115, .14); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 1.3rem) 50%, calc(100% - .95rem) 50%; background-size: .4rem .4rem; background-repeat: no-repeat; padding-right: 2.6rem; }
.check { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: var(--muted); }
.check input { accent-color: var(--gold); width: 1.1rem; height: 1.1rem; }
.error { color: var(--danger); font-size: .9rem; margin: 0; }
.field--invalid input, .field--invalid textarea, .field--invalid select { border-color: rgba(242, 141, 122, .65); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.count { text-align: right; font-size: .78rem; color: var(--muted); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; justify-content: space-between; }
.narrow { width: min(34rem, 100% - 2.5rem); margin-inline: auto; }
.mid { width: min(52rem, 100% - 2.5rem); margin-inline: auto; }

.page-head { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(1.8rem, 4vw, 3rem); text-align: center; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/title_glow.webp") center top / cover no-repeat; opacity: .35; -webkit-mask: linear-gradient(180deg, #000, transparent); mask: linear-gradient(180deg, #000, transparent); }
.page-head .lede { margin-inline: auto; }

/* alerts */
.toast { margin: 1.4rem auto 0; width: min(var(--wrap), 100% - 2.5rem); padding: .95rem 1.2rem; border: 1px solid var(--gold-dim); background: rgba(235, 199, 115, .08); border-radius: var(--radius); color: var(--gold-bright); animation: rise .5s both; }
.toast--error { border-color: rgba(242, 141, 122, .5); background: rgba(242, 141, 122, .08); color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- review + comment lists ---------- */
.stack { display: grid; gap: 1.1rem; }
.entry { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.3rem 1.4rem; }
.avatar { width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; font: 700 1.05rem var(--display); color: var(--gold); border: 1px solid var(--gold-dim); background: radial-gradient(circle at 30% 25%, rgba(235, 199, 115, .22), rgba(6, 11, 20, .9)); text-transform: uppercase; flex: none; }
.entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin-bottom: .35rem; }
.entry__head b { font: 700 .86rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.entry__head time { font-size: .82rem; color: var(--muted); }
.entry__body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: #d5dde8; }
.entry__actions { display: flex; gap: 1.2rem; margin-top: .7rem; font-size: .85rem; }
.badge { font: 700 .6rem var(--display); letter-spacing: .2em; text-transform: uppercase; color: #1a1204; background: var(--gold); border-radius: 2px; padding: .2rem .45rem; }
.badge--muted { background: transparent; color: var(--muted); border: 1px solid rgba(184, 199, 219, .3); }
.thread { display: grid; gap: .6rem; }
.replies { margin-left: 1.9rem; padding-left: 1.2rem; border-left: 1px solid var(--gold-line); display: grid; gap: .6rem; }
.replies .entry { padding: 1rem 1.1rem; }
.replies .avatar { width: 2.2rem; height: 2.2rem; font-size: .85rem; }
details.reply > summary { cursor: pointer; list-style: none; color: var(--gold); font-size: .85rem; }
details.reply > summary::-webkit-details-marker { display: none; }
details.reply > summary:hover { color: var(--gold-bright); }
details.reply[open] > summary { margin-bottom: .8rem; }
details.reply form { display: grid; gap: .7rem; }
details.reply textarea { min-height: 5rem; }
.entry.is-hidden { opacity: .5; }
.empty { text-align: center; color: var(--muted); font-style: italic; padding: 2.5rem 1rem; }
.mine-note { color: var(--gold-dim); font-style: italic; font-size: .95rem; }

.pager { display: flex; justify-content: center; align-items: center; gap: .4rem; margin-top: 2.2rem; flex-wrap: wrap; }
.pager a, .pager span { font: 700 .78rem var(--display); letter-spacing: .12em; min-width: 2.5rem; height: 2.5rem; display: grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--gold-line); border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.pager a:hover { border-color: var(--gold); color: var(--gold); }
.pager .on { background: rgba(235, 199, 115, .14); color: var(--gold-bright); border-color: var(--gold-dim); }
.pager .off { opacity: .35; }

/* ---------- play ---------- */
.stage { position: relative; background: #000; border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, .65), 0 0 90px rgba(60, 110, 200, .14); }
.stage__frame { position: relative; aspect-ratio: 16 / 9; background: #02040a; overflow: hidden; }
.stage__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem .4rem .3rem; font-size: .9rem; color: var(--muted); }
.stage--soon .stage__frame { display: grid; place-items: center; text-align: center; padding: 2rem; background: url("../img/loading_bg.webp") center / cover; }
.stage--soon .stage__frame > div { max-width: 30rem; }
.stage--soon img { width: 5.5rem; margin: 0 auto 1.2rem; animation: glow 6s ease-in-out infinite; }
.stage--soon h2 { margin-bottom: .5rem; }
.stage--soon p { color: var(--muted); }
.stage__launch { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(rgba(3, 6, 11, .35), rgba(3, 6, 11, .8)), url("../img/title_bg_1200.webp") center / cover; text-align: center; padding: 1rem; z-index: 2; }
.stage__launch[hidden] { display: none; }
.stage__launch img { width: 5rem; margin: 0 auto 1rem; }
.stage__launch p { color: var(--muted); font-size: .92rem; margin: 1rem 0 0; }
.controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.controls .panel { padding: 1.2rem; }
.controls h3 { font-size: .82rem; letter-spacing: .2em; margin-bottom: .5rem; }
.controls p { font-size: .92rem; color: var(--muted); margin: 0; }
kbd { font: 700 .72rem var(--display); color: var(--gold); border: 1px solid var(--gold-dim); border-bottom-width: 2px; border-radius: 3px; padding: .1rem .4rem; background: rgba(235, 199, 115, .06); }
@media (max-width: 900px) { .controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .controls { grid-template-columns: 1fr; } .stage__frame { aspect-ratio: 4 / 3; } }
.stage:fullscreen { padding: 0; border: 0; background: #000; display: flex; flex-direction: column; }
.stage:fullscreen .stage__frame { aspect-ratio: auto; flex: 1; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--gold-line); background: linear-gradient(180deg, transparent, rgba(3, 6, 11, .9)); padding: 3rem 0 2.2rem; margin-top: 3rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 1rem; max-width: 24rem; }
.footer-brand img { width: 3.4rem; flex: none; }
.footer-brand p { margin: 0; font-size: .92rem; color: var(--muted); font-style: italic; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.footer-links a { font: 700 .72rem var(--display); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
.legal { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid rgba(235, 199, 115, .09); font-size: .82rem; color: rgba(184, 199, 219, .5); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }

/* ---------- admin ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; border-bottom: 1px solid var(--gold-line); }
.admin-nav a { font: 700 .74rem var(--display); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: .9rem 1.1rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { color: var(--gold); border-color: var(--gold); }
.admin-nav .pill { margin-left: .4rem; background: var(--gold); color: #1a1204; border-radius: 99px; padding: .1rem .5rem; font-size: .65rem; }
.stat { text-align: center; }
.stat b { display: block; font: 700 2.4rem/1 var(--display); color: var(--gold-bright); }
.stat span { font: 700 .68rem var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.row-actions form { margin: 0; }
.tag { display: inline-block; font: 700 .62rem var(--display); letter-spacing: .18em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 2px; border: 1px solid var(--gold-dim); color: var(--gold); }
.tag--bug { color: var(--danger); border-color: rgba(242, 141, 122, .5); }
.tag--praise { color: var(--ok); border-color: rgba(159, 214, 166, .45); }
.tag--new { background: var(--gold); color: #1a1204; }
.entry.is-unread { border-color: var(--gold-dim); box-shadow: 0 0 30px rgba(235, 199, 115, .07); }
.filter { display: flex; gap: 1rem; margin-bottom: 1.4rem; font-size: .92rem; }
.filter a[aria-current] { color: var(--gold-bright); font-weight: 600; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* nav buttons must keep their own text colour */
.nav a.btn--primary { color: #1a1204; }
.nav a.btn--primary:hover { color: #1a1204; }

.stage__launch .phone-note { display: none; }
@media (pointer: coarse) { .stage__launch .phone-note { display: block; } }

/* Small phones: keep the wordmark and the menu button on one line. */
@media (max-width: 420px) {
    .site-header .wrap { gap: .8rem; }
    .brand { gap: .6rem; font-size: .84rem; letter-spacing: .18em; min-width: 0; }
    .brand img { width: 2.1rem; height: 2.1rem; }
}

/* Sign in with Google */
.social { margin-top: 1.2rem; display: grid; gap: 1rem; }
.social__or { margin: 0; display: flex; align-items: center; gap: 1rem; color: var(--muted); font: 700 .72rem var(--display); letter-spacing: .2em; text-transform: uppercase; }
.social__or::before, .social__or::after { content: ""; flex: 1; height: 1px; background: var(--gold-line); }
.btn--google { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; background: #fff; color: #1f1f1f; border-color: #fff; }
.btn--google:hover { background: #f1f3f4; color: #1f1f1f; border-color: #f1f3f4; }

/* Analytics consent */
.consent { position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem; max-width: 40rem; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; padding: 1rem 1.2rem; background: var(--night-1); border: 1px solid var(--gold-line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 18rem; font-size: .92rem; color: var(--muted); }
.consent__actions { display: flex; gap: .6rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.footer-links .link-button { font: inherit; letter-spacing: inherit; text-transform: inherit; }
