:root {
    --bg-top: #e9e4dd;
    --bg-bottom: #dde2e7;
    --bg-noise: rgba(255, 255, 255, 0.32);
    --surface: rgba(255, 255, 255, 0.68);
    --surface-strong: rgba(255, 255, 255, 0.82);
    --surface-quiet: rgba(250, 248, 245, 0.6);
    --surface-dark: #2f3642;
    --surface-dark-soft: #495364;
    --line: rgba(58, 66, 79, 0.14);
    --line-strong: rgba(58, 66, 79, 0.26);
    --ink: #1b2430;
    --muted: #5f6978;
    --accent: #b18d5a;
    --accent-soft: rgba(177, 141, 90, 0.15);
    --success-bg: rgba(229, 236, 229, 0.92);
    --success-ink: #26352a;
    --warning-bg: rgba(244, 238, 228, 0.96);
    --warning-ink: #655029;
    --error-bg: rgba(244, 230, 230, 0.96);
    --error-ink: #6c3434;
    --info-bg: rgba(231, 237, 245, 0.96);
    --info-ink: #27405d;
    --shadow-xl: 0 34px 80px rgba(17, 24, 39, 0.12);
    --shadow-lg: 0 24px 56px rgba(17, 24, 39, 0.1);
    --shadow-md: 0 16px 32px rgba(17, 24, 39, 0.07);
    --shadow-sm: 0 10px 20px rgba(17, 24, 39, 0.05);
    --radius-2xl: 34px;
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1260px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    position: relative;
    padding: 32px 20px 42px;
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(177, 141, 90, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(73, 83, 100, 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(135deg, transparent 0%, transparent 48%, var(--bg-noise) 50%, transparent 52%, transparent 100%),
        linear-gradient(45deg, transparent 0%, transparent 48%, rgba(255, 255, 255, 0.22) 50%, transparent 52%, transparent 100%);
    background-size: 180px 180px;
    opacity: 0.18;
    z-index: -2;
}

body::after {
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    opacity: 0.6;
    z-index: -1;
}

button,
input,
textarea {
    font: inherit;
}

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

strong,
h1,
h2,
h3,
h4 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    letter-spacing: -0.02em;
}

code {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: rgba(228, 231, 236, 0.9);
    color: var(--surface-dark);
    font-size: 0.88rem;
}

.page-shell {
    max-width: var(--container);
    margin: 0 auto;
}

.masthead,
.hero-panel,
.tab-strip,
.panel,
.status-banner,
.loading-panel {
    animation: rise-fade 0.65s ease both;
}

.masthead {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #d7c3a1);
    box-shadow: 0 0 0 8px rgba(177, 141, 90, 0.12);
}

.brand-kicker,
.section-kicker {
    display: inline-block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-title {
    display: block;
    margin-top: 3px;
    font-size: 1.1rem;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    display: block;
    padding: 24px 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-2xl);
    background:
        radial-gradient(circle at top right, rgba(177, 141, 90, 0.16), transparent 22%),
        linear-gradient(135deg, #2f3642 0%, #566174 100%);
    color: #f8f7f4;
    box-shadow: var(--shadow-xl);
}

.hero-panel::before,
.hero-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(2px);
}

.hero-panel::before {
    width: 140px;
    height: 140px;
    top: -50px;
    right: -40px;
}

.hero-panel::after {
    display: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 14px 0 8px;
    font-size: clamp(2.3rem, 4vw, 3.6rem);
    line-height: 1.02;
}

.hero-text {
    max-width: 760px;
    margin: 0;
    color: rgba(248, 247, 244, 0.9);
    font-size: 1rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
}

.hero-side {
    display: grid;
    gap: 14px;
}

.hero-summary,
.highlight-tile {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-summary {
    padding: 20px 22px;
}

.hero-summary strong {
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.hero-summary p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
}

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

.highlight-tile {
    min-height: 150px;
    padding: 18px 16px;
    transition: transform 0.24s ease, background 0.24s ease;
}

.highlight-tile:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.highlight-tile span {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
}

.highlight-tile strong {
    display: block;
    margin-top: 16px;
    font-size: 1.22rem;
}

.highlight-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.tab-strip {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}

.tab-button {
    border: 0;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: 0.2s ease;
}

.tab-button:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.34);
}

