/* ==========================================================================
   GALAVERSE CREATIONS — HOME
   Concept: a one-person studio presented like a game.
   Ink-dark surfaces, bone-white type, flashlight amber accent.
   ========================================================================== */

:root {
    --bg: #0b0b0e;
    --bg-2: #111115;
    --card: #15151a;
    --card-2: #1b1b21;
    --line: rgba(236, 230, 216, 0.09);
    --line-2: rgba(236, 230, 216, 0.18);
    --text: #ece6d8;
    --text-2: #a8a295;
    --text-3: #6d685f;
    --accent: #ffb547;
    --accent-2: #ff8a3d;
    --accent-ink: #1a1206;
    --accent-soft: rgba(255, 181, 71, 0.12);
    --ok: #7ee2a8;
    --danger: #ff6b6b;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);

    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --radius: 18px;
    --nav-h: 72px;
}

[data-theme="light"] {
    --bg: #efe9dc;
    --bg-2: #e8e1d2;
    --card: #f7f2e8;
    --card-2: #fffaf0;
    --line: rgba(22, 20, 15, 0.1);
    --line-2: rgba(22, 20, 15, 0.2);
    --text: #16140f;
    --text-2: #4c473d;
    --text-3: #8a8373;
    --accent: #c2410c;
    --accent-2: #9a3412;
    --accent-ink: #fff8ee;
    --accent-soft: rgba(194, 65, 12, 0.1);
    --ok: #15803d;
    --shadow: 0 30px 60px -30px rgba(60, 40, 10, 0.35);
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body { overflow-x: clip; }

body {
    line-height: 1.6;
    background: var(--bg);
}

/* Film grain */
body::after {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
}
.skip-link:focus { top: 16px; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--text);
}

em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.section-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 140px 28px;
}

.section-head { margin-bottom: 64px; max-width: 760px; }
.section-head-row { max-width: none; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 22px;
}
.section-kicker::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-size: clamp(40px, 6vw, 80px);
    margin-bottom: 24px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-2);
    max-width: 560px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.35s;
    white-space: nowrap;
}
.btn svg { transition: transform 0.35s var(--ease); }

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 0 0 0 var(--accent-soft);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -8px var(--accent);
}
.btn-primary:hover svg { transform: translate(2px, -2px); }
a[href="#projects"].btn-primary:hover svg { transform: translateY(3px); }

.btn-ghost {
    border: 1px solid var(--line-2);
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.btn-small { padding: 10px 18px; font-size: 13px; border: 1px solid var(--line-2); }
.btn-small:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 30px; font-size: 15px; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--line);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: var(--nav-h);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    transition: transform 0.5s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.05); }
.logo-text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1;
}
.logo-sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0;
    color: var(--text-2);
    margin-top: 2px;
}

