/* DrawScope · red / gold visual system */
:root {
  --bg: #f5eee4;
  --bg-deep: #efe2d1;
  --surface: #fffdf9;
  --surface-soft: #fbf5ec;
  --ink: #2b1512;
  --ink-2: #5f3d34;
  --muted: #9a7d6f;
  --line: #eadccb;
  --line-strong: #dcc5aa;
  --red: #b31722;
  --red-deep: #8a0f18;
  --red-bright: #d92d3a;
  --red-soft: #fbe8e8;
  --gold: #c9973f;
  --gold-deep: #966a21;
  --gold-soft: #fbf0d9;
  --gold-light: #f3d9a5;
  --blue: #234e9b;
  --green: #1f6b4f;
  --shadow: 0 10px 28px rgba(92, 28, 22, 0.08);
  --shadow-soft: 0 4px 14px rgba(92, 28, 22, 0.05);
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: #e9dccb;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(201, 151, 63, 0.18), transparent 34%),
    radial-gradient(circle at 92% 22%, rgba(179, 23, 34, 0.08), transparent 36%),
    #e9dccb;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sheet-open {
  overflow: hidden;
}

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

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

button {
  color: inherit;
}

img,
svg {
  display: block;
}

::selection {
  background: var(--gold-light);
  color: var(--red-deep);
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 248, 236, 0.55), transparent 46%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.18), transparent 38%);
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(59, 24, 18, 0.16);
  overflow-x: hidden;
}

.view {
  min-height: 60vh;
  padding: 0 16px calc(96px + var(--safe-bottom));
  outline: none;
}

body.no-tabbar .view {
  padding-bottom: calc(36px + var(--safe-bottom));
}

.page {
  animation: pageIn 0.32s cubic-bezier(0.22, 0.7, 0.3, 1) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

/* ---------- top bars ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar--brand {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background:
    radial-gradient(circle at 92% -20%, rgba(243, 217, 165, 0.28), transparent 42%),
    linear-gradient(128deg, #820e18 0%, #a8121c 48%, #c4202c 100%);
  border-bottom: 1px solid rgba(243, 217, 165, 0.38);
  box-shadow: 0 8px 22px rgba(100, 12, 20, 0.2);
}

.topbar--sub {
  min-height: 60px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background:
    radial-gradient(circle at 84% -40%, rgba(243, 217, 165, 0.24), transparent 42%),
    linear-gradient(128deg, #820e18 0%, #a8121c 52%, #c4202c 100%);
  border-bottom: 1px solid rgba(243, 217, 165, 0.32);
  box-shadow: 0 6px 18px rgba(100, 12, 20, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-logo {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  filter: drop-shadow(0 4px 8px rgba(54, 5, 10, 0.25));
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

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

.brand-copy strong {
  color: #fff9ef;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.brand-copy small {
  color: #f0d7a8;
  font-size: 9.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
  letter-spacing: 0.01em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  padding: 2px;
  border: 1px solid rgba(255, 246, 230, 0.28);
  border-radius: 999px;
  background: rgba(72, 5, 12, 0.22);
}

.lang-switch button {
  min-width: 29px;
  height: 25px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 248, 236, 0.68);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 6px;
}

.lang-switch button.is-active {
  background: #fff8ec;
  color: var(--red-deep);
  box-shadow: 0 1px 4px rgba(54, 5, 10, 0.25);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn--light {
  color: #fff8ec;
  border-color: rgba(255, 246, 230, 0.22);
  background: rgba(255, 248, 236, 0.1);
}

.icon-btn--danger {
  color: var(--red);
  background: var(--red-soft);
}

.sub-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.sub-title strong {
  color: #fff9ef;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-title small {
  color: #e7c996;
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sub-actions {
  width: 36px;
  display: flex;
  justify-content: flex-end;
}

.topbar-spacer {
  width: 36px;
}

/* ---------- bottom navigation ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 70;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 7px 10px calc(7px + var(--safe-bottom));
  background: rgba(255, 252, 246, 0.96);
  border-top: 1px solid rgba(222, 201, 174, 0.8);
  box-shadow: 0 -8px 24px rgba(83, 31, 22, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 0 0;
  color: #9e8274;
  min-width: 0;
}

.tab-icon {
  width: 36px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

.tab-icon .icon {
  width: 21px;
  height: 21px;
}

.tab-label {
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.tab.is-active {
  color: var(--red);
}

.tab.is-active .tab-icon {
  background: var(--red-soft);
}

.tab--center .tab-icon {
  width: 50px;
  height: 50px;
  margin-top: -24px;
  border-radius: 50%;
  border: 3px solid #fffaf1;
  color: #fff8ec;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 233, 190, 0.32), transparent 34%),
    linear-gradient(145deg, #d92d3a, #8a0f18);
  box-shadow: 0 7px 16px rgba(138, 15, 24, 0.32);
}

.tab--center .tab-icon .icon {
  width: 24px;
  height: 24px;
}

.tab--center.is-active .tab-icon {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 233, 190, 0.4), transparent 34%),
    linear-gradient(145deg, #e54950, #a8121c);
  box-shadow: 0 7px 18px rgba(138, 15, 24, 0.4);
}

.tab--center .tab-label {
  margin-top: 1px;
}

/* ---------- shared ---------- */
.eyebrow {
  display: block;
  color: var(--gold-deep);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 14px;
}

.page-head h1 {
  margin: 4px 0 5px;
  color: var(--red-deep);
  font-size: 27px;
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.page-head p {
  margin: 0;
  max-width: 330px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.section {
  margin-top: 24px;
}

.section--tight {
  margin-top: 18px;
}

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

.section-head-copy {
  position: relative;
  min-width: 0;
  padding-left: 10px;
}

.section-line {
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--red));
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--red);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  padding-bottom: 2px;
}

.section-link .icon {
  width: 14px;
  height: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn--primary {
  color: #fff9ef;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 228, 180, 0.28), transparent 40%),
    linear-gradient(135deg, #c4202c, #8a0f18);
  box-shadow: 0 6px 14px rgba(138, 15, 24, 0.22);
}

.btn--sm {
  min-height: 33px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 10.5px;
}

.btn--light {
  color: var(--red-deep);
  background: #fff8ec;
  border-color: rgba(255, 248, 236, 0.5);
}

.btn--ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line);
}

.btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #b31722, #7c0b13);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--official {
  color: #176244;
  background: #eaf7f0;
  border-color: #cfe8dc;
}

.badge--unofficial {
  color: #8b5b13;
  background: #fff6e4;
  border-color: #efd8ae;
}

.badge--manual {
  color: #6f4b3c;
  background: #f6ece3;
  border-color: #e8d5c5;
}

.badge--sample {
  color: #775d50;
  background: #f5eee7;
  border-color: #e9dacc;
}

.badge--random {
  color: #6d4a8e;
  background: #f3edfb;
  border-color: #dfd0f0;
}

.badge--partial {
  color: #8b5b13;
  background: #fff6e4;
  border-color: #efd8ae;
}

.badge--soft {
  color: var(--red-deep);
  background: var(--red-soft);
  border-color: #f1cdcd;
}

.badge--on-red {
  color: #fff6e6;
  background: rgba(255, 248, 236, 0.14);
  border-color: rgba(255, 248, 236, 0.28);
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 7px 2px 3px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--game, var(--red)) 24%, transparent);
  background: var(--game-soft, var(--red-soft));
  color: var(--game, var(--red));
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.game-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  color: #fff;
  background: var(--game, var(--red));
  font-style: normal;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.game-badge--general {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-soft);
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--muted);
  background: #f5eee7;
  border: 1px solid #eadccb;
  font-size: 8px;
  font-weight: 700;
}

.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 10px 0;
  padding: 9px 10px;
  border-radius: 10px;
  color: #7a4e18;
  background: #fff6e4;
  border: 1px solid #efd8ae;
  font-size: 10px;
  line-height: 1.5;
}

.inline-alert .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.inline-alert--warm {
  color: #77433a;
  background: #fdf0e9;
  border-color: #efd3c3;
}

.source-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 14px 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.source-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--gold-deep);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 26px 18px;
}

.empty--panel {
  margin: 14px 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.7);
}

.empty--compact {
  padding: 24px 14px;
}

.empty--small {
  padding: 18px 10px;
}

.empty--tall {
  min-height: 55vh;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f0cece;
}

.empty-icon .icon {
  width: 21px;
  height: 21px;
}

.empty h3,
.empty h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.empty p {
  margin: 0 0 3px;
  max-width: 270px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

/* ---------- home ---------- */
.home-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 2px 14px;
}

.home-intro h1 {
  margin: 5px 0 4px;
  color: var(--red-deep);
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.home-intro p {
  margin: 0;
  max-width: 310px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.year-stamp {
  color: rgba(150, 106, 33, 0.22);
  font-size: 42px;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
}

.ticker {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #e7c58a;
  border-radius: 10px;
  background: linear-gradient(90deg, #f8e7c4, #f3d9a5 46%, #f8e7c4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.ticker-track {
  display: flex;
  width: 100%;
  justify-content: center;
}

.ticker-track span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 12px;
  overflow: hidden;
  color: #6d3d12;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.ticker-track .icon {
  width: 12px;
  height: 12px;
  color: #9b651a;
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.featured {
  position: relative;
}

.draw-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.draw-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.78);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.draw-tab-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  border-radius: 5px;
  color: var(--game, var(--red));
  background: #f5ece2;
  font-size: 7px;
  font-weight: 800;
}

.draw-tab.is-active {
  color: #fff8ec;
  border-color: var(--game, var(--red));
  background: var(--game, var(--red));
  box-shadow: 0 5px 12px color-mix(in srgb, var(--game, var(--red)) 22%, transparent);
}

.draw-tab.is-active .draw-tab-mark {
  color: var(--game, var(--red));
  background: #fff8ec;
}

.draw-card {
  position: relative;
  overflow: hidden;
  padding: 15px 15px 13px;
  border: 1px solid #e7d4bb;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 151, 63, 0.09), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.draw-card::before {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--game, var(--red)), var(--gold), var(--game, var(--red)));
  opacity: 0.9;
}

.draw-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.draw-card-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-deep);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.draw-card-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.issue-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid #ecd7b1;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.draw-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.draw-card-meta i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #cbb3a2;
}

.draw-card-balls {
  margin: 18px 0 8px;
}

.zodiac-note {
  margin: 0 0 8px;
  text-align: center;
  color: #b29a8a;
  font-size: 8px;
}

.draw-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px dashed #ead8c3;
}

.next-draw {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.next-draw span {
  color: var(--muted);
  font-size: 8.5px;
}

.countdown {
  color: var(--red-deep);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.countdown--none {
  color: var(--muted);
  font-weight: 500;
}

.draw-card--empty {
  padding: 0;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 9px 3px 0;
  color: #9b7f70;
  font-size: 9px;
  line-height: 1.5;
}

.feed-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--gold-deep);
}

/* ---------- balls ---------- */
.ball-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ball-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  border: 1px solid transparent;
}