.tab-button.is-active {
    background: linear-gradient(135deg, #313947, #4d5769);
    color: #f8f7f4;
    box-shadow: var(--shadow-sm);
}

.tab-panels {
    margin-top: 22px;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.split-grid,
.help-grid {
    display: grid;
    gap: 18px;
}

.split-grid-main {
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.92fr);
}

.split-grid-secondary {
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
    margin-top: 18px;
}

.help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 26px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background:
        linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 58px rgba(17, 24, 39, 0.12);
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 26px;
    width: 78px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.section-head,
.results-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.section-head h2,
.section-head h3,
.results-head h2 {
    margin: 8px 0 8px;
    font-size: 2rem;
    line-height: 1.08;
}

.section-head p,
.results-head p,
.help-block li {
    color: var(--muted);
    line-height: 1.75;
}

.results-head h2 {
    margin-top: 10px;
    font-size: clamp(2rem, 2.6vw, 2.7rem);
}
.validation-list,
.chart-list,
.history-list,
.accordion-list {
    display: grid;
    gap: 14px;
}

.validation-item,
.history-metric {
    padding: 16px 17px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
}

.validation-item strong {
    display: block;
    font-size: 1.02rem;
}

.validation-item p {
    margin: 8px 0 0;
}

.upload-form {
    display: grid;
    gap: 18px;
}

.dropzone {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 28px;
    border: 1.5px dashed rgba(58, 66, 79, 0.18);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 245, 240, 0.72));
    cursor: pointer;
    transition: 0.22s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
    transform: translateY(-2px);
    border-color: rgba(177, 141, 90, 0.32);
    box-shadow: inset 0 0 0 1px rgba(177, 141, 90, 0.12);
}

.drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #313947, #596274);
    color: #f7f4ee;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.drop-copy {
    display: grid;
    gap: 6px;
}

.drop-copy strong {
    font-size: 1.36rem;
}

.drop-copy span {
    color: var(--muted);
}

.drop-hint {
    align-self: end;
    color: var(--muted);
    font-size: 0.88rem;
}

.upload-toolbar,
.meta-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.selected-file,
.meta-caption {
    color: var(--muted);
    line-height: 1.7;
}

.upload-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button,
.download-button {
    background: linear-gradient(135deg, #2d3440, #505b6e);
    color: #f9f8f6;
    box-shadow: var(--shadow-sm);
}

.primary-button:hover,
.download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(17, 24, 39, 0.11);
}

.secondary-button {
    border-color: rgba(58, 66, 79, 0.14);
    background: rgba(255, 255, 255, 0.56);
    color: var(--ink);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.86);
}

.primary-button:disabled,
.secondary-button:disabled,
.download-button:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-banner,
.loading-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.status-info {
    background: var(--info-bg);
    color: var(--info-ink);
}

.status-success {
    background: var(--success-bg);
    color: var(--success-ink);
}

.status-warning {
    background: var(--warning-bg);
    color: var(--warning-ink);
}

.status-error {
    background: var(--error-bg);
    color: var(--error-ink);
}

.loading-panel {
    background: rgba(255, 255, 255, 0.82);
}

.loading-panel p {
    margin: 4px 0 0;
    color: var(--muted);
}

.banner-copy strong {
    display: block;
    margin-bottom: 4px;
}

.banner-copy p {
    margin: 0;
    color: inherit;
    line-height: 1.6;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(58, 66, 79, 0.12);
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rise-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-panel.is-hidden,
.loading-panel.is-hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 242, 238, 0.72));
    box-shadow: var(--shadow-sm);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    margin-top: 14px;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
}

