@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../../resources/libs/fonts/dm-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../../resources/libs/fonts/dm-sans-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;
}

:root {
    --ink: #1b1d22;
    --muted: #6a6e79;
    --page: #fffdfb;
    --cream: #fff4ea;
    --cream-2: #ffe9d4;
    --soft: #f5f4f2;
    --card: #fff;
    --line: #eceae6;
    --orange: #ff891c;
    --orange-hover: #f47a0d;
    --orange-soft: #fff1e0;
    --green: #17803d;
    --green-soft: #e7f7ec;
    --red: #c2410c;
    --red-soft: #ffece6;
    --shadow: 0 1px 1px rgba(27, 29, 34, 0.04), 0 18px 40px rgba(27, 29, 34, 0.08);
    --shadow-hover: 0 1px 1px rgba(27, 29, 34, 0.04), 0 22px 48px rgba(27, 29, 34, 0.12);
    --shadow-soft: 0 8px 24px rgba(27, 29, 34, 0.05);
    --radius: 22px;
    --pill: 999px;
    --font: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; }
button, input { font: inherit; }
::selection { background: #ffd8a8; color: var(--ink); }
:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}
.wrap { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }

#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header {
    background: rgba(255, 244, 234, 0.86);
    backdrop-filter: saturate(1.2) blur(18px);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex: 0 0 auto;
}
.brand-mark {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 0;
}
.brand-mark svg { display: block; }
.brand-text {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.035em;
    line-height: 1;
}
.brand-text small { display: none; }
.nav-desk {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav-desk a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #5f6470;
    padding: 8px 11px;
    border-radius: 10px;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-desk a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.62); }
.nav-desk a[aria-current="page"] {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 2px rgba(27, 29, 34, 0.06);
}
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lang-box { position: relative; }
.lang-btn, .menu-toggle, .btn-text {
    border: 0;
    background: transparent;
    padding: 8px 11px;
    cursor: pointer;
    color: #5f6470;
    font-weight: 500;
    font-size: 14px;
    border-radius: 10px;
}
.lang-btn:hover, .btn-text:hover, .menu-toggle:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.62);
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.lang-btn .chev {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.7;
}
.lang-btn[aria-expanded="true"] .chev { transform: rotate(-135deg) translateY(-1px); }
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    list-style: none;
    margin: 0;
    padding: 8px;
    min-width: 188px;
    max-height: min(360px, 70vh);
    overflow: auto;
    box-shadow: var(--shadow);
    z-index: 30;
}
.lang-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    padding: 10px 20px;
    background: var(--cream-2);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.lang-hint p { margin: 0; }
.lang-hint-actions { display: flex; align-items: center; gap: 6px; }
.lang-menu li { margin: 0; }
.lang-menu a, .lang-soon {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
}
.lang-menu a:hover, .lang-menu a[aria-current="page"] { background: var(--soft); }
.lang-soon { color: var(--muted); }
.nav-mob {
    display: none;
    flex-direction: column;
    padding: 4px 20px 18px;
    gap: 2px;
}
.nav-mob a {
    padding: 11px 12px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
}
.nav-mob a:hover { background: rgba(255, 255, 255, 0.7); }
.menu-toggle { display: none; width: 40px; height: 40px; place-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: var(--pill);
    text-decoration: none;
    font-size: 15px;
    font-weight: 550;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: 0;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm {
    min-height: 38px;
    padding: 7px 16px;
    font-size: 14px;
}
.btn-accent {
    background: var(--orange);
    color: var(--ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 18px rgba(255, 137, 28, 0.28);
}
.btn-accent:hover { background: var(--orange-hover); }
.btn-solid {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 8px 18px rgba(27, 29, 34, 0.16);
}
.btn-solid:hover { background: #111318; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-line {
    background: #fff;
    color: var(--ink);
    border: 1px solid #d9d6d0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.btn-line:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-text { min-height: auto; }

.site-footer {
    margin-top: 24px;
    padding: 64px 0 28px;
    background:
        radial-gradient(ellipse 70% 50% at 0% 0%, rgba(255, 176, 92, 0.16), transparent 55%),
        var(--cream);
    border-top: 1px solid rgba(27, 29, 34, 0.05);
}
.footer-top {
    display: grid;
    grid-template-columns: minmax(240px, 1.15fr) minmax(0, 2fr);
    gap: 40px 48px;
    align-items: start;
}
.footer-brand-col { max-width: 360px; }
.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
}
.footer-mark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
}
.footer-mark svg { display: block; }
.footer-note {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}
.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.footer-mail {
    display: inline-block;
    color: #5c606b;
    font-size: 13.5px;
    text-decoration: none;
}
.footer-mail:hover { color: var(--ink); }
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
}
.footer-label {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a6a3d;
    margin: 0 0 12px;
}
.footer-nav a {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 9px;
    color: #5c606b;
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
}
.footer-nav a:hover { color: var(--ink); }
.footer-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 40px;
}
.footer-facts [role="listitem"] {
    padding: 16px 16px 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(27, 29, 34, 0.06);
    border-radius: 16px;
}
.footer-facts strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.02em;
}
.footer-facts span {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.45;
}
.footer-base {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(27, 29, 34, 0.06);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.footer-base p { margin: 0; }
.footer-base-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.footer-base-links a {
    color: #5c606b;
    text-decoration: none;
}
.footer-base-links a:hover { color: var(--ink); }

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 550;
}
.user-pill__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--orange);
    font-size: 12px;
    font-weight: 700;
}
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(27, 29, 34, 0.32);
    display: none;
    place-items: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}
