/* Self-hosted fonts (SIL OFL) — the CSP allows font-src 'self' only, so these must stay local. */
@font-face {
    font-family: "Press Start 2P";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/press-start-2p-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-0.woff2") format("woff2");
    unicode-range: U+3028-303f, U+3094-3096, U+309f-30a0, U+30ee, U+30f7-30fa, U+30ff, U+3105-312f, U+3131-3163, U+3165-318e, U+3190-31bb, U+31c0-31c7;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-1.woff2") format("woff2");
    unicode-range: U+a8, U+2032, U+2261, U+2282, U+3090, U+30f1, U+339c, U+535c, U+53d9, U+56a2, U+56c1, U+5806, U+589f, U+59d0, U+5a7f, U+60e0, U+639f, U+65af, U+68fa, U+69ae, U+6d1b, U+6ef2, U+71fb, U+725d, U+7262, U+75bc, U+7768, U+7940, U+79bf, U+7bed, U+7d68, U+7dfb, U+814b, U+8207, U+83e9, U+8494, U+8526, U+8568, U+85ea, U+86d9, U+87ba, U+8861, U+887f, U+8fe6, U+9059, U+9061, U+916a, U+976d, U+97ad, U+9ece;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-2.woff2") format("woff2");
    unicode-range: U+25b3, U+30f5, U+4eae, U+4f46, U+4f51, U+5203, U+52ff, U+55a7, U+564c, U+565b, U+57f9, U+5805, U+5b64, U+5e06, U+5f70, U+5f90, U+60e8, U+6182, U+62f3, U+62fe, U+63aa, U+64a4, U+65d7, U+673a, U+6851, U+68cb, U+68df, U+6d1e, U+6e58, U+6e9d, U+77b3, U+7832, U+7c3f, U+7db4, U+7f70, U+80aa, U+80c6, U+8105, U+819d, U+8276, U+8679, U+8986, U+8c9d, U+8fc5, U+916c, U+9665, U+9699, U+96c0, U+9a19, U+ff8b;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-3.woff2") format("woff2");
    unicode-range: U+30f6, U+50ac, U+5178, U+51e6, U+5224, U+52dd, U+5883, U+5897, U+590f, U+5a5a, U+5bb3, U+5c65, U+5e03, U+5e2b, U+5e30, U+5eb7, U+6271, U+63f4, U+64ae, U+6574, U+672b, U+679a, U+6a29-6a2a, U+6ca2, U+6cc1, U+6d0b, U+713c, U+74b0, U+7981, U+7a0b, U+7bc0, U+7d1a, U+7d61, U+7fd2, U+822c, U+8996, U+89aa, U+8cac, U+8cbb, U+8d77, U+8def, U+9020, U+9152, U+9244, U+9662, U+967a, U+96e3, U+9759, U+ff16;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-4.woff2") format("woff2");
    unicode-range: U+a9, U+3010-3011, U+30e2, U+4e0b, U+4eca, U+4ed6, U+4ed8, U+4f53, U+4f5c, U+4f7f, U+53d6, U+540d, U+54c1, U+5730, U+5916, U+5b50, U+5c0f, U+5f8c, U+624b, U+6570, U+6587, U+6599, U+691c, U+696d, U+6cd5, U+7269, U+7279, U+7406, U+767a-767b, U+77e5, U+7d04, U+7d22, U+8005, U+80fd, U+81ea, U+8868, U+8981, U+89a7, U+901a, U+9023, U+90e8, U+91d1, U+9332, U+958b, U+96c6, U+9ad8, U+ff1a, U+ff1f;
}
@font-face {
    font-family: "DotGothic16";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dotgothic16-kana-5.woff2") format("woff2");
    unicode-range: U+20, U+2027, U+3001-3002, U+3041-307f, U+3081-308f, U+3091-3093, U+3099-309a, U+309d-309e, U+30a1-30e1, U+30e3-30ed, U+30ef-30f0, U+30f2-30f4, U+30fb-30fe, U+ff0c, U+ff0e;
}

html {
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
}

.container {
    width: 100%;
    min-width: 0;
    flex: 1;
}

.container > *,
.calculator-wrapper > *,
.results-grid > *,
.pool-metrics-grid > *,
.stats-grid > * {
    min-width: 0;
}

.retro-table-container,
.table-container {
    max-width: 100%;
    overflow-x: auto;
}

.result-value,
.result-usd,
.fact-value,
.pool-share-value,
.stat-card-body,
.stat-value {
    overflow-wrap: anywhere;
}

.retro-footer {
    position: static;
    inset: auto;
    box-sizing: border-box;
    flex: none;
}

@media (max-width: 700px) {
    body {
        margin-left: 44px;
    }

    .nav-rail,
    .nav-rail:hover {
        width: 44px;
    }

    .nav-rail-link {
        padding: 10px 9px;
    }

    .nav-rail-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .nav-rail-stats {
        display: none;
    }

    .nav-rail-divider {
        margin-inline: 8px;
    }

    .container {
        padding: 10px;
    }

    .container > *:not(.header) {
        max-width: 100%;
    }

    .header {
        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }

    .title {
        max-width: 100%;
        margin: 0 0 0.75rem;
        font-size: 1.35rem;
        line-height: 1.5;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .subtitle {
        margin-top: 0.5rem;
        font-size: 0.7em;
        line-height: 1.6;
    }

    .tab-content {
        padding: 12px;
        border-width: 2px;
        margin-top: 10px;
    }

    .stats-grid,
    .pool-facts,
    .pool-metrics-grid,
    .server-list,
    .links-list,
    .calculator-wrapper,
    .results-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .stats-grid,
    .pool-metrics,
    .calculator-wrapper,
    .pool-chart-panel,
    .info-section,
    .payout-section,
    .retro-table-container {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .stat-card,
    .pool-metrics,
    .input-section,
    .results-section,
    .info-section,
    .payout-section,
    .retro-table-container,
    .setup-card {
        padding: 1rem;
    }

    .pool-chart-panel {
        padding: 0.8rem 0.6rem 0.4rem;
    }

    .payout-title,
    .payouts-table-title,
    .section-title {
        font-size: 0.78em;
        line-height: 1.6;
        letter-spacing: 0;
    }

    .retro-table {
        min-width: 520px;
    }

    .calculator-input {
        min-width: 0;
        padding: 12px 10px;
        font-size: 0.78em;
    }

    .unit-select {
        min-width: 76px;
        padding: 12px 8px;
        font-size: 0.65em;
    }

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

    .result-value,
    .result-usd,
    .pool-share-value,
    .result-card.highlight .result-value {
        font-size: 0.82em;
        line-height: 1.5;
    }

    .server-item {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .server-info,
    .link-info {
        min-width: 0;
    }

    .server-url,
    .link-url {
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .server-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .link-item {
        min-width: 0;
        padding: 1rem;
    }

    .setup-code-row {
        flex-wrap: wrap;
    }

    .setup-code-row .copy-btn {
        margin-left: auto;
    }

    .wallet-input {
        padding-right: 10px;
        font-size: 0.65em;
    }

    .corner-stack {
        right: 8px;
    }

    .retro-footer {
        margin-top: 20px;
        padding: 16px 8px;
        font-size: 0.62em;
        line-height: 1.7;
    }
}