.stat-note {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.table-shell {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(58, 66, 79, 0.1);
    background: rgba(255, 255, 255, 0.64);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 13px 15px;
    border-bottom: 1px solid rgba(58, 66, 79, 0.08);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: linear-gradient(180deg, #f6f3ef 0%, #ece6df 100%);
    color: var(--surface-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    background: rgba(255, 255, 255, 0.88);
}

.data-table tr:nth-child(even) td {
    background: rgba(248, 246, 243, 0.88);
}

.chart-row {
    display: grid;
    gap: 8px;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.chart-meta strong {
    font-size: 1rem;
}

.chart-meta span {
    color: var(--muted);
}

.chart-track {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(222, 226, 231, 0.92);
}

.chart-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3a4250, #b18d5a);
}

.code-block {
    min-height: 180px;
    margin: 0;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(247, 244, 240, 0.92);
    color: var(--surface-dark);
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    font-family: "Consolas", "SFMono-Regular", monospace;
    line-height: 1.7;
}

.code-block-raw {
    min-height: 240px;
    margin-top: 16px;
}

.validation-item.is-success {
    background: var(--success-bg);
    color: var(--success-ink);
}

.validation-item.is-warning {
    background: var(--warning-bg);
    color: var(--warning-ink);
}

.validation-item.is-error {
    background: var(--error-bg);
    color: var(--error-ink);
}

.accordion {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-md);
}

.accordion summary {
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 700;
    color: var(--surface-dark);
}

.accordion > div {
    padding: 0 20px 20px;
}

.filter-box {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.filter-box span {
    color: var(--muted);
    font-size: 0.92rem;
}

.filter-box input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(58, 66, 79, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
}

.filter-box input:disabled {
    cursor: not-allowed;
    opacity: 0.66;
    background: rgba(240, 238, 234, 0.92);
}

.history-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 242, 237, 0.72));
    box-shadow: var(--shadow-md);
    animation: rise-fade 0.5s ease both;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.history-head h3 {
    margin: 0 0 6px;
    font-size: 1.55rem;
}

.history-head p {
    margin: 0;
    color: var(--muted);
}

.history-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.history-metric span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.history-metric strong {
    display: block;
    margin-top: 10px;
    font-size: 1.15rem;
}

.history-section-title,
.help-block h3,
.coverage-panel h3 {
    margin: 18px 0 10px;
    font-size: 1.35rem;
}

.help-block {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
}

.help-list {
    margin: 0;
    padding-left: 20px;
}

.help-list li {
    margin-bottom: 8px;
}

.coverage-panel {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(58, 66, 79, 0.08);
}

.coverage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.coverage-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(177, 141, 90, 0.18);
    background: rgba(177, 141, 90, 0.1);
    color: var(--surface-dark);
}

.empty-state {
    padding: 20px;
    border: 1px dashed rgba(58, 66, 79, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.42);
    color: var(--muted);
    text-align: center;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 20, 0.46);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(880px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    padding: 24px;
    overflow: auto;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 241, 233, 0.9));
    box-shadow: var(--shadow-xl);
}

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

.modal-head h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.modal-head p {
    margin: 0;
    color: var(--muted);
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(47, 54, 66, 0.08);
    color: var(--surface-dark);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.manual-map-form,
.manual-map-list {
    display: grid;
    gap: 14px;
}

.manual-map-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
}

.manual-map-item.is-review {
    border-color: rgba(177, 141, 90, 0.3);
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(255, 255, 255, 0.72));
}

.manual-map-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.manual-map-kicker {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.manual-map-amount {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(47, 54, 66, 0.08);
    color: var(--surface-dark);
    font-size: 0.92rem;
    font-weight: 700;
}

.manual-map-copy strong {
    display: block;
    font-size: 1.06rem;
}

.manual-map-copy p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.manual-map-source-note {
    margin-top: 8px;
}

.manual-map-raw,
.manual-map-warning {
    padding: 10px 12px;
    border-radius: 14px;
}

.manual-map-raw {
    background: rgba(47, 54, 66, 0.06);
    color: var(--surface-dark);
}

.manual-map-warning {
    background: var(--warning-bg);
    color: var(--warning-ink);
}

.manual-map-clues {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px dashed rgba(58, 66, 79, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.manual-map-clues span {
    display: block;
    margin-bottom: 8px;
    color: var(--surface-dark);
    font-size: 0.84rem;
    font-weight: 700;
}

.manual-map-clues ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.manual-map-clues p {
    margin: 0;
}

.manual-map-field {
    display: grid;
    gap: 8px;
}

.manual-map-field span,
.checkbox-row span {
    color: var(--muted);
}

.manual-map-field select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(58, 66, 79, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row.is-disabled {
    padding: 12px 14px;
    border: 1px dashed rgba(58, 66, 79, 0.18);
    border-radius: 14px;
    background: rgba(240, 238, 234, 0.78);
}

.checkbox-row.is-disabled input {
    cursor: not-allowed;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 6px;
}

body.modal-open {
    overflow: hidden;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .split-grid-main,
    .split-grid-secondary,
    .help-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    body {
        padding: 18px 14px 26px;
    }

    body::after {
        inset: 10px;
        border-radius: 18px;
    }

    .masthead,
    .section-head,
    .results-head,
    .upload-toolbar,
    .history-head,
    .modal-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .masthead-note {
        text-align: left;
    }

    .hero-panel,
    .panel {
        padding: 22px 20px;
    }

    .stats-grid,
    .history-metrics,
    .manual-map-item {
        grid-template-columns: 1fr;
    }

    .dropzone {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .drop-hint {
        align-self: auto;
    }

    .modal-card {
        padding: 20px;
    }
}
