:root {
    --bg: #F3F7FB;
    --bg-deep: #E6EFF7;
    --surface: #FFFFFF;
    --surface-soft: #DCEBF5;
    --ink: #10263A;
    --text: #263B4C;
    --muted: #60788C;
    --soft-text: #8094A5;
    --blue: #3B9FE0;
    --blue-bright: #67B9EC;
    --steel: #1E6FB8;
    --ice: #B8DDF3;
    --mint: #39A69C;
    --line: rgba(30,111,184,0.16);
    --line-strong: rgba(59,159,224,0.38);
    --shadow: 0 14px 36px rgba(16,38,58,0.08);
    --radius: 14px;
    --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    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: 16px;
    line-height: 1.78;
    overflow-x: hidden;
}
body.overlay-open { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #155993; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(59,159,224,0.32);
    outline-offset: 3px;
}
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 200;
    background: var(--ink);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
}
.skip-link:focus { top: 10px; }

.brand-bar {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 72px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 20px rgba(16,38,58,0.05);
}
.brand-bar-inner {
    width: min(calc(100% - 32px), var(--max));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand-lockup {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    text-decoration: none;
}
.brand-logo, .panel-logo, .footer-logo {
    display: block;
    width: auto;
    height: 34px;
    object-fit: contain;
}
.brand-text { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.brand-status { color: var(--muted); font-size: 14px; white-space: nowrap; }
.brand-actions { display: flex; align-items: center; gap: 8px; }
.top-action {
    min-width: 52px;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--steel);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.top-action:hover { background: #F5FAFE; border-color: var(--line-strong); color: var(--ink); }
.menu-action { background: linear-gradient(135deg,var(--blue-bright),var(--blue) 52%,var(--steel)); color: #fff; border-color: transparent; }
.menu-action:hover { color: #fff; filter: brightness(.97); }

.site-shell { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 34px 0 72px; }
.layout-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 34px; align-items: start; }
.content-column { min-width: 0; }
.desktop-rail { position: relative; }
.rail-card {
    position: sticky;
    top: 96px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 16px;
}
.rail-group + .rail-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rail-group h2 { margin: 0; color: var(--ink); font-size: 15px; }
.rail-group p { margin: 4px 0 8px; color: var(--soft-text); font-size: 12px; line-height: 1.55; }
.rail-group nav { display: grid; gap: 4px; }
.rail-group a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 7px 10px 7px 12px;
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}
.rail-group a:hover { background: #F2F8FC; color: var(--ink); }
.rail-group a.is-current { background: #E8F4FB; border-left-color: var(--steel); color: var(--ink); font-weight: 800; }
.rail-all {
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--steel);
    border-radius: 10px;
    font-weight: 700;
}

.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; color: var(--soft-text); font-size: 14px; }
.breadcrumb a { color: var(--steel); }
.page-hero {
    background: linear-gradient(145deg,#FFFFFF 0%,#F7FBFE 58%,#EAF5FB 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: clamp(24px,4vw,46px);
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}
.page-hero h1 { margin: 6px 0 12px; color: var(--ink); font-size: clamp(30px,4vw,38px); line-height: 1.18; letter-spacing: -.02em; }
.page-hero p { margin: 0; max-width: 850px; font-size: 17px; color: var(--muted); }
.eyebrow { display: inline-block; color: var(--steel); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-actions, .section-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn-primary, .btn-secondary {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
}
.btn-primary { color: #fff; background: linear-gradient(135deg,var(--blue-bright),var(--blue) 52%,var(--steel)); box-shadow: 0 9px 22px rgba(30,111,184,.18); }
.btn-primary:hover { color: #fff; filter: brightness(.97); }
.btn-secondary { background: #fff; color: var(--steel); border: 1px solid var(--line-strong); }

.section-block { margin-top: 34px; }
.section-heading { margin-bottom: 16px; }
.section-heading.compact { margin-bottom: 12px; }
.section-heading h2 { margin: 5px 0 0; color: var(--ink); font-size: clamp(22px,3vw,28px); line-height: 1.28; }
.section-heading p { margin: 8px 0 0; max-width: 800px; color: var(--muted); }
.prose-card, .info-card, .content-card, .notice-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(16,38,58,.05);
}
.prose-card { padding: clamp(20px,3vw,30px); }
.prose-card p:first-child { margin-top: 0; }
.prose-card p:last-child { margin-bottom: 0; }
.prose-card h2, .prose-card h3, .content-card h3, .info-card h3 { color: var(--ink); }
.prose-card h2 { font-size: 25px; margin: 1.2em 0 .5em; }
.prose-card h3 { font-size: 20px; margin: 1.1em 0 .4em; }
.prose-card ul, .prose-card ol { padding-left: 1.35em; }
.prose-card li + li { margin-top: 7px; }

.media-frame {
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #EEF6FB;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
}
.media-placeholder {
    width: 100%;
    min-height: 230px;
    aspect-ratio: 16/9;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--ink);
    background:
        linear-gradient(135deg,rgba(103,185,236,.16),rgba(57,166,156,.08)),
        repeating-linear-gradient(90deg,transparent 0 48px,rgba(30,111,184,.05) 49px 50px);
}
.media-placeholder span { font-weight: 800; letter-spacing: .03em; }
.banner-frame .media-frame { max-height: 420px; }
.banner-frame .media-image { max-height: 420px; }
.app-visual .media-frame { min-height: 320px; }
.app-visual .media-image { max-height: 460px; width: 100%; object-fit: contain; }
.icon-frame .media-frame { width: 72px; height: 72px; min-height: 0; aspect-ratio: 1; }
.icon-frame .media-placeholder { min-height: 0; width: 72px; height: 72px; aspect-ratio: 1; padding: 6px; font-size: 11px; }
.icon-frame .media-image { width: 64px; height: 64px; object-fit: contain; }

.home-cover { margin-bottom: 36px; }
.home-cover-copy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
    padding: clamp(22px,4vw,38px);
    margin-top: -1px;
}
.home-cover-copy h1 { margin: 8px 0 12px; color: var(--ink); font-size: clamp(30px,4vw,38px); line-height: 1.16; }
.home-cover-copy p { max-width: 900px; margin: 0; color: var(--muted); }
.task-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.task-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    min-height: 190px;
    display: flex;
    flex-direction: column;
}
.task-card.visual { padding: 0; overflow: hidden; }
.task-card.visual .media-frame { border: 0; border-radius: 0; min-height: 118px; }
.task-card.visual .media-placeholder { min-height: 118px; aspect-ratio: 16/9; }
.task-card.visual .media-image { max-height: 135px; }
.task-card .task-copy { padding: 14px 16px 16px; }
.task-no { color: var(--steel); font-size: 26px; font-weight: 900; letter-spacing: -.04em; }
.task-card h3 { margin: 8px 0 6px; color: var(--ink); font-size: 18px; }
.task-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.task-card a { margin-top: auto; font-weight: 800; }
.task-line { height: 1px; background: var(--line-strong); margin: 16px 0; position: relative; }
.task-line::after { content: ''; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }

.editorial-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: 16px; }
.editorial-main { padding: 0; overflow: hidden; }
.editorial-main .media-frame { border: 0; border-radius: 14px 14px 0 0; }
.editorial-copy { padding: 22px; }
.editorial-copy h3 { margin: 0 0 8px; color: var(--ink); font-size: 22px; }
.editorial-copy p { margin: 0; color: var(--muted); }
.editorial-side { display: grid; gap: 16px; }
.editorial-side .info-card { padding: 20px; }
.editorial-side h3 { margin: 0 0 8px; font-size: 19px; }
.editorial-side p { margin: 0; color: var(--muted); }

.media-bands { display: grid; gap: 18px; }
.media-band {
    display: grid;
    grid-template-columns: minmax(0,42%) minmax(0,58%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.media-band:nth-child(even) { grid-template-columns: minmax(0,58%) minmax(0,42%); }
.media-band:nth-child(even) .band-media { order: 2; }
.media-band .media-frame { border: 0; border-radius: 0; min-height: 230px; }
.media-band .media-image { max-height: 270px; }
.band-copy { padding: clamp(20px,3vw,30px); align-self: center; }
.band-copy h3 { margin: 5px 0 8px; color: var(--ink); font-size: 24px; }
.band-copy p { margin: 0 0 12px; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 8px; background: #EAF5FB; color: var(--steel); font-size: 13px; font-weight: 700; }

.people-craft { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.people-copy { display: grid; gap: 12px; }
.node-card { padding: 18px 20px; border-left: 4px solid var(--steel); background: #fff; border-radius: 0 12px 12px 0; box-shadow: 0 8px 22px rgba(16,38,58,.04); }
.node-card:nth-child(2) { border-left-color: var(--mint); }
.node-card:nth-child(3) { border-left-color: var(--blue-bright); }
.node-card h3 { margin: 0 0 5px; color: var(--ink); font-size: 18px; }
.node-card p { margin: 0; color: var(--muted); }

.mosaic-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 12px; }
.mosaic-card { min-height: 180px; padding: 22px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; }
.mosaic-card:nth-child(1) { grid-column: span 7; background: #DCEEF9; }
.mosaic-card:nth-child(2) { grid-column: span 5; background: #E9F4F1; }
.mosaic-card:nth-child(3) { grid-column: span 4; background: #EDF3F8; }
.mosaic-card:nth-child(4) { grid-column: span 4; background: #E3F2FB; }
.mosaic-card:nth-child(5) { grid-column: span 4; background: #E6F2F0; }
.mosaic-card:nth-child(6) { grid-column: span 12; min-height: 150px; background: #F2F6F9; }
.mosaic-no { color: var(--steel); font-size: 28px; font-weight: 900; }
.mosaic-card h3 { margin: 14px 0 6px; font-size: 21px; }
.mosaic-card p { margin: 0; color: var(--muted); }

.shelf-chart { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; }
.shelf-board, .chart-board { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.shelf-board .media-frame, .chart-board .media-frame { margin-bottom: 16px; }
.shelf-layers { display: grid; gap: 8px; }
.shelf-layer { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shelf-layer:last-child { border-bottom: 0; }
.shelf-layer strong { color: var(--ink); }
.shelf-layer span { color: var(--muted); }
.chart-list { display: grid; gap: 8px; }
.chart-item { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.chart-item:last-child { border-bottom: 0; }
.chart-number { font-size: 26px; line-height: 1; color: var(--steel); font-weight: 900; }
.chart-item h3 { margin: 0 0 3px; color: var(--ink); font-size: 17px; }
.chart-item p { margin: 0; color: var(--muted); font-size: 14px; }

.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lab-item { padding: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.lab-item h3 { margin: 0 0 8px; color: var(--ink); font-size: 19px; }
.lab-item p { margin: 0; color: var(--muted); }
.demo-toggle { margin-top: 14px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #F4FAFD; color: var(--steel); font-weight: 800; }
.demo-toggle[aria-pressed="true"] { background: var(--steel); color: #fff; }
body.compact-reading .prose-card p, body.compact-reading .lab-item p { line-height: 1.58; }

.mobile-experience { display: grid; grid-template-columns: minmax(240px,.8fr) 1.2fr; gap: 26px; align-items: center; }
.app-copy .icon-frame { margin-bottom: 14px; }
.app-copy h2 { margin: 0 0 10px; color: var(--ink); font-size: 28px; }
.app-copy ul { margin: 14px 0 0; padding-left: 1.2em; }
.app-copy li + li { margin-top: 8px; }

.boundary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.boundary-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.boundary-card h3 { margin: 0 0 8px; color: var(--ink); }
.boundary-card p { margin: 0 0 14px; color: var(--muted); }
.boundary-card:last-child { grid-column: 1/-1; }

.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.card-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.info-card, .content-card { padding: 20px; }
.info-card h3, .content-card h3 { margin: 0 0 8px; }
.info-card p, .content-card p { margin: 0; color: var(--muted); }
.info-card a, .content-card a { display: inline-block; margin-top: 12px; font-weight: 800; }
.step-list { counter-reset: step; display: grid; gap: 12px; }
.step-card { position: relative; padding: 20px 20px 20px 76px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.step-card::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 18px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #E7F4FB; color: var(--steel); font-weight: 900; }
.step-card h3 { margin: 0 0 6px; color: var(--ink); }
.step-card p { margin: 0; color: var(--muted); }
.timeline { border-left: 2px solid var(--line-strong); margin-left: 18px; display: grid; gap: 18px; }
.timeline-item { position: relative; padding-left: 28px; }
.timeline-item::before { content: ''; position: absolute; left: -8px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--steel); box-shadow: 0 0 0 5px #E6F3FA; }
.timeline-item h3 { margin: 0 0 5px; color: var(--ink); }
.timeline-item p { margin: 0; color: var(--muted); }
.kanban { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.kanban-col { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.kanban-col h3 { margin: 0 0 10px; color: var(--ink); font-size: 17px; }
.kanban-note { padding: 10px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.kanban-note:first-of-type { border-top: 0; }
.theme-map { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.map-stop { position: relative; padding: 20px; border: 1px solid var(--line); background: #fff; border-radius: 14px; }
.map-stop::after { content: ''; position: absolute; right: -14px; top: 50%; width: 14px; height: 2px; background: var(--line-strong); }
.map-stop:last-child::after { display: none; }
.map-stop h3 { margin: 0 0 6px; color: var(--ink); }
.map-stop p { margin: 0; color: var(--muted); }

.quote-note { margin: 20px 0; padding: 16px 18px; border-left: 4px solid var(--mint); background: #EEF7F5; color: var(--text); border-radius: 0 10px 10px 0; }
.notice-card { padding: 18px 20px; background: #F3F9FC; }
.notice-card strong { color: var(--ink); }
.notice-card p { margin: 5px 0 0; color: var(--muted); }
.definition-list { display: grid; gap: 12px; }
.definition-item { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.definition-item dt { color: var(--ink); font-weight: 800; }
.definition-item dd { margin: 6px 0 0; color: var(--muted); }

.related-block { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.related-link { display: grid; gap: 5px; min-height: 118px; padding: 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.related-link strong { color: var(--ink); }
.related-link span { color: var(--muted); font-size: 14px; }
.related-link:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.page-cta { margin-top: 34px; padding: 24px; border-radius: 16px; background: linear-gradient(135deg,#E5F3FB,#F4FAFD 60%,#E9F6F3); border: 1px solid var(--line); }
.page-cta h2 { margin: 0 0 8px; color: var(--ink); }
.page-cta p { margin: 0; color: var(--muted); }

.faq-list { display: grid; gap: 10px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-list summary { min-height: 52px; display: flex; align-items: center; padding: 13px 18px; color: var(--ink); font-weight: 800; cursor: pointer; }
.faq-list details[open] summary { background: #F0F8FC; border-bottom: 1px solid var(--line); }
.faq-answer { padding: 16px 18px 18px; color: var(--muted); }
.faq-answer p { margin: 0; }

.site-footer { background: #102F48; color: #D4E3EE; padding: 44px 0 80px; }
.footer-inner { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.footer-logo-link { display: inline-flex; min-height: 44px; align-items: center; }
.footer-brand > div { display: grid; }
.footer-brand strong { color: #fff; font-size: 18px; }
.footer-brand span { color: #AFC6D7; font-size: 12px; letter-spacing: .08em; }
.footer-groups { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 26px; }
.footer-group h2 { margin: 0 0 10px; color: #fff; font-size: 16px; }
.footer-group nav { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.footer-group a { color: #C7D9E6; text-decoration: none; font-size: 14px; }
.footer-group a:hover { color: #fff; text-decoration: underline; }
.footer-note { margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #BFD2E0; }
.footer-copy { margin: 0; color: #9EB8CA; font-size: 14px; }

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(7,24,38,.46);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.overlay.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.menu-panel {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 110;
    width: min(calc(100% - 32px),980px);
    max-height: 82vh;
    overflow: auto;
    transform: translate(-50%,24px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(7,24,38,.28);
    padding: 22px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .2s ease, visibility .2s ease;
}
.menu-panel.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%,0); }
.panel-head { position: sticky; top: -22px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -4px -4px 18px; padding: 8px 4px 14px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.panel-brand { display: flex; align-items: center; gap: 14px; }
.panel-brand h2, .search-head h2 { margin: 2px 0 0; color: var(--ink); font-size: 22px; }
.icon-close { min-width: 54px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--steel); font-weight: 800; }
.menu-groups { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.menu-group h3 { margin: 0 0 10px; color: var(--ink); }
.menu-links { display: grid; gap: 8px; }
.menu-links a { min-height: 80px; padding: 12px; border-radius: 10px; background: #F7FAFC; border: 1px solid transparent; text-decoration: none; display: grid; gap: 3px; }
.menu-links a:hover, .menu-links a[aria-current="page"] { border-color: var(--line-strong); background: #EDF7FC; }
.menu-links strong { color: var(--ink); font-size: 14px; }
.menu-links span { color: var(--muted); font-size: 12px; line-height: 1.5; }

.search-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 115;
    width: min(calc(100% - 32px),640px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    transform: translate(-50%,-46%) scale(.98);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(7,24,38,.28);
    padding: 22px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
}
.search-dialog.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.search-head { position: static; margin: 0 0 16px; padding: 0 0 14px; }
.search-field input { width: 100%; min-height: 50px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; color: var(--ink); background: #F8FBFD; }
.search-help { margin: 8px 0 14px; color: var(--soft-text); font-size: 13px; }
.search-results { display: grid; gap: 8px; }
.search-result { padding: 12px 14px; border-radius: 10px; background: #F7FAFC; border: 1px solid var(--line); text-decoration: none; display: grid; gap: 2px; }
.search-result strong { color: var(--ink); }
.search-result span { color: var(--muted); font-size: 13px; }
.search-empty { margin: 14px 0 0; padding: 14px; border-radius: 10px; background: #F1F6FA; color: var(--muted); }

.mobile-bottom-nav { display: none; }

@media (max-width: 1100px) {
    .layout-grid { grid-template-columns: 210px minmax(0,1fr); gap: 22px; }
    .task-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .kanban { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .card-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 960px) {
    .layout-grid { display: block; }
    .desktop-rail { display: none; }
    .site-shell { padding-top: 24px; }
    .menu-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    body { font-size: 16px; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    .brand-bar { height: 68px; }
    .brand-bar-inner { width: calc(100% - 24px); gap: 10px; }
    .brand-status, .app-action { display: none; }
    .brand-logo { height: 30px; max-width: 132px; }
    .brand-actions { gap: 6px; }
    .top-action { min-width: 48px; padding: 8px 11px; font-size: 14px; }
    .site-shell { width: calc(100% - 32px); padding-bottom: 48px; }
    .page-hero { padding: 22px; }
    .page-hero p { font-size: 16px; }
    .hero-actions, .section-actions { display: grid; grid-template-columns: 1fr; }
    .btn-primary, .btn-secondary { width: 100%; }
    .task-strip, .editorial-grid, .people-craft, .shelf-chart, .lab-grid, .mobile-experience, .boundary-grid, .card-grid, .card-grid.two, .card-grid.four, .related-grid, .theme-map { grid-template-columns: 1fr; }
    .editorial-side { gap: 12px; }
    .media-band, .media-band:nth-child(even) { grid-template-columns: 1fr; }
    .media-band:nth-child(even) .band-media { order: 0; }
    .media-band .media-frame { min-height: 0; }
    .media-band .media-image { height: auto; max-height: none; }
    .mosaic-grid { grid-template-columns: 1fr; }
    .mosaic-card, .mosaic-card:nth-child(n) { grid-column: auto; min-height: 150px; }
    .shelf-layer { grid-template-columns: 1fr; gap: 4px; }
    .kanban { grid-template-columns: 1fr; }
    .map-stop::after { display: none; }
    .footer-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .site-footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
    .menu-panel { left: 0; bottom: 0; width: 100%; max-height: 82vh; transform: translateY(28px); border-radius: 18px 18px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
    .menu-panel.is-open { transform: translateY(0); }
    .panel-head { top: -18px; margin-left: 0; margin-right: 0; }
    .menu-groups { grid-template-columns: 1fr; gap: 16px; }
    .menu-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .search-dialog { width: calc(100% - 32px); padding: 18px; }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(5,1fr);
        min-height: calc(58px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,.96);
        border-top: 1px solid var(--line);
        box-shadow: 0 -8px 24px rgba(16,38,58,.08);
    }
    .mobile-bottom-nav a { min-width: 0; min-height: 54px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700; }
    .mobile-bottom-nav a.is-current { background: var(--steel); color: #fff; }
    .overlay.is-open { z-index: 100; }
    .menu-panel, .search-dialog { z-index: 110; }
    .app-visual .media-frame { min-height: 0; }
    .media-placeholder { min-height: 190px; }
}

@media (max-width: 420px) {
    .brand-bar-inner { width: calc(100% - 20px); }
    .brand-text { font-size: 19px; }
    .top-action { min-width: 46px; padding-inline: 9px; }
    .menu-links { grid-template-columns: 1fr; }
    .footer-groups { grid-template-columns: 1fr; }
}

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

/* Prevent intrinsic content widths from forcing horizontal overflow in mixed grid layouts. */
.shelf-board,
.chart-board,
.chart-item > div,
.media-band,
.band-copy,
.info-card,
.content-card,
.task-card,
.mosaic-card,
.lab-item,
.related-link {
    min-width: 0;
}