.ball--lg {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.ball--md {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.ball--sm {
  width: 26px;
  height: 26px;
  font-size: 9.5px;
}

.ball--xs {
  width: 23px;
  height: 23px;
  font-size: 8.5px;
}

.ball--xl {
  width: 39px;
  height: 39px;
  font-size: 14px;
}

.ball--main {
  color: var(--game-deep, var(--red-deep));
  background: #fffdf8;
  border-color: #ead5bd;
  box-shadow: 0 3px 8px rgba(78, 35, 20, 0.1), inset 0 1px 0 #fff;
}

.ball--special {
  color: #fffaf0;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.5), transparent 30%),
    linear-gradient(145deg, #e5b55f, #b7791f);
  border-color: #d7a44a;
  box-shadow: 0 3px 9px rgba(151, 99, 26, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ball--star {
  color: #fffaf0;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.5), transparent 30%),
    linear-gradient(145deg, #e5b55f, #b7791f);
  border-color: #d7a44a;
}

.ball-plus {
  align-self: center;
  margin: 0 0 10px;
  color: #b79884;
  font-size: 12px;
  font-weight: 700;
}

.ball-row--zodiac .ball-plus {
  margin-bottom: 16px;
}

.zodiac-label {
  display: block;
  max-width: 38px;
  color: #a88c7b;
  font-size: 7.5px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- quick grid ---------- */
.quick-section {
  margin-top: 16px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 83px;
  padding: 11px 3px 8px;
  border: 1px solid #eddfcf;
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: 0 3px 10px rgba(92, 28, 22, 0.035);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.quick-item:active {
  transform: scale(0.97);
}

.quick-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 9px rgba(77, 28, 18, 0.14);
}

.quick-icon .icon {
  width: 18px;
  height: 18px;
}

.quick-item--red .quick-icon {
  background: linear-gradient(145deg, #e5484d, #a8121c);
}

.quick-item--gold .quick-icon {
  background: linear-gradient(145deg, #e4b45e, #a56e18);
}

.quick-item--blue .quick-icon {
  background: linear-gradient(145deg, #4d74ba, #234e9b);
}

.quick-item--green .quick-icon {
  background: linear-gradient(145deg, #3d9a76, #1f6b4f);
}

.quick-label {
  color: var(--ink-2);
  font-size: 9.5px;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
}

.quick-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--red-deep);
  background: #f8d98f;
  border: 1px solid #efc66e;
  font-size: 6.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* ---------- post cards ---------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.post-card {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 13px;
  border: 1px solid #eddfcf;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.post-card:active {
  transform: scale(0.992);
}

.post-card--feature {
  padding: 15px;
  border-color: #e4cfb3;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 151, 63, 0.11), transparent 38%),
    linear-gradient(145deg, #fffdf9, #fff8ee);
  box-shadow: 0 8px 22px rgba(92, 28, 22, 0.07);
}

.post-card--feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 3px;
  height: 39px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--red), var(--gold));
}

.post-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
}

.post-time {
  margin-left: auto;
  color: #ae9586;
  font-size: 8px;
  white-space: nowrap;
}

.post-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card--feature .post-title {
  font-size: 17px;
  line-height: 1.35;
}

.post-excerpt {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  margin: 5px 0 10px;
  padding: 4px 0 0;
}

.mini-chart i {
  flex: 1;
  min-height: 4px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #d6a24d, #e9d3ae);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px dashed #eddfcf;
}

.post-author-name {
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
}

.post-read {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: #ae9586;
  font-size: 8px;
}

.post-read .icon {
  width: 10px;
  height: 10px;
}

.post-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  color: #9c8274;
  font-size: 8.5px;
}

.post-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.post-stats .icon {
  width: 11px;
  height: 11px;
}

.post-stats-read {
  margin-left: auto;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff8ec;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 248, 236, 0.28), transparent 38%),
    var(--avatar, var(--red));
  border: 2px solid #fffaf2;
  box-shadow: 0 2px 6px rgba(74, 31, 20, 0.16);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.avatar--sm {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  font-size: 8px;
  border-width: 1.5px;
}

.avatar--lg {
  width: 60px;
  height: 60px;
  flex-basis: 60px;
  font-size: 17px;
  border-width: 2.5px;
}

/* ---------- leaderboard ---------- */
.leader-card {
  padding: 3px 11px;
  border: 1px solid #e8d6bf;
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 151, 63, 0.09), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.leader-card--full {
  padding: 3px 12px;
}

.contributor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  border-bottom: 1px dashed #eddfcf;
}

.contributor-row:last-child {
  border-bottom: 0;
}

.contributor-row--compact {
  min-height: 49px;
}

.rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  color: #9b7f70;
  background: #f6efe7;
  font-size: 9px;
  font-weight: 800;
}

.rank .icon {
  width: 12px;
  height: 12px;
}

.rank.gold {
  color: #7b530e;
  background: linear-gradient(145deg, #f8dda3, #e9bd68);
  box-shadow: 0 2px 5px rgba(151, 99, 26, 0.2);
}

.rank.silver {
  color: #5e5b57;
  background: linear-gradient(145deg, #f0f0ed, #cac7bf);
}

.rank.bronze {
  color: #6f3e24;
  background: linear-gradient(145deg, #efc2a2, #c98a60);
}

.contributor-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.contributor-copy strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contributor-copy small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.contributor-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  flex: 0 0 auto;
}

.contributor-score strong {
  color: var(--red);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.contributor-score small {
  color: var(--muted);
  font-size: 7.5px;
}

/* ---------- upcoming ---------- */
.upcoming-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.upcoming-rail::-webkit-scrollbar {
  display: none;
}

.upcoming-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 128px;
  padding: 10px 11px;
  border: 1px solid #e9d7c0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--game) 10%, transparent), transparent 48%),
    #fffdf9;
  box-shadow: var(--shadow-soft);
}

.upcoming-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  border-radius: 7px;
  color: #fff8ec;
  background: var(--game);
  font-size: 7px;
  font-weight: 800;
}

.upcoming-card strong {
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.upcoming-countdown {
  margin-top: 4px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- footer ---------- */
.app-footer {
  margin: 28px 0 0;
  padding: 18px 2px 8px;
  border-top: 1px solid #e5d4bf;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 7px;
}

.footer-brand > svg {
  width: 31px;
  height: 31px;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.footer-brand small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.app-footer p {
  margin: 0 auto 8px;
  max-width: 300px;
  color: #96796d;
  font-size: 9px;
  line-height: 1.55;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #a68b7c;
  font-size: 8px;
}

.footer-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.footer-meta .icon {
  width: 11px;
  height: 11px;
}

/* ---------- results ---------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 43px;
  padding: 0 11px;
  border: 1px solid #e5d2ba;
  border-radius: 13px;
  background: #fffdf9;
  box-shadow: 0 3px 10px rgba(92, 28, 22, 0.035);
}

.search-box > .icon {
  width: 17px;
  height: 17px;
  color: var(--gold-deep);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
}

.search-box input::placeholder {
  color: #b39b8c;
}

.search-clear.is-hidden {
  display: none;
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4ebe1;
  color: var(--muted);
  cursor: pointer;
}

.search-clear .icon {
  width: 13px;
  height: 13px;
}

.chip-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 11px 1px 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e7d5c0;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.chip.is-active {
  color: #fff8ec;
  border-color: var(--red);
  background: linear-gradient(135deg, #c4202c, #8e111b);
  box-shadow: 0 4px 10px rgba(138, 15, 24, 0.18);
}

.results-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 1px 3px;
}

#results-count {
  color: var(--red-deep);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.summary-note {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  max-width: 235px;
  color: #a88d7e;
  font-size: 8px;
  line-height: 1.4;
  text-align: right;
}

.summary-note .icon {
  width: 10px;
  height: 10px;
  margin-top: 1px;
}

.date-group {
  margin-top: 13px;
}

.date-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 6px;
  color: #8b6d5d;
  font-size: 9px;
  font-weight: 700;
}

.date-label span {
  white-space: nowrap;
}

.date-label i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #e5d2ba, transparent);
}

.result-card {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  padding: 12px 12px 9px;
  border: 1px solid #ebdccb;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--game) 7%, transparent), transparent 37%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.result-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 2px;
  height: 24px;
  border-radius: 0 2px 2px 0;
  background: var(--game);
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.result-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.result-issue {
  color: #8c6e5e;
  font-size: 8.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.result-date {
  color: #aa8f80;
  font-size: 8px;
  white-space: nowrap;
}

.result-balls {
  margin: 9px 0 6px;
}

.result-balls .ball-row {
  justify-content: flex-start;
}

.result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #eddfcf;
  color: #a68b7c;
  font-size: 8px;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 700;
}

.result-link .icon {
  width: 12px;
  height: 12px;
}

/* ---------- draw detail ---------- */
.page--draw {
  padding-top: 13px;
}

.draw-ticket {
  position: relative;
  overflow: hidden;
  padding: 17px 17px 14px;
  border-radius: 23px;
  color: #fff8ec;
  background:
    radial-gradient(circle at 88% 4%, rgba(243, 217, 165, 0.26), transparent 36%),
    radial-gradient(circle at 0% 96%, rgba(74, 4, 10, 0.24), transparent 44%),
    linear-gradient(135deg, #8a0f18 0%, #a8121c 48%, #c4202c 100%);
  border: 1px solid rgba(243, 217, 165, 0.28);
  box-shadow: 0 16px 34px rgba(114, 14, 23, 0.24);
}

.draw-ticket-glow {
  position: absolute;
  right: -70px;
  top: -90px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(243, 217, 165, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.draw-ticket-glow::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(243, 217, 165, 0.13);
  border-radius: 50%;
}

.draw-ticket-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.draw-ticket-top > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-issue {
  color: #f1d8a8;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.draw-ticket-date {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: #edcf9e;
  font-size: 9px;
  line-height: 1.45;
}

.draw-ticket-balls {
  position: relative;
  z-index: 1;
  margin: 20px 0 8px;
}

.draw-ticket-balls .ball--main {
  color: var(--game-deep, var(--red-deep));
  background: #fffaf0;
  border-color: rgba(255, 248, 236, 0.8);
  box-shadow: 0 4px 10px rgba(58, 5, 10, 0.2);
}

.draw-ticket-balls .ball--special {
  color: #6f470b;
  background: linear-gradient(145deg, #f8dfab, #d8a94f);
  border-color: #f2d397;
  box-shadow: 0 4px 10px rgba(58, 5, 10, 0.2);
}

.draw-ticket-balls .ball-plus {
  color: #f0d7a8;
}

.draw-ticket-balls .zodiac-label {
  color: #f1d8a8;
}

.ticket-zodiac {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  color: #e6c58f;
  font-size: 8px;
}

.ticket-divider {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 11px;
}

.ticket-divider span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(243, 217, 165, 0.7);
}

.ticket-divider i {
  flex: 1;
  border-top: 1px dashed rgba(243, 217, 165, 0.36);
}

.ticket-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 0.95fr 1.2fr;
  gap: 7px;
}

.ticket-meta div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-meta small {
  color: #d9b77f;
  font-size: 7.5px;
  line-height: 1.3;
}

.ticket-meta strong {
  color: #fff8ec;
  font-size: 9.5px;
  line-height: 1.35;
  font-weight: 600;
  word-break: break-word;
}

.ticket-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
}

.ticket-next {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e8c996;
  font-size: 8px;
}

.ticket-next .countdown {
  color: #fff1d7;
  font-size: 10px;
}

.draw-action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 11px 0 13px;
}

.draw-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px;
  border: 1px solid #e7d4bb;
  border-radius: 11px;
  background: rgba(255, 253, 249, 0.8);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.draw-action .icon {
  width: 14px;
  height: 14px;
  color: var(--gold-deep);
}

.panel {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #e9d8c2;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

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

.panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-head > span {
  max-width: 200px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
  text-align: right;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fbf6ee;
  border: 1px solid #f0e4d4;
}

.stat-cell:nth-child(5) {
  grid-column: span 2;
}

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

.stat-cell strong {
  color: var(--red-deep);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.prize-table {
  overflow: hidden;
  border: 1px solid #f0e2d2;
  border-radius: 11px;
}

.prize-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 6px 10px;
  border-bottom: 1px solid #f2e7d8;
}

.prize-row:last-child {
  border-bottom: 0;
}

.prize-row--head {
  min-height: 29px;
  color: var(--muted);
  background: #fbf6ee;
  font-size: 8px;
  font-weight: 700;
}

.prize-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
}

.prize-name small {
  color: #a98e7e;
  font-size: 8px;
  font-weight: 500;
}

.prize-amount {
  text-align: right;
  color: var(--gold-deep);
  font-size: 8.5px;
  font-weight: 700;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 700;
}

.panel-link .icon {
  width: 12px;
  height: 12px;
}

.recent-list {
  overflow: hidden;
  border: 1px solid #f0e2d2;
  border-radius: 11px;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 6px 9px;
  border-bottom: 1px solid #f2e7d8;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-issue {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 54px;
  flex: 0 0 54px;
}

.recent-issue strong {
  color: var(--ink-2);
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.recent-issue small {
  color: #a48a7b;
  font-size: 7px;
}

.recent-balls {
  flex: 1;
  min-width: 0;
}

.recent-balls .ball-row {
  justify-content: flex-start;
  gap: 3px;
}

.recent-balls .ball--xs {
  width: 20px;
  height: 20px;
  font-size: 7.5px;
}

.recent-balls .ball-plus {
  margin-bottom: 0;
  font-size: 9px;
}

.recent-row > .icon {
  width: 12px;
  height: 12px;
  color: #c3aa98;
  flex: 0 0 12px;
}

.draw-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.draw-pager .btn {
  width: 100%;
}

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 12px 2px 0;
  color: #9c8274;
  font-size: 8.5px;
  line-height: 1.55;
}

.disclaimer .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--gold-deep);
}

/* ---------- article ---------- */
.article {
  margin-top: 13px;
  padding: 18px 17px 14px;
  border: 1px solid #e8d6bf;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.article-time {
  margin-left: auto;
  color: #aa8f80;
  font-size: 8px;
}

.article-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.article-deck {
  margin: 0 0 13px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0 12px;
  border-top: 1px solid #f0e4d4;
  border-bottom: 1px solid #f0e4d4;
}

.byline-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.byline-copy strong {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
}

.byline-copy small {
  color: var(--muted);
  font-size: 8px;
}

.article-body {
  padding: 12px 0 2px;
}

.article-body p {
  margin: 0 0 13px;
  color: #3f2924;
  font-size: 13.5px;
  line-height: 1.85;
  letter-spacing: 0.002em;
}

.chart {
  margin: 10px 0 14px;
  padding: 12px 10px 8px;
  border: 1px solid #eddfcf;
  border-radius: 13px;
  background: linear-gradient(180deg, #fffdf9, #fbf5ec);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 112px;
}

.chart-column {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 3px;
}

.chart-value {
  color: var(--gold-deep);
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart-track {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 25px;
  height: 76px;
  border-radius: 5px;
  background: #f4e9da;
  overflow: hidden;
}

.chart-track i {
  width: 100%;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #d8a652, #b31722);
}

.chart-column small {
  color: #9f8576;
  font-size: 7px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart figcaption {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e9dac9;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  color: #8b5b13;
  background: var(--gold-soft);
  border: 1px solid #ecd7b1;
  font-size: 8px;
  font-weight: 600;
}

.article-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 10px 0;
  padding: 8px 9px;
  border-radius: 8px;
  color: #8f7466;
  background: #fbf6ee;
  font-size: 8px;
  line-height: 1.5;
}

.article-disclaimer .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
  color: var(--gold-deep);
}

.article-actions {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #f0e4d4;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 33px;
  padding: 6px 9px;
  border: 1px solid #ead9c5;
  border-radius: 9px;
  background: #fffdf9;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.action-btn .icon {
  width: 14px;
  height: 14px;
}

.action-btn b {
  color: var(--red);
  font-size: 8.5px;
  font-weight: 700;
}

.action-btn.is-active {
  color: var(--red);
  border-color: #eccaca;
  background: var(--red-soft);
}

.action-btn--danger {
  margin-left: auto;
  color: #9b3a2e;
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e9d8c2;
  border-radius: 17px;
  background: var(--surface);
}

.author-card h3 {
  margin: 1px 0 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.author-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- forms ---------- */
.form-card {
  padding: 15px;
  border: 1px solid #e8d6bf;
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
}

.field-label em {
  color: #b08e7c;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #e7d4bb;
  border-radius: 10px;
  background: #fffdf9;
  color: var(--ink);
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

#compose-title {
  padding-right: 45px;
}

#compose-body {
  padding-bottom: 24px;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 151, 63, 0.13);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b79e8e;
}

.field-count {
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: #b49a8a;
  font-size: 7.5px;
  pointer-events: none;
}

.field textarea + .field-count {
  bottom: 9px;
}

.field-hint {
  color: #a88e7f;
  font-size: 8px;
  line-height: 1.4;
}

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

.field-row .field {
  margin-bottom: 4px;
}

.chart-builder {
  margin: 4px 0 12px;
  padding: 0 11px 11px;
  border: 1px solid #ead8bf;
  border-radius: 11px;
  background: #fbf5ea;
}

.chart-builder summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 0;
  color: var(--red-deep);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.chart-builder summary::-webkit-details-marker {
  display: none;
}

.chart-builder summary .icon {
  width: 14px;
  height: 14px;
}

.chart-builder summary span {
  margin-left: auto;
  color: #a48a7b;
  font-size: 7.5px;
  font-weight: 500;
}

.chart-builder[open] summary {
  margin-bottom: 7px;
  border-bottom: 1px dashed #e9dac9;
}

.chart-builder .field {
  margin-bottom: 8px;
}

.chart-builder textarea {
  min-height: 90px;
  font-size: 11px;
  line-height: 1.65;
}

.guideline-card {
  margin: 4px 0 12px;
  padding: 11px;
  border: 1px solid #ead8bf;
  border-radius: 11px;
  background: #fbf5ea;
}

.guideline-head {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--red-deep);
  font-size: 10px;
}

.guideline-head .icon {
  width: 14px;
  height: 14px;
}

.guideline-card ul {
  margin: 7px 0 0;
  padding-left: 14px;
  color: #7f6153;
  font-size: 8.5px;
  line-height: 1.6;
}

.guideline-card li {
  margin-bottom: 2px;
}

.form-note {
  margin: 0 0 10px;
  color: #a18879;
  font-size: 8px;
  line-height: 1.5;
}

.form-error {
  margin: 0 0 9px;
  padding: 8px 9px;
  border: 1px solid #efcaca;
  border-radius: 8px;
  color: #9e201e;
  background: #fceeee;
  font-size: 9px;
  line-height: 1.5;
}

.admin-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 11px;
  padding: 9px 10px;
  border: 1px solid #ead8bf;
  border-radius: 10px;
  color: #7c5b48;
  background: #fbf4e8;
  font-size: 8.5px;
  line-height: 1.5;
}

.admin-warning .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--gold-deep);
}