.navbar:not(.scrolled) .logo-text { color: #ece6d8; }
.navbar:not(.scrolled) .logo-sub { color: #a8a295; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.2s, background-color 0.2s;
}
.navbar:not(.scrolled) .nav-link { color: #c9c3b5; }
.nav-link:hover { color: var(--text); background: var(--line); }
.navbar:not(.scrolled) .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-link.active { color: var(--accent); }
.navbar:not(.scrolled) .nav-link.active { color: #ffb547; }

.nav-cta {
    display: inline-flex;
    padding: 9px 18px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.navbar:not(.scrolled) .nav-cta { background: #ffb547; color: #1a1206; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -8px var(--accent); }

.nav-dropdown { position: relative; }
.dropdown-chevron { transition: transform 0.25s var(--ease); }
.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    list-style: none;
    padding: 8px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.25s var(--ease);
}
.nav-dropdown-menu::before { content: ''; position: absolute; inset: -12px 0 auto 0; height: 12px; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
    color: var(--text-2);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.nav-dropdown-item:hover { background: var(--accent-soft); color: var(--accent); transform: translateX(3px); }

.nav-controls { display: flex; align-items: center; gap: 8px; }

.lang-switch {
    display: flex;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
}
.navbar:not(.scrolled) .lang-switch { border-color: rgba(255, 255, 255, 0.16); }
.lang-btn {
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    transition: background-color 0.2s, color 0.2s;
}
.navbar:not(.scrolled) .lang-btn { color: #8d877b; }
.lang-btn.active,
.navbar:not(.scrolled) .lang-btn.active { background: var(--accent); color: var(--accent-ink); }
.navbar:not(.scrolled) .lang-btn.active { background: #ffb547; color: #1a1206; }

.icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    color: var(--text-2);
    transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}
.navbar:not(.scrolled) .icon-btn { border-color: rgba(255, 255, 255, 0.16); color: #c9c3b5; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-8deg); }
.sound-toggle.active { color: var(--accent); border-color: var(--accent); }

.theme-icon { display: none; }
[data-theme="dark"] .theme-icon.sun,
[data-theme="light"] .theme-icon.moon { display: block; }

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
}
.menu-toggle .bar { width: 16px; height: 1.5px; background: var(--text); transition: transform 0.35s var(--ease); }
.navbar:not(.scrolled) .menu-toggle { border-color: rgba(255, 255, 255, 0.16); }
.navbar:not(.scrolled) .menu-toggle .bar { background: #ece6d8; }
.menu-toggle.active .bar:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero (always dark) ---------- */
.hero {
    --fx: 70%;
    --fy: 45%;
    --beam: 240px;
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding-top: calc(var(--nav-h) + 72px);
    overflow: hidden;
    background: #060608;
    color: #ece6d8;
    isolation: isolate;
}

.hero-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-collage {
    position: absolute;
    inset: -12%;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 22px;
    transform: rotate(-7deg) scale(1.05);
    transition: transform 0.6s var(--ease);
}
.collage-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    filter: saturate(1.05) contrast(1.05);
}
.collage-img.c1 { grid-row: span 2; }

.hero-dark {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle var(--beam) at var(--fx) var(--fy),
            rgba(6, 6, 8, 0) 0%,
            rgba(6, 6, 8, 0.25) 45%,
            rgba(6, 6, 8, 0.86) 78%,
            rgba(6, 6, 8, 0.965) 100%),
        linear-gradient(180deg, rgba(6, 6, 8, 0.55) 0%, rgba(6, 6, 8, 0) 30%, rgba(6, 6, 8, 0) 60%, rgba(6, 6, 8, 0.92) 100%);
}
.hero-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle calc(var(--beam) * 0.9) at var(--fx) var(--fy), rgba(255, 196, 110, 0.12), transparent 70%);
    mix-blend-mode: screen;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero-eyes {
    position: absolute;
    z-index: 3;
    top: 22%;
    left: 12%;
    display: flex;
    gap: 14px;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.4s;
}
.hero-eyes span {
    width: 14px;
    height: 7px;
    border-radius: 50%;
    background: #ff4b3a;
    box-shadow: 0 0 12px 3px rgba(255, 75, 58, 0.7);
    animation: blink 5s infinite;
}
@keyframes blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.hero-hud {
    position: absolute;
    inset: calc(var(--nav-h) + 16px) 28px 24px 28px;
    z-index: 3;
    pointer-events: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(236, 230, 216, 0.5);
}
.hud { position: absolute; display: inline-flex; align-items: center; gap: 8px; }
.hud-tl { top: 0; left: 0; }
.hud-tr { top: 0; right: 0; }
.hud-bl { bottom: 0; left: 0; }
.hud-br { bottom: 0; right: 0; }
.hud::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: rgba(236, 230, 216, 0.35);
    border-style: solid;
    border-width: 0;
}
.hud-tl::before { top: -10px; left: -10px; border-top-width: 1px; border-left-width: 1px; }
.hud-tr::before { top: -10px; right: -10px; border-top-width: 1px; border-right-width: 1px; }
.hud-bl::before { bottom: -10px; left: -10px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-br::before { bottom: -10px; right: -10px; border-bottom-width: 1px; border-right-width: 1px; }
.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4b3a;
    animation: rec 1.4s infinite;
}
@keyframes rec { 50% { opacity: 0.2; } }

.hero-content {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px 110px;
    pointer-events: none;
}
.hero-content a, .hero-content button { pointer-events: auto; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(236, 230, 216, 0.75);
    margin-bottom: 26px;
}
.kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 12px var(--ok);
}

.hero-title {
    font-size: clamp(56px, 11vw, 176px);
    line-height: 0.88;
    letter-spacing: -0.055em;
    color: #ece6d8;
    margin-bottom: 32px;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.hero-title em { color: #ffb547; letter-spacing: -0.03em; padding-right: 0.06em; }

.hero-subtitle {
    max-width: 560px;
    font-size: 18px;
    color: rgba(236, 230, 216, 0.78);
    margin-bottom: 36px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primary { background: #ffb547; color: #1a1206; }
.hero .btn-ghost { color: #ece6d8; border-color: rgba(236, 230, 216, 0.3); backdrop-filter: blur(8px); background: rgba(6, 6, 8, 0.35); }
.hero .btn-ghost:hover { border-color: #ece6d8; }

.hero-hint {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(236, 230, 216, 0.5);
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: var(--accent);
    color: var(--accent-ink);
    padding: 16px 0;
    transform: rotate(-1.2deg) scale(1.03);
    margin-top: -18px;
    position: relative;
    z-index: 5;
}
.marquee-track {
    display: flex;
    width: max-content;
    gap: 28px;
    align-items: center;
    animation: marquee 38s linear infinite;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.marquee-track i { font-style: normal; opacity: 0.6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Worlds (Level select) ---------- */
.worlds {
    --w: #9cc9a4;
    position: relative;
    overflow: clip;
    transition: background-color 0.6s;
}
.worlds::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(60% 50% at 75% 55%, color-mix(in srgb, var(--w) 14%, transparent), transparent 70%);
    transition: background 0.6s;
}

.world-select {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) 1.6fr;
    gap: 56px;
    align-items: start;
}

.world-list { display: flex; flex-direction: column; position: sticky; top: calc(var(--nav-h) + 24px); }

.world-tab {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    text-align: left;
    padding: 22px 8px 22px 0;
    border-top: 1px solid var(--line);
    transition: padding 0.4s var(--ease);
}
.world-tab:last-of-type { border-bottom: 1px solid var(--line); }
.world-tab::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--w);
    transform: translateY(-50%) scale(0);
    transition: transform 0.4s var(--ease);
    box-shadow: 0 0 14px var(--w);
}
.world-num {
    grid-row: span 2;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
    padding-top: 8px;
}
.world-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(22px, 2.4vw, 32px);
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-3);
    transition: color 0.3s;
}
.world-status {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-3);
}
.world-tab:hover .world-name { color: var(--text-2); }
.world-tab.is-active { padding-left: 14px; }
.world-tab.is-active::before { transform: translateY(-50%) scale(1); }
.world-tab.is-active .world-name { color: var(--text); }
.world-tab.is-active .world-num,
.world-tab.is-active .world-status { color: var(--w); }
[data-theme="light"] .world-genre,
[data-theme="light"] .world-tab.is-active .world-num,
[data-theme="light"] .world-tab.is-active .world-status { color: color-mix(in srgb, var(--w) 50%, #000); }

.world-hint {
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
}

.world-stage { position: relative; display: grid; }
.world-panel {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px);
    transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), visibility 0.5s;
}
.world-panel.is-active { opacity: 1; visibility: visible; transform: none; }

.world-media {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    background: var(--card);
    box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--w) 45%, transparent), var(--shadow);
}
.world-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.world-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 1.2s var(--ease);
}
.world-panel.is-active .world-img { transform: scale(1); }
.world-media:hover .world-img { transform: scale(1.04); }
.world-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(6, 6, 8, 0.7);
    backdrop-filter: blur(6px);
    color: #ece6d8;
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s var(--ease);
}
.world-media:hover .world-zoom { opacity: 1; transform: none; }

