/* Kohana website -- one stylesheet for every page.
   Design language is the Web Player's (WebPlayer/templates/home.html): the
   dark radial gradient, Kohana orange + soft pink, the Monainn wordmark font,
   a sticky blurred header, pill buttons, rounded cards that lift and glow
   orange on hover. */

@font-face {
    font-family: "Monainn";
    src: url("/static/fonts/Monainn.otf") format("opentype");
    font-display: swap;
}

:root {
    --bg1: #1F1C1E;
    --bg2: #17161A;
    --bg3: #121014;
    --orange: #FBA934;
    --orange-soft: #F8A89C;
    --on-orange: #1a1608;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-2: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --faint: rgba(255, 255, 255, 0.55);
    --radius: 16px;
    --max: 1120px;
    --header-h: 64px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg2);
    background-image: radial-gradient(circle at 50% -10%, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%);
    background-attachment: fixed;
}

main { flex: 1 0 auto; }

a { color: inherit; }
img { max-width: 100%; }

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

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--orange);
    color: var(--on-orange);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
    width: min(var(--max), 100% - 48px);
    margin-inline: auto;
}

/* ---------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(18, 16, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--header-h);
    padding: 10px 28px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.site-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
    color: var(--text);
    background-color: var(--surface-2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 9px 30px 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.lang-select:hover, .lang-select:focus { border-color: var(--orange); }
.lang-select option { background-color: var(--bg3); color: var(--text); }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s, border-color 0.15s, background-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background-color: var(--orange); color: var(--on-orange); }
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--orange); background-color: rgba(255, 255, 255, 0.1); }

.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: max(560px, calc(100vh - var(--header-h)));
    min-height: max(560px, calc(100svh - var(--header-h)));
    padding: 72px 0 88px;
    overflow: hidden;
}

/* the wall of uploaded novels' icons, drifting sideways in alternating rows */
.cover-wall {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    animation: fade-in 1.6s 0.2s forwards;
}
.cover-row { overflow: hidden; }
.cover-track {
    display: flex;
    width: max-content;
    animation: drift-left var(--dur, 70s) linear infinite;
    will-change: transform;
}
.cover-row:nth-child(even) .cover-track { animation-direction: reverse; }
.cover-track img {
    width: clamp(92px, 11vw, 148px);
    height: clamp(92px, 11vw, 148px);
    margin-right: 16px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    background-color: #26232A;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* keeps the text readable over the wall, and fades it into the page */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 55% at 50% 50%, rgba(18, 16, 20, 0.94) 0%, rgba(18, 16, 20, 0.8) 55%, rgba(18, 16, 20, 0.45) 100%),
        linear-gradient(to bottom, rgba(18, 16, 20, 0.85) 0%, rgba(18, 16, 20, 0) 22%, rgba(18, 16, 20, 0) 78%, var(--bg3) 100%);
}

.hero-inner {
    width: min(760px, 100% - 48px);
    text-align: center;
}

.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(251, 169, 52, 0.4);
    border-radius: 999px;
    background-color: rgba(251, 169, 52, 0.1);
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--orange) 0%, var(--orange-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 0 auto 30px;
    max-width: 620px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.store-badges a { display: block; transition: transform 0.15s, filter 0.15s; }
.store-badges a:hover { transform: translateY(-2px); filter: brightness(1.1); }
.store-badges img { display: block; height: 46px; width: auto; }
/* the Google Play artwork has built-in padding, the App Store's doesn't */
.store-badges .badge-play img { height: 62px; margin: -8px -4px; }
.hero .store-badges { margin-bottom: 22px; }

/* -------------------------------------------------------------- sections */

.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2, .h2-bar {
    margin: 0;
    padding-left: 12px;
    border-left: 3px solid var(--orange);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}
.section-head p { margin: 12px 0 0 15px; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-features { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 169, 52, 0.35);
    box-shadow: 0 8px 26px rgba(251, 169, 52, 0.14);
}
.card h3 { margin: 16px 0 8px; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.icon-chip {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background-color: rgba(251, 169, 52, 0.14);
    color: var(--orange);
}
.icon-chip svg { width: 24px; height: 24px; }
.card:nth-child(3n + 2) .icon-chip { background-color: rgba(248, 168, 156, 0.14); color: var(--orange-soft); }

/* ------------------------------------------------- web player showcase */

.wp-panel {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 44px;
    padding: 44px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(251, 169, 52, 0.12), transparent 55%),
        var(--surface);
}
.wp-panel h2 { margin: 14px 0 12px; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; }
.wp-panel p { margin: 0 0 26px; color: var(--muted); }

/* a miniature Web Player: same header, same cards */
.wp-mock {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background-color: var(--bg2);
    background-image: radial-gradient(circle at 50% -10%, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    transform: rotate(1.2deg);
}
.wp-mock-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wp-mock-bar i { width: 9px; height: 9px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.2); }
.wp-mock-bar span {
    margin-left: 10px;
    padding: 2px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--faint);
    font-size: 11px;
}
.wp-mock-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wp-mock-head img { height: 18px; }
.wp-mock-search {
    flex: 1;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
}
.wp-mock-play { width: 58px; height: 26px; border-radius: 999px; background-color: var(--orange); }
.wp-mock-body { padding: 14px; }
.wp-mock-body h3 {
    margin: 0 0 12px;
    padding-left: 8px;
    border-left: 3px solid var(--orange);
    font-size: 13px;
    line-height: 1.2;
}
.wp-mock-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wp-mock-cards .mc { display: block; }
.wp-mock-cards img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.wp-mock-cards b {
    display: block;
    height: 6px;
    margin-top: 7px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.22);
}
.wp-mock-cards b + b { width: 60%; margin-top: 5px; background-color: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------ community / cta band */

.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--surface);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.social-pill:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.social-pill svg { width: 18px; height: 18px; fill: currentColor; }

