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

:root {
    --bg: #0D0D0D;
    --deep: #070707;
    --panel: #171717;
    --panel-2: #222222;
    --title: #F2F2F2;
    --text: #C8C8C8;
    --muted: #9A9A9A;
    --faint: #6E6E6E;
    --silver: #C8C8C8;
    --bright: #E8E8E8;
    --ink: #1A1A1A;
    --mist-red: #B85A5A;
    --border: rgba(232, 232, 232, 0.12);
    --border-strong: rgba(232, 232, 232, 0.36);
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    --max: 1120px;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.ui-locked {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--bright);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 1000;
    padding: 10px 14px;
    background: var(--bright);
    color: var(--bg);
    border-radius: 8px;
}

.skip-link:focus {
    top: 12px;
}

.ink-line {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    height: 22px;
    background: #090909;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--silver);
}

.ink-line__inner,
.site-bar__inner,
.case-tabs__inner,
.footer-inner {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}

.ink-line__inner {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.text-button {
    appearance: none;
    border: 0;
    background: transparent;
    min-width: 44px;
    min-height: 22px;
    padding: 0 2px;
    cursor: pointer;
    color: var(--silver);
    font-size: 12px;
}

.text-button:hover {
    color: var(--title);
}

.site-bar {
    position: fixed;
    inset: 22px 0 auto 0;
    z-index: 115;
    height: 60px;
    background: var(--ink);
    border-bottom: 1px solid var(--border);
}

.site-bar__inner {
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.brand-link {
    justify-self: start;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: auto;
    height: 28px;
    object-fit: contain;
    object-position: center;
}

.brand-fallback {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--title);
}

.drawer-trigger,
.close-button {
    appearance: none;
    border: 1px solid var(--border-strong);
    background: var(--deep);
    color: var(--bright);
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.drawer-trigger {
    justify-self: center;
}

.drawer-trigger:hover,
.close-button:hover {
    border-color: var(--bright);
    background: var(--panel);
}

.app-link {
    justify-self: end;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #E8E8E8 0%, #C8C8C8 55%, #8A8A8A 100%);
    color: #0D0D0D;
    font-size: 14px;
    font-weight: 700;
}

.app-link:hover {
    filter: brightness(1.05);
}

.case-tabs {
    position: fixed;
    inset: 82px 0 auto 0;
    z-index: 110;
    height: 40px;
    background: #0A0A0A;
    border-bottom: 1px solid var(--border);
}

.case-tabs__inner {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.case-tabs a {
    min-height: 32px;
    min-width: 80px;
    padding: 4px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--silver);
}

.case-tabs a:hover {
    background: var(--panel);
    color: var(--title);
}

.case-tabs a.is-active {
    background: var(--bright);
    color: var(--bg);
}

.site-main {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
    padding: 154px 0 76px;
}

.page-hero,
.cover-copy,
.content-section,
.statement-panel,
.app-panel,
.faq-block,
.contact-card {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 30px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(184, 90, 90, 0.06), transparent 42%),
        var(--panel);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    color: var(--title);
    font-size: 24px;
    line-height: 1.3;
}

h2 {
    color: var(--title);
    font-size: 20px;
    line-height: 1.45;
}

h3 {
    color: var(--title);
    font-size: 16px;
    line-height: 1.5;
}

p {
    margin-bottom: 16px;
}

.lead {
    max-width: 820px;
    color: var(--text);
    font-size: 16px;
}

.muted {
    color: var(--muted);
}

.section-title {
    margin-bottom: 14px;
}

.section-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--mist-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
}

.content-section {
    padding: 26px;
    margin: 22px 0;
}

