:root {
  --bg: #07110f; --panel: rgba(15, 27, 25, .94); --panel-raised: #12221f;
  --surface-soft: #101e1b; --text: #f4f7f6; --muted: #96a7a2;
  --green: #35c978; --green-bright: #57e18f; --green-soft: rgba(53, 201, 120, .14);
  --amber: #e4aa3b; --amber-soft: rgba(228, 170, 59, .14);
  --coral: #ef6a68; --coral-soft: rgba(239, 106, 104, .13);
  --line: rgba(222, 240, 234, .11); --line-strong: rgba(222, 240, 234, .18);
  --shadow: 0 32px 90px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); }
body {
  min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text);
  background: radial-gradient(circle at 50% 8%, rgba(27, 112, 72, .21), transparent 33rem), linear-gradient(150deg, #06100e 0%, #091411 48%, #050b0a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before { position: fixed; inset: 0; z-index: -3; content: ""; opacity: .12; background-image: radial-gradient(rgba(255,255,255,.18) .5px, transparent .5px); background-size: 8px 8px; pointer-events: none; }
.ambient { position: fixed; z-index: -2; border-radius: 50%; pointer-events: none; }
.ambient-left { width: 33rem; height: 33rem; top: 9rem; left: -27rem; border: 1px solid rgba(53,201,120,.17); box-shadow: inset 0 0 90px rgba(53,201,120,.08); }
.ambient-right { width: 29rem; height: 29rem; top: 8rem; right: -24rem; border: 1px solid rgba(53,201,120,.14); box-shadow: inset 0 0 80px rgba(53,201,120,.06); }
button, input { font: inherit; } button { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { width: min(1380px, calc(100% - 48px)); min-height: 76px; margin: 28px auto 0; padding: 0 25px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 26px; background: rgba(10, 20, 18, .72); box-shadow: 0 16px 45px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(22px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand strong { font-size: 18px; font-weight: 680; letter-spacing: -.25px; }
.brand-ball { position: relative; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #86f2ae 0 5%, #28b968 18%, #08723d 58%, #034626 100%); box-shadow: 0 8px 22px rgba(22, 189, 96, .25), inset -6px -8px 12px rgba(0,0,0,.3); }
.brand-ball i { position: absolute; width: 10px; height: 10px; top: 8px; left: 9px; border-radius: 50%; background: rgba(255,255,255,.82); filter: blur(.3px); }
.help-button { min-height: 42px; padding: 0 8px 0 5px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 24px; color: #bdc9c5; background: transparent; cursor: pointer; transition: color .2s, background .2s; }
.help-button:hover { color: white; background: rgba(255,255,255,.045); }
.help-button > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 16px; }
.help-label { padding-right: 5px; font-size: 14px; font-weight: 560; }

.game-shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto 80px; }
.hero { max-width: 760px; margin: 72px auto 34px; text-align: center; animation: rise .6s ease both; }
.hero-accent { display: block; width: 74px; height: 7px; margin: 0 auto 28px; border-radius: 20px; background: linear-gradient(90deg, #22a95f, #61e79a); box-shadow: 0 0 25px rgba(53,201,120,.38); }
.eyebrow, .hint-kicker, .answer-kicker, .modal-kicker { margin: 0 0 11px; color: var(--green-bright); font-size: 11px; font-weight: 760; letter-spacing: 2.4px; text-transform: uppercase; }
h1, h2 { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.01; letter-spacing: -3.2px; font-weight: 760; }
.intro { margin: 18px auto; color: var(--muted); font-size: 17px; line-height: 1.5; }
.countdown-pill { width: max-content; max-width: 100%; min-height: 49px; margin: 20px auto 0; padding: 0 20px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(76,218,139,.23); border-radius: 99px; color: #c1d0cb; background: rgba(39, 116, 77, .14); box-shadow: inset 0 1px rgba(255,255,255,.035); font-size: 14px; }
.countdown-pill svg { width: 20px; fill: none; stroke: var(--green-bright); stroke-linecap: round; stroke-width: 1.8; }
.countdown-pill strong { color: var(--green-bright); font-variant-numeric: tabular-nums; }

.game-panel { padding: 28px; border: 1px solid var(--line-strong); border-radius: 30px; background: linear-gradient(145deg, rgba(18,32,29,.96), rgba(9,18,16,.97)); box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.025); animation: rise .65s .1s ease both; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.progress-box { display: flex; align-items: center; gap: 23px; flex: 1; }
.progress-box strong { min-width: 62px; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.progress-total { color: var(--muted); }
.guess-dots { display: flex; align-items: center; gap: 11px; }
.guess-dots i { width: 17px; height: 17px; border: 1.5px solid #63726e; border-radius: 50%; transition: .25s ease; }
.guess-dots i.used { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 4px #173d2d, 0 0 12px rgba(53,201,120,.28); }
#searchForm { position: relative; width: min(520px, 48%); }
.search-wrap { position: relative; }
.search-icon { position: absolute; width: 21px; left: 20px; top: 50%; transform: translateY(-50%); fill: none; stroke: #9baba6; stroke-linecap: round; stroke-width: 1.8; }
input[type="search"] { width: 100%; height: 58px; padding: 0 52px; border: 1px solid var(--line-strong); border-radius: 30px; outline: none; color: var(--text); background: rgba(7,15,14,.7); font-size: 16px; transition: border-color .2s, box-shadow .2s, background .2s; }
input[type="search"]::placeholder { color: #768781; }
input[type="search"]:focus { border-color: rgba(70,218,137,.62); background: #0b1715; box-shadow: 0 0 0 4px rgba(53,201,120,.1); }
input[type="search"]:disabled { opacity: .56; cursor: wait; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-spinner { position: absolute; right: 20px; top: 19px; width: 19px; height: 19px; border: 2px solid #263a35; border-top-color: var(--green); border-radius: 50%; opacity: 0; animation: spin .7s linear infinite; }
.search-spinner.active { opacity: 1; }
.search-results { position: absolute; z-index: 20; width: 100%; margin-top: 9px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: #10201d; box-shadow: 0 22px 60px rgba(0,0,0,.4); }
.search-results button { width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover, .search-results button:focus { background: var(--green-soft); outline: none; }
.search-results small { float: right; color: var(--green-bright); }
.hint-button { min-height: 50px; padding: 0 18px 0 8px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(228,170,59,.3); border-radius: 25px; color: #f4cf7d; background: var(--amber-soft); font-size: 13px; font-weight: 720; cursor: pointer; }
.hint-button:hover { border-color: rgba(228,170,59,.55); background: rgba(228,170,59,.2); }
.hint-button span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #171105; background: var(--amber); font-size: 16px; font-weight: 850; }

.column-labels { margin-top: 35px; padding: 0 13px 10px; display: grid; grid-template-columns: 250px repeat(6, 1fr); gap: 10px; color: #8fa09b; font-size: 11px; font-weight: 650; text-align: center; }
.column-labels span:first-child { text-align: left; }
.guess-list { display: grid; gap: 12px; }
.guess-row { padding: 9px; display: grid; grid-template-columns: 240px 1fr; gap: 10px; border: 1px solid var(--line-strong); border-radius: 22px; background: rgba(8,17,15,.56); box-shadow: inset 0 1px rgba(255,255,255,.02); animation: rise .35s ease both; }
.guess-name { padding: 9px 12px; display: flex; align-items: center; gap: 14px; border-right: 1px solid var(--line); }
.player-avatar { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #eafff2; background: radial-gradient(circle at 32% 25%, #35cf7b, #087741 65%, #04512d); box-shadow: 0 7px 22px rgba(25,179,92,.22); font-weight: 750; }
.guess-player-copy { min-width: 0; }
.guess-player-copy strong { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.guess-player-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .8px; text-transform: uppercase; }
.clue-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.clue { min-width: 0; min-height: 96px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 15px; text-align: center; }
.clue.exact { border-color: rgba(53,201,120,.22); background: var(--green-soft); }
.clue.close { border-color: rgba(228,170,59,.22); background: var(--amber-soft); }
.clue.miss { border-color: rgba(239,106,104,.2); background: var(--coral-soft); }
.clue-label { display: none; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.clue-value { min-height: 24px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.clue-arrow { color: currentColor; font-size: 18px; }
.clue-note { min-height: 24px; padding: 5px 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; font-size: 9px; font-weight: 750; letter-spacing: .55px; text-transform: uppercase; }
.clue.exact .clue-note { color: #79e8a6; background: rgba(53,201,120,.16); }
.clue.close .clue-note { color: #f2c96d; background: rgba(228,170,59,.15); }
.clue.miss .clue-note { color: #fa9290; background: rgba(239,106,104,.14); }

.empty-state { min-height: 118px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 16px; border: 1px dashed var(--line-strong); border-radius: 22px; color: var(--muted); text-align: left; }
.empty-state strong { display: block; color: #c5d0cd; font-size: 14px; }
.empty-state p { margin: 4px 0 0; font-size: 12px; }
.empty-orbit { position: relative; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #43534f; border-radius: 50%; }
.empty-orbit i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.legend { margin-top: 26px; padding: 19px 23px; display: flex; align-items: center; gap: 34px; border: 1px solid var(--line); border-radius: 19px; background: rgba(5,12,11,.33); }
.legend > span { display: grid; grid-template-columns: 36px auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.legend-icon { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 800; }
.legend-icon.exact { color: #9df0bc; border: 1px solid rgba(53,201,120,.35); background: var(--green-soft); }
.legend-icon.close { color: #f6cf7b; border: 1px solid rgba(228,170,59,.35); background: var(--amber-soft); }
.legend-icon.miss { color: #ff9997; border: 1px solid rgba(239,106,104,.32); background: var(--coral-soft); }
.legend b { font-size: 12px; }
.legend small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.hint-banner, .answer-card { margin-top: 22px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--panel-raised); box-shadow: 0 20px 50px rgba(0,0,0,.2); animation: rise .42s ease both; }
.hint-banner { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hint-banner h2 { margin: 0 0 5px; font-size: 22px; }
.hint-banner p { margin: 0; color: var(--muted); font-size: 13px; }
.secondary-button, .primary-button { min-height: 46px; padding: 0 21px; border: 0; border-radius: 23px; color: #032313; background: var(--green); font-weight: 720; cursor: pointer; box-shadow: 0 8px 22px rgba(29,185,95,.18); }
.secondary-button:hover, .primary-button:hover { background: var(--green-bright); }
.answer-card { padding: 29px; border-top-color: rgba(53,201,120,.65); }
.answer-heading { display: flex; gap: 17px; align-items: center; }
.answer-flag { font-size: 43px; line-height: 1; }
.answer-heading h2 { margin: 0 0 2px; font-size: 31px; letter-spacing: -.8px; }
.answer-heading p { margin: 0; color: var(--muted); }
.answer-facts { margin-top: 22px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.answer-facts div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.answer-facts span { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; }
.answer-facts strong { display: block; margin-top: 5px; font-size: 14px; }
.tomorrow-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
footer { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0 35px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #72827d; font-size: 10px; font-weight: 650; letter-spacing: .7px; text-transform: uppercase; }

.modal { width: min(530px, calc(100% - 28px)); padding: 27px; border: 1px solid var(--line-strong); border-radius: 27px; color: var(--text); background: #10201d; box-shadow: 0 35px 100px rgba(0,0,0,.55); }
.modal::backdrop { background: rgba(1,7,5,.76); backdrop-filter: blur(7px); }
.modal-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.modal h2 { margin: 0; font-size: 31px; letter-spacing: -.8px; }
.modal > p { color: var(--muted); line-height: 1.6; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%; color: #c7d1ce; background: rgba(255,255,255,.035); font-size: 24px; line-height: 1; cursor: pointer; }
.rule-grid { display: grid; gap: 9px; margin: 20px 0; }
.rule-grid > div { padding: 12px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.rule-grid p { margin: 0; color: var(--muted); font-size: 12px; }
.rule-grid p strong { display: block; margin-bottom: 2px; color: var(--text); }
.rule-swatch { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; font-weight: 850; }
.rule-swatch.exact { color: #9df0bc; background: var(--green-soft); }
.rule-swatch.close { color: #f6cf7b; background: var(--amber-soft); }
.rule-swatch.miss { color: #ff9997; background: var(--coral-soft); }
.dialog-note { padding-top: 16px; border-top: 1px solid var(--line); }
.full-button { width: 100%; margin-top: 20px; }
.hint-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; }
.hint-options button { padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 17px; color: var(--text); background: var(--surface-soft); cursor: pointer; }
.hint-options button:hover { border-color: rgba(53,201,120,.45); background: var(--green-soft); }
.hint-options small { color: var(--muted); font-size: 10px; }
.hint-icon { width: 35px; height: 35px; margin-bottom: 3px; display: grid; place-items: center; border-radius: 50%; color: #a7f2c3; background: var(--green-soft); font-weight: 850; }
.revealed-hint { margin-top: 18px; padding: 17px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(53,201,120,.2); border-radius: 16px; background: var(--green-soft); }
.revealed-hint > span { font-size: 29px; }
.revealed-hint strong { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.revealed-hint p { margin: 4px 0 0; line-height: 1.45; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 25px; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--line-strong); border-radius: 99px; color: white; background: #173029; box-shadow: 0 15px 45px rgba(0,0,0,.4); opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .column-labels { display: none; }
  .guess-row { grid-template-columns: 210px 1fr; margin-top: 17px; }
  .clue-grid { grid-template-columns: repeat(3, 1fr); }
  .clue-label { display: block; }
}
@media (max-width: 760px) {
  .site-header { width: calc(100% - 28px); min-height: 62px; margin-top: 14px; padding: 0 14px; border-radius: 21px; }
  .brand-ball { width: 34px; height: 34px; } .brand strong { font-size: 16px; } .help-label { display: none; }
  .game-shell { width: calc(100% - 24px); margin-bottom: 48px; }
  .hero { margin: 46px auto 27px; } .hero-accent { width: 55px; height: 5px; margin-bottom: 21px; }
  h1 { font-size: clamp(38px, 11.2vw, 54px); letter-spacing: -2.1px; }
  .intro { max-width: 330px; font-size: 15px; }
  .countdown-pill { min-height: 45px; padding: 0 16px; font-size: 13px; }
  .game-panel { padding: 16px; border-radius: 24px; }
  .control-row { align-items: stretch; flex-direction: column; gap: 17px; }
  .progress-box { justify-content: space-between; } .guess-dots { gap: 6px; }
  .guess-dots i { width: 13px; height: 13px; }
  #searchForm { width: 100%; } input[type="search"] { height: 55px; }
  .hint-button { width: 100%; justify-content: center; }
  .guess-row { grid-template-columns: 1fr; padding: 9px; }
  .guess-name { padding: 8px 7px 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .player-avatar { width: 46px; height: 46px; }
  .clue-grid { grid-template-columns: repeat(2, 1fr); }
  .clue { min-height: 98px; }
  .legend { padding: 16px; align-items: flex-start; justify-content: space-around; gap: 8px; }
  .legend > span { display: flex; flex-direction: column; text-align: center; }
  .legend-icon { width: 33px; height: 33px; margin-bottom: 6px; }
  .legend small { display: none; }
  .hint-banner { align-items: stretch; flex-direction: column; } .secondary-button { width: 100%; }
  .answer-card { padding: 23px 18px; } .answer-facts { grid-template-columns: repeat(2, 1fr); }
  .answer-facts div:last-child { grid-column: 1 / -1; }
  footer { width: calc(100% - 28px); align-items: center; flex-direction: column; gap: 8px; text-align: center; }
  .hint-options { grid-template-columns: 1fr; }
  .hint-options button { flex-direction: row; justify-content: start; text-align: left; padding: 12px; }
  .hint-options small { margin-left: auto; }
}
@media (max-width: 390px) {
  .progress-box { align-items: flex-start; flex-direction: column; gap: 11px; }
  .guess-dots { width: 100%; justify-content: space-between; }
  .clue-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .clue { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