.number-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.number-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 4px;
  border: 1px solid #e7d4bb;
  border-radius: 10px;
  background: #fffdf9;
  color: var(--red-deep);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.number-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 151, 63, 0.13);
}

/* ---------- community / compose ---------- */
.guideline-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1px 0 11px;
  padding: 9px 10px;
  border: 1px solid #ead8bf;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf3e6, #fffaf1);
}

.guideline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 50%;
  color: var(--red-deep);
  background: #f5dfb8;
}

.guideline-icon .icon {
  width: 15px;
  height: 15px;
}

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

.guideline-banner strong {
  display: block;
  color: var(--red-deep);
  font-size: 9.5px;
  font-weight: 700;
}

.guideline-banner p {
  margin: 1px 0 0;
  color: #8b6b58;
  font-size: 8px;
  line-height: 1.35;
}

.guideline-banner > a {
  color: var(--gold-deep);
}

.guideline-banner > a .icon {
  width: 15px;
  height: 15px;
}

.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid #e5d2ba;
  border-radius: 10px;
  background: #f8efe3;
}

.segmented button {
  min-height: 27px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #907366;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
}

.segmented button.is-active {
  color: var(--red-deep);
  background: #fffdf9;
  box-shadow: 0 2px 6px rgba(92, 28, 22, 0.08);
}

.community-count {
  color: #a78c7d;
  font-size: 8.5px;
}

.fab {
  position: fixed;
  z-index: 80;
  right: max(17px, calc(50% - 240px + 17px));
  bottom: calc(98px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 43px;
  padding: 0 13px 0 10px;
  border: 1px solid rgba(255, 248, 236, 0.45);
  border-radius: 999px;
  color: #fff8ec;
  background:
    radial-gradient(circle at 30% 15%, rgba(255, 230, 180, 0.34), transparent 36%),
    linear-gradient(135deg, #d92d3a, #8a0f18);
  box-shadow: 0 8px 18px rgba(125, 13, 22, 0.3);
  font-size: 10px;
  font-weight: 700;
}

.fab .icon {
  width: 18px;
  height: 18px;
}

/* ---------- leaderboard page ---------- */
.leader-periods {
  display: flex;
  gap: 5px;
  margin-bottom: 11px;
}

.leader-period {
  padding: 5px 10px;
  border: 1px solid #e7d5c0;
  border-radius: 999px;
  color: #93786a;
  background: rgba(255, 253, 249, 0.7);
  font-size: 9px;
  font-weight: 600;
}

.leader-period.is-active {
  color: var(--red-deep);
  border-color: #e8c6c6;
  background: var(--red-soft);
}

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

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 7px 11px;
  border: 1px solid #e9d8c2;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.podium-card--gold {
  border-color: #e4c47f;
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 217, 165, 0.42), transparent 48%),
    #fffdf9;
}

.podium-card--silver {
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 214, 208, 0.34), transparent 48%),
    #fffdf9;
}

.podium-card--bronze {
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 166, 124, 0.28), transparent 48%),
    #fffdf9;
}

.podium-rank {
  position: absolute;
  top: 7px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #7b530e;
  background: #f4d89f;
  font-size: 8px;
  font-weight: 800;
}

.podium-card .avatar {
  margin-top: 4px;
}

.podium-card strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-badge {
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.podium-stats {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.podium-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted);
  font-size: 7px;
}

.podium-stats b {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
}

.rank-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #ead8bf;
  border-radius: 13px;
  background: #fbf5ea;
}

.rank-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  color: var(--gold-deep);
  background: #f4dfb7;
}

.rank-note-icon .icon {
  width: 14px;
  height: 14px;
}

.rank-note strong {
  color: var(--red-deep);
  font-size: 10px;
}

.rank-note p {
  margin: 3px 0 0;
  color: #7e6152;
  font-size: 8.5px;
  line-height: 1.55;
}

.rank-local-note {
  margin: 9px 2px 0;
  color: #a88e7f;
  font-size: 8px;
  line-height: 1.4;
}

/* ---------- profile ---------- */
.profile-hero {
  position: relative;
  overflow: hidden;
  margin: 15px 0 0;
  padding: 17px 16px 14px;
  border-radius: 21px;
  color: #fff8ec;
  background:
    radial-gradient(circle at 92% 0%, rgba(243, 217, 165, 0.28), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(66, 3, 8, 0.28), transparent 44%),
    linear-gradient(135deg, #8a0f18, #b31722 55%, #c4202c);
  box-shadow: 0 14px 30px rgba(114, 14, 23, 0.22);
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -74px;
  width: 176px;
  height: 176px;
  border: 1px solid rgba(243, 217, 165, 0.2);
  border-radius: 50%;
}

.profile-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.profile-hero .avatar--lg {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-color: #f4d89f;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy .eyebrow {
  color: #e8c996;
}

.profile-copy h1 {
  margin: 2px 0 3px;
  color: #fff8ec;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile-copy p {
  margin: 0;
  max-width: 230px;
  color: #e8cda4;
  font-size: 8.5px;
  line-height: 1.45;
}

.profile-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(243, 217, 165, 0.28);
}

.profile-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-right: 1px solid rgba(243, 217, 165, 0.18);
}

.profile-stats div:last-child {
  border-right: 0;
}

.profile-stats strong {
  color: #fff2d7;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.profile-stats span {
  color: #e4c391;
  font-size: 8px;
}

.profile-joined {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 3px 12px;
  color: #a88d7e;
  font-size: 8px;
}

.profile-joined .icon {
  width: 11px;
  height: 11px;
}

.menu-card {
  margin-bottom: 10px;
  padding: 2px 12px;
  border: 1px solid #e9d8c2;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 51px;
  border-bottom: 1px dashed #eddfcf;
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 9px;
  color: var(--red-deep);
  background: #fbf1e4;
}

.menu-icon .icon {
  width: 15px;
  height: 15px;
}

.menu-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.menu-copy strong {
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 600;
}

.menu-copy small {
  color: #a48a7b;
  font-size: 7.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-row > .icon {
  width: 14px;
  height: 14px;
  color: #c3aa98;
}

.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 17px 12px;
  border: 1px dashed #dcc5aa;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 253, 249, 0.55);
}

.profile-empty h3 {
  margin: 1px 0 3px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
}

.clear-data-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid #e8d2c5;
  border-radius: 11px;
  color: #9b5c4d;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.clear-data-link .icon {
  width: 13px;
  height: 13px;
}

.version {
  margin: 10px 0 0;
  text-align: center;
  color: #ad9484;
  font-size: 7.5px;
}

/* ---------- calendar ---------- */
.calendar-card {
  padding: 12px;
  border: 1px solid #e8d6bf;
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

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

.calendar-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.calendar-head .icon-btn {
  width: 30px;
  height: 30px;
  color: var(--red-deep);
  background: #fbf1e4;
}

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

.calendar-grid--head {
  margin-bottom: 3px;
}

.calendar-grid--head span {
  padding: 4px 0;
  color: #a88e7f;
  font-size: 7.5px;
  text-align: center;
  font-weight: 600;
}

.calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  aspect-ratio: 1;
  min-height: 35px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.calendar-day > span:first-child {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calendar-day.is-today {
  border-color: #e5c27d;
  background: #fff9ed;
}

.calendar-day.is-selected {
  color: #fff8ec;
  border-color: var(--red);
  background: linear-gradient(135deg, #c4202c, #8e111b);
  box-shadow: 0 4px 9px rgba(138, 15, 24, 0.2);
}

.calendar-day--empty {
  cursor: default;
}

.calendar-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 4px;
}

.calendar-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dot, var(--red));
}

.calendar-dots i.is-manual {
  background: #6f4b3c;
}

.calendar-day.is-selected .calendar-dots i {
  background: #f8dda3;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eddfcf;
  color: #a08879;
  font-size: 7.5px;
}

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

.calendar-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.calendar-legend i.is-manual {
  background: #6f4b3c;
}

.calendar-today {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid #ead8bf;
  border-radius: 6px;
  color: var(--gold-deep);
  background: #fffaf1;
  font-size: 7.5px;
  cursor: pointer;
}