.auth-overlay.auth-open,
.auth-overlay:not([hidden]) { display: grid; }
.auth-overlay[hidden] { display: none; }
.auth-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.auth-msg { font-size: 13px; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; }
.auth-msg-error { background: var(--red-soft); color: var(--red); }
.auth-msg-success { background: var(--green-soft); color: var(--green); }
.auth-msg-info { background: var(--soft); color: var(--muted); }
.field-row { display: flex; gap: 8px; margin-top: 7px; }
.field-row input { flex: 1; margin-top: 0; }
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 12px 0; cursor: pointer; }
.agree input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
.agree .check {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 2px;
    border: 1.5px solid #d9d6d0;
    border-radius: 6px;
    background: #fff;
    position: relative;
}
.agree input:checked + .check {
    background: var(--orange);
    border-color: var(--orange);
}
.agree input:checked + .check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border-right: 1.8px solid var(--ink);
    border-bottom: 1.8px solid var(--ink);
    transform: rotate(40deg);
}
.agree input:focus-visible + .check {
    box-shadow: 0 0 0 4px rgba(255, 137, 28, 0.16);
}
.auth-panel {
    width: min(400px, 100%);
    background: var(--card);
    border-radius: 24px;
    padding: 28px 28px 26px;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: 0;
    background: var(--soft);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #5f6470;
}
.auth-close:hover { background: #ebe9e6; color: var(--ink); }
.auth-panel h2 {
    margin: 4px 0 8px;
    font-size: 26px;
    letter-spacing: -0.035em;
    font-weight: 650;
}
.auth-lead { color: var(--muted); font-size: 14px; margin: 0 0 6px; line-height: 1.6; }
.field { display: block; font-size: 13px; font-weight: 550; margin: 14px 0; color: #3c4048; }
.field input, .field textarea {
    width: 100%;
    margin-top: 7px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #e4e1db;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: #ffc27a;
    box-shadow: 0 0 0 4px rgba(255, 137, 28, 0.16);
}

.kicker, .eyebrow {
    font-size: 13px;
    font-weight: 550;
    color: #8a6a3d;
    margin: 0 0 14px;
}
.section-lead {
    color: var(--muted);
    margin: 0 auto 32px;
    max-width: 36em;
    font-size: 17px;
    font-weight: 450;
    line-height: 1.7;
}

.page-stub { padding: 56px 0 48px; }
.page-stub h1 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.12;
    margin: 0 0 14px;
    text-wrap: balance;
}
.page-stub h2 {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 40px 0 14px;
}
.page-stub .section-lead { margin-left: 0; }
.page-stub ul { padding-left: 18px; color: var(--muted); }
.page-stub li { margin: 8px 0; }
.page-stub li a { color: var(--ink); }

.sheet {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    overflow: hidden;
}
.table-wrap, table.sheet.kv {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.sheet th, .sheet td {
    border-bottom: 1px solid var(--line);
    padding: 15px 18px;
    text-align: left;
    vertical-align: top;
    font-variant-numeric: tabular-nums;
}
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 0; }
.sheet thead th { background: #faf8f5; font-weight: 600; font-size: 13px; color: #5c606b; }
.sheet tbody th { background: #fcfbf9; font-weight: 600; font-size: 13.5px; }
.sheet.kv th { width: 22%; }
.warn {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #9a5b12;
    font-size: 13.5px;
    line-height: 1.6;
    margin: 16px 0 0;
    padding: 12px 14px;
    background: #fff7ea;
    border-radius: 12px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.postpay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(27, 29, 34, 0.32);
    display: grid;
    place-items: center;
    padding: 20px;
}
.postpay[hidden] { display: none; }
.postpay-card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
}

@media (max-width: 860px) {
    .wrap { width: min(1100px, calc(100% - 32px)); }
    .nav-desk { display: none; }
    .menu-toggle { display: inline-grid; }
    .nav-mob:not([hidden]) { display: flex; }
    .header-actions .btn-accent { display: none; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-brand-col { max-width: none; }
    .footer-nav,
    .footer-facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .nav-desk a, .plan, .ledger article { transition: none; }
}