.cta-band {
    padding: 56px 28px;
    border: 1px solid rgba(251, 169, 52, 0.28);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(251, 169, 52, 0.18), transparent 65%),
        var(--surface);
    text-align: center;
}
.cta-band h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
.cta-band p { margin: 0 0 26px; color: var(--muted); }

/* ---------------------------------------------------------------- footer */

.site-footer {
    flex-shrink: 0;
    margin-top: 40px;
    padding: 44px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 36px;
}
.footer-brand img { height: 24px; display: block; }
.footer-brand p { margin: 14px 0 0; max-width: 300px; color: var(--faint); font-size: 13px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-heading {
    margin-bottom: 2px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.footer-col a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--orange); }
.footer-col a svg { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.footer-copy { margin-top: 32px; color: var(--faint); font-size: 12px; text-align: center; }

/* ----------------------------------------- page shell (inner pages) */

.page { padding: 56px 0 24px; }
.page-narrow { width: min(820px, 100% - 48px); margin-inline: auto; }
.page-head { margin-bottom: 30px; }
.page-head h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.page-head p { margin: 14px 0 0; color: var(--muted); font-size: 1.05rem; }

.notice {
    margin-bottom: 26px;
    padding: 12px 16px;
    border: 1px solid rgba(251, 169, 52, 0.35);
    border-radius: 12px;
    background-color: rgba(251, 169, 52, 0.08);
    color: var(--orange);
    font-size: 14px;
}

/* long-form text: terms, privacy, docs pages */
.prose { color: rgba(255, 255, 255, 0.86); overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { color: var(--text); line-height: 1.3; }
.prose h1 { margin: 0 0 20px; font-size: 2rem; }
.prose h2 { margin: 2.2em 0 0.7em; padding-left: 12px; border-left: 3px solid var(--orange); font-size: 1.45rem; }
.prose h3 { margin: 1.8em 0 0.6em; font-size: 1.2rem; }
.prose h4, .prose h5 { margin: 1.5em 0 0.5em; font-size: 1.05rem; }
.prose .title { margin: 0 0 8px; font-size: 2rem; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--orange); }
.prose a { color: var(--orange); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--orange-soft); }
.prose strong { color: var(--text); }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border); }
.prose img { height: auto; border-radius: 12px; }
.prose blockquote {
    margin: 1.4em 0;
    padding: 4px 18px;
    border-left: 3px solid var(--orange-soft);
    background-color: var(--surface);
    border-radius: 0 12px 12px 0;
    color: var(--muted);
}
.prose code {
    padding: 2px 6px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.09);
    font-size: 0.9em;
}
.prose pre {
    overflow-x: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.35);
}
.prose pre code { padding: 0; background: none; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.4em 0; }
.prose th, .prose td { padding: 9px 14px; border: 1px solid var(--border); text-align: left; }
.prose th { background-color: var(--surface-2); }

/* ------------------------------------------------------------------ docs */

.docs-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.docs-nav summary {
    display: none;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--surface);
    font-weight: 600;
    cursor: pointer;
}
.docs-cat { margin-bottom: 18px; }
.docs-cat-title {
    display: block;
    padding: 6px 12px;
    border-left: 3px solid var(--orange);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.docs-cat ul { margin: 6px 0 0; padding: 0; list-style: none; }
.docs-cat li a {
    display: block;
    padding: 6px 12px 6px 15px;
    border-left: 3px solid transparent;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.docs-cat li a:hover, .docs-cat a.active { color: var(--orange); }
.docs-cat li a.active { border-left-color: var(--orange); }
.docs-body { min-width: 0; }
.docs-empty { padding: 60px 0; color: var(--faint); text-align: center; }

/* --------------------------------------------- contact / guidelines */

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(251, 169, 52, 0.35); box-shadow: 0 8px 26px rgba(251, 169, 52, 0.14); }
.contact-card .icon-chip svg { fill: currentColor; }
.contact-card h2 { margin: 2px 0 4px; font-size: 1.05rem; }
.contact-card p { margin: 0; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }

.guide-intro { margin-bottom: 34px; color: var(--muted); font-size: 1.05rem; }
.guide-section {
    margin-bottom: 18px;
    padding: 26px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
}
.guide-section h2 { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--orange); font-size: 1.2rem; line-height: 1.3; }
.guide-section p { margin: 0 0 12px; color: var(--muted); }
.guide-section ul { margin: 0; padding-left: 1.3em; color: rgba(255, 255, 255, 0.86); }
.guide-section li { margin-bottom: 8px; }
.guide-section li::marker { color: var(--orange); }
.guide-section a { color: var(--orange); }
.guide-group { margin: 44px 0 16px; }
.guide-group h2 { margin: 0; font-size: 1.6rem; }
.guide-group p { margin: 6px 0 0; color: var(--faint); }