.calendar-schedule {
  overflow: hidden;
  border: 1px solid #e9d8c2;
  border-radius: 15px;
  background: var(--surface);
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  padding: 8px 10px;
  border-bottom: 1px dashed #eddfcf;
}

.schedule-row:last-child {
  border-bottom: 0;
}

.schedule-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 8px;
  color: #fff8ec;
  background: var(--game);
  font-size: 7.5px;
  font-weight: 800;
}

.schedule-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.schedule-copy strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}

.schedule-copy small {
  color: #a48a7b;
  font-size: 7.5px;
}

.schedule-row > .icon {
  width: 13px;
  height: 13px;
  color: #c3aa98;
}

.schedule-manual {
  padding: 10px;
  border-bottom: 1px dashed #eddfcf;
}

.schedule-manual:last-child {
  border-bottom: 0;
}

.schedule-manual-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}

.schedule-manual-top strong {
  color: var(--ink);
  font-size: 10px;
}

.schedule-manual-top > span:last-child {
  margin-left: auto;
  color: #a48a7b;
  font-size: 7.5px;
}

.schedule-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-top: 6px;
  color: var(--red);
  font-size: 8px;
  font-weight: 700;
}

.schedule-link .icon {
  width: 11px;
  height: 11px;
}

/* ---------- settings / legal ---------- */
.settings-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid #e8d6bf;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
}

.settings-card-head > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--gold-deep);
}

.settings-card-head h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.settings-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.language-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  padding: 7px 9px;
  border: 1px solid #ead9c5;
  border-radius: 9px;
  color: var(--ink-2);
  background: #fffdf9;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.language-option.is-active {
  color: var(--red-deep);
  border-color: #eccaca;
  background: var(--red-soft);
}

.language-option .icon {
  width: 14px;
  height: 14px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 9px;
}

.api-grid div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px;
  border-radius: 8px;
  background: #fbf6ee;
  border: 1px solid #f0e4d4;
}

.api-grid span {
  color: var(--muted);
  font-size: 7.5px;
}

.api-grid strong {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-card {
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid #e8d6bf;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.content-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.content-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  color: var(--red-deep);
  background: #fbf1e4;
}

.content-icon .icon {
  width: 15px;
  height: 15px;
}

.content-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.content-card p {
  margin: 0;
  color: #6f5146;
  font-size: 10px;
  line-height: 1.7;
}

.about-hero {
  position: relative;
  overflow: hidden;
  margin-top: 15px;
  padding: 22px 16px;
  border-radius: 21px;
  color: #fff8ec;
  background:
    radial-gradient(circle at 88% 4%, rgba(243, 217, 165, 0.28), transparent 38%),
    linear-gradient(135deg, #8a0f18, #b31722 58%, #c4202c);
  text-align: center;
}

.about-hero::after {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -100px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(243, 217, 165, 0.2);
  border-radius: 50%;
}

.about-logo {
  display: inline-block;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 14px rgba(54, 5, 10, 0.26));
}

.about-logo svg {
  width: 100%;
  height: 100%;
}

.about-hero .eyebrow {
  color: #e8c996;
}

.about-hero h1 {
  margin: 3px 0 5px;
  color: #fff8ec;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.about-hero p {
  margin: 0 auto;
  max-width: 290px;
  color: #e9cea6;
  font-size: 9.5px;
  line-height: 1.6;
}

.about-version {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  border: 1px solid rgba(243, 217, 165, 0.3);
  border-radius: 999px;
  color: #f1d8a8;
  font-size: 7.5px;
}

.about-links {
  margin-top: 10px;
  padding: 2px 12px;
  border: 1px solid #e9d8c2;
  border-radius: 16px;
  background: var(--surface);
}

.legal-updated {
  color: #a88e7f;
  font-size: 8px;
  text-align: center;
}

/* ---------- manual ---------- */
.manual-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-row {
  padding: 11px;
  border: 1px solid #e9d8c2;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.manual-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 7px;
}

.manual-row-top > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.manual-row-top strong {
  color: var(--ink);
  font-size: 10.5px;
}

.manual-row-top small {
  color: #a48a7b;
  font-size: 7.5px;
}

.manual-source {
  margin: 6px 0 0;
  color: #9c8274;
  font-size: 7.5px;
}

/* ---------- sheets & toast ---------- */
#sheet-root {
  position: relative;
  z-index: 120;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 10, 8, 0.46);
  opacity: 0;
  transition: opacity 0.22s ease;
}