.world-body { padding: 32px 4px 0; }
.world-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.world-genre { color: var(--w); }
.world-year { color: var(--text-3); }
.world-title { font-size: clamp(32px, 4vw, 52px); margin-bottom: 10px; }
.world-role { font-size: 14px; color: var(--text-3); margin-bottom: 18px; }
.world-desc { font-size: 16px; color: var(--text-2); max-width: 680px; margin-bottom: 24px; }
.world-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 12px;
    color: var(--text-2);
}
.btn-world { background: var(--w); color: #0b0b0e; }
.btn-world:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -10px var(--w); }
.btn-world:hover svg { transform: translate(2px, -2px); }

/* ---------- Achievements ---------- */
.achievements { background: var(--bg-2); border-block: 1px solid var(--line); }
.achievements .section-container { padding-block: 110px; }
.achievements .section-head { margin-bottom: 40px; }
.achievements .section-title { font-size: clamp(32px, 4vw, 52px); margin-bottom: 0; }

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}
.ach {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--card-2), var(--card));
    border: 1px solid var(--line);
    transition: transform 0.4s var(--ease), border-color 0.3s;
}
.ach:hover { transform: translateY(-4px); border-color: var(--line-2); }
.ach-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
}
.ach-text { display: flex; flex-direction: column; min-width: 0; }
.ach-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 8px;
}
.ach-value small { font-size: 16px; margin-left: 4px; color: var(--text-2); letter-spacing: 0; font-weight: 600; }
.ach-name { font-weight: 600; font-size: 14px; }
.ach-desc { font-size: 13px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }

.ach-hidden { border-style: dashed; }
.ach-hidden .ach-icon { color: var(--text-3); background: transparent; border-color: var(--line-2); }
.ach-hidden .ach-value { color: var(--text-3); }
.ach-hidden.unlocked { border-style: solid; border-color: var(--accent); }
.ach-hidden.unlocked .ach-icon { color: var(--accent-ink); background: var(--accent); }
.ach-hidden.unlocked .ach-value { color: var(--accent); }

/* ---------- Contracts ---------- */
.contract-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.contract {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.5s var(--ease), border-color 0.3s;
}
.contract::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.contract:hover { transform: translateY(-6px); border-color: var(--line-2); }
.contract:hover::before { opacity: 1; }
.contract > * { position: relative; }

.contract-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px dashed var(--line-2);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.contract-id { color: var(--text-3); }
.contract-delivery { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.contract-delivery::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.contract-icon { color: var(--accent); margin-bottom: 22px; }
.contract-title { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px; }
.contract-desc { font-size: 15px; color: var(--text-2); margin-bottom: 32px; flex-grow: 1; }
.contract-reward {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    margin-bottom: 18px;
}
.contract-reward span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.contract-reward strong { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; color: var(--accent); }

.btn-contract {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn-contract svg { transition: transform 0.3s var(--ease); }
.btn-contract:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-contract:hover svg { transform: translateX(4px); }

/* ---------- Arcade ---------- */
/* ---------- Side quests (free tools) ---------- */
.side-quests {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px dashed var(--line-2);
}
.side-quests-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ok);
}
.side-quests-title { font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0; }
.side-quests-desc { color: var(--text-2); font-size: 15px; }
.side-quests-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.quest-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    transition: border-color 0.25s, transform 0.3s var(--ease);
}
.quest-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.quest-card-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.quest-card-title { font-family: var(--font-display); font-size: 21px; letter-spacing: -0.02em; line-height: 1.15; padding-right: 28px; }
.quest-card-desc { font-size: 14px; color: var(--text-2); }
.quest-card-go {
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 18px;
    color: var(--text-3);
    transition: transform 0.3s var(--ease), color 0.25s;
}
.quest-card:hover .quest-card-go { color: var(--accent); transform: translateX(4px); }

@media (max-width: 1024px) {
    .side-quests { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
    .side-quests-grid { grid-template-columns: 1fr; }
}

.arcade { background: var(--bg-2); border-block: 1px solid var(--line); }

.cabinet {
    max-width: 920px;
    margin: 0 auto;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow), 0 0 0 8px var(--bg), 0 0 0 9px var(--line);
    overflow: hidden;
}
.cabinet-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
}
.cabinet-dots { display: flex; gap: 6px; align-items: center; }
.cabinet-dots i, .dot-odd { width: 10px; height: 10px; border-radius: 50%; display: block; }
.cabinet-dots i:nth-child(1) { background: #ff5f57; }
.cabinet-dots i:nth-child(2) { background: #febc2e; }
.dot-odd { background: #3d8bff; padding: 0; }
.cabinet-url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-tech { color: var(--accent); }

.cabinet-screen { position: relative; height: 560px; background: #05070c; }
.game-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #e8f4f0;
    background:
        radial-gradient(circle at 50% 120%, rgba(93, 184, 154, 0.25), transparent 55%),
        linear-gradient(160deg, #05080f 0%, #0a1225 55%, #0f1f18 100%);
    overflow: hidden;
}
.poster-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
    pointer-events: none;
}
.poster-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; color: #5db89a; }
.poster-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(48px, 8vw, 96px);
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 0 40px rgba(93, 184, 154, 0.5);
}
.poster-play {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #0b0b0e;
    background: #5db89a;
    margin: 10px 0;
    padding-left: 4px;
    box-shadow: 0 0 0 0 rgba(93, 184, 154, 0.5);
    animation: pulse 2s infinite;
    transition: transform 0.3s var(--ease);
}
.game-poster:hover .poster-play { transform: scale(1.1); }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(93, 184, 154, 0.5); }
    100% { box-shadow: 0 0 0 28px rgba(93, 184, 154, 0); }
}
.poster-coin {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.3em;
    color: #ffb547;
    animation: rec 1.1s steps(1) infinite;
}
.poster-sub { font-family: var(--font-mono); font-size: 12px; color: #8899aa; }
.game-frame { position: absolute; inset: 0; }
.game-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.cabinet-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-top: 1px solid var(--line);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}

