:root {
    --page: #EEF0F8;
    --deep-page: #E0E4F2;
    --panel: #F7F8FD;
    --panel-2: #EBEEF8;
    --ink: #1A1840;
    --text: #2C2A48;
    --muted: #5A5680;
    --soft: #7A76A0;
    --purple: #5B4BDB;
    --blue: #3A6BD4;
    --deep: #1C1A3A;
    --mist: #8AA4E0;
    --lilac: #8A6AD4;
    --line: rgba(58,107,212,0.18);
    --line-strong: rgba(91,75,219,0.42);
    --shadow: 0 12px 28px rgba(28,26,58,0.08);
    --radius: 12px;
    --max: 1000px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.overlay-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a, button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.skip-link {
    position: fixed;
    left: 12px;
    top: -80px;
    z-index: 1000;
    background: var(--panel);
    color: var(--deep);
    border: 1px solid var(--line-strong);
    padding: 8px 12px;
    border-radius: 8px;
}
.skip-link:focus { top: 8px; }

.top-addressbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 22px;
    z-index: 900;
    background: var(--deep);
    color: #F7F8FD;
    font-size: 12px;
}
.top-addressbar__inner,
.window-header__inner,
.sub-tabs__inner,
.site-footer__inner,
.site-main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.top-addressbar__inner {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.text-button {
    border: 0;
    background: transparent;
    color: inherit;
    min-height: 22px;
    padding: 0 2px;
}

.window-header {
    position: fixed;
    top: 22px;
    left: 0;
    right: 0;
    height: 54px;
    z-index: 890;
    background: var(--deep-page);
    border-bottom: 1px solid var(--line-strong);
}
.window-header__inner {
    height: 54px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}
.brand-link { justify-self: start; min-width: 44px; min-height: 44px; display: flex; align-items: center; }
.brand-logo, .footer-logo, .drawer-logo { height: 24px; width: auto; max-width: 150px; object-fit: contain; object-position: center; }
.brand-fallback { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.header-app-link {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--deep);
    border: 1px solid transparent;
}
.header-app-link.is-active { background: var(--purple); color: #F7F8FD; }
.tool-drawer-button {
    justify-self: end;
    min-width: 76px;
    min-height: 44px;
    padding: 0 14px;
    background: var(--panel);
    color: var(--deep);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
}

.sub-tabs {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 880;
    min-height: 42px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.sub-tabs__inner {
    min-height: 42px;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.sub-tab {
    min-height: 30px;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--deep);
    border: 1px solid var(--line);
    background: var(--panel-2);
    display: inline-flex;
    align-items: center;
}
.sub-tab.is-active { background: var(--purple); color: #F7F8FD; border-color: var(--purple); }

.site-main { padding-top: 146px; padding-bottom: 72px; }

h1, h2, h3 { color: var(--ink); margin-top: 0; }
h1 { font-size: 24px; line-height: 1.3; margin-bottom: 14px; }
h2 { font-size: 20px; line-height: 1.4; margin-bottom: 12px; }
h3 { font-size: 16px; line-height: 1.45; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 16px; }
.eyebrow { display: inline-block; font-size: 12px; color: var(--purple); font-weight: 700; letter-spacing: .04em; margin-bottom: 8px; }

.page-hero,
.section-block,
.soft-section,
.dark-section,
.notice-panel {
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.page-hero {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 28px;
}
.section-block { background: var(--panel); border: 1px solid var(--line); padding: 24px; }
.soft-section { background: var(--deep-page); border: 1px solid var(--line); padding: 24px; }
.dark-section { background: var(--deep); color: #F7F8FD; padding: 24px; }
.dark-section h2, .dark-section h3 { color: #F7F8FD; }
.dark-section p { color: #EEF0F8; }
.notice-panel { background: var(--panel-2); border-left: 4px solid var(--purple); padding: 18px 20px; }

.primary-button,
.secondary-button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.primary-button { background: linear-gradient(135deg,#8AA4E0 0%,#5B4BDB 55%,#3A6BD4 100%); color: #F7F8FD; border: 1px solid transparent; }
.secondary-button { background: var(--panel); color: var(--deep); border: 1px solid var(--line-strong); }
.primary-button:hover, .secondary-button:hover, .sub-tab:hover, .footer-links a:hover { transform: translateY(-1px); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(91,75,219,0.28); outline-offset: 2px; }

.media-slot {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.media-slot img, .media-img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-168 { height: 168px; }
.media-176 { height: 176px; }
.media-220 { height: 220px; }
.media-280 { height: 280px; }
.media-app { height: min(320px, 54vw); min-height: 220px; }
.empty-slot::after { content: ""; width: 36%; height: 5px; border-radius: 999px; background: rgba(91,75,219,.15); }

.window-card {
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.window-card__bar {
    height: 30px;
    background: var(--deep-page);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
}
.window-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); opacity: .7; }
.window-card__body { padding: 18px; }

.stair-stack { display: grid; gap: 14px; }
.stair-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.stair-card:nth-child(2) { margin-left: 24px; }
.stair-card:nth-child(3) { margin-left: 8px; }

.tag-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.info-tag { padding: 9px 14px; min-height: 40px; border-radius: 999px; background: var(--deep-page); border: 1px solid var(--line); color: var(--deep); display: inline-flex; align-items: center; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.compare-card--deep { background: var(--deep); color: #F7F8FD; }
.compare-card--deep h2, .compare-card--deep h3 { color: #F7F8FD; }

.path-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.path-row:first-child { border-top: 0; }
.path-key { color: var(--purple); font-weight: 800; }

.center-cards { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.center-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-align: center; }
.center-card p { text-align: left; }

.product-card { max-width: 760px; margin: 0 auto 24px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); border-radius: 14px; padding: 26px; text-align: center; }
.product-card__icon { width: 48px; height: 48px; object-fit: contain; margin: 0 auto 12px; }
.product-card__text { text-align: left; }

.check-list, .plain-list { margin: 0; padding: 0; list-style: none; }
.check-list li, .plain-list li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; }
.check-list li:last-child, .plain-list li:last-child { border-bottom: 0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 10px; color: var(--purple); font-weight: 800; }
.plain-list li::before { content: "•"; position: absolute; left: 4px; top: 10px; color: var(--blue); font-weight: 800; }

.tool-list { display: grid; gap: 12px; }
.tool-item { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tool-item strong { color: var(--ink); }

.note-list { counter-reset: note; display: grid; gap: 12px; }
.note-item { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 18px 58px; }
.note-item::before { counter-increment: note; content: counter(note); position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 8px; background: var(--deep-page); color: var(--purple); display: grid; place-items: center; font-weight: 800; }

.clause-group { display: grid; gap: 16px; }
.clause { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.clause h2 { margin-bottom: 8px; }

.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.faq-item h2 { font-size: 17px; }

.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.mini-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }

.home-intro { display: grid; gap: 18px; }
.home-intro .window-card { max-width: 760px; }
.home-copy { max-width: 760px; }
.home-section { margin-bottom: 30px; }
.home-section > h2 { margin-bottom: 14px; }
.home-long { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-path { background: var(--deep-page); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }

.site-footer {
    background: var(--deep);
    color: #EEF0F8;
    border-top: 1px solid rgba(138,164,224,.55);
    padding: 34px 0 76px;
    font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.footer-brand div { display: grid; }
.footer-brand strong { font-size: 16px; color: #F7F8FD; }
.footer-brand span { color: #C9D3F2; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.footer-links h2 { color: #F7F8FD; font-size: 14px; margin-bottom: 8px; }
.footer-links a { display: block; color: #DDE3F7; padding: 3px 0; }
.footer-note { color: #D4D8E9; max-width: 800px; }
.footer-copy { color: #AEB8D8; margin-bottom: 0; }

.page-mask {
    position: fixed;
    inset: 0;
    z-index: 930;
    background: rgba(28,26,58,.46);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}
.page-mask.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }

.tool-drawer {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 950;
    width: min(360px, calc(100% - 36px));
    max-height: 70vh;
    overflow: auto;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(28,26,58,.22);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: .18s ease;
}
.tool-drawer.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.tool-drawer__head { position: sticky; top: 0; z-index: 2; background: var(--deep-page); border-bottom: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-drawer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.drawer-close, .search-close { min-height: 40px; padding: 0 12px; border-radius: 9px; background: var(--panel); color: var(--deep); border: 1px solid var(--line-strong); }
.drawer-groups { padding: 14px; }
.drawer-groups section + section { margin-top: 14px; }
.drawer-groups h2 { font-size: 14px; color: var(--purple); margin-bottom: 8px; }
.drawer-groups a { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.drawer-groups a:first-of-type { border-top: 0; }
.drawer-groups a strong { color: var(--ink); }
.drawer-groups a span { font-size: 12px; color: var(--muted); }

.search-layer {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 945;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: .18s ease;
}
.search-layer.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.search-card {
    width: min(720px, calc(100% - 32px));
    margin: 10px auto 0;
    padding: 18px;
    background: var(--deep-page);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.search-card__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.search-card__head > div { display: grid; }
.search-card__head strong { color: var(--ink); }
.search-card__head span { color: var(--muted); font-size: 13px; }
.search-input-wrap input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 14px; background: var(--panel); color: var(--deep); }
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.search-presets a { min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--deep); }
.search-empty { margin: 14px 0 0; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.mobile-bottom { display: none; }

@media (max-width: 720px) {
    .top-addressbar__inner, .window-header__inner, .site-footer__inner, .site-main { width: calc(100% - 32px); }
    .sub-tabs { display: none; }
    .site-main { padding-top: 96px; padding-bottom: 96px; }
    .window-header__inner { grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; }
    .brand-link { overflow: hidden; }
    .brand-logo { max-width: 112px; }
    .brand-fallback { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
    .header-app-link, .tool-drawer-button { min-height: 44px; padding: 0 10px; }
    .page-hero, .section-block, .soft-section, .dark-section { padding: 20px; }
    .compare-grid, .home-two, .mini-grid { grid-template-columns: 1fr; }
    .stair-card:nth-child(2), .stair-card:nth-child(3) { margin-left: 0; }
    .path-row, .tool-item { grid-template-columns: 1fr; gap: 6px; }
    .footer-links { grid-template-columns: 1fr 1fr; }
    .tool-drawer { right: 4%; bottom: 62px; width: 92%; max-height: 70vh; }
    .drawer-groups a { grid-template-columns: 100px 1fr; }
    .search-layer { top: 0; bottom: 0; background: var(--deep); overflow: auto; }
    .search-card { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; background: var(--deep); color: #F7F8FD; padding: 88px 16px 24px; }
    .search-card__head strong, .search-card__head span { color: #F7F8FD; }
    .search-card__head span { color: #D7DDF3; }
    .search-close { background: transparent; border-color: rgba(247,248,253,.38); color: #F7F8FD; }
    .search-input-wrap input { background: #F7F8FD; }
    .search-presets a { background: rgba(247,248,253,.08); color: #F7F8FD; border-color: rgba(247,248,253,.24); }
    .search-empty { color: #D7DDF3; }
    .mobile-bottom {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 910;
        min-height: 48px;
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        background: var(--panel);
        border-top: 1px solid var(--line-strong);
    }
    .mobile-bottom a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--deep); }
    .mobile-bottom a.is-active { background: var(--purple); color: #F7F8FD; }
    .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .media-app { height: 300px; }
}

@media (max-width: 420px) {
    .top-addressbar__inner { gap: 8px; }
    .top-addressbar__inner > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .brand-fallback { font-size: 15px; }
    .header-app-link { padding: 0 8px; }
    .tool-drawer-button { min-width: 68px; }
    .page-hero { padding: 18px; }
    .footer-links { grid-template-columns: 1fr; }
    .drawer-groups a { grid-template-columns: 1fr; gap: 2px; }
}

.u-mb24 { margin-bottom: 24px; }
.u-mt16 { margin-top: 16px; }
.u-mt18 { margin-top: 18px; }
.text-center { text-align: center; }
.lead-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.media-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.eyebrow-light { color: #D9D4FF; }