.content-section > :last-child,
.page-hero > :last-child,
.statement-panel > :last-child,
.faq-block > :last-child,
.contact-card > :last-child {
    margin-bottom: 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.button-primary,
.button-secondary {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.button-primary {
    background: linear-gradient(135deg, #E8E8E8 0%, #C8C8C8 55%, #8A8A8A 100%);
    color: #0D0D0D;
}

.button-secondary {
    background: #101010;
    color: var(--bright);
    border: 1px solid var(--border-strong);
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-1px);
}

.media-slot {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.media-slot img,
.cover-slot img,
.section-media img,
.app-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.cover-slot {
    height: 260px;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-copy {
    padding: 26px;
    margin-top: 16px;
}

.cover-copy .brand-mark {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .14em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.feature-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 12px;
}

.feature-card .media-slot {
    height: 180px;
    margin-bottom: 16px;
}

.feature-card h2 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text);
}

.editorial-split {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 20px;
    align-items: stretch;
}

.section-media {
    min-height: 200px;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.number-list,
.shelf-list,
.memo-list,
.timeline,
.topic-list,
.rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.number-list {
    display: grid;
    gap: 10px;
}

.number-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.number-list li:first-child {
    border-top: 0;
}

.number-list b {
    color: var(--bright);
    font-size: 22px;
    line-height: 1.2;
}

.number-list span {
    color: var(--text);
}

.shelf-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shelf-list li {
    padding: 16px;
    min-height: 110px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.shelf-list strong,
.memo-list strong,
.topic-list strong {
    display: block;
    color: var(--title);
    margin-bottom: 6px;
}

.timeline {
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border-strong);
}

.timeline li {
    position: relative;
    padding: 0 0 22px 16px;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 7px;
    width: 9px;
    height: 9px;
    background: var(--bright);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--panel);
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 1px 9px;
    margin-bottom: 8px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--silver);
    font-size: 12px;
}

.memo-grid,
.topic-grid,
.rules-grid,
.faq-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.memo-list li,
.topic-list li,
.rule-list li {
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.memo-list li:first-child,
.topic-list li:first-child,
.rule-list li:first-child {
    border-top: 0;
}

.big-number-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.big-number {
    padding: 18px 12px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.big-number b {
    display: block;
    margin-bottom: 8px;
    color: var(--bright);
    font-size: 28px;
    line-height: 1;
}

.big-number span {
    color: var(--muted);
    font-size: 13px;
}

.app-panel {
    padding: 26px;
    margin: 22px 0;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
    gap: 22px;
    align-items: center;
}

.app-visual {
    height: 340px;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-icon-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.app-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
}

.statement-panel {
    padding: 26px;
    margin: 22px 0;
}

.faq-grid {
    align-items: start;
}

.faq-block {
    padding: 20px;
}

.faq-block h3 {
    margin-bottom: 8px;
}

.article-stack {
    display: grid;
    gap: 18px;
}

.article-card {
    padding: 22px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 12px;
}

.article-card .article-no {
    display: block;
    margin-bottom: 10px;
    color: var(--bright);
    font-size: 24px;
    line-height: 1;
}

.article-card h2 {
    margin-bottom: 8px;
}

.note-box {
    padding: 18px;
    background: var(--panel-2);
    border-left: 3px solid var(--mist-red);
    border-radius: 8px;
    color: var(--text);
}

.contact-card {
    padding: 22px;
}

.contact-card h2 {
    margin-bottom: 8px;
}

.site-footer {
    background: var(--deep);
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}

.footer-inner {
    padding: 34px 0 80px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.footer-logo {
    width: auto;
    height: 28px;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    color: var(--title);
    font-size: 16px;
}

.footer-brand span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .12em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.footer-grid h2 {
    margin-bottom: 9px;
    font-size: 13px;
    color: var(--title);
}

.footer-grid a {
    display: block;
    min-height: 30px;
    padding: 3px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--bright);
}

.footer-note {
    margin: 26px 0 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.copyright {
    margin-bottom: 0;
    color: var(--faint);
}

.page-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .66);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.page-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 220;
    width: min(400px, 86vw);
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    visibility: hidden;
    pointer-events: none;
    background: var(--deep);
    border-right: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    transition: transform .25s ease, visibility .25s ease;
}

.site-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: var(--deep);
    border-bottom: 1px solid var(--border);
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.drawer-logo {
    width: auto;
    height: 28px;
    object-fit: contain;
}

.drawer-brand strong {
    display: block;
    color: var(--title);
}

.drawer-brand span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .1em;
}

.drawer-groups {
    padding: 10px 16px 30px;
}

.drawer-groups section {
    padding: 14px 0 4px;
    border-bottom: 1px solid var(--border);
}

.drawer-groups section:last-child {
    border-bottom: 0;
}

.drawer-groups h2 {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
}

.drawer-groups a {
    display: block;
    min-height: 58px;
    padding: 10px 12px;
    margin-bottom: 5px;
    border-radius: 10px;
}

.drawer-groups a:hover {
    background: var(--panel);
}

.drawer-groups strong {
    display: block;
    color: var(--title);
    font-size: 14px;
}

.drawer-groups span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.search-layer {
    position: fixed;
    top: 82px;
    left: 50%;
    z-index: 230;
    width: min(calc(100% - 32px), 720px);
    transform: translate(-50%, -16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.search-layer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.search-card {
    padding: 22px;
    background: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow);
}

.search-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.search-head h2 {
    margin-bottom: 12px;
}

.search-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.search-input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    background: var(--deep);
    color: var(--title);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
}

.search-input::placeholder {
    color: var(--faint);
}

.search-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.search-presets a {
    min-height: 58px;
    padding: 10px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--title);
}