/* ---------- AI Lab ---------- */
.assistant-workspace {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 20px;
}
.chat-container, .config-container {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 540px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    overflow: hidden;
}
.chat-header, .config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; }
.status-indicator.online { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chat-bot-name { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.chat-bot-status { display: block; font-size: 12px; color: var(--text-3); }
.chat-latency, .config-header-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; }
.config-header-title { color: var(--text); }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.chat-message { display: flex; gap: 12px; max-width: 88%; animation: msgIn 0.35s var(--ease) both; }
.chat-message.bot { align-self: flex-start; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }

.message-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--bg);
}
.message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-message.user .message-avatar { display: grid; place-items: center; background: var(--accent); border-color: var(--accent); }
.user-avatar-icon { color: var(--accent-ink); font-weight: 700; font-size: 12px; }

.message-wrapper { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.message-content {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.message-content p { color: inherit; }
.bot .message-content { background: var(--bg); border: 1px solid var(--line); border-top-left-radius: 4px; }
.user .message-content { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-right-radius: 4px; }
.message-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }
.user .message-time { align-self: flex-end; }
.message-meta { color: var(--accent); opacity: 0.75; }
.fallback-msg .message-meta { color: var(--text-3); }
.fallback-msg .message-content { border-style: dashed; }

.typing-dot { width: 6px; height: 6px; border-radius: 50%; animation: typing 1.4s infinite both; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
}
#chat-input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}
#chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.chat-send-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--accent); }
.chat-send-btn:disabled, #chat-input:disabled { opacity: 0.55; cursor: wait; }

.config-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.config-description { font-size: 13px; color: var(--text-2); }
.config-field { display: flex; flex-direction: column; gap: 6px; }
.config-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.config-input, .config-textarea {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}
.config-input:focus, .config-textarea:focus { outline: none; border-color: var(--accent); }
.config-textarea { resize: none; height: 84px; }
.config-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.config-btn { padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: all 0.25s; }
.config-btn-demo { border: 1px solid var(--line-2); color: var(--text-2); }
.config-btn-demo:hover { border-color: var(--accent); color: var(--accent); }
.config-btn-apply { background: var(--accent); color: var(--accent-ink); }
.config-btn-apply:hover { box-shadow: 0 8px 24px -8px var(--accent); }

.config-toast {
    position: absolute;
    left: 50%;
    bottom: 78px;
    transform: translate(-50%, 16px);
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--ok);
    color: #062012;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s var(--ease);
}
.config-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- About / Character sheet ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: start;
}
.about-copy .section-title { font-size: clamp(56px, 9vw, 128px); margin-bottom: 36px; }
.about-text { font-size: 18px; color: var(--text-2); margin-bottom: 20px; max-width: 580px; }
.about-text:first-of-type { font-size: 22px; color: var(--text); line-height: 1.45; }

