:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #182620;
  background: #f8faf8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #182620;
  --ink-soft: #34443b;
  --muted: #75827a;
  --muted-soft: #929c95;
  --line: #e5eae6;
  --canvas: #f8faf8;
  --surface: #fff;
  --green: #176c49;
  --green-dark: #124d35;
  --green-light: #ebf5ef;
  --green-line: #d3e6da;
  --red: #a94e45;
  --amber: #916b25;
  --shadow: 0 14px 38px rgba(31, 53, 41, .07);
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #80b99a; outline-offset: 2px; }
.eyebrow { display: block; color: #78867c; font-size: 10px; font-weight: 650; line-height: 1.4; letter-spacing: 1.15px; }
.brand, .auth-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; background: var(--green); color: white; border-radius: 9px; font-weight: 750; font-size: 17px; }
.brand strong, .auth-brand strong { display: block; color: var(--ink); font-size: 14px; font-weight: 720; letter-spacing: .15px; }
.brand small, .auth-brand small { display: block; margin-top: 3px; color: #8b978f; font-size: 8px; font-weight: 600; letter-spacing: 1.55px; }

/* Authentication */
.auth-view { min-height: 100dvh; padding: 23px 20px 20px; background: #f8faf8; }
.auth-brand { width: min(1100px, 100%); margin: 0 auto; }
.auth-layout { display: grid; width: min(1080px, 100%); min-height: calc(100dvh - 95px); margin: 18px auto 0; align-items: center; }
.auth-story { display: none; }
.auth-card-wrap { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card { padding: 28px 23px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.auth-heading { margin-bottom: 23px; }
.auth-heading h2 { margin: 9px 0 6px; color: var(--ink); font-size: 24px; line-height: 1.3; font-weight: 650; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; min-width: 0; color: #34443b; font-size: 12px; font-weight: 580; }
.field > span { line-height: 1.45; }
.field small { color: var(--muted-soft); font-size: 11px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; height: 48px; padding: 0 13px; color: var(--ink); background: #fff; border: 1px solid #dce4de; border-radius: 6px; font-size: 16px; font-weight: 400; }
.field textarea { height: auto; min-height: 100px; padding: 12px; line-height: 1.6; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa59d; }
.form-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 26px; }
.session-note { color: #839087; font-size: 11px; }
.check-line { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--green); }
.text-button { min-height: 36px; padding: 4px 0; color: var(--green); background: none; border: 0; font-size: 12px; font-weight: 600; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 630; line-height: 1.25; transition: background .16s, border .16s, transform .16s; }
.button:active { transform: translateY(1px); }
.button.primary { color: white; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button.secondary { color: var(--ink-soft); background: #fff; border-color: var(--line); }
.button.secondary:hover { background: #f6f9f6; border-color: #c9d6cd; }
.button.quiet { color: var(--green); background: var(--green-light); border-color: var(--green-line); }
.button.wide { width: 100%; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-switch .text-button { margin-left: 4px; }
.demo-fill { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 43px; margin-top: 17px; padding: 0 12px; color: #53675a; background: #f4f8f5; border: 1px dashed #c9d9ce; border-radius: 5px; text-align: left; font-size: 12px; }
.demo-fill span { color: var(--green); font-weight: 640; font-variant-numeric: tabular-nums; }
.auth-footnote { margin: 16px 0 0; color: var(--muted-soft); font-size: 10px; line-height: 1.6; text-align: center; }
.auth-footer { margin: 18px auto 0; text-align: center; color: #9ca69f; font-size: 10px; line-height: 1.7; }
.auth-error, .inline-error { padding: 10px 12px; color: #975449; background: #fcf1ed; border: 1px solid #efd8d0; border-radius: 5px; font-size: 12px; line-height: 1.6; }
.auth-error { margin: 0 0 15px; }
.auth-result { padding: 12px; color: #53685a; background: #f2f7f3; border: 1px solid #dce9df; border-radius: 5px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.auth-result a { color: var(--green); text-decoration: underline; }

/* App shell, desktop navigation */
.app-shell { min-height: 100dvh; }
.desktop-sidebar { display: none; }
.main-area { min-height: 100dvh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 15px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-title { display: grid; gap: 3px; min-width: 0; }
.topbar-title .eyebrow { font-size: 8px; }
.topbar-title strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sandbox-label { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 8px; color: #627d69; background: #f1f7f2; border: 1px solid #e0ebe2; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.sandbox-label i, .status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #58a274; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; color: #68776d; background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 17px; }
.icon-button:hover { color: var(--ink); background: #f2f6f3; }
.user-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 2px; color: var(--ink-soft); background: none; border: 0; font-size: 12px; font-weight: 560; }
.user-button > span:not(.avatar):not(.chevron) { display: none; }
.avatar { display: inline-grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; color: #245c40; background: #e4f0e8; border-radius: 50%; font-size: 12px; font-weight: 680; }
.chevron { color: #8d9991; font-size: 17px; }
.mobile-menu { width: 35px; height: 38px; margin-left: -8px; font-size: 16px; }
.page-content { width: min(1320px, 100%); min-height: calc(100dvh - 60px); margin: 0 auto; padding: 22px 15px 30px; }
.page { display: grid; gap: 17px; animation: enter .18s ease-out; }
@keyframes enter { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.page-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.page-header h1 { margin: 6px 0 0; color: var(--ink); font-size: 23px; line-height: 1.32; font-weight: 640; }
.page-header p { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.page-header-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.page-header-actions .button { flex: 1 1 auto; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 11px; }
.section-title h2 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 630; }
.section-title p { margin: 4px 0 0; color: var(--muted-soft); font-size: 10px; line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; min-height: 36px; padding: 3px 0; color: var(--green); background: transparent; border: 0; font-size: 12px; font-weight: 590; white-space: nowrap; }
.text-link:hover { color: var(--green-dark); }
.panel, .metric-card, .plan-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.panel { padding: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 11px; margin: 0 0 14px; }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 620; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.panel-head .text-link { flex-shrink: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.metric-card { min-height: 103px; padding: 13px 12px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.metric-value { margin-top: 12px; color: var(--ink); font-size: 21px; line-height: 1.22; font-weight: 640; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value small { margin-left: 4px; color: #68766c; font-size: 11px; font-weight: 520; }
.metric-foot { margin-top: 5px; color: #87938b; font-size: 9px; line-height: 1.5; }
.metric-foot.up { color: #3a8158; }
.farm-strip { display: grid; gap: 13px; padding: 16px; color: #f4faf5; background: #173f2d; border-radius: 7px; }
.farm-main { min-width: 0; }
.farm-strip .eyebrow { color: #bdd4c4; }
.farm-strip h2 { margin: 6px 0 4px; font-size: 16px; line-height: 1.35; font-weight: 620; }
.farm-strip p { margin: 0; color: #d1e0d5; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.farm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.farm-fact span { display: block; color: #bed0c3; font-size: 9px; }
.farm-fact strong { display: block; margin-top: 4px; font-size: 12px; font-weight: 610; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.notice { padding: 12px 13px; color: #5a7160; background: #f1f7f2; border: 1px solid #dfebe1; border-radius: 6px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.notice.warning { color: #886a2d; background: #fbf7ec; border-color: #eee4c9; }
.notice.error { color: #985449; background: #fcf1ed; border-color: #efd8d0; }
.two-column { display: grid; gap: 13px; }
.chart-card { min-height: 215px; }
.chart-svg { width: 100%; height: 160px; overflow: visible; }
.chart-gridline { stroke: #edf1ee; stroke-width: 1; }
.chart-path { fill: none; stroke: #38815b; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(56, 129, 91, .09); }
.chart-point { fill: white; stroke: #38815b; stroke-width: 2; }
.chart-labels { display: flex; justify-content: space-between; gap: 5px; color: #97a198; font-size: 9px; }
.chart-empty { display: grid; place-items: center; min-height: 170px; color: #8d9991; font-size: 12px; }
.settlement-list { display: grid; gap: 0; }
.settlement-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 38px; padding: 9px 0; color: var(--muted); border-top: 1px solid #eef1ef; font-size: 11px; }
.settlement-row strong { color: var(--ink-soft); font-size: 12px; font-weight: 590; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.settlement-row.total { margin-top: 3px; padding-top: 12px; color: var(--ink); font-weight: 600; }
.settlement-row.total strong { color: var(--green); font-size: 15px; }

/* Plans, tables, forms and account */
.plan-grid { display: grid; gap: 11px; }
.plan-card { display: grid; gap: 9px; padding: 16px; }
.plan-card.featured { border-color: #8ab398; box-shadow: 0 0 0 1px #8ab398 inset; }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan-tag { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 7px; color: #436b50; background: #edf5ef; border-radius: 4px; font-size: 10px; font-weight: 600; }
.plan-card h3 { margin: 5px 0 0; color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 630; }
.plan-card .plan-description { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.plan-price { color: var(--ink); font-size: 23px; line-height: 1.35; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-price small { color: var(--muted); font-size: 11px; font-weight: 480; }
.plan-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 12px 0; border-top: 1px solid #edf1ee; border-bottom: 1px solid #edf1ee; }
.plan-metric span { display: block; color: var(--muted); font-size: 9px; line-height: 1.5; }
.plan-metric strong { display: block; margin-top: 4px; color: #34463b; font-size: 12px; line-height: 1.4; font-weight: 590; overflow-wrap: anywhere; }
.plan-card .button { width: 100%; }
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 10px 11px; color: #89958e; background: #f8faf8; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 560; white-space: nowrap; }
.data-table td { padding: 12px 11px; color: #536159; border-bottom: 1px solid #edf1ee; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong { color: #34443b; font-weight: 600; }
.data-table td small { display: block; color: #87938b; font-size: 9px; }
.asset-cell { display: flex; align-items: center; gap: 9px; }
.coin-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; color: #876728; background: #f5eedf; border-radius: 50%; font-size: 13px; font-weight: 700; }
.coin-mark.ltc { color: #526a78; background: #edf1f3; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 2px 7px; color: #36764f; background: #edf6ef; border-radius: 3px; font-size: 9px; line-height: 1.4; white-space: nowrap; }
.status::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: currentColor; }
.status.pending { color: #967638; background: #f8f4e9; }
.status.failed { color: #a55349; background: #fbefec; }
.status.muted { color: #7d8982; background: #f0f3f1; }
.data-table .empty-cell { padding: 30px 14px; color: #89958e; text-align: center; white-space: normal; }
.filter-select { min-height: 40px; padding: 0 10px; color: var(--ink-soft); background: white; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.page-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.summary-cell { padding: 14px 12px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.summary-cell span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.summary-cell strong { display: block; margin-top: 8px; color: var(--ink); font-size: 18px; line-height: 1.3; font-weight: 640; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.invite-card { padding: 17px; color: white; background: #173f2d; border-radius: 7px; }
.invite-card h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 620; }
.invite-card p { margin: 7px 0 14px; color: #d2e1d6; font-size: 11px; line-height: 1.7; }
.invite-code-row { display: flex; align-items: end; gap: 8px; margin: 12px 0 8px; }
.invite-code-row label { display: grid; flex: 1; gap: 5px; color: #d2e1d6; font-size: 11px; }
.invite-code-row input { min-height: 44px; padding: 0 10px; color: white; background: #ffffff12; border: 1px solid #ffffff46; border-radius: 5px; font-size: 14px; font-weight: 650; letter-spacing: 1px; }
.invite-copy-button { white-space: nowrap; }
.invite-link { display: flex; align-items: stretch; gap: 7px; }
.invite-link input { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; color: white; background: #ffffff12; border: 1px solid #ffffff46; border-radius: 5px; font-size: 12px; }
.invite-link .button, .invite-copy-button { flex: 0 0 auto; min-height: 44px; color: #17432e; background: #c2e5cd; font-size: 12px; }
.invite-cycle-card { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px; background: #eef7f0; border: 1px solid #dceade; border-radius: 7px; }
.invite-cycle-card > div { display: grid; gap: 5px; min-width: 0; }
.invite-cycle-card strong { color: var(--ink-soft); font-size: 13px; }
.invite-cycle-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.invite-debt-notice strong { color: var(--red); }
.invite-summary .summary-cell strong { font-variant-numeric: tabular-nums; }
.rule-list { display: grid; gap: 0; }
.rule-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #edf1ee; color: var(--muted); font-size: 11px; line-height: 1.55; }
.rule-row:last-child { border: 0; }
.rule-row strong { color: #33443a; font-size: 11px; font-weight: 580; text-align: right; }
.form-grid { display: grid; gap: 14px; }
.form-grid .field { font-size: 12px; }
.form-grid .field input, .form-grid .field select, .form-grid .field textarea { height: 48px; font-size: 16px; }
.form-grid .field textarea { height: auto; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.form-actions .button { flex: 1 1 auto; }
.account-header { display: flex; align-items: center; gap: 13px; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.account-header .avatar { width: 48px; height: 48px; font-size: 17px; }
.account-header h2 { margin: 0; font-size: 15px; font-weight: 630; }
.account-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.danger-zone p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.button.danger { color: var(--red); background: white; border-color: #ead8d4; }
.button.danger:hover { background: #fcf4f1; }
.disclaimer { color: #8b968f; font-size: 10px; line-height: 1.7; }
.conversation { display: flex; flex-direction: column; gap: 15px; min-height: 220px; max-height: 480px; overflow-y: auto; overscroll-behavior: contain; padding: 17px 0 20px; background: #fafcf9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.chat-message { align-self: flex-start; max-width: 86%; margin: 0 12px; }
.chat-message.mine { align-self: flex-end; }
.chat-bubble { padding: 10px 12px; color: #435c4a; background: #fff; border: 1px solid #dfe8e0; border-radius: 7px 7px 7px 1px; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.chat-message.mine .chat-bubble { color: #2e6240; background: #e8f3eb; border-color: #d2e4d7; border-radius: 7px 7px 1px 7px; }
.chat-message small { display: block; margin-top: 5px; color: #94a096; font-size: 9px; }
.chat-message.mine small { text-align: right; }
.message-form { display: grid; gap: 10px; padding-top: 16px; }
.message-form .button { justify-self: end; min-width: 122px; }
.mobile-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: calc(60px + env(safe-area-inset-bottom)); padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.mobile-nav button { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 48px; padding: 2px; color: #849087; background: transparent; border: 0; border-radius: 5px; font-size: 9px; line-height: 1.25; }
.mobile-nav button .nav-icon { display: grid; place-items: center; width: 26px; height: 24px; font-size: 17px; line-height: 1; }
.mobile-nav button.active { color: var(--green); font-weight: 640; }
.mobile-nav button.active .nav-icon { background: #edf5ef; border-radius: 5px; }
.mobile-nav button .nav-label { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu-overlay { position: fixed; z-index: 30; inset: 0; display: grid; grid-template-columns: minmax(250px, 82vw) 1fr; background: rgba(20, 36, 27, .4); }
.mobile-menu-panel { display: flex; flex-direction: column; min-height: 100%; padding: 20px 15px; background: #fff; box-shadow: 12px 0 35px rgba(14, 38, 23, .14); }
.mobile-menu-scrim { border: 0; background: transparent; }
.mobile-menu-links { display: grid; gap: 5px; margin-top: 22px; }
.mobile-menu-links button { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 0 11px; color: #5d6b62; background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 13px; }
.mobile-menu-links button.active { color: var(--green); background: var(--green-light); font-weight: 620; }
.mobile-menu-links .nav-icon { width: 20px; text-align: center; font-size: 16px; }
.toast { position: fixed; z-index: 60; right: 15px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 15px; width: max-content; max-width: calc(100vw - 30px); margin: auto; padding: 11px 15px; color: white; background: #24352a; border-radius: 5px; box-shadow: 0 9px 28px rgba(15, 40, 24, .2); font-size: 12px; line-height: 1.5; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: none; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0; background: rgba(17, 31, 22, .48); }
.modal { width: min(100%, 570px); max-height: 92dvh; overflow-y: auto; padding: 19px 17px calc(18px + env(safe-area-inset-bottom)); background: white; border-radius: 12px 12px 0 0; box-shadow: 0 -12px 45px rgba(13, 37, 21, .18); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-size: 18px; font-weight: 630; }
.modal-content { display: grid; gap: 13px; padding: 15px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-content p { margin: 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-actions .button { flex: 1 1 140px; }
.payment-summary { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.payment-summary strong { color: var(--ink); font-size: 13px; font-weight: 610; }
.payment-total { padding: 14px; background: #f4f8f5; border: 1px solid #e0ebe2; border-radius: 5px; }
.payment-total span { display: block; color: var(--muted); font-size: 10px; }
.payment-total strong { display: block; margin-top: 5px; color: var(--green); font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-address { padding: 10px; color: #465a4c; background: #f7f9f7; border: 1px solid var(--line); border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; word-break: break-all; }
.loader { width: 18px; height: 18px; border: 2px solid #d8e7dc; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state, .empty-state { display: grid; justify-items: center; gap: 12px; padding: 42px 18px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.loading-state .loader { width: 22px; height: 22px; }

@media (min-width: 680px) {
  .auth-view { padding: 26px 30px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(370px, 440px); gap: clamp(36px, 7vw, 100px); min-height: calc(100dvh - 112px); margin-top: 8px; }
  .auth-story { display: block; max-width: 530px; padding: 40px 0; }
  .auth-story .eyebrow { color: #5e8069; }
  .auth-story h1 { margin: 18px 0 13px; color: #193427; font-size: clamp(34px, 4vw, 48px); font-weight: 620; line-height: 1.28; }
  .auth-story > p { max-width: 400px; color: #69776e; font-size: 14px; line-height: 1.8; }
  .story-facts { display: flex; gap: 35px; margin-top: 44px; }
  .story-facts div { display: grid; gap: 5px; }
  .story-facts strong { color: #254d35; font-size: 15px; font-weight: 630; }
  .story-facts span { color: #859189; font-size: 10px; }
  .auth-card { padding: 32px 30px 26px; }
  .auth-heading h2 { font-size: 25px; }
  .auth-footer { font-size: 10px; }
  .main-area { margin-left: 224px; padding-bottom: 0; }
  .desktop-sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 224px; padding: 24px 14px 14px; background: #fff; border-right: 1px solid var(--line); }
  .desktop-sidebar > .brand { padding: 0 9px 29px; }
  .sidebar-label { padding: 0 10px; color: #96a198; font-size: 9px; font-weight: 650; letter-spacing: .8px; text-transform: uppercase; }
  .primary-nav { display: grid; gap: 4px; margin-top: 9px; }
  .primary-nav button { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 10px; color: #718077; background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 12px; }
  .primary-nav button:hover { color: var(--ink); background: #f5f8f5; }
  .primary-nav button.active { color: var(--green); background: #eef6f0; font-weight: 620; }
  .primary-nav .nav-icon { display: grid; place-items: center; width: 19px; font-size: 15px; }
  .primary-nav .nav-count { display: grid; place-items: center; min-width: 19px; height: 19px; margin-left: auto; padding: 0 4px; color: #607468; background: #f0f4f1; border-radius: 10px; font-size: 9px; }
  .sidebar-bottom { display: grid; gap: 14px; margin-top: auto; }
  .secure-note { display: flex; align-items: center; gap: 9px; padding: 11px 10px; background: #f7faf7; border-radius: 5px; }
  .secure-note strong, .secure-note small { display: block; }
  .secure-note strong { color: #51655a; font-size: 10px; font-weight: 590; }
  .secure-note small { margin-top: 3px; color: #98a29b; font-size: 9px; }
  .profile-shortcut { display: flex; align-items: center; gap: 9px; min-height: 51px; padding: 9px 3px 2px; color: var(--ink-soft); background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; }
  .profile-shortcut > span:nth-child(2) { min-width: 0; }
  .profile-shortcut strong, .profile-shortcut small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-shortcut strong { font-size: 11px; font-weight: 590; }
  .profile-shortcut small { margin-top: 3px; color: var(--muted-soft); font-size: 9px; }
  .profile-shortcut .chevron { margin-left: auto; }
  .topbar { min-height: 66px; padding: 0 30px; }
  .topbar-title { display: flex; align-items: center; gap: 13px; }
  .topbar-title .eyebrow { padding-right: 13px; border-right: 1px solid var(--line); font-size: 9px; }
  .topbar-title strong { font-size: 13px; }
  .topbar-actions { gap: 12px; }
  .sandbox-label { font-size: 10px; }
  .user-button { gap: 8px; }
  .user-button > span:not(.avatar):not(.chevron) { display: initial; }
  .mobile-menu, .mobile-nav { display: none; }
  .page-content { min-height: calc(100dvh - 66px); padding: 30px 28px 38px; }
  .page { gap: 20px; }
  .page-header { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 20px; }
  .page-header h1 { font-size: 25px; }
  .page-header p { font-size: 12px; }
  .page-header-actions { width: auto; justify-content: flex-end; }
  .page-header-actions .button { flex: 0 0 auto; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .metric-card { min-height: 119px; padding: 16px; }
  .metric-label { font-size: 11px; }
  .metric-value { margin-top: 14px; font-size: 23px; }
  .metric-foot { font-size: 10px; }
  .farm-strip { grid-template-columns: 1fr minmax(260px, .9fr); align-items: center; min-height: 142px; padding: 22px 24px; }
  .farm-strip h2 { font-size: 18px; }
  .farm-strip p { font-size: 12px; }
  .farm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: end; width: 100%; max-width: 330px; gap: 15px; }
  .farm-fact span { font-size: 10px; }
  .farm-fact strong { font-size: 14px; }
  .two-column { grid-template-columns: minmax(0, 1.55fr) minmax(270px, .8fr); gap: 14px; }
  .panel { padding: 18px; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .plan-card { padding: 18px; }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .summary-cell { padding: 16px; }
  .summary-cell strong { font-size: 20px; }
  .invite-card { padding: 21px 23px; }
  .mobile-menu-overlay { display: none !important; }
  .toast { right: 25px; bottom: 24px; left: auto; margin: 0; }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { width: min(540px, 100%); padding: 22px; border-radius: 9px; }
}
@media (min-width: 980px) {
  .desktop-sidebar { width: 242px; padding-right: 16px; padding-left: 16px; }
  .main-area { margin-left: 242px; }
  .topbar { padding-right: 40px; padding-left: 40px; }
  .page-content { padding: 34px 40px 45px; }
  .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-card { min-height: 355px; align-content: start; }
  .plan-card > .button { align-self: end; margin-top: 2px; }
}
@media (max-width: 679px) {
  .notification { display: none; }
  .topbar-actions .chevron { display: none; }
  .data-table { display: block; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tbody { display: grid; gap: 10px; }
  .data-table tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px 12px; padding: 12px; background: #fafcfa; border: 1px solid #e6ece7; border-radius: 5px; }
  .data-table td { display: block; min-width: 0; padding: 0; color: #526359; border: 0; font-size: 12px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
  .data-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #91a093; font-size: 9px; line-height: 1.45; }
  .data-table td:first-child { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid #e6ece7; color: #344f3e; }
  .data-table td:first-child strong { font-size: 12px; }
  .data-table .empty-cell { grid-column: 1 / -1; padding: 18px 0; border: 0; }
  .data-table .empty-cell::before { display: none; }
  .table-wrap { overflow: visible; }
  .panel { padding: 14px; }
  .data-table .text-link { justify-content: center; width: 100%; min-height: 40px; margin-top: 3px; background: #edf5ee; border-radius: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.code-input { display: flex; min-width: 0; gap: 8px; align-items: stretch; }
.code-input input { width: 0; min-width: 0; flex: 1; }
.code-input .button { min-width: 112px; padding: 8px 12px; white-space: nowrap; font-size: 12px; }
.local-mail-note { margin: 0; color: #647768; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.agreement { display: flex; align-items: flex-start; gap: 9px; color: #68776b; font-size: 12px; line-height: 1.8; }
.agreement input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; }
.agreement .text-button { font-size: inherit; }
.email-status { align-self: center; color: #728377; font-size: 12px; }
.address-text { max-width: 250px; white-space: normal; overflow-wrap: anywhere; }
.notification-list { display: grid; gap: 12px; }
.notification-card.unread { border-left: 3px solid #427a51; }
.notification-card > p { margin: 0; color: #566b5c; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.document-content { color: #425348; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.withdrawal-net { font-size: 15px; font-weight: 600; color: #2d653d; }
.form-grid > .notice, .form-grid > .local-mail-note { grid-column: 1 / -1; }
@media (max-width: 390px) { .code-input .button { min-width: 98px; padding: 7px 8px; } }

/* Personal center and its account subpages. */
.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.account-profile-link { width: 100%; color: var(--ink); text-align: left; appearance: none; }
.account-profile-link:hover { background: #fbfdfb; border-color: #cbded2; }
.account-profile-copy { display: grid; flex: 1; min-width: 0; gap: 5px; }
.account-profile-copy > strong { overflow: hidden; font-size: 15px; font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-meta { color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-profile-meta > span { white-space: nowrap; }
.account-profile-link > .status { flex: 0 0 auto; }
.account-menu { display: grid; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.account-menu-row { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 81px; padding: 17px; color: var(--ink); background: transparent; border: 0; text-align: left; }
.account-menu-row + .account-menu-row { border-top: 1px solid var(--line); }
.account-menu-row:hover { background: #f4f9f5; }
.account-menu-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; color: var(--green); background: #f0f6f2; border: 1px solid #e1ece5; border-radius: 8px; font-size: 17px; }
.account-menu-copy { display: grid; flex: 1; min-width: 0; gap: 5px; }
.account-menu-copy strong { color: var(--ink-soft); font-size: 14px; font-weight: 620; line-height: 1.35; }
.account-menu-copy small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.account-menu-chevron { flex: 0 0 auto; color: #95a198; font-size: 22px; font-weight: 400; }
.account-menu-danger .account-menu-copy strong, .account-menu-danger .account-menu-icon { color: var(--red); }
.account-menu-danger .account-menu-icon { background: #faf2ef; border-color: #f0ded8; }
.account-back { display: inline-flex; align-items: center; justify-self: start; gap: 8px; min-height: 42px; margin: -4px 0 0; padding: 0 12px; color: var(--green-dark); background: #f1f7f3; border: 1px solid #dce9df; border-radius: 6px; font-size: 13px; font-weight: 610; }
.account-back:hover { background: #e8f2eb; border-color: #c6ddcc; }
.account-back > span:first-child { font-size: 20px; line-height: 1; }
.account-subpage > .panel { max-width: 860px; }
.account-subpage .form-grid { max-width: 720px; }
.avatar-editor { display: flex; align-items: center; gap: 17px; min-width: 0; padding: 3px 0 8px; }
.avatar-large { width: 76px; height: 76px; font-size: 24px; }
.avatar-editor > div { min-width: 0; }
.avatar-editor p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.avatar-editor .text-button { margin-left: 12px; font-size: 11px; }
.avatar-upload-label { position: relative; overflow: hidden; min-height: 38px; padding: 0 12px; cursor: pointer; font-size: 12px; }
.avatar-upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-upload-label:focus-within { outline: 3px solid #80b99a; outline-offset: 2px; }
.bound-email { display: grid; gap: 4px; min-width: 0; margin: 0 0 2px; padding: 12px 13px; background: #f5f8f5; border: 1px solid var(--line); border-radius: 6px; }
.bound-email > span { color: var(--muted); font-size: 11px; }
.bound-email strong { color: #536b5a; font-size: 13px; line-height: 1.6; font-weight: 550; overflow-wrap: anywhere; }
.language-form { display: grid; gap: 12px; max-width: 600px; }
.language-choice { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 82px; padding: 17px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.language-choice:has(input:checked) { background: #f1f8f3; border-color: #84b296; }
.language-choice > span { display: grid; gap: 5px; }
.language-choice strong { color: var(--ink-soft); font-size: 15px; font-weight: 620; }
.language-choice small { color: var(--muted); font-size: 11px; }
.language-choice input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: var(--green); }
.language-form > .button { margin-top: 5px; }
.funds-readiness { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; padding: 13px 15px; color: #82724d; background: #faf7ef; border: 1px solid #eee5cd; border-radius: 6px; font-size: 11px; line-height: 1.6; }
.funds-readiness.is-ready { color: #557661; background: #f0f7f2; border-color: #dce9df; }
.account-form-section { display: grid; gap: 5px; padding-top: 3px; }
.account-form-section h3 { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 630; }
.account-form-section p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.funds-verification { display: grid; gap: 14px; padding-top: 5px; }
.funds-setup-message { margin: 2px 0 9px; color: #627368; font-size: 14px; line-height: 1.9; }
.readonly-id { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 0 13px; color: #58675e; background: #f4f7f4; border: 1px solid #dce4de; border-radius: 6px; font-size: 16px; font-weight: 400; cursor: default; user-select: text; }
.form-grid > .inline-error { grid-column: 1 / -1; }
@media (max-width: 390px) {
  .account-profile-link { gap: 10px; padding: 15px 13px; }
  .account-profile-link > .account-menu-chevron { display: none; }
  .account-menu-row { padding: 16px 14px; }
  .avatar-editor { gap: 13px; }
  .avatar-editor .text-button { display: block; margin: 3px 0 0; }
  .avatar-large { width: 65px; height: 65px; }
}

.wallet-totals { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0 2px 19px; color: var(--muted); font-size: 12px; }
.wallet-totals strong { margin-left: 7px; color: var(--ink-soft); font-weight: 600; }
.wallet-debt, .wallet-debt strong { color: var(--red); }
.checkout-remaining { padding: 13px 2px; font-size: 12px; }
.checkout-remaining strong { font-variant-numeric: tabular-nums; }
#depositAddress { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.chain-deposit { display: grid; gap: 17px; min-width: 0; }
.chain-deposit > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.chain-deposit h3 { margin: 3px 0 0; font-size: 14px; }
.chain-deposit-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.chain-deposit-address, .chain-contract { display: block; min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.7; }
.chain-deposit-address { padding: 16px; border: 1px solid var(--line, #dce5dd); border-radius: 8px; background: var(--surface-soft, #f4f7f2); font-size: 14px; color: var(--ink-soft); user-select: all; }
.chain-contract { color: var(--muted); font-size: 11px; user-select: all; }
.chain-deposit .notice, .chain-deposit .settlement-list { margin: 0; }
.chain-deposit > .button { justify-self: start; }
.chain-deposit .address-text { display: block; max-width: 220px; overflow-wrap: anywhere; white-space: normal; font-size: 11px; }
@media(max-width:620px){.chain-deposit-address{padding:13px;font-size:13px}.chain-deposit{gap:15px}.chain-deposit .table-wrap{max-width:100%}}