.search-presets a:hover {
    border-color: var(--border-strong);
}

.search-presets span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.search-empty {
    margin: 14px 0 0;
    color: var(--muted);
}

.mobile-bottom {
    display: none;
}

@media (max-width: 860px) {
    .feature-grid,
    .editorial-split,
    .app-layout,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-grid .feature-card:last-child {
        grid-column: 1 / -1;
    }

    .big-number-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body {
        padding-bottom: calc(48px + env(safe-area-inset-bottom));
    }

    .case-tabs {
        display: none;
    }

    .site-main {
        padding-top: 106px;
        padding-bottom: 54px;
    }

    .ink-line__inner,
    .site-bar__inner,
    .footer-inner {
        width: calc(100% - 32px);
    }

    .site-bar__inner {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
    }

    .brand-link,
    .app-link {
        min-width: 0;
    }

    .brand-fallback {
        font-size: 15px;
        white-space: nowrap;
    }

    .app-link {
        padding: 0 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .drawer-trigger {
        padding: 0 14px;
    }

    .page-hero,
    .content-section,
    .cover-copy,
    .statement-panel,
    .app-panel {
        padding: 20px;
    }

    .cover-slot {
        height: 260px;
    }

    .feature-grid,
    .editorial-split,
    .app-layout,
    .memo-grid,
    .topic-grid,
    .rules-grid,
    .faq-grid,
    .contact-grid,
    .footer-grid,
    .shelf-list {
        grid-template-columns: 1fr;
    }

    .feature-grid .feature-card:last-child {
        grid-column: auto;
    }

    .feature-card .media-slot {
        height: 180px;
    }

    .section-media {
        min-height: 200px;
    }

    .big-number-grid {
        grid-template-columns: 1fr;
    }

    .app-visual {
        height: 340px;
    }

    .footer-inner {
        padding-bottom: 72px;
    }

    .mobile-bottom {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 150;
        min-height: 48px;
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        background: var(--deep);
        border-top: 1px solid var(--border-strong);
    }

    .mobile-bottom a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--silver);
        font-size: 12px;
    }

    .mobile-bottom a.is-active {
        background: var(--bright);
        color: var(--bg);
    }

    .search-layer {
        inset: 0;
        width: 100%;
        height: 100dvh;
        transform: none;
        background: var(--deep);
        overflow-y: auto;
    }

    .search-layer.is-open {
        transform: none;
    }

    .search-card {
        min-height: 100dvh;
        padding: 28px 16px 80px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: var(--deep);
    }

    .search-presets {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