#sheet-root.is-open .sheet-overlay {
  opacity: 1;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: 82dvh;
  overflow-y: auto;
  z-index: 121;
  padding: 9px 16px calc(16px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: #fffdf9;
  box-shadow: 0 -18px 40px rgba(35, 10, 8, 0.22);
  transform: translate(-50%, 102%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#sheet-root.is-open .sheet {
  transform: translate(-50%, 0);
}

.sheet-grabber {
  display: block;
  width: 34px;
  height: 3px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: #e1ceb8;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sheet-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-head .icon-btn {
  width: 29px;
  height: 29px;
  color: var(--muted);
  background: #f8f0e6;
}

.sheet-note {
  margin: 8px 0 12px;
  color: #8a6c5d;
  font-size: 9.5px;
  line-height: 1.6;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.report-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #ead9c5;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 10px;
  cursor: pointer;
}

.report-option input {
  accent-color: var(--red);
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  z-index: 150;
  width: calc(100% - 32px);
  max-width: 448px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 248, 236, 0.18);
  border-radius: 10px;
  color: #fff8ec;
  background: rgba(49, 20, 16, 0.94);
  box-shadow: 0 8px 18px rgba(40, 12, 9, 0.24);
  font-size: 10px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast .icon {
  width: 14px;
  height: 14px;
  color: #f4d89f;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--red-deep);
  font-size: 14px;
  text-align: center;
}

/* ---------- responsive ---------- */
@media (min-width: 520px) {
  .app-shell {
    min-height: calc(100dvh - 28px);
    margin: 14px auto;
    border-radius: 26px;
    overflow: hidden;
  }

  .topbar--brand {
    padding-top: 14px;
  }

  .tabbar {
    bottom: 14px;
    border-radius: 0 0 26px 26px;
  }

  .fab {
    bottom: 112px;
  }

  .toast-root {
    bottom: 104px;
  }
}

@media (max-width: 360px) {
  .view {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-copy small {
    max-width: 170px;
  }

  .ball--lg {
    width: 33px;
    height: 33px;
    font-size: 12px;
  }

  .ball--xl {
    width: 35px;
    height: 35px;
    font-size: 12.5px;
  }

  .draw-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .draw-card::before {
    left: 12px;
    right: 12px;
  }

  .quick-grid {
    gap: 5px;
  }

  .quick-item {
    min-height: 78px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .quick-icon {
    width: 33px;
    height: 33px;
  }

  .quick-label {
    font-size: 8.5px;
  }

  .article-title {
    font-size: 22px;
  }

  .number-input {
    height: 40px;
    font-size: 15px;
  }
}

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

  .ticker-track {
    animation: none;
  }
}

/* ---------- clean refinement ---------- */
/* Restrained red/gold, more white space, flatter navigation. */
.topbar--brand,
.topbar--sub {
  background: #8f111b;
  background-image: none;
  border-bottom: 1px solid rgba(243, 217, 165, 0.28);
  box-shadow: 0 4px 14px rgba(80, 10, 15, 0.12);
}

.topbar--brand {
  padding-top: calc(13px + env(safe-area-inset-top, 0px));
  padding-bottom: 13px;
}

.brand-copy strong {
  font-size: 20px;
}

.brand-copy small {
  color: #e8cda4;
  font-size: 9px;
}

.lang-switch {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 1px;
}

.lang-switch button {
  height: 28px;
  min-width: 27px;
  color: rgba(255, 248, 236, 0.55);
}

.lang-switch button.is-active {
  color: #fff8ec;
  background: rgba(255, 248, 236, 0.12);
  box-shadow: none;
}

.icon-btn--light {
  border-color: transparent;
  background: transparent;
}

.view {
  padding-left: 18px;
  padding-right: 18px;
}

.home-intro {
  display: block;
  padding: 24px 2px 12px;
}

.home-intro h1 {
  margin: 6px 0 7px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.home-intro p {
  max-width: 320px;
  font-size: 12px;
  line-height: 1.65;
}

.year-stamp,
.ticker {
  display: none;
}

.home-notice {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 2px 16px;
  color: #8f7567;
  font-size: 10px;
  line-height: 1.5;
}

.home-notice .icon {
  width: 13px;
  height: 13px;
  color: var(--gold-deep);
}

.section {
  margin-top: 28px;
}

.draw-tabs {
  display: flex;
  gap: 20px;
  margin: 0 2px 10px;
  padding: 0 2px;
  border-bottom: 1px solid #e9dccb;
  overflow-x: auto;
  scrollbar-width: none;
}

.draw-tabs::-webkit-scrollbar {
  display: none;
}

.draw-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #9a7d6f;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

.draw-tab.is-active {
  color: var(--red-deep);
  background: transparent;
  border-bottom-color: var(--red);
  box-shadow: none;
  font-weight: 800;
}

.draw-tab-mark {
  display: none;
}

.draw-card {
  padding: 17px 16px 14px;
  border: 1px solid #e8dac9;
  border-radius: 20px;
  background: #fffdf9;
  box-shadow: 0 6px 20px rgba(80, 30, 20, 0.045);
}

.draw-card::before {
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), #d8b06a);
}

.draw-card-balls {
  margin: 20px 0 6px;
}

.draw-card-foot {
  padding-top: 12px;
}

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

.quick-item {
  align-items: flex-start;
  gap: 8px;
  min-height: 92px;
  padding: 14px 10px 12px;
  border-color: #ecdfd0;
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 3px 10px rgba(80, 30, 20, 0.025);
}

.quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f8efe3;
  color: var(--red);
  box-shadow: none;
}

.quick-item--red .quick-icon {
  color: var(--red);
  background: #fbf0ef;
}

.quick-item--gold .quick-icon {
  color: var(--gold-deep);
  background: #fbf3e5;
}

.quick-item--green .quick-icon {
  color: var(--green);
  background: #eef7f2;
}

.quick-item--blue .quick-icon {
  color: var(--blue);
  background: #eef3fb;
}

.quick-label {
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.quick-badge {
  display: none;
}

.tabbar {
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: rgba(255, 253, 249, 0.97);
  border-top: 1px solid #e6d7c5;
  box-shadow: 0 -4px 14px rgba(80, 30, 20, 0.04);
}

.tab-icon {
  width: 32px;
  height: 26px;
  border-radius: 8px;
}

.tab-icon .icon {
  width: 20px;
  height: 20px;
}

.tab.is-active .tab-icon {
  background: transparent;
}

.tab.is-active .tab-label {
  font-weight: 700;
}

.tab--center .tab-icon,
.tab--center.is-active .tab-icon {
  width: 32px;
  height: 26px;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.tab--center .tab-icon .icon {
  width: 20px;
  height: 20px;
}

.tab--center .tab-label {
  margin-top: 0;
}

.fab {
  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  bottom: calc(84px + var(--safe-bottom));
}

.fab .icon {
  width: 20px;
  height: 20px;
}

.wave-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 9px;
  color: #a08879;
  font-size: 8px;
}

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

.wave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.wave-dot--red {
  background: #b32633;
}

.wave-dot--blue {
  background: #28549a;
}

.wave-dot--green {
  background: #1f6b4f;
}

.ball--wave-red {
  color: #fffaf2;
  background: linear-gradient(145deg, #d95a62, #b32633);
  border-color: #a91f2b;
  box-shadow: 0 3px 8px rgba(179, 38, 51, 0.2);
}

.ball--wave-blue {
  color: #f8fbff;
  background: linear-gradient(145deg, #4f7fc9, #28549a);
  border-color: #234e9b;
  box-shadow: 0 3px 8px rgba(40, 84, 154, 0.2);
}

.ball--wave-green {
  color: #f8fffb;
  background: linear-gradient(145deg, #439f78, #1f6b4f);
  border-color: #1a5b43;
  box-shadow: 0 3px 8px rgba(31, 107, 79, 0.2);
}

.draw-ticket {
  padding: 18px 17px 14px;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid #e5d4bf;
  box-shadow: 0 8px 24px rgba(80, 30, 20, 0.06);
}

.draw-ticket::before {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--red), #d8b06a);
}

.draw-ticket-glow {
  display: none;
}

.draw-ticket-date {
  color: var(--muted);
}

.ticket-issue {
  color: var(--gold-deep);
}

.draw-ticket-balls .ball-plus {
  color: #b79884;
}

.draw-ticket-balls .zodiac-label {
  color: #a88c7b;
}

.ticket-divider span {
  background: #d9b77f;
}

.ticket-divider i {
  border-top-color: #e7d3b6;
}

.ticket-meta small {
  color: var(--muted);
}

.ticket-meta strong {
  color: var(--ink);
}

.ticket-next {
  color: var(--muted);
}

.ticket-next .countdown {
  color: var(--red);
}

.ticket-actions .btn--light {
  color: var(--red-deep);
  background: #fff;
  border-color: #e5ceca;
}

.draw-ticket-balls .ball--wave-red,
.draw-ticket-balls .ball--wave-blue,
.draw-ticket-balls .ball--wave-green {
  box-shadow: 0 4px 10px rgba(48, 20, 12, 0.16);
}

.draw-ticket-balls .ball--main {
  color: var(--ink);
  background: #fff;
  border-color: #e5d4bf;
}

.post-card,
.leader-card,
.result-card {
  box-shadow: none;
}

.post-card--feature {
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(80, 30, 20, 0.035);
}

.result-card {
  background: #fffdf9;
  border-color: #ece0d2;
}

@media (max-width: 360px) {
  .view {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-intro h1 {
    font-size: 25px;
  }

  .quick-grid {
    gap: 7px;
  }

  .quick-item {
    min-height: 86px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .fab {
    bottom: calc(82px + var(--safe-bottom));
  }
}

@media (min-width: 520px) {
  .fab {
    bottom: calc(100px + var(--safe-bottom));
  }
}

.home-history {
  overflow: hidden;
  border: 1px solid #ecdfd0;
  border-radius: 17px;
  background: #fffdf9;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px dashed #eddfcf;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 56px;
  flex: 0 0 56px;
}

.history-meta strong {
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1.25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.history-meta small {
  color: #a48a7b;
  font-size: 7.5px;
}

.history-balls {
  flex: 1;
  min-width: 0;
}

.history-balls .ball-row {
  justify-content: flex-start;
  gap: 4px;
}

.history-balls .ball-plus {
  margin-bottom: 14px;
}

.history-balls .zodiac-label {
  font-size: 6.8px;
  max-width: 27px;
}

.history-row > .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: #c3aa98;
}

.recent-balls .zodiac-label {
  font-size: 6px;
  max-width: 20px;
}

.ball-row--zodiac .ball-plus {
  margin-bottom: 16px;
}

/* Gallery */
.home-gallery-section { padding-top: 0; }
.home-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-gallery-card { display: block; position: relative; overflow: hidden; border-radius: 11px; border: 1px solid #ead6c4; background: #f7f0e7; aspect-ratio: 3 / 4; }
.home-gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-gallery-card span { position: absolute; left: 6px; bottom: 6px; padding: 3px 6px; border-radius: 5px; background: rgba(44, 23, 20, .78); color: #fff8ec; font-size: 9px; font-weight: 700; }
.section-link .icon { width: 12px; height: 12px; }
.gallery-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #ead6c4;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf3, #f8eee1);
  box-shadow: 0 8px 22px rgba(98, 48, 20, .06);
}

.gallery-banner-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 12px;
  color: #9a1c22;
  background: #fff;
  border: 1px solid #efd9c8;
}

.gallery-banner-icon .icon { width: 21px; height: 21px; }

.gallery-banner-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.gallery-banner-copy strong { font-size: 14px; color: #2b1714; letter-spacing: .01em; }
.gallery-banner-copy small { font-size: 11px; color: #8b7162; line-height: 1.35; }
.gallery-banner-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #a5262c; white-space: nowrap; }
.gallery-banner-cta .icon { width: 14px; height: 14px; }

.page--gallery { padding-bottom: 28px; }
.gallery-hero { padding: 22px 2px 16px; }
.gallery-hero .eyebrow { display: block; margin-bottom: 6px; }
.gallery-hero h1 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.15; color: #2b1714; }
.gallery-hero p { margin: 8px 0 0; max-width: 300px; font-size: 12px; line-height: 1.55; color: #8a7163; }
.gallery-section { padding-top: 0; }
.gallery-select { display: grid; gap: 6px; margin: 2px 0 12px; }
.gallery-select > span { color: #8b7162; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.gallery-select select { width: 100%; height: 42px; border: 1px solid #e4d1c0; border-radius: 10px; background: #fffaf4; color: #3a2420; padding: 0 12px; font-size: 13px; }
.gallery-categories { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.gallery-categories::-webkit-scrollbar { display: none; }
.gallery-category { flex: 0 0 auto; border: 1px solid #e5d3c4; background: #fffaf4; color: #795d4d; border-radius: 999px; padding: 8px 13px; font-size: 12px; font-weight: 700; }
.gallery-category.is-active { color: #fff; background: #9a1c22; border-color: #9a1c22; }
.gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 10px; }
.gallery-heading h2 { margin: 0; font-size: 20px; color: #2b1714; }
.gallery-heading p { margin: 4px 0 0; color: #8b7162; font-size: 11px; }
.gallery-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: #f2e4d4; color: #7c5a45; font-size: 11px; font-weight: 700; }
.gallery-issues { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.gallery-issues::-webkit-scrollbar { display: none; }
.gallery-issue { flex: 0 0 auto; border: 1px solid #e4d1c0; background: #fff; color: #775a49; border-radius: 8px; padding: 7px 11px; font-size: 12px; font-weight: 600; }
.gallery-issue.is-active { background: #9a1c22; border-color: #9a1c22; color: #fff; }
.gallery-viewer { margin: 0; padding: 10px; border: 1px solid #ead6c4; border-radius: 14px; background: #fff; box-shadow: 0 12px 28px rgba(98, 48, 20, .08); }
.gallery-viewer img { display: block; width: 100%; height: auto; border-radius: 9px; background: #f7f0e7; }
.gallery-viewer.is-broken img { display: none; }
.gallery-viewer.is-broken::before { content: "图片加载失败 / Image unavailable"; display: grid; place-items: center; min-height: 220px; border-radius: 9px; background: #f7f0e7; color: #9a7d69; font-size: 12px; }
.gallery-viewer figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px 0; }
.gallery-viewer figcaption strong { color: #2b1714; font-size: 12px; }
.gallery-viewer figcaption span { flex: 0 0 auto; color: #917664; font-size: 11px; }
.gallery-source { display: flex; align-items: flex-start; gap: 7px; margin: 10px 2px 0; color: #8b7162; font-size: 10.5px; line-height: 1.45; }
.gallery-source .icon { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 1px; }
.gallery-source span { flex: 1; }
.gallery-source a { display: inline-flex; align-items: center; gap: 3px; color: #a5262c; font-weight: 700; text-decoration: none; white-space: nowrap; }
.gallery-source a .icon { width: 11px; height: 11px; }
.gallery-empty { padding: 40px 16px; text-align: center; color: #8b7162; }

/* Glossy Mark Six ball treatment, reference-inspired */
.ball--wave-red {
  color: #fff;
  border: 2px solid #8d0710;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.62) 10%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at 52% 42%, #ff7377 0%, #e52b35 42%, #b20a15 76%, #7f040c 100%);
  box-shadow:
    inset -5px -7px 11px rgba(58, 0, 0, .38),
    inset 3px 4px 8px rgba(255, 255, 255, .24),
    0 5px 9px rgba(45, 10, 8, .28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .58), 0 0 1px rgba(0, 0, 0, .85);
}

.ball--wave-green {
  color: #fff;
  border: 2px solid #056b34;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.58) 10%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at 52% 42%, #7dff78 0%, #25d36b 40%, #07964a 76%, #05622f 100%);
  box-shadow:
    inset -5px -7px 11px rgba(0, 50, 20, .32),
    inset 3px 4px 8px rgba(255, 255, 255, .24),
    0 5px 9px rgba(12, 48, 25, .26);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .52), 0 0 1px rgba(0, 0, 0, .8);
}

.ball--wave-blue {
  color: #fff;
  border: 2px solid #06347f;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.58) 10%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at 52% 42%, #79c4ff 0%, #2b8cf0 40%, #0b5ac6 76%, #06358c 100%);
  box-shadow:
    inset -5px -7px 11px rgba(0, 12, 60, .36),
    inset 3px 4px 8px rgba(255, 255, 255, .24),
    0 5px 9px rgba(10, 30, 65, .28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .85);
}

.ball--wave-red,
.ball--wave-green,
.ball--wave-blue {
  font-weight: 900;
  letter-spacing: -0.03em;
}

.draw-ticket-balls .ball--wave-red,
.draw-ticket-balls .ball--wave-green,
.draw-ticket-balls .ball--wave-blue {
  color: #fff;
  border-width: 2px;
  box-shadow:
    inset -5px -7px 11px rgba(20, 5, 5, .34),
    inset 3px 4px 8px rgba(255, 255, 255, .24),
    0 5px 9px rgba(45, 10, 8, .26);
}

.draw-ticket-balls .ball--wave-red { border-color: #8d0710; background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.62) 10%, rgba(255,255,255,0) 28%), radial-gradient(circle at 52% 42%, #ff7377 0%, #e52b35 42%, #b20a15 76%, #7f040c 100%); }
.draw-ticket-balls .ball--wave-green { border-color: #056b34; background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.58) 10%, rgba(255,255,255,0) 28%), radial-gradient(circle at 52% 42%, #7dff78 0%, #25d36b 40%, #07964a 76%, #05622f 100%); }
.draw-ticket-balls .ball--wave-blue { border-color: #06347f; background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.58) 10%, rgba(255,255,255,0) 28%), radial-gradient(circle at 52% 42%, #79c4ff 0%, #2b8cf0 40%, #0b5ac6 76%, #06358c 100%); }

/* Reference pearl/glow balls: white center, colored rim, dark number */
.ball--wave-red,
.ball--wave-green,
.ball--wave-blue {
  color: #171313;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 0 1px rgba(0,0,0,.45);
}

.ball--wave-red {
  border: 2px solid #a90913;
  background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #fff4f5 41%, #ffb3b8 54%, #f22c37 69%, #c50c17 84%, #8d0009 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset -3px -6px 9px rgba(90,0,0,.24), 0 4px 8px rgba(50,10,8,.24);
}

.ball--wave-green {
  border: 2px solid #07852a;
  background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #f4fff2 41%, #baffa4 54%, #34e34c 69%, #06a62f 84%, #03651d 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset -3px -6px 9px rgba(0,60,20,.2), 0 4px 8px rgba(10,55,25,.22);
}

.ball--wave-blue {
  border: 2px solid #0848b8;
  background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #f2f8ff 41%, #b2d6ff 54%, #3b8bff 69%, #0b50d2 84%, #052f83 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset -3px -6px 9px rgba(0,20,80,.22), 0 4px 8px rgba(8,30,70,.24);
}

.draw-ticket-balls .ball--wave-red,
.draw-ticket-balls .ball--wave-green,
.draw-ticket-balls .ball--wave-blue {
  color: #171313;
  text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 0 1px rgba(0,0,0,.45);
}

.draw-ticket-balls .ball--wave-red { border-color: #a90913; background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #fff4f5 41%, #ffb3b8 54%, #f22c37 69%, #c50c17 84%, #8d0009 100%); }
.draw-ticket-balls .ball--wave-green { border-color: #07852a; background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #f4fff2 41%, #baffa4 54%, #34e34c 69%, #06a62f 84%, #03651d 100%); }
.draw-ticket-balls .ball--wave-blue { border-color: #0848b8; background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 31%, #f2f8ff 41%, #b2d6ff 54%, #3b8bff 69%, #0b50d2 84%, #052f83 100%); }

/* Exact reference theme3 ball texture */
.ball--wave-red,
.ball--wave-green,
.ball--wave-blue {
  color: #111;
  border: 0;
  text-shadow: none;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 3px 4px rgba(30, 20, 18, .18));
}

.ball--wave-red { background-image: url("../img/balls/theme3-red.png"); }
.ball--wave-green { background-image: url("../img/balls/theme3-green.png"); }
.ball--wave-blue { background-image: url("../img/balls/theme3-blue.png"); }

.draw-ticket-balls .ball--wave-red,
.draw-ticket-balls .ball--wave-green,
.draw-ticket-balls .ball--wave-blue {
  color: #111;
  border: 0;
  text-shadow: none;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 3px 4px rgba(30, 20, 18, .18));
}

.draw-ticket-balls .ball--wave-red { background-image: url("../img/balls/theme3-red.png"); }
.draw-ticket-balls .ball--wave-green { background-image: url("../img/balls/theme3-green.png"); }
.draw-ticket-balls .ball--wave-blue { background-image: url("../img/balls/theme3-blue.png"); }

/* Match reference number proportions */
.ball--lg { font-size: 18px; }
.ball--md { font-size: 16px; }
.ball--sm { font-size: 12px; }
.ball--xs { font-size: 10.5px; }
.ball--xl { font-size: 19px; }

/* Post cover images */
.post-cover { margin: 10px 0 12px; overflow: hidden; border-radius: 11px; border: 1px solid #ead6c4; background: #f7f0e7; aspect-ratio: 16 / 9; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-cover { margin: 18px 0 20px; overflow: hidden; border-radius: 14px; border: 1px solid #ead6c4; background: #f7f0e7; }
.article-cover img { width: 100%; height: auto; max-height: 460px; object-fit: cover; display: block; }

/* Bot prediction stats */
.bot-stats-banner { display: flex; align-items: center; gap: 11px; margin: 0 0 12px; padding: 13px 14px; border-radius: 13px; border: 1px solid #e6cdb8; background: linear-gradient(135deg, #fff8f0, #f7e8dc); color: var(--ink); }
.bot-stats-banner-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #8f111b; color: #fff; flex: none; }
.bot-stats-banner-icon svg { width: 17px; height: 17px; }
.bot-stats-banner > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bot-stats-banner strong { font-size: 13px; }
.bot-stats-banner small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.bot-stats-banner > svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.bot-stat-hero { display: flex; align-items: center; gap: 18px; padding: 18px; margin-bottom: 16px; border-radius: 16px; background: #8f111b; color: #fff; }
.bot-stat-hero-rate { display: flex; flex-direction: column; align-items: center; min-width: 104px; padding-right: 16px; border-right: 1px solid rgba(255,255,255,.26); }
.bot-stat-hero-rate strong { font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.bot-stat-hero-rate span { margin-top: 4px; font-size: 11px; opacity: .78; }
.bot-stat-hero-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.bot-stat-hero-meta span { display: flex; flex-direction: column; gap: 3px; font-size: 10px; opacity: .78; }
.bot-stat-hero-meta b { font-size: 19px; opacity: 1; font-weight: 700; }
.bot-stat-section { margin: 18px 0; }
.bot-stat-section h2 { font-size: 16px; margin: 0 0 9px; }
.bot-game-list, .bot-result-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fffdf9; }
.bot-game-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.bot-game-row:last-child { border-bottom: 0; }
.bot-game-name { flex: 1; }
.bot-game-rate { font-size: 15px; font-weight: 800; color: #8f111b; }
.bot-game-count { min-width: 55px; text-align: right; font-size: 10px; color: var(--muted); }
.bot-result-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
.bot-result-row:last-child { border-bottom: 0; }
.bot-result-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bot-result-main strong { font-size: 12px; }
.bot-result-main span { margin-top: 3px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-result-actual { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 50px; }
.bot-result-actual small { font-size: 9px; color: var(--muted); }
.bot-result-actual span { font-size: 11px; font-weight: 700; }
.bot-result-badge { flex: none; padding: 3px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.bot-result-badge--hit { background: #e9f5ec; color: #1d6b3a; }
.bot-result-badge--miss { background: #f7e9e8; color: #9a2b22; }
.bot-result-badge--pending { background: #f2ecdF; color: #7c5a20; }

.bot-baseline { display: flex; flex-direction: column; gap: 3px; margin: -8px 0 16px; padding: 9px 12px; border: 1px solid #ead6c4; border-radius: 9px; background: #fffaf4; color: var(--muted); font-size: 10px; line-height: 1.5; }
.bot-baseline span:first-child { color: var(--ink-2); font-weight: 700; }
.bot-backtest-note { margin: -2px 0 8px; color: var(--muted); font-size: 10px; line-height: 1.6; }

.bot-refresh-row { display: flex; justify-content: flex-end; margin: -8px 0 12px; }

/* Compose cover image */
.compose-cover { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 6px; }
.compose-cover-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fffaf4; color: var(--ink-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.compose-cover-pick svg { width: 15px; height: 15px; }
.compose-cover-pick input { display: none; }
.compose-cover-preview { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f6efe6; }

[hidden] { display: none !important; }

/* Account and user submissions */
.profile-account { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 12px 13px; border: 1px solid #e6cdb8; border-radius: 13px; background: #fffaf4; color: var(--ink); }
.profile-account--login { text-decoration: none; }
.profile-account-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-account-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--account-color, #8f111b); color: #fff; font-size: 12px; font-weight: 800; flex: none; }
.profile-account-avatar svg { width: 17px; height: 17px; }
.profile-account-main div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-account-main strong { font-size: 13px; }
.profile-account-main small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-account > svg { width: 15px; height: 15px; color: var(--muted); }
.auth-tabs { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 10px; background: #f1e6da; }
.auth-tabs button { flex: 1; min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-tabs button.is-active { background: #fffaf4; color: var(--ink); box-shadow: 0 1px 3px rgba(60,30,10,.08); }
.auth-gate { text-align: center; padding: 34px 20px; }
.auth-gate-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #f6e8dd; color: #8f111b; }
.auth-gate-icon svg { width: 21px; height: 21px; }
.auth-gate h2 { margin: 0 0 6px; font-size: 17px; }
.auth-gate p { margin: 0 auto 16px; max-width: 280px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.my-post-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fffdf9; }
.my-post-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.my-post-row:last-child { border-bottom: 0; }
.my-post-row > img { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.my-post-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.my-post-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-post-copy small { color: var(--muted); font-size: 9px; }
.my-post-status { flex: none; padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.my-post-status--pending { background: #f4ecd9; color: #7c5a20; }
.my-post-status--draft { background: #eee8e2; color: #6f6258; }
.my-post-status--published { background: #e9f5ec; color: #1d6b3a; }

.auth-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 11px; border: 1px solid #e6cdb8; border-radius: 9px; background: #fff8f0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.auth-hint span { flex: 1; }
.auth-hint a { color: #8f111b; font-weight: 700; white-space: nowrap; }

.my-post-delete { flex: none; display: grid; place-items: center; width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: #9a2b22; cursor: pointer; }
.my-post-delete svg { width: 14px; height: 14px; }

.my-post-edit { flex: none; display: grid; place-items: center; width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: #8f111b; cursor: pointer; }
.my-post-edit svg { width: 14px; height: 14px; }
.my-post-copy a { color: inherit; text-decoration: none; }

.next-date { color: var(--muted); font-size: 9px; font-style: normal; }
.countdown--delayed { color: #9a5b12; font-size: 10.5px; font-weight: 700; }
.ticket-next .next-date { color: #f4dcc4; }

.live-draw {
  position: relative;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--red) 24%, #fff);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8f4, var(--game-soft, #fdf3ef));
  box-shadow: 0 12px 30px rgba(120, 24, 24, 0.08);
}
.live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.live-head strong { display: block; font-size: 14px; color: var(--ink); }
.live-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.live-dot {
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  animation: live-pulse 1.4s ease-in-out infinite;
}
.live-balls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.live-plus { color: var(--muted); font-size: 16px; font-weight: 700; margin: 0 2px; }
.ball--pending {
  color: #b9aca6;
  background: #f1eae6;
  border: 1px dashed #d7c8c1;
  box-shadow: none;
}
.live-wait { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.live-mini {
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.draw-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.draw-refresh { gap: 4px; }
.draw-refresh span { font-size: 10px; }

.page--picker { padding-bottom: 32px; }
.picker-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr); gap: 18px; align-items: start; }
.picker-filters { display: grid; gap: 13px; }
.picker-group { padding: 15px 16px; border: 1px solid #eadfd4; border-radius: 16px; background: #fffdf9; box-shadow: 0 4px 14px rgba(80, 30, 20, 0.035); }
.picker-group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.picker-group-head h2 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; }
.picker-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.picker-chip { min-width: 37px; padding: 7px 10px; border: 1px solid #ead9cc; border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.16s ease; }
.picker-chip:hover { border-color: var(--red); color: var(--red-deep); }
.picker-chip.is-active { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 3px 8px rgba(160, 30, 30, 0.2); }
.picker-result-panel { position: sticky; top: 16px; padding: 18px; border: 1px solid #e7d7ca; border-radius: 18px; background: linear-gradient(145deg, #fffaf4, #fffefd); box-shadow: 0 12px 30px rgba(90, 25, 20, 0.06); }
.picker-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.picker-result-head h2 { margin: 4px 0 0; color: var(--red-deep); font-size: 19px; }
.picker-actions { display: flex; gap: 6px; flex-shrink: 0; }
.picker-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 12px; }
.picker-selected small { color: var(--muted); font-size: 10px; }
.picker-selected span { padding: 3px 6px; border-radius: 5px; background: #f7ebe2; color: #8c5141; font-size: 10px; }
.picker-number-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 14px; }
.picker-number { display: grid; place-items: center; min-height: 34px; border-radius: 9px; background: #f4ece6; color: #4e3b31; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.picker-number--red { background: #fde8e5; color: #b42318; }
.picker-number--blue { background: #e8effc; color: #234e9b; }
.picker-number--green { background: #e8f4e6; color: #27733a; }
.picker-empty { margin-top: 16px; padding: 20px 10px; border-radius: 10px; background: #faf3ed; color: var(--muted); font-size: 12px; text-align: center; }
.picker-hint { margin: 13px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
@media (max-width: 760px) {
  .picker-layout { grid-template-columns: 1fr; }
  .picker-result-panel { position: static; order: -1; }
  .picker-result-head h2 { font-size: 17px; }
  .picker-number-grid { grid-template-columns: repeat(7, 1fr); }
}

.post-author-name.is-privileged,
.byline-copy strong.is-privileged,
.author-card h3.is-privileged { color: #b31217; font-weight: 900; }
.privileged-tag {
  padding: 2px 5px;
  border-radius: 4px;
  background: #b31217;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.badge--privileged {
  background: #b31217;
  border-color: #b31217;
  color: #fff;
}

.captcha-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; padding: 9px 11px; border: 1px solid #ead9cc; border-radius: 9px; background: #fffaf5; }
.captcha-row strong { color: var(--red-deep); font-size: 16px; letter-spacing: 0.08em; }
.captcha-row .btn { flex: none; }

.draw-action-row--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) {
  .draw-action-row--four { grid-template-columns: repeat(2, 1fr); }
}

.page--drop { padding-bottom: 32px; }
.drop-today { padding: 18px; border: 1px solid #ead9cc; border-radius: 18px; background: linear-gradient(145deg, #fffaf4, #fffefd); box-shadow: 0 10px 26px rgba(80, 30, 20, 0.05); }
.drop-today--loading { min-height: 120px; display: grid; place-items: center; color: var(--muted); }
.drop-today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drop-today-head h2 { margin: 4px 0 2px; color: var(--red-deep); font-size: 22px; }
.drop-today-head p { margin: 0; color: var(--muted); font-size: 11px; }
.drop-today-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; padding: 9px 0; border-top: 1px dashed #ead8c3; border-bottom: 1px dashed #ead8c3; color: var(--muted); font-size: 11px; }
.drop-today-meta strong { color: var(--red-deep); font-size: 15px; }
.drop-today-meta em { margin-right: 4px; padding: 2px 5px; border-radius: 4px; background: #f6e9de; color: #8c5141; font-style: normal; }
.drop-groups { display: grid; gap: 9px; }
.drop-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; background: #fff; border: 1px solid #f0e2d7; }
.drop-group-numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.drop-group-numbers .picker-number { min-width: 38px; min-height: 30px; }
.drop-multiplier { color: var(--red-deep); font-size: 15px; font-weight: 800; white-space: nowrap; }
.drop-section-title { margin: 20px 0 10px; font-size: 17px; color: var(--ink); }
.drop-table td { vertical-align: middle; }
.drop-history-numbers { display: flex; flex-wrap: wrap; gap: 4px; }
.drop-history-numbers span { padding: 3px 5px; border-radius: 4px; background: #f7efe8; color: #4e3b31; font-size: 10px; font-weight: 700; }
.drop-status { display: inline-block; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.drop-status--hit { background: #e6f4e8; color: #27733a; }
.drop-status--miss { background: #fde8e5; color: #b42318; }
.drop-status--pending { background: #fff4d9; color: #8c6411; }
.drop-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 11px; }
@media (max-width: 560px) {
  .drop-today-head { display: grid; }
  .drop-group { align-items: flex-start; }
}

.drop-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #eccfc8; border-radius: 13px; background: linear-gradient(135deg, #fff7f3, #fdebe6); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(140, 30, 20, 0.05); }
.drop-banner-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--red); color: #fff; flex: none; }
.drop-banner-icon svg { width: 16px; height: 16px; }
.drop-banner-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.drop-banner-copy strong { color: var(--red-deep); font-size: 13px; }
.drop-banner-copy small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-banner > svg { color: var(--red); width: 15px; flex: none; }

.drop-history-zodiacs { display: flex; flex-wrap: wrap; gap: 3px; }
.drop-history-zodiacs span { padding: 2px 5px; border-radius: 4px; background: #f6e9de; color: #8c5141; font-size: 10px; font-weight: 700; }

.drop-history-zodiacs .drop-zodiac--hit,
.drop-today-meta .drop-zodiac--hit { background: #b31217; color: #fff; }
.drop-today-meta .drop-zodiac--hit { padding: 2px 5px; border-radius: 4px; font-style: normal; }

.drop-status--zodiac { background: #fff0d4; color: #a15c00; }

.footer-note {
  margin: 7px auto 0 !important;
  color: #8f6f60 !important;
  font-size: 9px !important;
  letter-spacing: 0.08em;
}

.feedback-card {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ead9cc;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffaf4, #fffefd);
}
.feedback-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}
.feedback-summary::-webkit-details-marker { display: none; }
.feedback-summary-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 8px;
  background: #f7e5dd;
  color: var(--red);
}
.feedback-summary-icon .icon { width: 15px; height: 15px; }
.feedback-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.feedback-summary-copy strong { color: var(--ink); font-size: 13px; }
.feedback-summary-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-chevron { color: var(--muted); transition: transform 0.18s ease; }
.feedback-chevron .icon { width: 14px; height: 14px; }
.feedback-card[open] .feedback-chevron { transform: rotate(90deg); }
.feedback-card[open] .feedback-summary { border-bottom: 1px solid #f0e2d7; }
.feedback-form-body { padding: 13px 15px 15px; }
.feedback-card textarea { min-height: 92px; resize: vertical; }
.feedback-card .field { margin-bottom: 10px; }

.pre-draw {
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid #ead9cc;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf4, #fff5ef);
  box-shadow: 0 6px 16px rgba(90, 35, 20, 0.05);
}
.pre-draw-head { display: flex; align-items: center; gap: 9px; }
.pre-draw-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pre-draw-head strong { color: var(--ink); font-size: 14px; }
.pre-draw-head small { color: var(--muted); font-size: 9px; }
.pre-draw-countdown { color: var(--red-deep); font-size: 10px; white-space: nowrap; }
.pre-draw .live-balls { margin-top: 10px; }
.pre-draw .live-dot { flex: none; }
.ball--drawing-word {
  color: #5f4a40;
  background: #eee7e2;
  border: 1px solid #ddd0c8;
  box-shadow: none;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0;
}

.page--boot { min-height: 62vh; display: grid; place-items: center; }
.boot-screen { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); }
.boot-logo { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 3px; }
.boot-logo svg { width: 48px; height: 48px; }
.boot-screen strong { color: var(--ink); font-size: 17px; letter-spacing: -0.01em; }
.boot-screen > span:last-child { font-size: 10px; letter-spacing: 0.08em; }

.ad-carousel {
  position: relative;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #ead9cc;
  border-radius: 16px;
  background: #f7eee8;
  aspect-ratio: 16 / 6;
}
.ad-track { position: absolute; inset: 0; }
.ad-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.ad-slide.is-active { opacity: 1; visibility: visible; }
.ad-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-carousel-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 12px 9px;
  background: linear-gradient(transparent, rgba(30, 8, 5, 0.7));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}
.ad-dots { position: absolute; right: 9px; bottom: 8px; display: flex; gap: 4px; z-index: 2; }
.ad-dot { width: 5px; height: 5px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,0.55); }
.ad-dot.is-active { width: 13px; border-radius: 4px; background: #fff; }

.home-site-ad {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 8px 10px;
  border: 1px solid #ead9cc;
  border-radius: 10px;
  background: #fffaf4;
  color: var(--ink);
  text-decoration: none;
}
.home-site-ad-label { flex: none; padding: 2px 5px; border-radius: 4px; background: var(--red); color: #fff; font-size: 8px; font-weight: 800; letter-spacing: 0.04em; }
.home-site-ad-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.home-site-ad-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-site-ad-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.home-site-ad > svg { width: 13px; flex: none; color: var(--red); }

.podium-card { color: inherit; text-decoration: none; }
.author-card--profile { margin-top: 10px; align-items: center; }
.author-profile-stats { display: flex; gap: 14px; margin-left: auto; flex: none; }
.author-profile-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 9px; }
.author-profile-stats b { color: var(--ink); font-size: 16px; }
@media (max-width: 560px) {
  .author-card--profile { align-items: flex-start; flex-wrap: wrap; }
  .author-profile-stats { margin-left: 0; width: 100%; }
}

.gallery-favorites {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #ead6c4;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf4, #f8eadb);
}
.gallery-favorites-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gallery-favorites-title { display: flex; align-items: center; gap: 5px; color: #5c3a2d; font-size: 12px; }
.gallery-favorites-title .icon { width: 14px; height: 14px; color: #a55a2a; }
.gallery-favorites-title span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #ecd6c2; color: #7c4b32; font-size: 10px;
}
.gallery-favorite-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #d8bba4; border-radius: 999px; background: #fff;
  color: #8a4a2c; padding: 6px 9px; font-size: 10px; font-weight: 700;
}
.gallery-favorite-toggle .icon { width: 12px; height: 12px; }
.gallery-favorite-toggle.is-active { background: #9a1c22; border-color: #9a1c22; color: #fff; }
.gallery-favorites-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.gallery-favorite-chip {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid #dfc7b3; border-radius: 999px; background: #fffaf4;
}
.gallery-favorite-chip.is-active { border-color: #9a1c22; }
.gallery-favorite-open {
  border: 0; background: transparent; color: #6e4635;
  padding: 6px 4px 6px 10px; font-size: 11px; font-weight: 700;
}
.gallery-favorite-chip.is-active .gallery-favorite-open { color: #9a1c22; }
.gallery-favorite-remove {
  border: 0; background: transparent; color: #a88976;
  padding: 6px 8px 6px 2px; font-size: 13px; line-height: 1;
}
.gallery-favorite-remove:active, .gallery-favorite-open:active { opacity: .6; }
.gallery-favorites-empty { margin: 8px 0 0; color: #9b7a65; font-size: 11px; line-height: 1.5; }

/* Hall of Fame */
.page--hall .page-head h1 { color: var(--red-deep); }
.hall-wallet {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 12px; padding: 12px 14px;
  border-radius: 16px; color: #fff8ec;
  background:
    radial-gradient(circle at 88% 10%, rgba(230, 180, 92, .30), transparent 35%),
    linear-gradient(135deg, #781016, #a61a25 62%, #6c0c12);
  box-shadow: 0 8px 20px rgba(111, 17, 24, .18);
}
.hall-wallet-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.hall-wallet-label .icon { width: 15px; height: 15px; color: #f3d9a5; }
.hall-wallet-value { font-size: 22px; letter-spacing: .02em; margin-left: auto; color: #f7dda8; }
.hall-wallet-link {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 5px 9px; border: 1px solid rgba(255, 234, 198, .35);
  border-radius: 999px; color: #ffe9c4; font-size: 10px; font-weight: 700;
}
.hall-wallet-link .icon { width: 12px; height: 12px; }
.hall-toolbar { margin-top: 2px; }
.hall-types { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.hall-types::-webkit-scrollbar { display: none; }
.hall-type {
  flex: 0 0 auto; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 11px; font-size: 11px; font-weight: 700;
}
.hall-type.is-active { color: #fff; border-color: var(--red); background: var(--red); }
.hall-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 2px 10px; }
.hall-section-head h2 { margin: 0; color: var(--ink); font-size: 19px; }
.hall-section-head > span { color: var(--muted); font-size: 11px; }
.hall-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hall-card {
  display: block; position: relative; overflow: hidden;
  padding: 14px; border: 1px solid #ead6c4; border-radius: 16px;
  background:
    radial-gradient(circle at 95% 0, rgba(201, 151, 63, .14), transparent 34%),
    linear-gradient(135deg, #fffdf9, #fff8ee);
  box-shadow: var(--shadow-soft);
}
.hall-card:active { transform: scale(.993); }
.hall-card-head { display: flex; align-items: center; gap: 10px; }
.hall-card-identity { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.hall-card-identity strong { color: var(--ink); font-size: 17px; line-height: 1.2; }
.hall-card-identity small { color: var(--muted); font-size: 10px; }
.hall-badge {
  width: fit-content; margin-top: 3px; padding: 2px 7px;
  border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep);
  font-size: 9px; font-weight: 700;
}
.hall-score { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.hall-score b { color: var(--red); font-size: 23px; line-height: 1; }
.hall-score small { color: var(--muted); font-size: 9px; }
.hall-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.hall-card-meta span { padding: 3px 7px; border-radius: 6px; background: #f6ecdf; color: #7c5a45; font-size: 10px; }
.hall-card-latest { margin-top: 10px; padding: 9px 10px; border-radius: 9px; background: rgba(255,255,255,.66); border: 1px solid #f0dfcd; }
.hall-card-latest small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 2px; }
.hall-card-latest strong { display: block; color: var(--ink-2); font-size: 12px; line-height: 1.45; font-weight: 600; }
.hall-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.hall-open { display: inline-flex; align-items: center; gap: 2px; color: var(--red); font-size: 10px; font-weight: 700; }
.hall-open .icon { width: 12px; height: 12px; }
.coin-pill {
  display: inline-flex; width: fit-content; align-items: center; gap: 3px;
  margin-top: 7px; padding: 3px 8px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-deep);
  font-size: 10px; font-weight: 800;
}
.coin-pill.is-locked { background: #fbe8e8; color: var(--red); }
.coin-pill--free { background: #eef5ea; color: #3d6b45; }
.locked-panel {
  margin: 16px 0; padding: 22px 18px; text-align: center;
  border: 1px dashed #d9b99b; border-radius: 16px;
  background: linear-gradient(135deg, #fffaf2, #f8ebdc);
}
.locked-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--red-soft); color: var(--red); }
.locked-icon .icon { width: 21px; height: 21px; }
.locked-panel h3 { margin: 10px 0 4px; color: var(--ink); font-size: 19px; }
.locked-panel p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.locked-balance { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
@media (min-width: 560px) {
  .hall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.task-badge {
  display: inline-flex; padding: 2px 7px; border-radius: 6px;
  background: #eef2fb; color: #31518c; font-size: 9px; font-weight: 700;
}

.compose-picker { margin-top: 3px; }
.compose-pick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.compose-pick-row[hidden] { display: none; }
.compose-pick {
  min-width: 44px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: var(--surface-soft);
  color: var(--ink-2); padding: 8px 9px; font-size: 12px; font-weight: 700;
}
.compose-pick.is-selected {
  border-color: var(--red); background: var(--red); color: #fff;
  box-shadow: 0 3px 8px rgba(179, 23, 34, .16);
}
.compose-pick:active { transform: scale(.95); }
#compose-pick-count { margin-top: 7px; }

.author-follow-row { margin: -2px 0 12px; }

.author-social-stats { display: flex; gap: 18px; margin: -2px 0 10px; padding: 0 4px; }
.author-social-stats a, .author-social-stats span { display: flex; flex-direction: column; color: var(--muted); font-size: 10px; }
.author-social-stats b { color: var(--ink); font-size: 15px; }
.author-follow-row { display: flex; gap: 6px; margin-bottom: 14px; }
.author-follow-row .btn { flex: 1; }
.follower-list { display: flex; flex-direction: column; gap: 8px; }
.follower-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.follower-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.follower-row strong { color: var(--ink); font-size: 14px; }
.follower-row small { color: var(--muted); font-size: 10px; }
.follower-row .icon { width: 14px; height: 14px; color: var(--muted); }
.tip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tip-amount { border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-soft); color: var(--red-deep); padding: 14px; font-weight: 800; font-size: 14px; }

.author-record {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 0 0 10px; padding: 9px 8px;
  border: 1px solid #ead6c4; border-radius: 11px; background: #fffaf4;
}
.author-record > span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.author-record b { color: var(--ink); font-size: 14px; }
.author-record small { color: var(--muted); font-size: 9px; }
.author-record .author-record-main b { color: var(--red); font-size: 16px; }

.post-excerpt--compact { margin: 6px 0 0; font-size: 10px; }
.post-excerpt--locked { color: var(--red); font-weight: 700; }

.tip-section-label { margin: 14px 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.tip-amount--flower { color: #6c4b7c; background: #fbf2ff; border-color: #dec6eb; }
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.ranking-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.ranking-no { width: 20px; color: var(--muted); font-size: 12px; text-align: center; }
.ranking-row:nth-child(1) .ranking-no { color: #b7791f; font-size: 16px; }
.ranking-copy { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ranking-copy strong { font-size: 14px; }
.ranking-copy small { color: var(--muted); font-size: 10px; }
.ranking-flowers { color: #7a4f8c; font-size: 13px; font-weight: 800; }

.menu-card--danger { border-color: #efc9c9; }
.menu-row--danger { color: var(--red); }
.menu-row--danger .menu-copy strong { color: var(--red); }

.growth-badge {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; font-size: 10px; font-weight: 800;
}
.growth-progress { margin: 0 0 12px; padding: 9px 11px; border-radius: 10px; background: #fffaf4; border: 1px solid #ead6c4; }
.growth-progress-head { display: flex; flex-direction: column; gap: 2px; }
.growth-progress-head strong { color: var(--red-deep); font-size: 12px; }
.growth-progress-head span { color: var(--muted); font-size: 9px; }
.growth-bar { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #eadfd2; }
.growth-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d64a54, #a8121c); }
.author-growth { margin: -3px 0 10px; color: #7a4f8c; font-size: 11px; font-weight: 800; }

.member-name { color: #c0182a !important; }
.profile-hero .member-name { color: #ff7b84 !important; }
.membership-hero { margin-bottom: 12px; padding: 20px 16px; border-radius: 16px; background: #1c1714; color: #fff; }
.membership-hero.is-active { background: linear-gradient(135deg, #3a0c12, #8f111b); }
.membership-kicker { font-size: 9px; letter-spacing: .18em; color: #d7b98e; }
.membership-hero h2 { margin: 5px 0 3px; font-size: 22px; }
.membership-hero p { margin: 0; color: #e8d9d0; font-size: 12px; }
.membership-hero small { display: block; margin-top: 6px; color: #d7b98e; font-size: 10px; }
.membership-benefits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.membership-benefits span { padding: 4px 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: 9px; }
.membership-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.membership-plan { padding: 13px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.membership-plan--annual { border-color: #b98b4e; background: #fffaf0; }
.membership-plan strong { display: block; margin: 4px 0; color: var(--red-deep); font-size: 18px; }
.membership-plan p { min-height: 28px; margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.membership-wallet { display: flex; justify-content: space-between; margin: 12px 0; color: var(--muted); font-size: 11px; }
.membership-wallet b { color: var(--ink); }
.membership-rename { margin-bottom: 8px; }
.membership-note { color: var(--muted); font-size: 10px; line-height: 1.5; }

.forum-toolbar { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.forum-toolbar .chip-row { display: flex; gap: 6px; overflow-x: auto; }
.forum-compose-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 10px; }

.red-packet-section { margin: 12px 0; }
.red-packet-card { padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #8f111b, #c53a43); color: #fff; }
.red-packet-card:not(.is-active) { background: #f1ebe4; color: var(--ink); }
.red-packet-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.red-packet-top strong { font-size: 18px; }
.red-packet-card p { margin: 8px 0 4px; font-size: 12px; }
.red-packet-card small { color: rgba(255,255,255,.75); font-size: 10px; }
.red-packet-card:not(.is-active) small { color: var(--muted); }
.red-packet-card .btn { margin-top: 10px; }
.red-packet-claimed, .red-packet-note { display: block; margin-top: 9px; font-size: 11px; }
.red-packet-form label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.red-packet-form input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.comments-section { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.comments-head h2 { margin: 0; font-size: 14px; }
.comments-head small { color: var(--muted); font-size: 10px; }
.comment-form { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 10px; }
.comment-form textarea { flex: 1; min-height: 46px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; font: inherit; resize: vertical; }
.comment-login { display: block; margin-bottom: 10px; padding: 9px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--red); font-size: 11px; text-align: center; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-row { display: flex; gap: 9px; }
.comment-copy { flex: 1; min-width: 0; }
.comment-copy > div { display: flex; align-items: baseline; gap: 7px; }
.comment-copy strong { font-size: 12px; }
.comment-copy small { color: var(--muted); font-size: 9px; }
.comment-copy p { margin: 3px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.comments-empty { color: var(--muted); font-size: 11px; }

.forum-compose-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.forum-compose-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.forum-compose-top a { color: var(--red); font-size: 11px; font-weight: 700; }
.forum-title-input { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-size: 17px; font-weight: 700; outline: none; }
.forum-input-meta { display: flex; justify-content: flex-end; color: var(--muted); font-size: 9px; margin: 2px 0 8px; }
.forum-rules { margin: 8px 0 10px; padding: 9px 11px; border-radius: 9px; background: #f7f3ed; color: var(--muted); font-size: 10px; line-height: 1.5; }
.forum-rules strong { color: var(--ink-2); }
.forum-rules p { margin: 3px 0 0; }
.forum-body-input { width: 100%; min-height: 210px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; }
.forum-tools { display: flex; gap: 8px; align-items: center; margin: 2px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.forum-tool { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 700; text-decoration: none; }
.forum-tool--red { color: var(--red); }
.forum-cover-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.forum-cover-pick { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 8px; background: #f1e9dd; color: var(--ink-2); font-size: 11px; }
.forum-cover-pick input { display: none; }
.forum-cover-pick .icon { width: 15px; height: 15px; }
.forum-publish-btn { margin-top: 2px; }
.forum-publish-note { color: var(--muted); font-size: 10px; line-height: 1.5; }

.forum-game-select { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.forum-game-select select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font: inherit; font-size: 11px; }
.forum-game-select small { width: 100%; color: var(--muted); }
.forum-game-select small.is-full { color: var(--red); font-weight: 700; }

.forum-post-meta { margin: 4px 0 8px; color: var(--muted); font-size: 10px; }

.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.emoji-btn { border: 0; border-radius: 8px; background: transparent; padding: 7px 0; font-size: 22px; line-height: 1; }
.emoji-btn:active { background: var(--surface-soft); }

.checkin-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px; border: 1px solid #ead6c4;
  border-radius: 11px; background: #fffaf4;
}
.checkin-card span { display: flex; flex-direction: column; gap: 2px; }
.checkin-card strong { font-size: 12px; color: var(--ink); }
.checkin-card small { font-size: 9px; color: var(--muted); }

.avatar--image { object-fit: cover; display: inline-block; border-radius: 50%; }
.account-avatar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.account-avatar-row > div { display: flex; flex-direction: column; gap: 3px; }
.account-avatar-row strong { font-size: 14px; color: var(--ink); }
.account-avatar-row small { color: var(--muted); font-size: 10px; }
.account-avatar-row .btn { margin-top: 4px; align-self: flex-start; }
.password-form { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.password-form h4 { margin: 0 0 2px; font-size: 12px; }
.password-form input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }

.profile-account-avatar--image { object-fit: cover; border-radius: 50%; }

.profile-stats--social { flex-wrap: wrap; }
.profile-stats--social a { color: inherit; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.profile-stats--social a strong { color: var(--ink); }
.profile-activity { display: grid; gap: 8px; margin: 0 0 12px; }
.profile-activity-card { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
.profile-activity-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-activity-head strong { font-size: 12px; color: var(--ink); }
.profile-activity-head b { color: var(--red); font-size: 12px; }
.profile-activity-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-avatar--image { overflow: hidden; padding: 0; background: transparent; }
.account-avatar--image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-logout { margin-left: auto; }
@media (max-width: 520px) {
  .profile-logout { margin-left: 0; }
}

.hall-types--pay { padding-top: 0; margin-top: -8px; }

button.menu-row {
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed #eddfcf;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
button.menu-row:last-child { border-bottom: 0; }
button.menu-row:focus { outline: none; }
button.menu-row:focus-visible { outline: 2px solid rgba(196,32,44,.25); outline-offset: -2px; }

@media (max-width: 760px) {
  .picker-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .picker-group {
    padding: 10px 11px;
    border-radius: 12px;
  }
  .picker-group-head {
    margin-bottom: 6px;
  }
  .picker-group-head h2 {
    font-size: 12px;
  }
  .picker-chips {
    gap: 4px;
  }
  .picker-chip {
    min-width: 30px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 11px;
  }
  .picker-group--wide {
    grid-column: 1 / -1;
  }
  .picker-group--wide .picker-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .picker-group--wide .picker-chips::-webkit-scrollbar {
    display: none;
  }
  .picker-group--wide .picker-chip {
    flex: 0 0 auto;
  }
  .picker-number-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 5px;
  }
  .picker-number {
    min-height: 30px;
    font-size: 11px;
  }
}

/* Compact picker layout: result first, then zodiac / tail / head rows. */
.picker-layout {
  grid-template-columns: 1fr;
  gap: 12px;
}
.picker-result-panel {
  position: static;
  order: -1;
  padding: 16px;
}
.picker-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.picker-group {
  order: 4;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 12px;
}
.picker-group-head { margin-bottom: 6px; }
.picker-group-head h2 { font-size: 12px; }
.picker-chips { gap: 4px; }
.picker-chip {
  min-width: 30px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 11px;
}
.picker-group[data-group="zodiac"] {
  order: 1;
  grid-column: 1 / -1;
}
.picker-group[data-group="tail"] {
  order: 2;
  grid-column: 1 / -1;
}
.picker-group[data-group="head"] {
  order: 3;
  grid-column: 1 / -1;
}
.picker-group--wide { grid-column: 1 / -1; }
.picker-group[data-group="zodiac"] .picker-chips,
.picker-group[data-group="tail"] .picker-chips,
.picker-group[data-group="head"] .picker-chips,
.picker-group--wide .picker-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.picker-group[data-group="zodiac"] .picker-chips::-webkit-scrollbar,
.picker-group[data-group="tail"] .picker-chips::-webkit-scrollbar,
.picker-group[data-group="head"] .picker-chips::-webkit-scrollbar,
.picker-group--wide .picker-chips::-webkit-scrollbar { display: none; }
.picker-group[data-group="zodiac"] .picker-chip,
.picker-group[data-group="tail"] .picker-chip,
.picker-group[data-group="head"] .picker-chip,
.picker-group--wide .picker-chip { flex: 0 0 auto; }
.picker-number-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}
.picker-number {
  min-height: 30px;
  font-size: 11px;
}

.author-results {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
}
.author-results-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.author-results-head h2 { margin: 0; font-size: 13px; color: var(--ink); }
.author-results-head span { color: var(--muted); font-size: 10px; }
.author-result-table { display: grid; gap: 1px; overflow: hidden; border-radius: 8px; background: #f2e7dc; }
.author-result-row { display: grid; grid-template-columns: 1.25fr 1fr .65fr .55fr; gap: 6px; align-items: center; padding: 7px 8px; background: #fffdf9; font-size: 10px; color: var(--ink-2); }
.author-result-row--head { background: #f8efe5; color: var(--muted); font-weight: 700; }
.author-result-badge { justify-self: start; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.author-result-badge.is-hit { color: #237a42; background: #e7f5eb; }
.author-result-badge.is-miss { color: #a53535; background: #fbe9e7; }

/* Give zodiac captions enough breathing room, especially under the special ball. */
.ball-row--zodiac { row-gap: 6px; padding-bottom: 3px; }
.ball-cell { padding-bottom: 2px; }
.zodiac-label {
  max-width: none;
  overflow: visible;
  line-height: 1.35;
  padding-bottom: 1px;
}
.zodiac-label--special { padding-bottom: 2px; }
.draw-ticket-balls { margin-bottom: 14px; }
.draw-card-balls { margin-bottom: 12px; }

/* Keep all seven balls on one row on mobile. */
@media (max-width: 520px) {
  .draw-card-balls .ball-row,
  .draw-ticket-balls .ball-row,
  .ball-row--lg {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .draw-card-balls .ball--xl,
  .draw-ticket-balls .ball--xl {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .draw-card-balls .ball-cell,
  .draw-ticket-balls .ball-cell {
    min-width: 0;
  }

  .draw-card-balls .zodiac-label,
  .draw-ticket-balls .zodiac-label {
    font-size: 7px;
  }

  .draw-card-balls .ball-plus,
  .draw-ticket-balls .ball-plus {
    margin-left: -2px;
    margin-right: -2px;
  }
}

@media (max-width: 360px) {
  .draw-card-balls .ball--xl,
  .draw-ticket-balls .ball--xl {
    width: 31px;
    height: 31px;
    font-size: 11px;
  }
}

/* Keep the profile name horizontal on mobile; move badges and logout below the identity row. */
@media (max-width: 520px) {
  .profile-hero-top {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 8px;
  }

  .profile-copy {
    flex: 1 1 calc(100% - 69px);
    max-width: calc(100% - 69px);
  }

  .profile-copy h1 {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-hero-top > .badge,
  .profile-hero-top > .growth-badge,
  .profile-logout {
    order: 2;
    margin-left: 0;
  }
}
