:root {
    --legal-bg: #070708;
    --legal-panel: #0d0d0f;
    --legal-soft: #151517;
    --legal-line: rgba(255, 255, 255, 0.11);
    --legal-text: #f4f4f2;
    --legal-muted: #9a9a9f;
}

html { scroll-behavior: smooth; }

body.legal-page {
    min-height: 100vh;
    background: var(--legal-bg);
    color: var(--legal-text);
    font-family: "DM Sans", Arial, sans-serif;
}

body.legal-page::before,
body.legal-page .ambient { display: none; }

.legal-page .header {
    position: relative;
    inset: auto;
    z-index: 10;
    width: min(1240px, calc(100% - 40px));
    height: 68px;
    margin: 24px auto 0;
    padding: 0 18px 0 22px;
    border: 1px solid var(--legal-line);
    border-radius: 18px;
    background: rgba(7, 7, 8, 0.92);
    backdrop-filter: blur(18px);
}

.legal-page .header-logo img {
    width: 78px !important;
    height: auto !important;
    max-height: 30px;
    object-fit: contain;
}

.legal-page .nav-links {
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--legal-line);
    border-radius: 999px;
    background: #111113;
}

.legal-page .nav-links a {
    padding: 9px 15px;
    border-radius: 999px;
    color: var(--legal-muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.legal-page .nav-links a[aria-current="page"] {
    background: #f3f3f1;
    color: #0b0b0c;
}

.legal-page .container {
    width: min(1120px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto;
    padding: 96px 0 120px;
}

.legal-page .policy-card {
    overflow: visible;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.legal-page .policy-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    align-items: end;
    gap: 56px;
    margin: 0 0 96px;
    padding: 0 0 46px;
    border-bottom: 1px solid var(--legal-line);
}

.legal-page .policy-kicker {
    margin: 0 0 18px;
    color: var(--legal-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.legal-page .policy-header h1 {
    max-width: 800px;
    margin: 0;
    color: var(--legal-text);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: clamp(46px, 7vw, 84px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.legal-page .policy-meta {
    display: grid;
    gap: 12px;
    margin: 0;
}

.legal-page .policy-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--legal-line);
    color: var(--legal-muted);
    font-size: 13px;
}

.legal-page .policy-meta-row strong {
    color: var(--legal-text);
    font-weight: 500;
}

.legal-page .last-updated { display: none; }

.legal-page .section {
    width: min(820px, 100%);
    margin: 0 0 0 auto;
    padding: 42px 0;
    border-top: 1px solid var(--legal-line);
}

.legal-page .policy-header + .section { border-top: 0; padding-top: 0; }

.legal-page .section h2 {
    margin: 0 0 20px;
    color: var(--legal-text);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.legal-page .section h3 {
    margin: 28px 0 12px;
    color: var(--legal-text);
    font-size: 15px;
    font-weight: 600;
}

.legal-page .section p,
.legal-page .section li,
.legal-page .section td,
.legal-page .section th {
    color: var(--legal-muted);
    font-size: 15px;
    line-height: 1.75;
}

.legal-page .section p { margin: 0 0 16px; }
.legal-page .section p:last-child { margin-bottom: 0; }

.legal-page .section strong,
.legal-page .section a { color: var(--legal-text); }
.legal-page .section a { text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 4px; }

.legal-page .section ul {
    display: grid;
    gap: 11px;
    margin: 18px 0 20px;
    padding: 0;
    list-style: none;
}

.legal-page .section li {
    position: relative;
    padding-left: 20px;
}

.legal-page .section li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f3f3f1;
}

.legal-page .notice-box,
.legal-page .data-card {
    margin: 22px 0;
    padding: 22px 24px;
    border: 1px solid var(--legal-line);
    border-radius: 16px;
    background: var(--legal-panel);
}

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

.legal-page .data-card { margin: 0; }
.legal-page .data-card h3 { margin-top: 0; }

.legal-page .cookie-table {
    overflow: hidden;
    width: 100%;
    margin: 24px 0;
    border: 1px solid var(--legal-line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    background: var(--legal-panel);
}

.legal-page .cookie-table th,
.legal-page .cookie-table td {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--legal-line);
    text-align: left;
}

.legal-page .cookie-table tr:last-child td { border-bottom: 0; }
.legal-page .cookie-name,
.legal-page .duration-badge {
    border: 0;
    background: var(--legal-soft);
    color: var(--legal-text);
}

.legal-page .refund-label {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid var(--legal-line);
    border-radius: 999px;
    background: var(--legal-panel);
    color: var(--legal-text);
    font-size: 12px;
}

.legal-page .policy-card > div[style*="text-align:center"] { display: none; }
.legal-page .footer { display: none; }
.legal-page dream-footer { display: block; width: min(1240px, calc(100% - 40px)); margin: 0 auto 28px; }

@media (max-width: 760px) {
    .legal-page .header {
        width: calc(100% - 24px);
        height: auto;
        min-height: 64px;
        margin-top: 12px;
        padding: 13px 14px;
    }

    .legal-page .nav-links { overflow-x: auto; max-width: calc(100vw - 135px); }
    .legal-page .nav-links a { padding: 8px 12px; white-space: nowrap; }
    .legal-page .container { width: calc(100% - 32px); padding: 68px 0 84px; }
    .legal-page .policy-header { grid-template-columns: 1fr; gap: 38px; margin-bottom: 62px; }
    .legal-page .section { width: 100%; padding: 34px 0; }
    .legal-page .data-grid { grid-template-columns: 1fr; }
    .legal-page .cookie-table { display: block; overflow-x: auto; }
    .legal-page dream-footer { width: calc(100% - 24px); }
}
