:root {
  --bg: #f6efe7;
  --paper: #fffaf4;
  --card: rgba(255, 250, 244, 0.92);
  --line: rgba(101, 71, 42, 0.14);
  --text: #1f1a16;
  --muted: #6d5d4f;
  --accent: #bc6c25;
  --accent-deep: #8d4f15;
  --success: #2f7d32;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(85, 50, 17, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.modal-open {
  overflow: hidden;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(241, 168, 88, 0.26), transparent 28%),
    radial-gradient(circle at left center, rgba(94, 140, 128, 0.18), transparent 26%),
    linear-gradient(180deg, #f8f1ea 0%, #f5ece2 48%, #f2e9df 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  padding: 24px 0 14px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(77, 50, 24, 0.22));
}

.brand-text strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(77, 50, 24, 0.16);
}

.brand-text span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-tool-entry {
  background: linear-gradient(180deg, #4f8fff 0%, #2f6df3 58%, #2458cf 100%);
  border: 1px solid rgba(28, 84, 207, 0.55);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 22px rgba(47, 109, 243, 0.28),
    0 3px 0 rgba(24, 67, 166, 0.9);
}

.btn-tool-entry:hover {
  background: linear-gradient(180deg, #5a99ff 0%, #3a79fb 58%, #2a63dc 100%);
  transform: translateY(-2px);
}

.btn-tool-entry:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 14px rgba(47, 109, 243, 0.24),
    0 1px 0 rgba(24, 67, 166, 0.9);
}

.btn-photo-entry {
  background: linear-gradient(180deg, #ffb36a 0%, #f08a25 58%, #c86812 100%);
  border: 1px solid rgba(181, 91, 17, 0.5);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 22px rgba(212, 116, 29, 0.24),
    0 3px 0 rgba(155, 71, 10, 0.88);
}

.btn-photo-entry:hover {
  background: linear-gradient(180deg, #ffbf7f 0%, #f6993d 58%, #d2761d 100%);
  transform: translateY(-2px);
}

.btn-photo-entry:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 6px 14px rgba(212, 116, 29, 0.2),
    0 1px 0 rgba(155, 71, 10, 0.88);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  padding: 26px 0 18px;
}

.photo-tool-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.photo-tool-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
}

.photo-tool-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  cursor: pointer;
}

.photo-tool-item.is-active {
  border-left: 5px solid #f08a25;
  background: #fffaf5;
}