/* ------------------------------------------------- 404 / status pages */

.centered { display: grid; place-items: center; min-height: 60vh; padding: 60px 24px; text-align: center; }
.centered .big {
    margin: 0;
    font-size: clamp(5rem, 22vw, 10rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(100deg, var(--orange) 0%, var(--orange-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.centered h1, .centered h2 { margin: 12px 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); }
.centered p { margin: 0 0 26px; color: var(--muted); }

.status-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 24px auto 28px;
    padding: 18px;
    max-width: 460px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    text-align: left;
}
.status-card img { width: 84px; height: 84px; flex-shrink: 0; border-radius: 14px; object-fit: cover; }
.status-card .noveltitle { font-size: 1.15rem; font-weight: 700; }
.status-card .author { color: var(--muted); font-size: 0.95rem; }

/* ---------------------------------------------------- submit (novel form) */

.submit-page { width: min(680px, 100% - 48px); margin: 0 auto; padding: 48px 0 24px; }
.submit-page #welcome { text-align: center; }
.submit-page .welcomemsg { margin-bottom: 26px; color: var(--muted); font-size: 1.05rem; }
.kfilebtn, .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    background-color: var(--orange);
    color: var(--on-orange);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s;
}
.kfilebtn:hover, .submit:hover { filter: brightness(1.08); }
#form { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background-color: var(--surface); }
#form .name { margin: 22px 0 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
#form .name:first-child { margin-top: 0; }
#form input[type="text"], #form input[type="number"], #form input[type="email"], #form input[type="url"],
#form select, #form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font: inherit;
}
#form input:focus, #form select:focus, #form textarea:focus { border-color: var(--orange); outline: none; }
#form textarea { min-height: 140px; resize: vertical; }
#form select option { background-color: var(--bg3); }
#form input[type="range"] { width: 100%; accent-color: var(--orange); }
#form label.iconpreview img { width: 120px; aspect-ratio: 1; border-radius: 24px; object-fit: cover; cursor: pointer; }
#form label.bannerpreview { display: inline-block; width: calc(33.3% - 8px); }
#form label.bannerpreview img { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 8px; object-fit: cover; cursor: pointer; }
#form label[for="ss"] {
    display: block;
    margin-top: 22px;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--orange);
    color: var(--on-orange);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}
#form .submit { width: 100%; margin-top: 26px; }

#loaderbg {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(18, 16, 20, 0.86);
    display: none;
}
#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
#loaderbarbg { position: fixed; top: 0; left: 0; right: 0; z-index: 210; height: 4px; background-color: rgba(255, 255, 255, 0.12); }
#loaderbar { position: fixed; top: 0; left: 0; z-index: 211; height: 4px; width: 0; background-color: var(--orange); }

/* ------------------------------------------------------------- motion */

@keyframes drift-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cover-track { animation-play-state: paused; }
    .cover-wall { animation: none; opacity: 1; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card, .btn, .contact-card, .social-pill { transition: none; }
}

/* ------------------------------------------------------- responsive */

@media (max-width: 1000px) {
    .grid-features { grid-template-columns: repeat(2, 1fr); }
    .wp-panel { grid-template-columns: 1fr; padding: 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .header-inner { padding: 8px 16px; gap: 12px; }
    .nav-toggle { display: inline-flex; }
    .header-actions { gap: 8px; }
    .header-actions .btn { display: none; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 10px 16px 16px;
        background-color: rgba(18, 16, 20, 0.97);
        border-bottom: 1px solid var(--border);
    }
    .site-header.open .site-nav { display: flex; }
    .site-nav a { padding: 13px 14px; font-size: 16px; }
    .site-nav .nav-cta { display: inline-flex; }

    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .docs-nav { position: static; max-height: none; overflow: visible; }
    .docs-nav summary { display: block; }
    .docs-nav .docs-tree { margin-top: 14px; }
}

@media (min-width: 861px) {
    .site-nav .nav-cta { display: none; }
    .docs-nav .docs-tree { display: block !important; }
}

@media (max-width: 720px) {
    .grid-3 { grid-template-columns: 1fr; }
    .section { padding: 52px 0; }
    .hero { padding: 56px 0 64px; }
    .container, .page-narrow, .submit-page { width: calc(100% - 32px); }
    .guide-section { padding: 22px 20px; }
    .wp-panel { padding: 24px 20px; }
    .wp-mock { transform: none; }
    #form { padding: 20px 16px; }
}

@media (max-width: 520px) {
    .grid-features { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .wp-mock-cards { grid-template-columns: repeat(3, 1fr); }
    .wp-mock-cards .mc:nth-child(4) { display: none; }
    .store-badges img { height: 44px; }
    .store-badges .badge-play img { height: 58px; }
}