.char-sheet {
    position: relative;
    padding: 28px;
    border-radius: var(--radius);
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--accent), transparent 40%, transparent 60%, var(--line-2)) border-box;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}
.sheet-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.sheet-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
}
.sheet-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}
.sheet-name { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; }
.sheet-lvl {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
}
.sheet-rows div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}
.sheet-rows dt { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.sheet-rows dd { font-weight: 500; text-align: right; }
.sheet-open { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.open-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: rec 2s infinite; }

.party-size { position: relative; font-weight: 600; padding: 0 4px; }
.ghost-two {
    position: absolute;
    left: 100%;
    top: 0;
    opacity: 0;
    color: var(--danger);
    animation: ghostFlicker 7s infinite;
}
@keyframes ghostFlicker {
    0%, 86%, 100% { opacity: 0; }
    87% { opacity: 0.7; transform: translateX(1px); }
    88% { opacity: 0; }
    90% { opacity: 0.5; transform: translateX(-1px); }
    91% { opacity: 0; }
}

.sheet-skills { padding-top: 20px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.skill-list span {
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}

.patch-notes {
    margin-top: 110px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-2);
    overflow: hidden;
}
.patch-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 26px;
    border-bottom: 1px solid var(--line);
}
.patch-head .section-kicker { margin: 0; }
.patch-file { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.patch-list { list-style: none; }
.patch-list li {
    display: grid;
    grid-template-columns: 110px 70px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.25s;
}
.patch-list li:last-child { border-bottom: none; }
.patch-list li:hover { background: var(--card); }
.patch-ver { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.patch-year { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.patch-list strong { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }
.patch-list p { font-size: 14px; color: var(--text-2); }
.patch-next { background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--accent-soft) 10px 11px); }
.patch-next strong { color: var(--accent); }

/* ---------- Finale ---------- */
.finale { position: relative; overflow: hidden; text-align: center; }
.finale::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 55%;
    width: 900px;
    height: 900px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-soft), transparent 65%);
    pointer-events: none;
}
.finale .section-container { position: relative; padding-block: 160px; }
.finale .section-kicker { justify-content: center; }
.finale-title {
    font-size: clamp(48px, 9vw, 140px);
    line-height: 0.92;
    letter-spacing: -0.05em;
    margin-bottom: 32px;
}
.finale-desc { max-width: 560px; margin: 0 auto 40px; font-size: 17px; color: var(--text-2); }
.finale-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.finale-proof {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
}
.finale-proof span::before { content: '✓ '; color: var(--ok); }

.contact-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 920px;
    margin: 80px auto 0;
    border-top: 1px solid var(--line);
}
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 12px;
    border-right: 1px solid var(--line);
}
.contact-item:last-child { border-right: none; }
.contact-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--text-3); }
.contact-value { font-size: 15px; font-weight: 500; transition: color 0.2s; overflow-wrap: anywhere; }
.contact-value:hover { color: var(--accent); }

/* ---------- Footer / Credits ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-container { max-width: 1240px; margin: 0 auto; padding: 80px 28px 32px; }
.credits { text-align: center; margin-bottom: 72px; }
.credits-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 28px;
}
.credits-list { display: flex; flex-direction: column; gap: 10px; }
.credits-list div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    font-size: 15px;
}
.credits-list dt { text-align: right; color: var(--text-3); }
.credits-list dd { text-align: left; font-weight: 500; }
.credit-ghost { color: var(--text-3); font-size: 15px; }
.credits-list div:last-child dd { color: var(--text-3); letter-spacing: 0.1em; }
.credits-thanks {
    margin-top: 40px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 32px;
    color: var(--text);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.footer-copy { font-size: 13px; color: var(--text-3); }
.privacy-link:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 8px; }
.social-link {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--text-2);
    transition: all 0.25s var(--ease);
}
.social-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* ---------- Anomaly hunt ---------- */
.anomaly { cursor: pointer; }
.anomaly.found { cursor: default; }
.anomaly-hud {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-2);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    transition: transform 0.4s var(--ease), color 0.3s, border-color 0.3s;
}
.anomaly-hud { cursor: help; }
.anomaly-hud:hover { color: var(--text-2); border-color: var(--accent); }
.anomaly-hud strong { color: var(--text); font-weight: 500; }
.anomaly-hud.bump { transform: scale(1.12); color: var(--accent); border-color: var(--accent); }
.anomaly-hud.complete { color: var(--accent); border-color: var(--accent); }

.anomaly-toast {
    position: fixed;
    right: 20px;
    bottom: 68px;
    z-index: 1100;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--accent);
    font-size: 13px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.4s var(--ease);
}
.anomaly-toast.show { opacity: 1; transform: none; }