.photo-tool-canvas-wrap,
.photo-tool-result {
  min-height: 520px;
  border-radius: 24px;
  border: 1px dashed rgba(109, 93, 79, 0.24);
  background: rgba(255, 255, 255, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-tool-canvas-wrap img,
.photo-tool-result img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.photo-tool-prompt {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
}

@media (max-width: 1100px) {
  .photo-tool-grid {
    grid-template-columns: 1fr;
  }
}

.card,
.info-panel,
.shell-panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-panel {
  padding: 38px;
  position: relative;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(188, 108, 37, 0.1);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  display: grid;
  gap: 6px;
}

.hero-title-top {
  display: block;
  font-size: clamp(32px, 3.9vw, 52px);
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 20px rgba(78, 49, 20, 0.16);
}

.hero-title-main {
  display: block;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.62),
    0 3px 0 rgba(132, 83, 36, 0.28),
    0 12px 24px rgba(78, 49, 20, 0.18);
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-copy-emphasis {
  color: #7f3f0f;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero-actions,
.stack,
.list-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-inline {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.action-inline .btn {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.2;
}

.action-inline {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.action-inline .btn {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.2;
}

.hero-actions {
  margin-top: 24px;
}

.hero-cta-animated {
  opacity: 0;
  transform: translateY(32px);
  animation: hero-cta-rise 1s ease forwards;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.info-panel {
  padding: 24px;
}

.info-panel-animated {
  animation: panel-fade-up 0.9s ease both;
}

.seo-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.info-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.step-list {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.step-animated {
  opacity: 0;
  animation: step-fade-in 0.7s ease forwards;
}

.step-animated:nth-child(1) { animation-delay: 0.22s; }
.step-animated:nth-child(2) { animation-delay: 0.38s; }
.step-animated:nth-child(3) { animation-delay: 0.54s; }
.step-animated:nth-child(4) { animation-delay: 0.7s; }
.step-animated:nth-child(5) { animation-delay: 0.86s; }

.step-index {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(188, 108, 37, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
}

@keyframes panel-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes step-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-cta-rise {
  0% {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(6px);
  }
  45% {
    opacity: 0.58;
    transform: translateY(12px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.section {
  padding: 16px 0 32px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 10px 0 8px;
  font-size: 30px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.seo-copy-panel {
  padding: 28px 30px;
}

.seo-copy-title {
  margin-bottom: 20px;
}

.seo-copy-grid .card {
  height: 100%;
}

.seo-visual {
  margin-top: 22px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  padding: 22px;
}

.card h3,
.card h4 {
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.shell-panel {
  padding: 28px;
}

.shell-panel h2 {
  margin: 0 0 14px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stats-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.stats-row-1 {
  grid-template-columns: 1fr;
}

.stats-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stats-row-5 {
  grid-template-columns: repeat(5, 1fr);
}

.stats-row-6 {
  grid-template-columns: repeat(6, 1fr);
}

.stat-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.stat-box-green {
  background: linear-gradient(180deg, rgba(80, 168, 88, 0.18), rgba(47, 125, 50, 0.1));
  border-color: rgba(47, 125, 50, 0.26);
}

.stat-box-gold {
  background: linear-gradient(180deg, rgba(230, 163, 78, 0.2), rgba(188, 108, 37, 0.1));
  border-color: rgba(188, 108, 37, 0.28);
}

.stat-box-red {
  background: linear-gradient(180deg, rgba(220, 102, 90, 0.18), rgba(180, 35, 24, 0.1));
  border-color: rgba(180, 35, 24, 0.24);
}

.stat-box-blue {
  background: linear-gradient(180deg, rgba(86, 140, 206, 0.18), rgba(43, 102, 179, 0.1));
  border-color: rgba(43, 102, 179, 0.24);
}

.stat-box-green strong {
  color: #2f7d32;
}

.stat-box-gold strong {
  color: #b66822;
}

.stat-box-red strong {
  color: #b42318;
}

.stat-box-blue strong {
  color: #2b66b3;
}

.stat-box strong {
  display: block;
  font-size: 24px;
}

.stat-box span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stat-box-action {
  position: relative;
  padding-bottom: 52px;
}

.stat-action-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
}

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

.field,
.field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.field-full label {
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field-full input,
.field-full textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.field-full textarea {
  min-height: 92px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.note {
  font-size: 13px;
  color: var(--muted);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-inline,
.filter-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-inline label,
.filter-grid label {
  font-size: 13px;
  color: var(--muted);
}

.filter-inline input,
.filter-inline select,
.filter-grid input,
.filter-grid select {
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.input-clear-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.input-clear-wrap input {
  padding-right: 40px;
}

.input-clear-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(109, 93, 79, 0.12);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.input-clear-btn:hover {
  background: rgba(188, 108, 37, 0.12);
  color: var(--accent-deep);
}

.section-tight {
  padding-top: 16px;
}

.chart-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.mini-bar-chart,
.mini-line-chart {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 220px;
  overflow-x: auto;
}

.chart-empty {
  color: var(--muted);
  font-size: 14px;
}

.chart-group {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 4px;
  height: 180px;
}

.chart-bar-wrap {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 8px;
  height: 100%;
}


.chart-day {
  flex: 0 0 36px;
  width: 36px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: stretch;
  gap: 4px;
  position: relative;
}

.chart-bar {
  border-radius: 10px 10px 4px 4px;
  min-height: 2px;
  width: 8px;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.chart-bar-wrap:hover .chart-bar {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.chart-bar-green {
  background: linear-gradient(180deg, #62c069, #2f7d32);
}

.chart-bar-gold {
  background: linear-gradient(180deg, #f0a751, #bc6c25);
}

.chart-bar-red {
  background: linear-gradient(180deg, #e36e61, #b42318);
}

.chart-bar-blue {
  background: linear-gradient(180deg, #68a1ea, #2b66b3);
}

.chart-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.chart-tooltip-inline {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(32, 27, 23, 0.94);
  color: #fff7ef;
  box-shadow: 0 10px 24px rgba(26, 18, 12, 0.18);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.chart-bar-wrap:hover .chart-tooltip-inline {
  opacity: 1;
  transform: translateY(0);
}

.trend-list {
  display: grid;
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}

.trend-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trend-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(109, 93, 79, 0.12);
  overflow: hidden;
}

.trend-fill {
  height: 100%;
  border-radius: inherit;
}

.trend-fill-money {
  background: linear-gradient(90deg, #bc6c25, #d7904d);
}

.trend-fill-points {
  background: linear-gradient(90deg, #b42318, #dd7a73);
}

.trend-fill-user-register {
  background: linear-gradient(90deg, #2b66b3, #68a1ea);
}

.trend-fill-user-recharge {
  background: linear-gradient(90deg, #b42318, #dd7a73);
}

.user-growth-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 190px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.user-growth-day {
  flex: 0 0 42px;
  width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.user-growth-bars {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.user-growth-bar-wrap {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
}

.user-growth-bar {
  width: 12px;
  min-height: 4px;
  border-radius: 10px 10px 4px 4px;
}

.user-growth-bar-wrap:hover .chart-tooltip-inline {
  opacity: 1;
  transform: translateY(0);
}

.user-growth-bar-register {
  background: linear-gradient(180deg, #68a1ea, #2b66b3);
}

.user-growth-bar-recharge {
  background: linear-gradient(180deg, #e36e61, #b42318);
}

.user-growth-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.trend-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.trend-dot-blue {
  background: #4d87d8;
}

.trend-dot-red {
  background: #cf5d52;
}

.compact-table table {
  min-width: 100%;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(109, 93, 79, 0.12);
  color: var(--muted);
  font-size: 12px;
}

.status-chip-success {
  background: rgba(47, 125, 50, 0.12);
  color: var(--success);
}

.status-chip-failed {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.status-chip-pending {
  background: rgba(188, 108, 37, 0.12);
  color: var(--accent-deep);
}

.txn-plus {
  color: var(--success);
  font-weight: 700;
}

.txn-minus {
  color: var(--danger);
  font-weight: 700;
}

.ellipsis {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pager button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.tab-chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.ranking-bars {
  margin: 18px 0 8px;
  display: grid;
  gap: 8px;
}

.ranking-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 72px;
  gap: 12px;
  align-items: center;
}

.ranking-bar-label {
  font-size: 13px;
  color: var(--muted);
}

.ranking-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(109, 93, 79, 0.12);
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bc6c25, #d7904d);
}

.danger-row {
  background: rgba(180, 35, 24, 0.04);
}

.admin-modal-panel {
  width: min(980px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
}

.admin-transactions-modal-panel {
  width: min(1520px, 100%);
}

.modal-card-list {
  display: grid;
  gap: 12px;
}

.modal-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.modal-table-wrap {
  max-height: min(62vh, 560px);
  overflow: auto;
}

.notice,
.error,
.success {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  font-size: 14px;
}

.notice {
  background: rgba(188, 108, 37, 0.08);
  color: var(--accent-deep);
}

.success {
  background: rgba(47, 125, 50, 0.12);
  color: var(--success);
}

.error {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.settings-form.is-hidden-by-mode {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.footer {
  padding: 18px 0 34px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.footer-link {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 26, 22, 0.42);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  padding: 16px 16px 14px;
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 70px rgba(49, 30, 12, 0.26);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.auth-switch {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(188, 108, 37, 0.08);
  margin-bottom: 12px;
}

.auth-tab {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.auth-tab.is-active {
  background: var(--accent);
  color: white;
}

.auth-panel {
  animation: fade-up 0.2s ease;
}

.auth-panel .muted {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
}

.auth-panel .form-grid {
  gap: 10px;
}

.auth-panel .field label {
  font-size: 13px;
}

.auth-panel .field input {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.inline-field input {
  margin: 0;
}

.inline-send-btn {
  white-space: nowrap;
  padding: 10px 14px;
}

.auth-agreement {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-agreement a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-panel .form-actions {
  gap: 10px;
  margin-top: 10px;
}

.auth-panel .notice,
.auth-panel .error,
.auth-panel .success {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.modal-copy-block {
  display: grid;
  gap: 10px;
}

.modal-copy-block .muted {
  margin: 0;
}

.policy-content {
  max-height: min(70vh, 620px);
  overflow-y: auto;
  padding-right: 6px;
}

.policy-content p {
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.75;
}

.account-settings-stack {
  display: grid;
  gap: 12px;
}

.settings-form {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.settings-form-head {
  margin-bottom: 8px;
}

.settings-form-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.settings-form-head .muted {
  margin: 0;
  font-size: 13px;
}

.settings-form .field label {
  font-size: 13px;
}

.settings-form .field input,
.settings-form .field-full input {
  padding: 10px 12px;
  border-radius: 14px;
}

.settings-form .field-full > .inline-send-btn {
  align-self: flex-start;
  margin-bottom: 2px;
}

.settings-form .notice {
  margin-top: 8px;
}

.pricing-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.pricing-option {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pricing-copy {
  display: grid;
  gap: 6px;
}

.pricing-option strong {
  font-size: 18px;
}

.pricing-copy span {
  color: var(--muted);
  line-height: 1.6;
}

.pricing-cta {
  display: inline-flex;
  justify-self: end;
  align-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

.pricing-option:hover {
  transform: translateY(-1px);
  border-color: rgba(188, 108, 37, 0.4);
}

.pricing-option.is-active {
  border-color: rgba(188, 108, 37, 0.58);
  box-shadow: 0 12px 26px rgba(188, 108, 37, 0.12);
  background: rgba(255, 247, 238, 0.92);
}

.pricing-action-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--accent-deep);
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero,
  .grid-3,
  .grid-2,
  .stats-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-row-3,
  .stats-row-4,
  .stats-row-5 {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .info-panel,
  .shell-panel,
  .card,
  .modal-panel {
    padding: 22px;
  }

  .ranking-bar-row {
    grid-template-columns: 1fr;
  }
}
