/* ==========================================================================
   PayLight · 微光  —  design system
   ========================================================================== */

/* 自托管中文字体：确保无系统中文字体的环境也能正常显示 */
@font-face {
  font-family: "PayLight Sans";
  src: url("/fonts/noto-sans-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PayLight Sans";
  src: url("/fonts/noto-sans-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 单色 emoji 回退字体：无系统 emoji 字体时也不会出现方块 */
@font-face {
  font-family: "PayLight Emoji";
  src: url("/fonts/noto-emoji-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1F000-1FAFF, U+2600-27BF, U+2B00-2BFF, U+FE0F, U+200D, U+20E3;
}

:root {
  --ink: #10241f;
  --ink-soft: #3d534c;
  --muted: #6d817a;
  --muted-2: #93a39d;
  --bg: #f6f4ee;
  --bg-deep: #efece3;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --line: #e8e3d8;
  --line-strong: #d8d2c4;
  --brand: #0e7a63;
  --brand-bright: #129179;
  --brand-deep: #0a5445;
  --brand-dark: #062d25;
  --brand-soft: #e7f4ef;
  --brand-soft-2: #f2faf6;
  --gold: #e3a23c;
  --gold-deep: #b97a18;
  --gold-soft: #fcf1da;
  --danger: #c9483f;
  --danger-soft: #fcecea;
  --blue: #3f7fd8;
  --blue-soft: #eaf1fc;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --shadow-sm: 0 2px 10px rgba(12, 46, 38, 0.04);
  --shadow: 0 18px 42px -28px rgba(9, 44, 36, 0.4);
  --shadow-lg: 0 36px 70px -36px rgba(9, 44, 36, 0.45);
  --font: "PayLight Sans", "PayLight Emoji", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::selection,
::selection {
  background: rgba(14, 122, 99, 0.2);
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

:focus-visible {
  outline: 2.5px solid rgba(14, 122, 99, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
}

.dot-sep {
  color: var(--muted-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 19px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-deep));
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(10, 84, 69, 0.85);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -16px rgba(10, 84, 69, 0.9);
  background: linear-gradient(135deg, #15a289, var(--brand-deep));
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  color: #f3fbf7;
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-1px);
}

.btn-danger-ghost {
  background: #fff;
  border-color: #f0cfcc;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn.is-disabled,
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-link {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--brand);
  white-space: nowrap;
}

.text-link:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- avatar ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.avatar-md {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.avatar-xl {
  width: 76px;
  height: 76px;
  font-size: 26px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 244, 238, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(9, 44, 36, 0.5);
  background: rgba(246, 244, 238, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(145deg, #0f806a, #073c30);
  box-shadow: 0 8px 18px -10px rgba(9, 68, 55, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.brand-text small {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.nav-link.is-active {
  color: var(--brand-deep);
  background: rgba(14, 122, 99, 0.09);
}

.nav-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  background: var(--brand-dark);
  color: #f2fbf7;
  padding: 9px 16px;
}

.nav-link-cta:hover {
  background: var(--brand-deep);
  color: #fff;
}

.nav-link-cta.is-active {
  background: var(--brand-deep);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 4px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch button {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  transition: 0.16s var(--ease);
  line-height: 1.3;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.is-active {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 4px 10px -6px rgba(6, 45, 37, 0.9);
}

.user-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  transition: 0.16s var(--ease);
}

.user-chip:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.user-menu-wrap {
  position: relative;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.18s var(--ease);
  z-index: 70;
}

.user-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
  color: var(--ink-soft);
}

.user-menu a:hover,
.user-menu button:hover {
  background: var(--bg);
  color: var(--ink);
}

.user-menu .menu-sep {
  height: 1px;
  background: var(--line);
  margin: 5px 3px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 66px 0 132px;
  color: #f2fbf7;
  overflow: hidden;
  background: radial-gradient(1100px 560px at 82% -12%, rgba(24, 143, 116, 0.55), transparent 62%),
    radial-gradient(720px 500px at 4% 108%, rgba(227, 162, 60, 0.18), transparent 60%),
    linear-gradient(135deg, #05261f 0%, #093c31 52%, #0b5b49 100%);
  border-radius: 0 0 44px 44px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.55;
}

.hero-glow-a {
  width: 360px;
  height: 360px;
  right: -60px;
  top: -120px;
  background: rgba(43, 178, 143, 0.5);
}

.hero-glow-b {
  width: 300px;
  height: 300px;
  left: -100px;
  bottom: -160px;
  background: rgba(227, 162, 60, 0.24);
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 52px;
  align-items: center;
}

.nowrap {
  white-space: nowrap;
}

.hero-copy {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
  font-weight: 550;
  color: rgba(231, 248, 241, 0.9);
  letter-spacing: 0.01em;
}

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fe0b8;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(95, 224, 184, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  70% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.hero-title {
  margin: 20px 0 20px;
  font-size: clamp(2.35rem, 4.9vw, 4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #f7fdf9;
  text-wrap: balance;
}

.hero-title-lead,
.hero-title-accent {
  display: block;
}

.hero-title-accent {
  background: linear-gradient(100deg, #fffaf0 10%, #f3cf8c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(220, 242, 234, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 12.5px;
  color: rgba(203, 234, 223, 0.62);
}

.hero-panel {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
  box-shadow: 0 36px 70px -34px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -30%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 224, 184, 0.25), transparent 65%);
  pointer-events: none;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-panel-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(206, 236, 225, 0.7);
}

.hero-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #7fe9c4;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(95, 224, 184, 0.1);
  border: 1px solid rgba(95, 224, 184, 0.25);
}

.hero-live-tag .pulse-dot {
  width: 5px;
  height: 5px;
}

.hero-panel-amount {
  display: block;
  margin: 10px 0 18px;
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #fff5df, #f0c978 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.hero-panel-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-panel-mini div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-panel-mini span {
  font-size: 10.5px;
  color: rgba(205, 235, 224, 0.6);
  letter-spacing: 0.02em;
}

.hero-panel-mini b {
  font-size: 17px;
  font-weight: 700;
  color: #eafaf3;
}

.hero-feed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 58px;
}

.hero-feed-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(95, 224, 184, 0.16);
  color: #8cf0cf;
  flex-shrink: 0;
}

.hero-feed p {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(214, 240, 231, 0.72);
}

.hero-feed p strong {
  display: block;
  color: #f1fcf7;
  font-size: 12.5px;
}

.hero-feed p span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-feed time {
  font-size: 10.5px;
  color: rgba(200, 232, 220, 0.5);
  white-space: nowrap;
}

.hero-feed-empty {
  color: rgba(205, 235, 224, 0.6) !important;
}

/* ---------- stats strip ---------- */
.stats-strip-wrap {
  position: relative;
  z-index: 5;
  margin-top: -72px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stat-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.stat-cell:last-child {
  border-right: none;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-shrink: 0;
}

.tone-amber {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.tone-green {
  background: var(--brand-soft);
  color: var(--brand);
}

.tone-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tone-rose {
  background: #fdeeee;
  color: #cf5a63;
}

.stat-cell div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-cell strong {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.stat-cell span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* ---------- sections ---------- */
.section {
  padding: 74px 0;
}

.section-tight {
  padding: 26px 0 64px;
}

.section-muted {
  background: var(--bg-deep);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-head.center {
  justify-content: center;
  text-align: center;
}

.section-head.center p {
  margin-inline: auto;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.7;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

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

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.split-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 22px;
  align-items: start;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 0 4px rgba(18, 145, 121, 0.14);
}

/* ---------- podium ---------- */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
  padding: 22px 2px 8px;
}

.podium-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 10px 16px;
  border-radius: 18px;
  text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  border: 1px solid transparent;
}

.podium-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.podium-1 {
  background: linear-gradient(180deg, #fff8e7, #fbecc6);
  border-color: #f0dcaa;
  padding-top: 26px;
  transform: translateY(-10px);
}

.podium-1:hover {
  transform: translateY(-14px);
}

.podium-2 {
  background: linear-gradient(180deg, #f7f9fb, #eef2f5);
  border-color: #e2e8ed;
}

.podium-3 {
  background: linear-gradient(180deg, #fdf4ed, #f8e7da);
  border-color: #efdacb;
}

.podium-crown {
  position: absolute;
  top: -15px;
  font-size: 21px;
  color: var(--gold);
  filter: drop-shadow(0 4px 6px rgba(185, 122, 24, 0.3));
}

.podium-avatar {
  width: 52px;
  height: 52px;
  font-size: 18px;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px -8px rgba(9, 44, 36, 0.5);
}

.podium-1 .podium-avatar {
  width: 62px;
  height: 62px;
  font-size: 21px;
}

.podium-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: -13px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: #9aa7ad;
  border: 2px solid #fff;
  z-index: 2;
}

.podium-1 .podium-medal {
  background: linear-gradient(135deg, #eab64f, #c98a1f);
}

.podium-3 .podium-medal {
  background: linear-gradient(135deg, #d59a72, #b4744b);
}

.podium-name {
  font-size: 13.5px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: -0.01em;
}

.podium-count {
  font-size: 10.5px;
  color: var(--muted);
}

.rank-list {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  border-radius: 12px;
  transition: background-color 0.16s var(--ease);
}

.rank-row:hover {
  background: var(--brand-soft-2);
}

.rank-num {
  width: 24px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-2);
  flex-shrink: 0;
}

.rank-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.rank-name small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

.rank-amount {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
}

/* ---------- feed ---------- */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 9px;
  border-radius: 12px;
  transition: background-color 0.16s var(--ease);
}

.feed-item:hover {
  background: var(--brand-soft-2);
}

.feed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}

.feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.feed-text {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-text strong {
  color: var(--ink);
  font-weight: 650;
}

.feed-body time {
  font-size: 10.5px;
  color: var(--muted-2);
}

.feed-amount {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
}

/* ---------- bill grid / card ---------- */
.bill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 20px;
}

.bill-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}

.bill-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(14, 122, 99, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.bill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 122, 99, 0.22);
}

.bill-card:hover::after {
  opacity: 1;
}

.bill-card.is-paid {
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.bill-card.is-urgent {
  border-color: #f0dad1;
}

.bill-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--cat-tone, var(--brand));
  background: rgba(14, 122, 99, 0.07);
  background: color-mix(in srgb, var(--cat-tone, #0e7a63) 11%, white);
  white-space: nowrap;
}

.cat-icon {
  font-size: 12px;
  line-height: 1;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-open {
  background: #f2f2ec;
  color: #6c7f78;
}

.status-urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-paid {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.bill-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.bill-title a {
  transition: color 0.15s var(--ease);
}

.bill-title a:hover {
  color: var(--brand);
}

.bill-desc {
  font-size: 13px;
  line-height: 1.78;
  color: var(--muted);
  margin-bottom: 16px;
}

.bill-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.bill-owner {
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px dashed var(--line);
}

.bill-amount small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 1px;
}

.bill-amount strong {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--brand-deep);
}

.bill-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--brand);
  padding-bottom: 2px;
  white-space: nowrap;
}

.bill-card-link:hover {
  color: var(--brand-deep);
}

/* ---------- steps / trust / cta ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  position: relative;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(14, 122, 99, 0.1);
  line-height: 1;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--brand-soft);
  font-size: 21px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-card {
  padding: 26px;
  border-top: 2px solid var(--brand);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 0 var(--radius) var(--radius);
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
  margin-bottom: 14px;
}

.trust-card h3 {
  font-size: 15.5px;
  margin-bottom: 8px;
}

.trust-card p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 42px 46px;
  border-radius: var(--radius-xl);
  background: radial-gradient(700px 300px at 90% -30%, rgba(34, 168, 136, 0.5), transparent 60%),
    linear-gradient(120deg, #062d25, #0a5243 65%, #0d6a55);
  color: #f4fbf8;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-band::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -60%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cta-band-copy h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.cta-band-copy p {
  font-size: 13.5px;
  color: rgba(214, 240, 231, 0.7);
}

.cta-band-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 30px;
  padding: 54px 0 26px;
  background: #082b23;
  color: #c9e1d8;
  border-radius: 38px 38px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
}

.brand-footer {
  margin-bottom: 14px;
}

.brand-footer .brand-text strong {
  color: #f2fbf7;
}

.brand-footer .brand-text small {
  color: rgba(201, 225, 216, 0.55);
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(201, 225, 216, 0.68);
  max-width: 42ch;
}

.footer-brand .footer-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: rgba(201, 225, 216, 0.42);
}

.footer-links h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 225, 216, 0.5);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: rgba(222, 241, 234, 0.78);
  transition: color 0.15s var(--ease);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  color: rgba(201, 225, 216, 0.5);
}

.footer-bottom a {
  color: rgba(201, 225, 216, 0.7);
}

/* ---------- bottom nav ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.15s var(--ease);
}

.bottom-nav-item.is-active {
  color: var(--brand);
}

.bottom-nav-fab {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-bright), var(--brand-deep));
  color: #fff;
  border: 3px solid var(--bg);
  box-shadow: 0 12px 22px -10px rgba(10, 84, 69, 0.8);
}

/* ---------- empty / loading ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 54px 24px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state.compact {
  padding: 34px 18px;
  border: none;
  background: transparent;
}

.empty-emoji {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 4px;
}

.empty-state h3 {
  font-size: 17px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.7;
}

.empty-state small {
  font-size: 12px;
  color: var(--muted-2);
  max-width: 40ch;
  line-height: 1.7;
}

.empty-state .btn {
  margin-top: 10px;
}

.skeleton {
  border-radius: 14px;
  background: linear-gradient(100deg, #ece9e0 20%, #f6f4ee 40%, #ece9e0 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-card {
  height: 150px;
  margin-bottom: 18px;
}

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

.skeleton-grid .skeleton {
  height: 78px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* ---------- toast / modal ---------- */
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #0d2f27;
  color: #eefaf5;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  transform: translateY(12px);
  opacity: 0;
  transition: 0.24s var(--ease);
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 15px;
  line-height: 1.4;
  flex-shrink: 0;
}

.toast.toast-error {
  background: #4a1f1d;
}

.toast.toast-success {
  background: #0a3d31;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 28, 23, 0.55);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s var(--ease);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s var(--ease);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--ink);
}

.modal-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
  padding-right: 24px;
}

.modal-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-amount {
  padding: 14px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
  background: var(--brand-soft-2);
  border: 1px solid var(--brand-soft);
  border-radius: 14px;
}

.modal-note {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}


@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 34px 0 30px;
  background: linear-gradient(180deg, rgba(14, 122, 99, 0.06), transparent);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.page-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  letter-spacing: -0.035em;
  margin-top: 12px;
}

.page-hero p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 64ch;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  transition: 0.15s var(--ease);
}

.breadcrumb:hover {
  color: var(--brand);
  background: rgba(14, 122, 99, 0.07);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field label,
.field-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
}

.field label em,
.field-label em {
  color: var(--danger);
  font-style: normal;
}

.optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  margin-left: 4px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:hover,
textarea:hover,
select:hover {
  border-color: #c3bcac;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(14, 122, 99, 0.12);
}

textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.7;
}

select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%236d817a' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
  background: #fffafa;
}

.field-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 15px;
}

.field-error {
  font-size: 11.5px;
  color: var(--danger);
  line-height: 1.5;
}

.char-count {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  margin-left: auto;
}

.field-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.input-prefix {
  position: relative;
}

.input-prefix > span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.input-prefix input {
  padding-left: 32px;
  font-weight: 600;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0.55;
  line-height: 1;
}

.password-toggle:hover {
  opacity: 1;
  background: var(--bg);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.form-alert {
  padding: 10px 13px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid #f3d3d0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.55;
}

.form-alert[hidden] {
  display: none;
}

/* ==========================================================================
   Bills page
   ========================================================================== */
.filter-bar {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--bg);
  border-radius: 999px;
}

.filter-tabs button {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  transition: 0.16s var(--ease);
  white-space: nowrap;
}

.filter-tabs button:hover {
  color: var(--ink);
}

.filter-tabs button.is-active {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 4px 10px -6px rgba(9, 44, 36, 0.4);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
  padding: 4px 5px 4px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.filter-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(14, 122, 99, 0.1);
}

.filter-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 13.5px;
  box-shadow: none;
}

.filter-search input:focus {
  box-shadow: none;
}

.filter-search-btn {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.filter-search-btn:hover {
  background: var(--brand-deep);
}

.filter-sort select {
  width: auto;
  min-width: 140px;
  padding: 9px 34px 9px 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  background-color: var(--surface);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.cat-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  background: var(--surface);
  transition: 0.16s var(--ease);
}

.cat-filter:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.cat-filter.is-active {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 2px 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.result-bar span:first-child {
  font-weight: 650;
  color: var(--ink-soft);
}

.result-tip {
  color: var(--muted-2);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.page-btn {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: 0.16s var(--ease);
}

.page-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-status {
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   Bill detail
   ========================================================================== */
.detail-hero {
  padding: 20px 0 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  gap: 26px;
  align-items: start;
  padding-top: 14px;
}

.detail-main {
  padding: 30px 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-title {
  margin: 14px 0 12px;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 22px;
}

.detail-amount-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(120deg, var(--brand-soft-2), var(--brand-soft));
  border: 1px solid #d9ece4;
  margin-bottom: 26px;
}

.detail-amount-card > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-amount-card span {
  font-size: 11.5px;
  color: var(--muted);
}

.detail-amount-card strong {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
  line-height: 1.2;
}

.detail-amount-state {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: #fff;
  color: var(--brand-deep);
  border: 1px solid #d5e9e0;
  white-space: nowrap;
}

.detail-amount-state.is-paid {
  background: var(--brand-dark);
  color: #fff;
  border-color: transparent;
}

.detail-block {
  margin-top: 26px;
}

.detail-block h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.detail-story {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-soft);
  white-space: pre-line;
}

.info-list {
  border-top: 1px solid var(--line);
}

.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.info-label {
  font-size: 12.5px;
  color: var(--muted);
  flex-shrink: 0;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  word-break: break-all;
  max-width: 68%;
}

.privacy-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.owner-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  margin-top: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.owner-card div {
  flex: 1;
  min-width: 0;
}

.owner-card strong {
  font-size: 14px;
}

.owner-card p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.owner-badge {
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.paid-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  margin-top: 22px;
  background: var(--brand-soft);
  border: 1px solid #d3e9e0;
  border-radius: 16px;
}

.paid-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.paid-banner strong {
  font-size: 13px;
  color: var(--brand-deep);
}

.paid-banner p {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.detail-side {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pay-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.pay-card-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 16px;
}

.pay-card-label {
  font-size: 11.5px;
  color: var(--muted);
}

.pay-card-amount {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--brand-deep);
  line-height: 1.2;
}

.pay-card-payee {
  padding: 4px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
}

.pay-card-payee > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.pay-card-payee > div + div {
  border-top: 1px dashed var(--line);
}

.pay-card-payee span {
  font-size: 11.5px;
  color: var(--muted);
}

.pay-card-payee b {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.pay-card-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 14px;
}

.pay-card-note {
  margin-top: 11px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}

.pay-card-done {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--brand-deep);
}

.pay-card-done span {
  font-weight: 700;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: 0.16s var(--ease);
}

.share-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.safety-card {
  padding: 18px 20px;
  background: #fbf8ef;
  border: 1px solid #ece3cd;
  border-radius: 18px;
}

.safety-card h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.safety-card ul {
  list-style: disc;
  padding-left: 16px;
}

.safety-card li {
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

/* ==========================================================================
   Publish page
   ========================================================================== */
.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 24px;
  align-items: start;
}

.form-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.form-head h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.form-required-note {
  font-size: 11px;
  color: var(--muted-2);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 20px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.form-divider::before,
.form-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.category-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.cat-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: 0.16s var(--ease);
  text-align: left;
}

.cat-option:hover {
  border-color: var(--cat-tone, var(--brand));
}

.cat-option.is-active {
  border-color: var(--cat-tone, var(--brand));
  background: rgba(14, 122, 99, 0.05);
  background: color-mix(in srgb, var(--cat-tone, #0e7a63) 9%, white);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--cat-tone, var(--brand));
}

.cat-option-icon {
  font-size: 14px;
  line-height: 1;
}

.segment {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: var(--bg);
  border-radius: 12px;
}

.segment-option {
  position: relative;
}

.segment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-option span {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: 0.16s var(--ease);
}

.segment-option input:checked + span {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 3px 9px -5px rgba(9, 44, 36, 0.45);
}

.segment-urgent input:checked + span {
  color: var(--danger);
}

.segment-option input:focus-visible + span {
  outline: 2px solid rgba(14, 122, 99, 0.5);
  outline-offset: 1px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

.privacy-note svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-hint {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--gold-soft);
  border: 1px solid #f0dfb8;
}

.notice[hidden] {
  display: none;
}

.notice-icon {
  font-size: 19px;
  flex-shrink: 0;
}

.notice div {
  flex: 1;
  min-width: 0;
}

.notice strong {
  display: block;
  font-size: 13px;
  color: var(--gold-deep);
}

.notice p {
  margin-top: 1px;
  font-size: 11.5px;
  color: #8a6a2c;
  line-height: 1.55;
}

.publish-side {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.side-card h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.side-card p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.side-card-accent {
  background: linear-gradient(170deg, #fbfdfb, #f1f8f4);
  border-color: #dcece4;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 14px;
}

.side-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.side-list li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.side-list strong {
  font-size: 12.5px;
  color: var(--ink);
}

.side-list p {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

.success-panel {
  text-align: center;
  padding: 34px 12px;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 16px;
}

.success-panel h2 {
  font-size: 23px;
  margin-bottom: 8px;
}

.success-panel p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 40ch;
  margin-inline: auto;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Leaderboard
   ========================================================================== */
.leaderboard-hero {
  background: radial-gradient(900px 400px at 88% -40%, rgba(14, 122, 99, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(227, 162, 60, 0.07), transparent);
}

.leaderboard-hero .page-hero-inner {
  align-items: flex-end;
}

.range-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.range-tabs a {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  transition: 0.16s var(--ease);
}

.range-tabs a:hover {
  color: var(--ink);
}

.range-tabs a.is-active {
  background: var(--brand-dark);
  color: #fff;
}

.podium-lg {
  gap: 16px;
  padding: 34px 8px 14px;
  margin-bottom: 24px;
}

.podium-lg .podium-item {
  padding: 30px 14px 24px;
  border-radius: 22px;
}

.podium-lg .podium-1 {
  padding-top: 40px;
}

.podium-lg .podium-avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.podium-lg .podium-1 .podium-avatar {
  width: 78px;
  height: 78px;
  font-size: 27px;
}

.podium-lg .podium-name {
  font-size: 15px;
  margin-top: 2px;
}

.podium-lg .podium-amount {
  font-size: 15.5px;
  color: var(--brand-deep);
}

.podium-lg .podium-count {
  font-size: 11px;
}

.leaderboard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.leaderboard-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 96px 96px 140px;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
}

.leaderboard-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.leaderboard-head span:last-child,
.leaderboard-row .lb-amount {
  text-align: right;
}

.leaderboard-row {
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s var(--ease);
}

.leaderboard-row:last-of-type {
  border-bottom: none;
}

.leaderboard-row:hover {
  background: var(--brand-soft-2);
}

.lb-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-2);
}

.lb-person {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.lb-person > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lb-person strong {
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-person small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.lb-count,
.lb-families {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.lb-amount {
  font-size: 14px;
  font-weight: 750;
  color: var(--brand-deep);
  letter-spacing: -0.01em;
}

.leaderboard-more-empty {
  padding: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.leaderboard-more-empty .btn {
  margin-top: 10px;
}

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

.lb-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.lb-stat span {
  font-size: 11.5px;
  color: var(--muted);
}

.lb-stat strong {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.leaderboard-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.6;
}

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-page {
  padding: 44px 0 72px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 580px;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 46px;
  color: #effaf5;
  background: radial-gradient(600px 340px at 90% 0%, rgba(31, 158, 128, 0.55), transparent 60%),
    linear-gradient(150deg, #05271f, #0a4b3d 60%, #0c6450);
  overflow: hidden;
}

.auth-visual-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 162, 60, 0.25), transparent 65%);
  filter: blur(30px);
  bottom: -100px;
  right: -80px;
  pointer-events: none;
}

.auth-visual .brand {
  position: relative;
  z-index: 2;
}

.auth-visual h1 {
  position: relative;
  z-index: 2;
  margin: 40px 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  color: #f7fdfa;
  text-wrap: balance;
}

.auth-visual h1 span {
  display: block;
}

.auth-visual h1 span:last-child {
  color: #f5d79a;
}

.auth-visual > p {
  position: relative;
  z-index: 2;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(213, 240, 230, 0.72);
  max-width: 40ch;
}

.auth-points {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 28px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(222, 244, 235, 0.82);
}

.auth-points li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(95, 224, 184, 0.16);
  color: #8cf0cf;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-visual-link {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 30px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f0cd8a;
}

.auth-visual-link:hover {
  color: #ffe7b8;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
  background: var(--surface);
}

.auth-tabs {
  display: flex;
  padding: 4px;
  gap: 3px;
  background: var(--bg);
  border-radius: 999px;
  margin-bottom: 26px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  transition: 0.16s var(--ease);
}

.auth-tab.is-active {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 4px 10px -6px rgba(9, 44, 36, 0.4);
}

.auth-panel h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.auth-sub {
  margin: 7px 0 22px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-switch button {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--brand);
}

.auth-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-demo {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}

.brand-light .brand-text strong {
  color: #f4fcf8;
}

.brand-light .brand-text small {
  color: rgba(210, 238, 228, 0.55);
}

/* ==========================================================================
   Me
   ========================================================================== */
.me-loading {
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.login-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 66px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.login-wall h2 {
  font-size: 23px;
}

.login-wall p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.75;
}

.login-wall .btn {
  margin-top: 8px;
}

.me-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.me-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

.me-header-info {
  flex: 1;
  min-width: 0;
}

.me-header-info h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.me-header-info > p {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.me-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.me-rank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 14px 24px;
  border-radius: 18px;
  background: linear-gradient(150deg, #0a3f33, #062d25);
  color: #ecfaf4;
  text-align: center;
  min-width: 138px;
}

.me-rank-card span {
  font-size: 10.5px;
  color: rgba(212, 240, 229, 0.65);
}

.me-rank-card strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f5d79a;
  line-height: 1.2;
}

.me-rank-card small {
  font-size: 10px;
  color: rgba(212, 240, 229, 0.55);
}

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

.me-stat {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.me-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.me-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.me-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
}

.me-tab {
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: 0.16s var(--ease);
}

.me-tab:hover {
  color: var(--ink);
}

.me-tab.is-active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
}

.me-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.me-panel[hidden] {
  display: none;
}

.me-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.me-panel-head h3 {
  font-size: 16px;
}

.me-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.me-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: 0.16s var(--ease);
}

.me-item:hover {
  border-color: rgba(14, 122, 99, 0.25);
  background: var(--brand-soft-2);
}

.me-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--brand-soft);
  font-size: 18px;
  flex-shrink: 0;
}

.me-item-icon.is-paid {
  background: var(--gold-soft);
}

.me-item-body {
  flex: 1;
  min-width: 0;
}

.me-item-body h4 {
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-item-body h4 a:hover {
  color: var(--brand);
}

.me-item-body p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.me-item-amount {
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
}

.me-item-tag {
  font-size: 9.5px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}

.me-item-tag.is-paid {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.me-empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
}

.me-empty .empty-emoji {
  font-size: 28px;
}

.me-empty h4 {
  font-size: 14.5px;
  margin-bottom: 5px;
}

.me-empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 40ch;
  margin-inline: auto;
}

.me-empty .btn {
  margin-top: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.settings-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.settings-card h3 {
  font-size: 15px;
  margin-bottom: 16px;
}

.settings-card .btn {
  margin-top: 6px;
}

.settings-account {
  grid-column: 1 / -1;
}

.settings-account .btn {
  margin-top: 16px;
}

/* ==========================================================================
   Not found
   ========================================================================== */
.notfound-section {
  min-height: 62vh;
  display: flex;
  align-items: center;
}

.notfound-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.notfound-code {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(14, 122, 99, 0.28);
}

.notfound-inner h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.notfound-inner p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.75;
}

.notfound-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Admin
   ========================================================================== */
body.page-admin {
  background: #f2f4f2;
}

.admin-login {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.admin-login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 56px;
  color: #eefaf5;
  background: radial-gradient(700px 400px at 90% -10%, rgba(31, 158, 128, 0.5), transparent 60%),
    linear-gradient(150deg, #05251e, #093f33 55%, #0a5644);
  overflow: hidden;
}

.admin-login-visual h1 {
  position: relative;
  z-index: 2;
  margin: 54px 0 14px;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  letter-spacing: -0.04em;
  color: #f8fdfa;
}

.admin-login-visual > p {
  position: relative;
  z-index: 2;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(211, 239, 229, 0.7);
  max-width: 44ch;
}

.admin-login-visual .auth-points {
  margin-top: 30px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  background: #fff;
}

.admin-login-form > * {
  width: min(380px, 100%);
}

.admin-login-form h2 {
  font-size: 26px;
  letter-spacing: -0.03em;
  margin-top: 26px;
}

.admin-login-form > p {
  margin: 8px 0 22px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-lang {
  align-self: flex-end;
  width: auto;
  margin-left: auto;
}

.admin-back-link {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.admin-back-link:hover {
  color: var(--brand);
}

.admin-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  background: radial-gradient(500px 300px at 20% 0%, rgba(23, 133, 108, 0.3), transparent 60%),
    linear-gradient(180deg, #062b23, #051f1a);
  color: #d7ebe3;
  z-index: 40;
}

.admin-brand {
  padding: 0 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: rgba(211, 235, 226, 0.68);
  transition: 0.16s var(--ease);
}

.admin-nav-item span {
  width: 17px;
  text-align: center;
  opacity: 0.8;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f2fbf7;
}

.admin-nav-item.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  box-shadow: inset 2px 0 0 #6bdcb7;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-side-link {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 550;
  color: rgba(205, 231, 221, 0.6);
  text-align: left;
}

.admin-side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.admin-topbar-title {
  flex: 1;
  min-width: 0;
}

.admin-topbar-title h1 {
  font-size: 20px;
  letter-spacing: -0.025em;
}

.admin-topbar-title p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  white-space: nowrap;
}

.admin-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 7px;
  border-radius: 8px;
}

.admin-menu-btn span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.admin-content {
  flex: 1;
  padding: 26px 28px 40px;
  max-width: 1440px;
  width: 100%;
}

.admin-view {
  display: none;
}

.admin-view.is-active {
  display: block;
  animation: viewIn 0.22s var(--ease);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.admin-card {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.admin-card:last-child {
  margin-bottom: 0;
}

.admin-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-card-head h2 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.admin-muted {
  font-size: 11px;
  color: var(--muted-2);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1240px) {
  .admin-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-stat {
  position: relative;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.admin-stat::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--stat-tone, var(--brand-soft));
  opacity: 0.55;
}

.admin-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.admin-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.admin-stat small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.admin-two-col .admin-card {
  margin-bottom: 0;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 196px;
  padding-top: 12px;
}

.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.trend-bar {
  width: min(46px, 72%);
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #19a98c, #0b5a48);
  transition: height 0.4s var(--ease);
  position: relative;
}

.trend-bar:hover {
  background: linear-gradient(180deg, #f0b45a, #cf8a24);
}

.trend-bar-value {
  font-size: 9.5px;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.trend-col-label {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.admin-top-helpers,
.admin-recent,
.admin-runtime {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-helper-row,
.admin-recent-row,
.admin-runtime-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
  border-bottom: 1px dashed var(--line);
}

.admin-helper-row:last-child,
.admin-recent-row:last-child,
.admin-runtime-row:last-child {
  border-bottom: none;
}

.admin-helper-rank {
  width: 18px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted-2);
  text-align: center;
}

.admin-helper-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-helper-amount,
.admin-recent-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
}

.admin-recent-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-recent-time {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.admin-runtime-row {
  justify-content: space-between;
  font-size: 12px;
}

.admin-runtime-row span {
  color: var(--muted);
}

.admin-runtime-row b {
  font-weight: 650;
  color: var(--ink);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.admin-select {
  width: auto;
  min-width: 130px;
  padding: 8px 32px 8px 12px;
  font-size: 12px;
  border-radius: 999px;
  background-color: #fff;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #fafcfb;
}

.admin-table .cell-title {
  max-width: 320px;
}

.admin-table .cell-title a {
  font-weight: 600;
  color: var(--ink);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.admin-table .cell-title a:hover {
  color: var(--brand);
}

.admin-table .cell-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.admin-table .cell-amount {
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
}

.admin-table .cell-actions {
  white-space: nowrap;
}

.admin-table .cell-actions button {
  font-size: 10.5px;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 7px;
  margin-right: 4px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  transition: 0.15s var(--ease);
}

.admin-table .cell-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.admin-table .cell-actions button.danger {
  color: var(--danger);
  border-color: #efd0cd;
}

.admin-table .cell-actions button.danger:hover {
  background: var(--danger-soft);
}

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-badge.open {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.admin-badge.paid {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.admin-badge.hidden {
  background: #f0eeee;
  color: #8a7d7d;
}

.admin-badge.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.admin-badge.disabled {
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-badge.admin-role {
  background: #eef0fd;
  color: #4d57bd;
}

.admin-badge.user-role {
  background: var(--surface-2);
  color: var(--muted);
}

.admin-empty-row td {
  text-align: center;
  color: var(--muted-2);
  padding: 40px 10px;
  font-size: 12px;
}

.admin-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}

.admin-pager button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.admin-pager button:hover:not([disabled]) {
  border-color: var(--brand);
  color: var(--brand);
}

.admin-pager button[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.export-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: left;
  transition: 0.16s var(--ease);
}

.export-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft-2);
  transform: translateY(-2px);
}

.export-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 15px;
  margin-bottom: 8px;
}

.export-card strong {
  font-size: 13px;
}

.export-card small {
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero-panel {
    max-width: 520px;
  }

  .hero {
    padding-bottom: 112px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .publish-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(1180px, 100% - 36px);
  }

  .main-nav {
    display: none;
  }

  .header-inner {
    gap: 12px;
    height: 64px;
  }

  .header-actions {
    margin-left: auto;
  }

  .user-chip span.user-chip-name {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  body {
    padding-bottom: 72px;
  }

  body.page-admin {
    padding-bottom: 0;
  }

  .hero {
    padding: 44px 0 104px;
    border-radius: 0 0 32px 32px;
  }

  .hero-title-lead,
.hero-title-accent {
  display: block;
}

.hero-title-accent {
  background: linear-gradient(100deg, #fffaf0 10%, #f3cf8c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
    font-size: 14.5px;
  }

  .stats-strip-wrap {
    margin-top: -60px;
  }

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

  .stat-cell {
    padding: 18px;
  }

  .stat-cell:nth-child(2) {
    border-right: none;
  }

  .stat-cell:nth-child(1),
  .stat-cell:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head.center {
    align-items: center;
  }

  .steps-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer {
    border-radius: 26px 26px 0 0;
    padding-top: 40px;
  }

  .detail-grid,
  .publish-grid {
    grid-template-columns: 1fr;
  }

  .detail-side,
  .publish-side {
    position: static;
  }

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

  .leaderboard-hero .page-hero-inner {
    align-items: flex-start;
  }

  .leaderboard-head,
  .leaderboard-row {
    grid-template-columns: 44px minmax(0, 1fr) 74px 110px;
    padding: 12px 18px;
  }

  .leaderboard-head span:nth-child(3),
  .leaderboard-row .lb-count {
    display: none;
  }

  .leaderboard-head span:nth-child(4) {
    text-align: center;
  }

  .lb-families {
    text-align: center;
  }

  .leaderboard-stats,
  .me-stats {
    grid-template-columns: 1fr 1fr;
  }

  .podium-lg {
    gap: 8px;
  }

  .podium-lg .podium-item {
    padding: 22px 8px 18px;
  }

  .podium-lg .podium-1 {
    padding-top: 30px;
  }

  .podium-lg .podium-avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .podium-lg .podium-1 .podium-avatar {
    width: 60px;
    height: 60px;
    font-size: 21px;
  }

  .podium-lg .podium-amount {
    font-size: 13px;
  }

  .podium-lg .podium-name {
    font-size: 13px;
  }

  .podium-lg .podium-count {
    display: none;
  }

  .auth-grid,
  .admin-login {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-visual {
    padding: 36px 30px;
  }

  .auth-visual h1 {
    margin-top: 26px;
    font-size: 1.65rem;
  }

  .auth-points {
    display: none;
  }

  .auth-visual-link {
    display: none;
  }

  .auth-card {
    padding: 32px 26px;
  }

  .auth-page {
    padding: 24px 0 46px;
  }

  .admin-login-visual {
    padding: 34px 28px;
    min-height: 250px;
  }

  .admin-login-visual h1 {
    margin-top: 22px;
    font-size: 1.8rem;
  }

  .admin-login-visual .auth-points {
    display: none;
  }

  .admin-login-form {
    padding: 34px 26px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 252px;
    transform: translateX(-104%);
    transition: transform 0.24s var(--ease);
    box-shadow: 20px 0 50px -30px rgba(0, 0, 0, 0.6);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-menu-btn {
    display: flex;
  }

  .admin-topbar {
    padding: 13px 18px;
  }

  .admin-topbar-title h1 {
    font-size: 17px;
  }

  .admin-topbar-title p {
    display: none;
  }

  .admin-user {
    display: none;
  }

  .admin-content {
    padding: 18px 16px 34px;
  }

  .admin-card {
    padding: 18px 16px;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 28, 23, 0.45);
    z-index: 35;
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    gap: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .lang-switch button {
    padding: 4px 7px;
    font-size: 10px;
  }

  .header-actions .user-chip {
    padding-right: 4px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    font-size: 8.5px;
  }

  .hero {
    padding: 36px 0 92px;
  }

  .hero-badge {
    font-size: 10.5px;
    padding: 6px 11px;
  }

  .hero-title {
    margin: 16px 0 14px;
    font-size: 2.05rem;
  }

  .hero-title-lead,
.hero-title-accent {
  display: block;
}

.hero-title-accent {
  background: linear-gradient(100deg, #fffaf0 10%, #f3cf8c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
    font-size: 13.5px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 22px;
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
  }

  .hero-note {
    font-size: 11px;
  }

  .hero-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-panel-amount {
    font-size: 2rem;
  }

  .hero-panel-mini span {
    font-size: 9.5px;
  }

  .hero-panel-mini b {
    font-size: 15px;
  }

  .stats-strip {
    border-radius: 18px;
  }

  .stat-cell {
    gap: 10px;
    padding: 15px 13px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .stat-cell strong {
    font-size: 20px;
  }

  .stat-cell span {
    font-size: 10.5px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head h2 {
    font-size: 1.35rem;
  }

  .panel {
    padding: 20px 16px;
  }

  .bill-grid {
    grid-template-columns: 1fr;
  }

  .bill-card {
    padding: 19px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cta-band-actions {
    width: 100%;
  }

  .cta-band-actions .btn {
    flex: 1;
  }

  .filter-bar {
    padding: 14px;
  }

  .filter-row {
    gap: 10px;
  }

  .filter-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .filter-tabs button {
    flex: 1;
    padding: 7px 6px;
  }

  .filter-search {
    min-width: 100%;
    order: 3;
  }

  .filter-sort {
    flex: 1;
  }

  .filter-sort select {
    width: 100%;
  }

  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .cat-filter {
    flex-shrink: 0;
  }

  .detail-main {
    padding: 22px 18px;
  }

  .detail-title {
    font-size: 1.4rem;
  }

  .detail-amount-card {
    padding: 16px;
  }

  .info-row {
    flex-direction: column;
    gap: 3px;
  }

  .info-value {
    text-align: left;
    max-width: 100%;
  }

  .form-card {
    padding: 22px 18px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-card {
    padding: 26px 20px;
  }

  .auth-visual {
    padding: 28px 22px;
  }

  .auth-visual > p {
    display: none;
  }

  .auth-grid {
    border-radius: 22px;
  }

  .me-header {
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px;
  }

  .me-header-info {
    flex-basis: calc(100% - 96px);
  }

  .me-header-info h2 {
    font-size: 20px;
  }

  .me-rank-card {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
  }

  .me-rank-card strong {
    font-size: 20px;
  }

  .me-stats {
    gap: 10px;
  }

  .me-stat {
    padding: 14px;
  }

  .me-stat strong {
    font-size: 18px;
  }

  .me-panel {
    padding: 18px 14px;
  }

  .me-item {
    padding: 12px;
    gap: 10px;
  }

  .me-item-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-head,
  .leaderboard-row {
    grid-template-columns: 34px minmax(0, 1fr) 96px;
    padding: 11px 14px;
    gap: 8px;
  }

  .leaderboard-head span:nth-child(3),
  .leaderboard-head span:nth-child(4),
  .leaderboard-row .lb-count,
  .leaderboard-row .lb-families {
    display: none;
  }

  .lb-amount {
    font-size: 13px;
  }

  .podium-lg {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .podium-name {
    font-size: 12px;
  }

  .podium-amount {
    font-size: 12px;
  }

  .range-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .range-tabs a {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 11px;
  }

  .toast-root {
    left: 16px;
    right: 16px;
    bottom: 84px;
    max-width: none;
  }

  .modal-card {
    padding: 22px;
  }

  .notfound-code {
    font-size: 5.5rem;
  }
}