.case-closed {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(6, 6, 8, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.case-closed.active { opacity: 1; visibility: visible; }
.case-card {
    position: relative;
    max-width: 480px;
    padding: 44px 36px 36px;
    border-radius: 20px;
    background: #ece6d8;
    color: #16140f;
    text-align: center;
    transform: rotate(-1.5deg) scale(0.92);
    transition: transform 0.5s var(--ease);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}
.case-closed.active .case-card { transform: rotate(-1.5deg) scale(1); }
.case-stamp {
    display: inline-block;
    padding: 6px 14px;
    margin-bottom: 18px;
    border: 3px solid #c2410c;
    border-radius: 6px;
    color: #c2410c;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.2em;
    transform: rotate(-6deg);
}
.case-card h3 { font-size: 34px; color: #16140f; margin-bottom: 14px; }
.case-card p { color: #4c473d; margin-bottom: 26px; }
.case-actions { display: flex; flex-direction: column; gap: 10px; }
.case-card .btn-primary { background: #16140f; color: #ece6d8; }
.case-card .btn-ghost { color: #16140f; border-color: rgba(22, 20, 15, 0.25); }

/* ---------- Lightbox ---------- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.lightbox-modal.active { opacity: 1; visibility: visible; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.9); backdrop-filter: blur(12px); }
.lightbox-content {
    position: relative;
    max-width: 92vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.94);
    transition: transform 0.4s var(--ease);
}
.lightbox-modal.active .lightbox-content { transform: scale(1); }
.lightbox-img { max-width: 100%; max-height: 78vh; width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.lightbox-caption { margin-top: 16px; font-family: var(--font-display); font-weight: 600; color: #ece6d8; }
.lightbox-close { position: absolute; top: -46px; right: 0; font-size: 36px; line-height: 1; color: #ece6d8; transition: transform 0.3s var(--ease); }
.lightbox-close:hover { transform: rotate(90deg); color: #ffb547; }

/* ---------- Reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .nav-link { padding: 8px 10px; }
    .nav-right { gap: 12px; }
}

@media (max-width: 1024px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        inset: 0;
        z-index: -1;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        background: var(--bg);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s, visibility 0.35s;
    }
    .nav-links.active { opacity: 1; visibility: visible; }
    .nav-links .nav-link,
    .navbar:not(.scrolled) .nav-links .nav-link {
        font-family: var(--font-display);
        font-weight: 800;
        font-size: 34px;
        letter-spacing: -0.03em;
        color: var(--text);
    }
    .nav-dropdown { display: flex; flex-direction: column; align-items: center; }
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        border: none;
        box-shadow: none;
        display: flex;
        gap: 4px;
    }
    .nav-cta { margin: 16px 0 0; padding: 14px 28px; font-size: 16px; }
    .navbar:has(.nav-links.active) .logo-text { color: var(--text); }
    .navbar:has(.nav-links.active) .menu-toggle .bar { background: var(--text); }

    .world-select { grid-template-columns: 1fr; gap: 28px; }
    .world-list {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .world-list::-webkit-scrollbar { display: none; }
    .world-tab,
    .world-tab:last-of-type {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 14px 18px;
        border: 1px solid var(--line);
        border-radius: 14px;
    }
    .world-tab.is-active { padding-left: 18px; border-color: var(--w); }
    .world-tab::before { display: none; }
    .world-num { padding: 0; }
    .world-name { font-size: 18px; }
    .world-hint { display: none; }

    .contract-grid { grid-template-columns: 1fr 1fr; }
    .assistant-workspace { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 720px) {
    :root { --nav-h: 64px; }
    .nav-container { padding: 0 16px; }
    .logo-sub { display: none; }
    .sound-toggle { display: none; }
    .section-container { padding: 96px 20px; }
    .section-head { margin-bottom: 44px; }
    .section-desc { font-size: 16px; }

    .hero-content { padding: 0 20px 80px; }
    .hero-hud { inset: calc(var(--nav-h) + 14px) 20px 18px 20px; }
    .hud-tr, .hud-bl { display: none; }
    .hero-subtitle { font-size: 16px; }
    .hero-buttons .btn { flex: 1; }
    .hero-collage { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); inset: -10% -40%; }
    .collage-img.c1 { grid-row: auto; }

    .marquee-track { font-size: 17px; }

    .contract-grid { grid-template-columns: 1fr; }
    .cabinet-screen { height: 440px; }
    .cabinet-url { display: none; }
    .chat-container { height: 480px; }
    .chat-message { max-width: 95%; }

    .patch-list li { grid-template-columns: 1fr; gap: 4px; }
    .patch-list li > span { display: inline; }
    .patch-ver::after { content: ' · '; color: var(--text-3); }

    .contact-details { grid-template-columns: 1fr; }
    .contact-item { border-right: none; border-bottom: 1px solid var(--line); }
    .credits-list div { gap: 12px; font-size: 14px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .anomaly-hud { right: 12px; bottom: 12px; }
    .anomaly-toast { left: 12px; right: 12px; bottom: 58px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
