:root {
  --cream: #f6f0e6;
  --cream-2: #efe6d6;
  --paper: #fffaf2;
  --navy: #13254a;
  --navy-2: #0b1733;
  --ink: #1d2a44;
  --muted: #5b6680;
  --orange: #e8762c;
  --orange-d: #c95c16;
  --yellow: #ffc531;
  --blue: #2bb3f0;
  --purple: #8b4fd8;
  --green: #5fb84a;
  --red: #ef4a2b;
  --holo: #6fd8ff;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(19, 37, 74, .12);
  --heading: #13254a;
  --header-bg: rgba(246, 240, 230, .92);
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .4em; color: var(--heading); font-weight: 600; }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--orange-d); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
section { padding: 88px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 0 var(--orange-d); }
.btn-primary:hover { box-shadow: 0 8px 0 var(--orange-d); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 6px 0 var(--navy-2); }
.btn-outline { background: transparent; color: var(--heading); border: 2px solid var(--heading); }
.btn-sm { font-size: .95rem; padding: .5rem 1rem; min-height: 40px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(19,37,74,.08);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--heading); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-family: var(--font-head); font-weight: 500; padding: .45rem .8rem; border-radius: 999px; color: var(--heading); font-size: 1rem; }
.nav a:hover { background: var(--cream-2); }
.nav a.nav-star { background: var(--red); color: #fff; }
.nav a.nav-star:hover { background: #d63c1f; }
.lang { display: flex; border: 2px solid var(--heading); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.lang button { border: 0; background: transparent; font-family: var(--font-head); font-weight: 600; padding: .3rem .7rem; cursor: pointer; color: var(--heading); min-height: 36px; }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: var(--navy); color: #fff; border: 0; border-radius: 12px; width: 46px; height: 46px; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); padding: 12px 16px 20px; box-shadow: var(--shadow); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1rem; font-size: 1.1rem; }
  .brand span { display: none; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% 10%, #2a3f86 0%, transparent 60%), linear-gradient(180deg, #0b1733 0%, #1a2b5c 70%, #3a2a4f 100%);
  padding: 64px 0 80px;
}
.stars::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 120px 80px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 200px 150px, #cfe9ff 50%, transparent 51%),
    radial-gradient(2px 2px at 300px 60px, #ffe9a8 50%, transparent 51%),
    radial-gradient(1px 1px at 380px 190px, #fff 50%, transparent 51%);
  background-size: 420px 220px; opacity: .55;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; }
.hero h1 .hl { color: var(--yellow); }
.hero p.lead { color: #d8e2ff; }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; background: rgba(239,74,43,.9); color: #fff; font-family: var(--font-head); font-weight: 600; padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.4rem; }
.hero-cover { position: relative; justify-self: center; max-width: 320px; }
.hero-cover img { border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.45); transform: rotate(2deg); }
.hero-cover .sticker { position: absolute; left: -26px; bottom: 28px; background: var(--yellow); color: var(--heading); font-family: var(--font-head); font-weight: 700; padding: .55rem 1rem; border-radius: 14px; transform: rotate(-6deg); box-shadow: var(--shadow); }

.countdown { display: flex; gap: 12px; margin-top: 1.6rem; flex-wrap: wrap; }
.countdown .cd { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: .6rem .9rem; min-width: 84px; text-align: center; }
.countdown .cd b { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.countdown .cd span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #b9c6ea; }
.cd-label { font-family: var(--font-head); color: var(--yellow); margin-top: 1.4rem; font-size: 1.05rem; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cover { max-width: 280px; order: -1; }
  .hero-cover .sticker { left: -10px; }
}

/* YOU */
.you-section { background: var(--paper); }
.you-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.you-figure { position: relative; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--cream-2) 70%); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; max-width: 420px; margin-inline: auto; width: 100%; }
.you-figure img { height: 92%; width: auto; object-fit: contain; filter: hue-rotate(var(--you-hue, 0deg)); transition: filter .4s; }
.you-figure .you-name-tag { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; padding: .3rem 1rem; border-radius: 999px; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.you-form { display: grid; gap: 18px; margin-top: 1.2rem; }
.you-form label { font-family: var(--font-head); font-weight: 600; color: var(--heading); display: block; margin-bottom: .4rem; }
.you-form input[type=text] { width: 100%; max-width: 380px; font: inherit; font-size: 1.15rem; padding: .7rem 1rem; border-radius: 14px; border: 2px solid #d5cbb8; background: #fff; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #d5cbb8; cursor: pointer; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--heading); transform: scale(1.08); }
.you-greeting { background: var(--navy); color: #fff; border-radius: 18px; padding: 1rem 1.2rem; font-family: var(--font-head); font-size: 1.15rem; position: relative; }
.you-greeting::before { content: ""; position: absolute; left: 28px; top: -10px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--heading); }
@media (max-width: 860px) { .you-grid { grid-template-columns: 1fr; } .you-figure { max-width: 300px; } }

/* Play section */
.play { background: linear-gradient(180deg, #0b1733, #13254a); color: #e6ecff; position: relative; overflow: hidden; }
.play h2, .play h3 { color: #fff; }
.play .lead { color: #b9c6ea; }
.play .eyebrow { color: var(--holo); }
.sim-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 2rem 0 1.4rem; position: relative; }
.sim-tabs button { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid rgba(111,216,255,.4); background: rgba(111,216,255,.06); color: #dff6ff; cursor: pointer; min-height: 48px; }
.sim-tabs button[aria-selected="true"] { background: var(--holo); color: var(--navy-2); border-color: var(--holo); }
.sim-panel { position: relative; background: rgba(9, 20, 46, .75); border: 1px solid rgba(111,216,255,.3); border-radius: var(--radius); padding: 24px; box-shadow: 0 0 40px rgba(111,216,255,.08) inset; }
.sim-panel[hidden] { display: none; }
.sim-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.sim-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--holo); flex-shrink: 0; background: #fff; }
.boogie-says { background: rgba(111,216,255,.1); border: 1px solid rgba(111,216,255,.35); border-radius: 16px; padding: .7rem 1rem; color: #e6f7ff; }
.boogie-says b { color: var(--holo); font-family: var(--font-head); }
.sim-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.sim-canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #050c1f; align-self: start; }
.sim-canvas-wrap canvas { display: block; width: 100%; height: auto; touch-action: manipulation; }
.sim-side { display: flex; flex-direction: column; gap: 14px; }
.planet-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.planet-pick button { font: inherit; font-family: var(--font-head); font-weight: 500; font-size: .98rem; padding: .55rem .6rem; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); color: #fff; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.planet-pick button .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.planet-pick button[aria-pressed="true"] { border-color: var(--yellow); background: rgba(255,197,49,.14); }
.readout { background: rgba(255,255,255,.06); border-radius: 14px; padding: .8rem 1rem; }
.readout dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: #9fb0d8; }
.readout dd { margin: 0 0 .5rem; font-family: var(--font-head); font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.readout dd:last-child { margin-bottom: 0; }
.fact-card { background: rgba(255,197,49,.1); border: 1px solid rgba(255,197,49,.35); border-radius: 14px; padding: .9rem 1rem; color: #fff3cf; min-height: 120px; }
.fact-card h4 { color: var(--yellow); font-size: 1.25rem; margin-bottom: .3rem; }
.sim-more { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: #b9c6ea; }
.mars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mars-card { background: linear-gradient(160deg, rgba(232,118,44,.25), rgba(239,74,43,.08)); border: 1px solid rgba(232,118,44,.45); border-radius: 18px; padding: 20px; }
.mars-card h3 { font-size: 1.25rem; }
.mars-big { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.mars-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 12px; }
.mars-row div { min-width: 120px; }
.mars-row small { display: block; color: #ffc9a6; text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; }
.mars-row b { font-family: var(--font-head); font-size: 1.25rem; color: #fff; }
.mars-card input[type=date] { font: inherit; padding: .6rem .8rem; border-radius: 12px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.95); color: var(--heading); min-height: 48px; }
.birthday-out { margin-top: 14px; }
@media (max-width: 900px) { .sim-layout, .mars-grid { grid-template-columns: 1fr; } }

/* Mystery */
.mystery { background: linear-gradient(180deg, #2a1a12 0%, #3b2416 100%); color: #f6e7d2; position: relative; overflow: hidden; }
.mystery h2 { color: #fff; }
.mystery .eyebrow { color: var(--yellow); }
.mystery .lead { color: #e7cfb2; }
.mystery-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.mystery-top img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.tree-progress { margin-top: 1.2rem; }
.tree-bar { height: 18px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.tree-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--red)); transition: width .6s; }
.tree-progress p { margin-top: .5rem; font-family: var(--font-head); color: var(--yellow); }
.advent { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 2.6rem; }
.door {
  aspect-ratio: 1; border-radius: 16px; border: 2px dashed rgba(255,214,140,.35); background: rgba(255,255,255,.04);
  color: #f6e7d2; font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; cursor: pointer; position: relative;
  display: grid; place-items: center; transition: transform .15s, background .2s;
}
.door small { position: absolute; bottom: 6px; left: 0; right: 0; font-size: .7rem; font-weight: 500; opacity: .75; }
.door:hover:not([disabled]) { transform: translateY(-3px); }
.door.today { background: var(--red); border: 2px solid #ffb59f; color: #fff; animation: pulse 2s infinite; }
.door.open-ok { background: linear-gradient(160deg, #1f6b3a, #134a27); border: 2px solid #7fe39a; }
.door.available { background: rgba(255,197,49,.16); border: 2px solid rgba(255,197,49,.6); }
.door[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,74,43,.6); } 50% { box-shadow: 0 0 0 10px rgba(239,74,43,0); } }
@media (prefers-reduced-motion: reduce) { .door.today { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) { .mystery-top { grid-template-columns: 1fr; } .advent { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .advent { grid-template-columns: repeat(3, 1fr); } }

/* Dialog */
dialog { background: var(--paper); border: 0; border-radius: 24px; padding: 0; max-width: min(640px, calc(100% - 32px)); width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.4); color: var(--ink); }
dialog::backdrop { background: rgba(8, 14, 32, .7); }
.dlg-body { padding: 28px; }
.dlg-close { color: var(--ink); position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream-2); font-size: 1.4rem; cursor: pointer; z-index: 2; }
.q-options { display: grid; gap: 10px; margin-top: 1rem; }
.q-options button { text-align: left; font: inherit; font-weight: 600; padding: .85rem 1rem; border-radius: 14px; border: 2px solid #ddd2bf; background: var(--paper); color: var(--ink); cursor: pointer; min-height: 52px; }
.q-options button:hover { border-color: var(--orange); }
.q-options button.right { color: #13254a; background: #e3f7e7; border-color: #3aa55a; }
.q-options button.wrong { color: #13254a; background: #fde6e1; border-color: var(--red); }
.q-feedback { margin-top: 1rem; padding: .9rem 1rem; border-radius: 14px; background: var(--cream); display: none; }
.q-feedback.show { display: block; }
.dlg-sheet { max-width: min(1100px, calc(100% - 32px)); }
.dlg-sheet img { width: 100%; height: auto; border-radius: 24px; }

/* Stories */
.books { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 2.4rem; }
.book { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 24px; align-items: start; }
.book img { border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.book .tag { display: inline-block; background: var(--cream-2); color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: .2rem .7rem; border-radius: 999px; margin-bottom: .6rem; }
.book.featured .tag { background: var(--red); color: #fff; }
.book blockquote { margin: 0 0 1rem; font-style: italic; color: var(--orange-d); font-weight: 600; }
.book .btn { margin-top: .4rem; }
@media (max-width: 960px) { .books { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .book { grid-template-columns: 1fr; } .book img { max-width: 220px; } }

/* Characters */
.crew { background: var(--paper); }
.crew-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 2.4rem; }
.crew-card { background: var(--cream); border-radius: 20px; overflow: hidden; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.crew-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.crew-card img { width: 100%; aspect-ratio: 25/40; object-fit: cover; object-position: top; background: #f3ece1; }
.crew-card .info { padding: 12px 14px 16px; }
.crew-card h3 { font-size: 1.3rem; margin: 0; }
.crew-card .nick { font-size: .85rem; color: var(--muted); }
.crew-card p { font-size: .92rem; margin: .4rem 0 0; color: var(--ink); }
.crew-card .more { display: inline-block; margin-top: .5rem; font-family: var(--font-head); color: var(--orange-d); font-size: .9rem; font-weight: 600; }
.families { margin-top: 48px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; }
.families img { border-radius: var(--radius); box-shadow: var(--shadow); cursor: zoom-in; }
@media (max-width: 1180px) { .crew-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .families { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .crew-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Parents */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 2.4rem; }
.value { background: var(--paper); border-radius: 20px; padding: 22px; box-shadow: 0 4px 14px rgba(19,37,74,.06); }
.value .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: .8rem; }
.value h3 { font-size: 1.2rem; }
.value p { font-size: .98rem; color: var(--muted); margin: 0; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.topics span { background: var(--paper); border: 2px solid var(--cream-2); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .95rem; }
.author { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; margin-top: 80px; }
.author img { border-radius: var(--radius); box-shadow: var(--shadow); }
.contact { margin-top: 80px; background: var(--navy); color: #e6ecff; border-radius: var(--radius); padding: 40px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.contact h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.contact .lead { color: #b9c6ea; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, 1fr); } .author, .contact { grid-template-columns: 1fr; } .contact { padding: 28px; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--navy-2); color: #b9c6ea; padding: 48px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer-grid img { width: 96px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-grid nav a { text-decoration: none; color: #e6ecff; }
.footer-small { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; } .footer-grid nav { justify-content: center; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Theme toggle + dark mode */
.theme-btn { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--heading); background: transparent; cursor: pointer; font-size: 1.15rem; display: grid; place-items: center; }
@media (max-width: 1180px) { .theme-btn { margin-left: 0; } }
:root[data-theme="dark"] {
  --cream: #0e1630; --cream-2: #1d2950; --paper: #15204a; --ink: #e6ecff; --muted: #aab7d8;
  --heading: #ffffff; --header-bg: rgba(14, 22, 48, .92);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #0e1630; --cream-2: #1d2950; --paper: #15204a; --ink: #e6ecff; --muted: #aab7d8;
    --heading: #ffffff; --header-bg: rgba(14, 22, 48, .92);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

/* Mobile refinements */
.brand img { border-radius: 12px; }
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-cover { max-width: 190px; }
  .hero-cover .sticker { font-size: .9rem; left: -18px; bottom: 16px; }
}
@media (max-width: 520px) {
  section { padding: 64px 0; }
  .countdown { gap: 8px; }
  .countdown .cd { min-width: 0; flex: 1; padding: .5rem .3rem; }
  .countdown .cd b { font-size: 1.6rem; }
  .sim-panel { padding: 14px; }
  .sim-head img { width: 48px; height: 48px; }
  .sim-tabs button { flex: 1 1 100%; }
}

/* Log */
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 2rem; }
.log-card { display: grid; grid-template-rows: 170px 1fr; background: var(--paper); border-radius: 20px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.log-card:hover { transform: translateY(-4px); }
.log-card img { width: 100%; height: 170px; object-fit: cover; background: var(--cream-2); }
.log-card div { padding: 16px 18px 20px; }
.log-card small { color: var(--orange-d); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; }
.log-card h3 { font-size: 1.2rem; margin: .3rem 0; }
.log-card p { font-size: .95rem; color: var(--muted); margin: 0; }

/* Embedded simulators */
.sim-frame { display: block; width: 100%; height: 720px; border: 0; border-radius: 16px; background: #0b1733; }

/* Language picker */
.lang-pick { display: flex; align-items: center; gap: 4px; border: 2px solid var(--heading); border-radius: 999px; padding: 0 4px 0 10px; flex-shrink: 0; color: var(--heading); }
.lang-pick select { border: 0; background: transparent; color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: .95rem; padding: .35rem .2rem; min-height: 38px; cursor: pointer; max-width: 120px; }
.lang-pick select option { color: #13254a; }
/* Right-to-left (Arabic) */
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .menu-btn { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero-cover .sticker { left: auto; right: -26px; }
[dir="rtl"] .you-greeting::before { left: auto; right: 28px; }
[dir="rtl"] .dlg-close { right: auto; left: 12px; }
[dir="rtl"] .q-options button { text-align: right; }
