:root {
  color-scheme: light;
  font-family: "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
  --ink: #102a22;
  --muted: #65766f;
  --forest: #062a23;
  --forest-2: #0b3a30;
  --gold: #d7ad5a;
  --ivory: #f6f2e9;
  --paper: #ffffff;
  --line: #d8e2dd;
  --danger: #a83b3b;
  --success: #087a58;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #edf3ef;
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .button.secondary {
  border-color: #bdcbc5;
  background: #fff;
  color: var(--ink);
}
button.danger { background: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: #0a6f54; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d4cf;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
label { display: grid; gap: 7px; color: #385048; font-weight: 700; }

.site-header {
  min-height: 68px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--forest);
  color: #fff;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions a { color: #fff; text-decoration: none; font-weight: 800; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 64px; }
.narrow { width: min(560px, calc(100% - 32px)); margin: 40px auto; }
.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(16, 42, 34, .06);
}
.panel + .panel { margin-top: 18px; }
.eyebrow { margin: 0 0 5px; color: #6b7d75; font-size: 12px; font-weight: 900; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; }
h1 { font-size: clamp(28px, 5vw, 50px); line-height: 1.1; }
h2 { font-size: 24px; }
.muted { color: var(--muted); line-height: 1.65; }
.notice, .error, .success {
  margin: 14px 0;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.55;
}
.notice { border: 1px solid #d8c391; background: #fff8e8; }
.error { border: 1px solid #e4b5b5; background: #fff3f3; color: #8d2929; }
.success { border: 1px solid #a9d8c5; background: #effaf5; color: #075e43; }
.hidden { display: none !important; }
.form-grid { display: grid; gap: 14px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.public-hero {
  min-height: 520px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(6, 42, 35, .97), rgba(6, 42, 35, .68)),
    url("/assets/tk-radar-hero-wide.png") center / cover;
  color: #fff;
}
.public-hero > div { width: min(1180px, calc(100% - 40px)); margin: auto; }
.public-hero p { max-width: 650px; color: #d6e1dc; font-size: 18px; line-height: 1.7; }
.public-hero .button { display: inline-flex; align-items: center; background: var(--gold); color: #143129; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; }
.plan-card strong { display: block; font-size: 24px; margin: 8px 0; }

.public-intelligence-panel { margin-bottom: 18px; }
.intelligence-page { background: #062a23; color: #f5f2ea; }
.intelligence-header { border-bottom: 1px solid rgba(215, 173, 90, .18); }
.intelligence-shell { width: min(1120px, calc(100% - 32px)); margin: 28px auto 64px; }
.intelligence-hero {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid rgba(215, 173, 90, .25);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(6, 42, 35, .98), rgba(6, 42, 35, .73)),
    url("/assets/market-summary-background-20260716.png") right center / cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}
.intelligence-hero .eyebrow { color: var(--gold); }
.intelligence-hero h1 { margin-bottom: 12px; }
.intelligence-hero > p:not(.eyebrow) { max-width: 720px; color: #cdd9d4; line-height: 1.7; }
.intelligence-disclaimer { margin-bottom: 0; font-size: 13px; color: #aebfb8 !important; }
.intelligence-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(118px, 1fr) minmax(108px, 1fr) minmax(136px, 1fr) minmax(136px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0 10px;
  padding: 14px;
  border: 1px solid rgba(245, 242, 234, .14);
  border-radius: 12px;
  background: rgba(11, 58, 48, .86);
}
.intelligence-toolbar label { color: #ced9d4; font-size: 13px; }
.intelligence-toolbar input, .intelligence-toolbar select { background: rgba(255,255,255,.96); }
.intelligence-toolbar button { align-self: end; }
.intelligence-status { min-height: 22px; margin: 12px 2px; color: #b8c7c1; font-size: 13px; }
.intelligence-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.intelligence-card, .intelligence-article {
  min-width: 0;
  border: 1px solid rgba(215, 173, 90, .26);
  border-radius: 14px;
  padding: 18px;
  background: #f6f2e9;
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .12);
}
.intelligence-card { display: flex; flex-direction: column; align-items: flex-start; }
.intelligence-card h2 { margin: 13px 0 9px; font-size: 20px; overflow-wrap: anywhere; }
.intelligence-card .button { margin-top: auto; }
.intelligence-card-top, .intelligence-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.intelligence-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px; border: 1px solid #c8d6d0; border-radius: 999px; color: #36564a; background: #eff4f1; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.intelligence-pill.category { border-color: #dcc68f; background: #fff7e6; color: #73520b; }
.intelligence-pill.model { border-color: #b8cde2; background: #edf5ff; color: #315c8d; }
.intelligence-pill.locked { border-color: #e2b0a8; background: #fff2ee; color: #8d3c2f; }
.intelligence-summary, .intelligence-lead { color: #536b61; line-height: 1.65; overflow-wrap: anywhere; }
.intelligence-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0; color: #60746b; font-size: 12px; line-height: 1.5; }
.intelligence-empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed rgba(245, 242, 234, .35); border-radius: 12px; color: #c9d6d0; text-align: center; }
.intelligence-article { max-width: 850px; margin: 0 auto; }
.intelligence-back { display: inline-block; margin-bottom: 18px; color: #1a6250; font-weight: 800; }
.intelligence-article h1 { font-size: clamp(28px, 4vw, 42px); margin: 12px 0; overflow-wrap: anywhere; }
.intelligence-body { margin-top: 24px; line-height: 1.8; }
.intelligence-body h2, .intelligence-body h3, .intelligence-body h4 { margin-top: 28px; }
.intelligence-body p, .intelligence-body li { overflow-wrap: anywhere; }
.radar-judgement { margin: 24px 0; padding: 16px; border: 1px solid #d9c391; border-radius: 10px; background: #fffaf0; }
.radar-judgement h2 { margin-bottom: 12px; font-size: 21px; }
.radar-judgement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radar-judgement-item { min-width: 0; padding: 10px; border-radius: 8px; background: rgba(6, 42, 35, .055); }
.radar-judgement-item span, .radar-judgement-item strong { display: block; overflow-wrap: anywhere; }
.radar-judgement-item span { color: #63776d; font-size: 12px; }
.radar-judgement-item strong { margin-top: 4px; font-size: 15px; }
.intelligence-sources, .intelligence-related { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.intelligence-source-link { display: block; width: fit-content; max-width: 100%; margin: 8px 0; overflow-wrap: anywhere; }
.intelligence-related-link { display: block; width: fit-content; max-width: 100%; margin: 8px 0; overflow-wrap: anywhere; color: #0b5e49; font-weight: 700; }
.intelligence-data-chart { margin: 24px 0; padding: 16px; border: 1px solid #cfded7; border-radius: 10px; background: #fbfdfb; }
.intelligence-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.intelligence-chart-heading h2 { margin: 0; font-size: 20px; }
.intelligence-chart-heading .muted { margin: 0; font-size: 12px; text-align: right; }
.intelligence-chart { display: grid; gap: 9px; }
.intelligence-chart-row { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(100px, 3fr) minmax(76px, 1fr); align-items: center; gap: 10px; min-width: 0; }
.intelligence-chart-label { overflow-wrap: anywhere; color: #405c50; font-size: 13px; }
.intelligence-chart-track { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: #dfebe5; }
.intelligence-chart-bar { display: block; width: var(--chart-width); min-width: 2px; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #157b5d, #d7ad5a); }
.intelligence-chart-row strong { min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 13px; }

.account-grid, .admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); padding: 14px; border-radius: 8px; background: #f7faf8; }
.stat strong { display: block; margin-top: 5px; font-size: 24px; }
.role-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e9f2ee;
  color: #174b3c;
  font-size: 13px;
  font-weight: 900;
}
.role-badge.premium, .role-badge.super_admin { background: #fff3d9; color: #755411; }
.role-badge.suspended { background: #feeaea; color: #8f2d2d; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.tabs button { white-space: nowrap; background: #e8efeb; color: var(--ink); }
.tabs button.active { background: var(--forest); color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #5b6d65; font-size: 13px; }
td button { min-height: 36px; padding: 6px 10px; }

.account-page .page-shell {
  display: grid;
  gap: 18px;
}

.settings-hero {
  color: #f5f2ea;
  border-color: rgba(215, 173, 90, .26);
  background:
    linear-gradient(90deg, rgba(6, 42, 35, .98), rgba(11, 58, 48, .9)),
    url("/assets/market-summary-background-20260716.png") right center / auto 170% no-repeat;
}

.settings-hero .eyebrow { color: #d7ad5a; }
.settings-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 42px);
}

.settings-lead {
  margin: 0 0 18px;
  color: #c8d7d1;
  line-height: 1.6;
}

.account-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-summary-grid .stat {
  min-width: 0;
  min-height: 88px;
  border-color: rgba(245, 242, 234, .14);
  background: rgba(255, 255, 255, .055);
}

.account-summary-grid .stat span {
  color: #a9bbb4;
  font-size: 13px;
  font-weight: 800;
}

.account-summary-grid .stat strong {
  overflow-wrap: anywhere;
  color: #f5f2ea;
  font-size: clamp(15px, 1.65vw, 20px);
  line-height: 1.3;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "profile membership"
    "push push"
    "security security"
    "payments payments"
    "danger danger";
  align-items: start;
}

.settings-grid > .panel { margin-top: 0; }
.account-profile { grid-area: profile; }
.account-membership { grid-area: membership; }
.account-push { grid-area: push; }
.account-security { grid-area: security; }
.account-payments { grid-area: payments; }
.account-danger { grid-area: danger; }

.account-panel {
  min-width: 0;
  padding: 20px;
}

.account-panel h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

.account-panel hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.account-security #password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-security #password-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.settings-plan-card {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
}

.account-payments table { min-width: 0; }
.account-danger {
  border-color: #ead3d3;
  background: #fffafa;
}

.account-danger .form-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.account-danger textarea { min-height: 72px; }
.push-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.push-heading h2 { margin-bottom: 0; }
.push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

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

.push-preferences-heading {
  grid-column: 1 / -1;
  margin: 8px 0 -2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.push-preferences > button { grid-column: 1 / -1; justify-self: start; }
.toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f7faf8;
}
.toggle-row-primary {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.toggle-row input {
  width: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  accent-color: var(--forest);
}

.toggle-row span { min-width: 0; }
.toggle-row strong,
.toggle-row small { display: block; overflow-wrap: anywhere; }
.toggle-row small { margin-top: 5px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.push-device-section { margin-top: 20px; }
.push-device-section h3 { margin-bottom: 10px; font-size: 17px; }
.push-device-list { display: grid; gap: 8px; }
.push-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.push-device > div { min-width: 0; }
.push-device strong,
.push-device small { display: block; overflow-wrap: anywhere; }
.push-device small { margin-top: 4px; color: var(--muted); }
.push-remove-device { flex: 0 0 auto; }
.push-empty { margin: 0; }
.inline-form { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; align-items: end; }
.code-block {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f2f6f4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.content-filter-bar {
  margin: 16px 0 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f8f6;
}
.content-filter-bar > * { min-width: min(100%, 148px); }
.content-editor,
.content-ingest-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}
.content-field { min-width: 0; }
.content-editor .content-field:nth-of-type(11),
.content-editor .content-field:nth-of-type(18),
.content-editor .content-field:nth-of-type(19),
.content-ingest-form .content-field:nth-of-type(7),
.content-ingest-form .content-field:nth-of-type(8) { grid-column: span 2; }
.content-editor textarea[name="bodyMarkdown"],
.content-ingest-form textarea { min-height: 148px; }
.content-editor button,
.content-ingest-form button { align-self: end; justify-self: start; }
.content-review-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0 26px;
}
.content-review-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fbfcfb;
}
.content-review-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.content-review-card h4 {
  margin: 1px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.content-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.status-review { background: #fff0cc; color: #785000; }
.status-draft { background: #e8eef0; color: #43555d; }
.status-published { background: #dceee5; color: #0b5e49; }
.status-archived { background: #eee8e3; color: #66594e; }
.content-review-card p { margin: 0; overflow-wrap: anywhere; }
.content-review-summary { color: #40524c; line-height: 1.55; }
.content-review-card button { justify-self: start; }
.content-review-dialog {
  width: min(860px, calc(100% - 28px));
  max-height: min(88vh, 920px);
  overflow: auto;
  border: 1px solid #b8c9c1;
  border-radius: 12px;
  padding: 0;
  color: #102e27;
  background: #fbfcfb;
  box-shadow: 0 24px 70px rgba(5, 33, 27, .32);
}
.content-review-dialog::backdrop { background: rgba(4, 30, 24, .58); }
.content-review-panel { padding: 22px; }
.content-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.content-review-header h3 { margin: 0; overflow-wrap: anywhere; }
.content-review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.content-review-meta > div { min-width: 0; padding: 10px; background: #f8faf9; }
.content-review-meta span,
.content-review-meta strong { display: block; overflow-wrap: anywhere; }
.content-review-meta span { color: var(--muted); font-size: 12px; }
.content-review-meta strong { margin-top: 3px; font-size: 14px; }
.content-review-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.content-review-checks li {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.content-review-checks span { font-size: 13px; color: var(--muted); }
.content-review-checks .is-ready { border-color: #9ac8b5; background: #eef8f3; }
.content-review-checks .needs-work { border-color: #e4c07a; background: #fff8e8; }
.content-review-section { margin: 18px 0; }
.content-review-section h4 { margin: 0 0 8px; }
.content-review-section p { line-height: 1.65; overflow-wrap: anywhere; }
.content-review-sources { margin: 0; padding-left: 20px; }
.content-review-sources a { overflow-wrap: anywhere; }
.content-review-warning { color: #8a5700; }
.content-review-body {
  max-height: 42vh;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f3f7f5;
  color: #183a31;
  font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.content-review-actions { margin-top: 22px; }
.policy-footer {
  padding: 22px;
  background: #082c25;
  color: #cfdcd7;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.policy-footer a { color: #f0ce89; }

@media (max-width: 760px) {
  .content-filter-bar,
  .content-editor,
  .content-ingest-form { grid-template-columns: 1fr; }
  .content-filter-bar { display: grid; }
  .content-filter-bar > * { min-width: 0; width: 100%; }
  .content-editor .content-field:nth-of-type(n),
  .content-ingest-form .content-field:nth-of-type(n) { grid-column: auto; }
  .content-editor button,
  .content-ingest-form button { width: 100%; justify-self: stretch; }
  .content-review-list { grid-template-columns: 1fr; }
  .content-review-card button { width: 100%; justify-self: stretch; }
  .content-review-dialog { width: min(100% - 16px, 860px); max-height: 92vh; }
  .content-review-panel { padding: 18px; }
  .content-review-header { gap: 10px; }
  .content-review-header button { flex: 0 0 auto; }
  .content-review-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-review-actions { display: grid; grid-template-columns: 1fr; }
  .content-review-actions > * { width: 100%; }
  .intelligence-shell { width: min(100% - 24px, 620px); margin: 14px auto 44px; }
  .intelligence-hero { padding: 24px 18px; border-radius: 14px; }
  .intelligence-toolbar { grid-template-columns: 1fr 1fr; }
  .intelligence-search-label { grid-column: 1 / -1; }
  .intelligence-toolbar button { grid-column: 1 / -1; }
  .intelligence-list { grid-template-columns: 1fr; }
  .radar-judgement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-chart-heading { display: grid; }
  .intelligence-chart-heading .muted { text-align: left; }
  .intelligence-chart-row { grid-template-columns: minmax(58px, 1fr) minmax(82px, 2fr) minmax(64px, 1fr); gap: 7px; }
  .intelligence-header {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }
  .intelligence-header .brand {
    min-width: 0;
    white-space: nowrap;
  }
  .intelligence-header .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .intelligence-header .header-actions a {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }
  .public-hero { min-height: 460px; }
  .plans, .account-grid, .admin-grid, .stat-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .page-shell { width: min(100% - 24px, 1180px); margin-top: 18px; }
  .settings-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "membership"
      "push"
      "security"
      "payments"
      "danger";
  }
  .account-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-summary-grid .stat { min-height: 80px; }
  .account-security #password-form { grid-template-columns: 1fr; }
  .account-security #password-form button {
    grid-column: auto;
    justify-self: stretch;
  }
  .push-heading { align-items: center; }
  .push-actions,
  .push-preferences { grid-template-columns: 1fr; }
  .push-actions { display: grid; }
  .push-actions button,
  .push-preferences > button { width: 100%; justify-self: stretch; }
  .push-device { align-items: flex-start; }
  .account-danger .form-grid { grid-template-columns: 1fr; }
  .account-payments table,
  .account-payments tbody,
  .account-payments tr,
  .account-payments td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .account-payments thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .account-payments tr:not(.empty-row) {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
  }
  .account-payments tr:not(.empty-row) td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
  }
  .account-payments tr:not(.empty-row) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }
}

.settings-save-toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, calc(16px + env(safe-area-inset-bottom)));
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  max-width: min(calc(100vw - 32px), 360px);
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid rgba(217, 179, 91, 0.58);
  border-radius: 10px;
  background: #0b3a30;
  box-shadow: 0 14px 34px rgba(5, 30, 24, 0.3);
  color: #f5f2ea;
  font-weight: 800;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.settings-save-toast[hidden] {
  display: none;
}

.settings-save-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.settings-save-toast-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #d7ad5a;
  color: #12352d;
  font-size: 14px;
  line-height: 1;
}
.operations-panel { margin-top: 28px; min-width: 0; }
.operations-panel h2 { font-size: 21px; }
.operations-panel h3 { font-size: 17px; }
.operations-panel p { line-height: 1.65; overflow-wrap: anywhere; }
.operation-market { padding: 14px 0; border-bottom: 1px solid #64807855; }
.operations-panel button { min-height: 44px; }
