:root {
    --bg: #eef3f6;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --panel-muted: #f5f8fa;
    --line: rgba(19, 42, 62, 0.12);
    --line-strong: rgba(19, 42, 62, 0.2);
    --text: #102334;
    --muted: #546677;
    --accent: #0f6d78;
    --accent-soft: rgba(15, 109, 120, 0.1);
    --accent-strong: #0b4f58;
    --shadow: 0 18px 42px rgba(18, 35, 52, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --content-width: 1180px;
    --body-font: "IBM Plex Sans", sans-serif;
    --title-font: "Space Grotesk", sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--body-font);
    background:
        linear-gradient(90deg, rgba(15, 109, 120, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(15, 109, 120, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 84% 12%, rgba(15, 109, 120, 0.08), transparent 22%),
        linear-gradient(180deg, #f6f9fb 0%, var(--bg) 50%, #e6edf1 100%);
    background-size: 34px 34px, 34px 34px, auto, auto;
}

a {
    color: var(--accent-strong);
}

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

.page-shell {
    width: min(100% - 28px, var(--content-width));
    margin: 0 auto;
}

.frame-host {
    width: min(100% - 28px, var(--content-width));
    margin: 18px auto 0;
    margin-bottom: -150px;
    position: relative;
    z-index: 50;
}

.frame-host-inline {
    margin-bottom: 0;
    isolation: isolate;
}

.frame-host iframe {
    width: 100%;
    border: 0;
    display: block;
    background: transparent;
    position: relative;
    z-index: 50;
}

.page {
    width: min(100% - 28px, var(--content-width));
    margin: 20px auto 60px;
    display: grid;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.intro-row {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    gap: 24px;
    align-items: stretch;
}

.closing-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.intro-row > .panel,
.closing-row > .panel {
    height: 100%;
}

.intro-row > .panel .panel-inner,
.closing-row > .panel .panel-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.panel-inner {
    padding: 30px;
}

.section-heading {
    display: block;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    font-family: var(--title-font);
    font-size: clamp(1.7rem, 3.5vw, 2.45rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.section-heading p,
.overview-copy p,
.architecture-copy p,
.map-note,
.acknowledgement-text,
.spec-card p,
.site-footnote {
    margin: 0;
    font-size: 1rem;
    line-height: 1.68;
    color: var(--muted);
}

.overview-copy {
    display: grid;
    gap: 14px;
}

.spec-card strong,
.legend-card strong,
.tooltip strong {
    color: var(--text);
}

.overview-image {
    margin-top: 22px;
}

.specs-wrap {
    display: grid;
    gap: 16px;
    flex: 1 1 auto;
}

.spec-preview {
    margin: 0;
    border-radius: var(--radius-lg);
    background: var(--panel-muted);
    border: 1px solid var(--line);
    overflow: hidden;
}

.spec-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

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

.spec-card {
    border-radius: var(--radius-lg);
    background: var(--panel-muted);
    border: 1px solid var(--line);
    overflow: hidden;
    min-height: 132px;
    padding: 14px 14px 12px;
    display: grid;
    align-content: start;
    gap: 6px;
}

.spec-card strong {
    font-size: 1.18rem;
    font-family: var(--title-font);
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.spec-card span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-strong);
    font-weight: 700;
}

.spec-card p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.media-panel {
    margin: 0;
    border-radius: var(--radius-lg);
    background: var(--panel-muted);
    border: 1px solid var(--line);
    overflow: hidden;
}

.media-panel img {
    width: 100%;
    height: auto;
}

.overview-panel .media-panel img {
    aspect-ratio: auto;
    object-fit: contain;
}

.media-caption {
    padding: 14px 16px 16px;
    color: var(--muted);
    line-height: 1.55;
}

.map-panel .panel-inner {
    padding: 26px;
}

.map-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    background: var(--panel-strong);
}

.map-canvas,
.map-image,
.map-overlay {
    width: 100%;
    height: auto;
    display: block;
}

.map-canvas {
    aspect-ratio: 1840 / 940;
}

.map-panel[data-map-mode="wham"] .map-frame {
    aspect-ratio: 1840 / 940;
    min-height: clamp(260px, 38vw, 560px);
    background: #ffffff;
}

.map-panel[data-map-mode="wham"] .map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.map-overlay {
    position: absolute;
    inset: 0;
}

.legend-card {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    min-width: 180px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(18, 35, 52, 0.08);
}

.legend-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legend-list {
    display: grid;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.swatch {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 1px solid rgba(16, 35, 52, 0.24);
}

.map-note {
    margin-top: 16px;
}

.map-credit {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.map-credit a {
    color: var(--accent-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.tooltip {
    position: fixed;
    z-index: 999;
    min-width: 220px;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(16, 35, 52, 0.12);
    box-shadow: 0 18px 36px rgba(18, 35, 52, 0.16);
    font-size: 0.9rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 100ms ease, transform 100ms ease;
    pointer-events: none;
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tooltip strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.96rem;
}

.field-highlight {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 90ms ease;
}

.field-highlight.active {
    opacity: 1;
    fill: rgba(15, 109, 120, 0.24);
    stroke: rgba(11, 79, 88, 0.96);
}

.field-highlight.hover:not(.active) {
    opacity: 1;
    fill: rgba(255, 255, 255, 0.08);
    stroke: rgba(242, 225, 188, 0.95);
    stroke-width: 1.2;
}

.map-panel[data-map-mode="wham"] .field-highlight.hover:not(.active) {
    fill: rgba(242, 225, 188, 0.12);
    stroke: rgba(242, 225, 188, 0.98);
    stroke-width: 1.4;
}

.map-panel[data-map-mode="wham"] .field-highlight.active {
    fill: rgba(116, 212, 103, 0.38);
    stroke: rgba(69, 166, 57, 0.98);
    stroke-width: 1.6;
}

.field-outline {
    fill: none;
    stroke: rgba(232, 244, 255, 0.14);
    stroke-width: 0.42;
    pointer-events: none;
}

.simple-axis-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.72);
    stroke-width: 1.2;
}

.simple-axis-tick {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1;
}

.simple-axis-label {
    fill: rgba(17, 24, 39, 0.96);
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.map-guides {
    pointer-events: none;
}

.field-hit {
    fill: transparent;
    cursor: pointer;
}

.acknowledgement-text {
    color: var(--text);
}

.site-footnote {
    width: min(100% - 28px, var(--content-width));
    margin: 0 auto 34px;
}

.animation-panel .media-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.animation-panel .media-panel img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.acknowledgement-panel .panel-inner {
    justify-content: center;
}

.acknowledgement-panel .acknowledgement-text {
    flex: 1 1 auto;
}

.design-header-body {
    margin: 0;
    min-height: auto;
    background: transparent;
    overflow: visible;
}

.design-header {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: visible;
    position: relative;
    z-index: 20;
}

.header-top {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 16px;
    padding: 20px 26px 18px;
    border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    max-height: 72px;
    width: auto;
}

.header-title {
    text-align: center;
}

.header-title h1 {
    margin: 0;
    font-family: var(--title-font);
    font-size: clamp(1.7rem, 3.4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
    color: var(--text);
}

.nav-strip {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(247, 250, 251, 0.92), rgba(240, 245, 247, 0.92));
    padding: 0 10px;
    overflow: visible;
    border-radius: 0 0 calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-list > li {
    position: relative;
    overflow: visible;
}

.nav-list a,
.dropbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    text-decoration: none;
    color: var(--text);
    font: inherit;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-list a:hover,
.dropbtn:hover {
    color: var(--accent-strong);
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 2px);
    transform: translateX(-50%);
    min-width: 190px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(18, 35, 52, 0.12);
    z-index: 25;
}

.frame-host-inline .dropdown-content {
    z-index: 80;
}

.dropdown-content a {
    width: 100%;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.93rem;
}

.dropdown-content a:hover {
    background: var(--accent-soft);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

@media (max-width: 980px) {
    .intro-row,
    .closing-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .panel-inner {
        padding: 22px;
    }

    .map-panel .panel-inner {
        padding: 18px;
    }

    .header-top {
        grid-template-columns: 72px minmax(0, 1fr) 72px;
        padding: 16px 16px 14px;
        gap: 10px;
    }

    .header-logo img {
        max-height: 52px;
    }

    .nav-list a,
    .dropbtn {
        min-height: 44px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .legend-card {
        position: static;
        margin-top: 14px;
    }
}

@media (max-width: 560px) {
    .page,
    .frame-host,
    .site-footnote {
        width: min(100% - 18px, var(--content-width));
    }

    .header-title h1 {
        font-size: 1.35rem;
    }

    .nav-strip {
        padding: 6px;
    }

    .dropdown-content {
        left: 0;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
