@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400;0,700;0,800;1,700;1,800&family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #e9edf1;
  --muted: #8e9aaa;
  --navy: #111c2c;
  --navy-deep: #0b1422;
  --panel: #17263a;
  --panel-light: #1b2c43;
  --line: rgba(224, 186, 113, 0.2);
  --gold: #ddb875;
  --gold-bright: #f3ce8a;
  --red: #c35e5d;
  --green: #638f7a;
  --blue: #3e6681;
  --shadow: 0 24px 80px rgba(3, 8, 15, 0.34);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--navy-deep); font-family: Manrope, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 5; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% -10%, rgba(73, 118, 144, .21), transparent 42%), linear-gradient(120deg, rgba(221, 184, 117, .04), transparent 36%); }
.site-header { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 28px 34px; display: flex; justify-content: space-between; align-items: center; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { display: flex; gap: 2px; align-items: center; }
.mini-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 2px; background: var(--green); color: #fff; font: 700 16px/1 'DM Mono', monospace; box-shadow: inset 0 -1px 0 rgba(8, 18, 25, .2); }
.brand-kicker, .chapter-label, .eyebrow { display: block; color: var(--gold); font: 500 10px 'DM Mono', monospace; letter-spacing: .15em; text-transform: uppercase; }
.brand-name { display: block; font: 800 19px Manrope, sans-serif; letter-spacing: -.05em; }
.page-shell { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 60px 34px 24px; }
.hero-copy { max-width: 680px; margin-bottom: 52px; }
.eyebrow { margin: 0 0 17px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 22px; font: 800 clamp(48px, 7vw, 84px)/.98 Alegreya, serif; letter-spacing: -.055em; }
h1 em { color: var(--gold-bright); font-weight: 700; }
.hero-lede { max-width: 515px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .8fr); gap: 22px; align-items: stretch; }
.game-card, .briefing-card { border: 1px solid var(--line); border-radius: 5px; background: linear-gradient(145deg, rgba(27,44,67,.98), rgba(18,31,49,.98)); box-shadow: var(--shadow); }
.game-card { min-height: 555px; padding: clamp(24px, 4vw, 45px); position: relative; overflow: hidden; }
.game-card::after { content: 'Diarrhea'; position: absolute; right: 3%; bottom: -20%; color: rgba(221,184,117,.025); font: 800 175px Alegreya, serif; pointer-events: none; }
.gate-view { max-width: 670px; position: relative; z-index: 1; padding: 50px 3% 30px; }
.card-heading h2, .game-topline h2 { margin: 8px 0 12px; font-size: 29px; letter-spacing: -.045em; }
.card-heading p { max-width: 480px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.name-form { margin-top: 54px; max-width: 630px; }
.name-form label { display: block; margin-bottom: 10px; font: 11px 'DM Mono', monospace; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; }
.input-row { display: flex; gap: 10px; }
.input-row input { min-width: 0; flex: 1; border: 1px solid rgba(224,186,113,.3); background: rgba(9,17,29,.45); color: var(--ink); border-radius: 3px; padding: 16px 17px; outline: none; font-size: 15px; }
.input-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(221,184,117,.1); }
.input-row input::placeholder { color: #68778b; }
.primary-button { border: 0; border-radius: 3px; padding: 0 21px; background: var(--gold); color: var(--navy-deep); font-weight: 800; font-size: 13px; white-space: nowrap; transition: .2s; }
.primary-button:hover { background: var(--gold-bright); transform: translateY(-1px); }
.form-hint { margin: 13px 0 0; color: #718096; font: 11px 'DM Mono', monospace; }
.error-message { min-height: 18px; margin-top: 14px; color: #ea9995; font-size: 12px; }
.briefing-card { padding: 38px 32px; position: relative; }
.crest { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 30px; border: 1px solid var(--gold); color: var(--gold-bright); font-size: 22px; transform: rotate(45deg); }
.crest::first-letter { display: inline-block; transform: rotate(-45deg); }
.briefing-card h2 { margin: 0 0 34px; font: 700 32px Alegreya, serif; letter-spacing: -.04em; }
.legend { display: grid; gap: 20px; }
.legend > div { display: flex; align-items: center; gap: 13px; }
.legend-tile { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 2px; font: 600 14px 'DM Mono', monospace; color: white; }
.legend-tile.correct { background: var(--green); }.legend-tile.present { background: var(--blue); }.legend-tile.absent { background: #344153; }
.legend strong, .legend small { display: block; }.legend strong { font-size: 12px; }.legend small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.briefing-rule { height: 1px; background: var(--line); margin: 34px 0 27px; }
.briefing-foot { margin: 28px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.game-view { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }.game-topline { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }.game-topline h2 { margin-bottom: 0; }.attempt-counter { color: var(--gold-bright); font: 700 26px Alegreya, serif; text-align: right; }.attempt-counter .muted { color: var(--muted); font-size: 17px; }.attempt-counter small { display: block; color: var(--muted); font: 9px 'DM Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.board { display: grid; gap: 6px; max-width: 320px; margin: 0 auto 26px; }.board-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }.tile { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(224,186,113,.25); border-radius: 2px; color: var(--ink); font: 700 23px 'DM Mono', monospace; transition: transform .15s; }.tile.filled { border-color: rgba(224,186,113,.64); transform: scale(.98); }.tile.correct { background: var(--green); border-color: var(--green); }.tile.present { background: var(--blue); border-color: var(--blue); }.tile.absent { background: #344153; border-color: #344153; color: #a8b0b9; }.tile.pop { animation: pop .16s ease-out; } @keyframes pop { 50% { transform: scale(1.06); } }
.end-panel { margin: 30px auto 0; padding: 25px 18px 8px; border-top: 1px solid var(--line); text-align: center; }.end-panel.reveal { animation: reveal .45s ease-out both; } @keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }.end-rune { color: var(--gold-bright); font-size: 22px; margin-bottom: 12px; }.end-panel .chapter-label { margin-bottom: 7px; }.end-panel h3 { margin: 0 0 11px; color: var(--gold-bright); font: 700 30px Alegreya, serif; letter-spacing: -.04em; }.end-flavour { max-width: 440px; margin: 0 auto 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }.answer-card, .definition-card { max-width: 410px; margin: 0 auto 9px; border: 1px solid rgba(224,186,113,.2); background: rgba(9,17,29,.3); border-radius: 3px; padding: 12px 16px; text-align: left; }.answer-label { display: block; margin-bottom: 5px; color: var(--gold); font: 10px 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }.answer-card strong { color: var(--ink); font: 700 21px 'DM Mono', monospace; letter-spacing: .12em; }.definition-card p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.55; }
.keyboard { display: flex; flex-direction: column; gap: 7px; align-items: center; }.key-row { display: flex; gap: 5px; width: 100%; justify-content: center; }.key { min-width: 31px; height: 42px; padding: 0 7px; border: 0; border-radius: 3px; background: #344153; color: var(--ink); font: 600 11px 'DM Mono', monospace; transition: .15s; }.key:hover { background: #46586d; }.key.wide { min-width: 52px; font-size: 10px; }.key.correct { background: var(--green); }.key.present { background: var(--blue); }.key.absent { background: #242f3f; color: #697689; }
.game-message { min-height: 35px; margin: 0 auto 5px; color: var(--gold-bright); text-align: center; font-size: 13px; }.game-message.error { color: #ea9995; }.text-button { display: block; margin: 21px auto 0; padding: 0; border: 0; background: none; color: #77869a; font: 11px 'DM Mono', monospace; text-decoration: underline; text-underline-offset: 3px; }.text-button:hover { color: var(--ink); }
.site-footer { display: flex; justify-content: space-between; padding: 60px 2px 0; color: #546377; font: 10px 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
[hidden] { display: none !important; }
@media (max-width: 760px) { .site-header { padding: 22px 20px; }.header-note { display: none; }.page-shell { padding: 48px 20px 20px; }.hero-copy { margin-bottom: 34px; }.game-layout { grid-template-columns: 1fr; }.game-card { min-height: 510px; padding: 24px 20px; }.gate-view { padding: 35px 0 20px; }.input-row { flex-direction: column; }.primary-button { min-height: 50px; }.briefing-card { padding: 30px 24px; }.site-footer { padding-top: 35px; gap: 20px; flex-direction: column; }.game-topline { margin-bottom: 18px; }.keyboard { width: 100%; max-width: 390px; margin: 0 auto; gap: 6px; }.key-row { gap: 4px; }.key { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 3px; }.key.wide { flex: 1.45 1 0; min-width: 0; } }
