:root {
  --navy: #112a55;
  --blue: #174a8b;
  --sky: #eaf5ff;
  --gold: #f7b718;
  --gold-dark: #d99200;
  --red: #d8283f;
  --paper: #fffdf7;
  --cream: #fff6d9;
  --ink: #162037;
  --muted: #728096;
  --line: #e6e2d7;
  --green: #17956b;
  --shadow: 0 12px 35px rgba(17, 42, 85, .12);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0, rgba(247, 183, 24, .18), transparent 34%),
    linear-gradient(180deg, #fff9e9 0, #f7f9fc 460px);
  color: var(--ink);
  font-family: Nunito, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
h2 { font-size: 20px; letter-spacing: -.02em; }
.app-shell { width: 100%; max-width: 1108px; min-height: 100vh; margin: 0 auto; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.app-column { min-width: 0; position: relative; }
.content { padding: 30px 28px 70px; }

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  background: var(--navy);
  color: white;
  border-right: 5px solid var(--gold);
  display: flex;
  flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; margin: 0 6px 30px; }
.brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }
.brand span { display: flex; flex-direction: column; }
.brand strong { color: var(--gold); font-family: "Alfa Slab One", serif; font-size: 20px; letter-spacing: .02em; }
.brand small { font-size: 11px; color: #a8bad7; text-transform: uppercase; letter-spacing: .08em; }
.desktop-links { display: grid; gap: 6px; }
.desktop-links a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #bfd0eb;
  font-weight: 800;
  text-decoration: none;
  border-radius: 13px;
}
.desktop-links a b { width: 24px; text-align: center; }
.desktop-links a.on, .desktop-links a:hover { color: var(--navy); background: var(--gold); }
.side-contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;
  padding: 8px;
  color: #dbe8fa;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.contact-link:hover { transform: translateY(-2px); border-color: rgba(247,183,24,.7); background: rgba(247,183,24,.14); }
.contact-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact-link span { font-size: 11px; font-weight: 900; }
.contact-link.contact-admin { color: #ffe28a; }
.contact-link.contact-chat { color: #a9dcff; }
.lang-picker { position: relative; margin-top: auto; }
.side-contact-links + .lang-picker--side { margin-top: 10px; }
.lang-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  color: #e8f0ff;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.lang-picker-btn strong { font-size: 12px; letter-spacing: .04em; }
.lang-picker-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 2px;
  padding: 8px;
  background: #0d2248;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0,0,0,.35);
}
.lang-picker-menu[hidden] { display: none !important; }
.lang-picker-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  color: #d5e3f8;
  text-decoration: none;
  border-radius: 11px;
  font-weight: 800;
}
.lang-picker-menu a b { font-size: 11px; letter-spacing: .06em; }
.lang-picker-menu a span { color: #9eb2d2; font-size: 12px; font-weight: 700; }
.lang-picker-menu a.on,
.lang-picker-menu a:hover { color: var(--navy); background: var(--gold); }
.lang-picker-menu a.on span,
.lang-picker-menu a:hover span { color: #6d5200; }
.lang-picker.is-open .lang-picker-btn { border-color: var(--gold); background: rgba(247,183,24,.18); }
.mobile-header, .bottom-nav { display: none; }
.header-contact-links { display: flex; align-items: center; gap: 5px; }
.header-contact {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(17,42,85,.08);
}
.header-contact svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.header-contact.contact-admin { color: #9a6800; border-color: #ecd58d; background: linear-gradient(145deg, #fff9dd, #ffedaf); }
.header-contact.contact-chat { color: #116d9f; border-color: #b9dff0; background: linear-gradient(145deg, #f0fbff, #d8f2ff); }
.header-contact > i { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: var(--green); }

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { display: block; color: var(--red); font-size: 12px; line-height: 1.4; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 7px; }
.round-action {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.vault-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: white;
}
.vault-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vault-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 28, 64, .92), rgba(8, 28, 64, .2)); }
.vault-content { position: relative; z-index: 1; padding: 34px; max-width: 430px; }
.vault-content > span { font-size: 13px; font-weight: 800; color: #fff0ad; }
.vault-content > strong { display: block; margin: 7px 0; font-size: clamp(35px, 8vw, 54px); line-height: 1; letter-spacing: -.04em; }
.vault-content strong small { font-size: 15px; letter-spacing: 0; }
.vault-content p { margin: 14px 0 0; font-weight: 800; font-size: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.quick-grid a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  min-height: 120px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(17, 42, 85, .07);
}
.quick-grid i { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 8px; background: var(--cream); border-radius: 13px; font-style: normal; font-size: 20px; }
.quick-grid strong { font-size: 14px; }
.quick-grid small { color: var(--muted); font-size: 12px; }
.stats-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.stats-strip div { background: white; padding: 16px 18px; }
.stats-strip span, .stats-strip strong { display: block; }
.stats-strip span { color: var(--muted); font-size: 12px; }
.stats-strip strong { margin-top: 4px; font-size: 20px; }
.stats-strip strong small { font-size: 12px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }
.section-title a { color: var(--blue); font-size: 13px; font-weight: 900; text-decoration: none; }

.chest-list, .ledger-list, .admin-list { display: grid; gap: 9px; }
.chest-item, .ledger-list article, .admin-list article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.chest-icon, .ledger-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--cream); }
.chest-icon.active { color: #805000; background: linear-gradient(145deg, #fff8d7, #ffe6a1); box-shadow: inset 0 0 0 1px #f4da86; }
.chest-icon.done { color: white; background: linear-gradient(145deg, #35b68a, #11845f); }
.chest-main { min-width: 0; flex: 1; }
.chest-main strong, .chest-main span, .chest-result strong, .chest-result span, .ledger-list article small { display: block; }
.chest-main strong { font-size: 15px; }
.chest-main span, .chest-result span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.chest-result { flex: 0 0 auto; text-align: right; }
.chest-result strong { color: var(--green); font-size: 15px; }
.chest-result strong small { display: inline; color: inherit; font-size: 11px; }
.ledger-list article { min-height: 86px; border-color: #e8e2d5; box-shadow: 0 7px 20px rgba(17,42,85,.045); }
.ledger-list article > div { flex: 1; min-width: 0; }
.ledger-list article > div strong, .ledger-list article > div small, .ledger-list article > p strong, .ledger-list article > p small { display: block; }
.ledger-list article > div strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.ledger-list article > div small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.ledger-list article > p { flex: 0 0 auto; margin: 0; text-align: right; }
.ledger-list article > p strong { white-space: nowrap; font-size: 14px; }
.ledger-list article > p strong i { color: var(--muted); font-size: 11px; font-style: normal; }
.ledger-icon { font-size: 18px; }
.tone-reward .ledger-icon { background: linear-gradient(145deg, #fff4b8, #ffd55a); box-shadow: inset 0 0 0 1px #e7b832; }
.tone-reward > p strong { color: #b47700; }
.tone-in .ledger-icon { color: #087451; background: #e0f8ee; }
.tone-in > p strong { color: var(--green); }
.tone-out .ledger-icon { color: #a6243a; background: #ffe7eb; }
.tone-out > p strong { color: var(--red); }
.status-pill { display: inline-flex !important; width: fit-content; margin-left: auto; padding: 4px 9px; border-radius: 99px; color: #52647b !important; background: #edf1f5; font-size: 11px !important; font-weight: 900; white-space: nowrap; }
.status-completed { color: #087451 !important; background: #dff7ed; }
.status-active, .status-pre_notified, .status-processing { color: #15549a !important; background: #e3f0ff; }
.status-queued, .status-skipped, .status-manual_check { color: #8a5b00 !important; background: #fff0c5; }
.status-failed, .status-cancelled { color: #9f2338 !important; background: #ffe5ea; }

.empty-card { padding: 35px 20px; text-align: center; background: white; border: 1px dashed #d9c781; border-radius: 22px; }
.empty-card > span { font-size: 38px; }
.empty-card h3 { margin: 9px 0 5px; }
.empty-card p { max-width: 370px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; }
.empty-card.compact { padding: 24px; }
.subtle { color: var(--muted); font-size: 13px; }

.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plan-card, .form-card, .deposit-card, .invite-card {
  position: relative;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(17, 42, 85, .07);
}
.plan-card.featured { border: 2px solid var(--gold); }
.popular { position: absolute; top: -9px; right: 17px; padding: 4px 10px; border-radius: 99px; background: var(--gold); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.plan-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.plan-top span, .plan-top strong { display: block; }
.plan-top span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.plan-top strong { margin-top: 3px; font-size: 27px; }
.plan-top strong small { font-size: 13px; }
.plan-return { text-align: right; }
.plan-return strong { color: var(--green); }
.coin-track { height: 5px; margin: 0 0 17px; overflow: hidden; border-radius: 99px; background: #f0ead8; }
.coin-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #ffdb55); }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--ink);
  background: #f8f7f2;
  border: 1px solid #ddd9cc;
  border-radius: 13px;
  outline: none;
}
.field input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(247, 183, 24, .17); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 55px; }
.input-wrap b { position: absolute; right: 12px; top: 15px; color: var(--muted); font-size: 12px; }
.check-row { display: flex; gap: 8px; align-items: center; margin: 12px 0 16px; color: var(--muted); font-size: 12px; }
.check-row input { accent-color: var(--gold-dark); }

/* Golden 25-day cycle */
.cycle-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  min-height: 250px;
  margin-bottom: 18px;
  padding: 34px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,220,91,.28), transparent 28%),
    linear-gradient(135deg, #0d244e, #174a8b 64%, #102b5b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(17,42,85,.2);
}
.cycle-hero::after { content: ""; position: absolute; right: -80px; bottom: -110px; width: 330px; height: 220px; border-radius: 50%; background: rgba(247,183,24,.16); transform: rotate(-12deg); }
.cycle-hero-copy { position: relative; z-index: 2; max-width: 570px; }
.cycle-hero .eyebrow { color: #ffd863; }
.cycle-hero h1 { margin-bottom: 10px; color: white; font-family: "Alfa Slab One", serif; font-weight: 400; }
.cycle-hero p { margin: 0; color: #d6e3f8; font-size: 14px; }
.cycle-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cycle-badges span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; background: rgba(255,255,255,.09); color: #fff7d2; font-size: 12px; font-weight: 900; }
.cycle-vault { position: relative; z-index: 2; width: 160px; height: 160px; margin: auto; display: grid; place-items: center; border: 10px solid #e6a50b; border-radius: 50%; background: radial-gradient(circle, #fff4b5 0 15%, #f7b718 16% 48%, #9a5e00 50% 53%, #122e60 54%); box-shadow: 0 0 0 7px rgba(255,255,255,.1), 0 22px 35px rgba(0,0,0,.28), inset 0 0 28px rgba(79,39,0,.38); }
.vault-door { font-size: 49px; filter: drop-shadow(0 6px 3px rgba(78,42,0,.3)); }
.cycle-vault i, .cycle-vault b { position: absolute; padding: 5px 8px; border-radius: 9px; color: #102b5b; background: #ffe986; box-shadow: 0 5px 12px rgba(0,0,0,.25); font-style: normal; font-size: 13px; }
.cycle-vault i { top: 7px; right: -9px; } .cycle-vault b { bottom: 9px; left: -9px; }
.gold-cycle-card { padding: 24px; background: rgba(255,255,255,.94); border: 1px solid #ead89d; border-radius: 24px; box-shadow: var(--shadow); }
.cycle-form-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.cycle-amount input { height: 58px; font-size: 22px; font-weight: 900; background: #fffaf0; }
.cycle-amount .input-wrap b { top: 21px; }
.field-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.4; }
.field-hint.is-error { color: #b42318; }
input.is-invalid { border-color: #f3a4a0 !important; background: #fff5f5 !important; }
.cycle-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cycle-preview > div { padding: 12px; border-radius: 14px; background: #f5f7fa; border: 1px solid #edf0f4; }
.cycle-preview span, .cycle-preview strong { display: block; }
.cycle-preview span { color: var(--muted); font-size: 12px; font-weight: 800; }
.cycle-preview strong { margin-top: 3px; color: var(--green); font-size: 14px; }
.mode-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.mode-picker legend { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.mode-option { position: relative; display: grid; grid-template-columns: 42px 1fr 22px; align-items: center; gap: 10px; margin-bottom: 9px; padding: 13px; cursor: pointer; border: 1px solid var(--line); border-radius: 16px; background: #fafbfc; transition: .18s ease; }
.mode-option.is-selected { border-color: var(--gold-dark); background: #fff8dc; box-shadow: inset 0 0 0 1px var(--gold); }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: white; font-size: 20px; box-shadow: 0 5px 12px rgba(17,42,85,.08); }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 14px; }
.mode-option small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.mode-option > i { width: 20px; height: 20px; display: grid; place-items: center; opacity: 0; border-radius: 50%; color: white; background: var(--green); font-size: 10px; font-style: normal; }
.mode-option.is-selected > i { opacity: 1; }
.wallet-reveal { max-width: 100%; margin-top: 6px; padding: 12px 14px 4px; border-radius: 16px; background: #f5f8fc; }
.cycle-submit { min-height: 52px; margin-top: 16px; font-size: 14px; }

.deal-card {
  overflow: hidden;
  border: 1px solid #e6d394;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(17,42,85,.08);
}
.deal-card[open] { border-color: #d9b84a; box-shadow: 0 18px 44px rgba(17,42,85,.13); }
.deal-summary {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,216,80,.2), transparent 28%),
    linear-gradient(135deg, #fffef9, #fff9e9);
}
.deal-summary::-webkit-details-marker { display: none; }
.deal-summary::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #e2c66b, transparent);
}
.deal-card[open] .deal-summary::after { opacity: 1; }
.deal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 21px;
}
.deal-icon.active { background: linear-gradient(145deg, #fff7ce, #ffd75c); box-shadow: inset 0 0 0 1px #efc94e, 0 7px 16px rgba(198,133,0,.16); }
.deal-icon.done { color: white; background: linear-gradient(145deg, #35b68a, #11845f); }
.deal-copy, .deal-copy > strong, .deal-copy > small, .deal-open-label, .deal-result > strong, .deal-result > em { display: block; }
.deal-copy { min-width: 0; }
.deal-copy > strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.deal-copy > small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.deal-open-label { margin-top: 7px; color: #936400; font-size: 12px; font-weight: 900; letter-spacing: .01em; }
.deal-open-label i { display: inline-block; margin-left: 3px; font-style: normal; transition: transform .22s ease; }
.deal-card[open] .deal-open-label i { transform: rotate(180deg); }
.deal-result { text-align: right; }
.deal-result > strong { color: var(--green); font-size: 15px; }
.deal-result > strong small { font-size: 11px; }
.deal-result > em { margin-top: 5px; font-style: normal; }
.deal-calendar {
  padding: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(247,183,24,.12), transparent 35%),
    #fff;
}
.calendar-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.calendar-heading strong, .calendar-heading span { display: block; }
.calendar-heading strong { font-size: 16px; }
.calendar-heading span { max-width: 500px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.calendar-heading > b { padding: 6px 10px; border-radius: 99px; color: #765100; background: #fff0b8; font-size: 12px; }
.calendar-progress { height: 7px; margin: 13px 0 18px; overflow: hidden; border-radius: 99px; background: #eee9da; box-shadow: inset 0 1px 2px rgba(17,42,85,.08); }
.calendar-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8a708, #ffe06b); box-shadow: 0 0 10px rgba(247,183,24,.4); transition: width .3s ease; }
.month-calendar {
  max-width: 610px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid #ebe4cf;
  border-radius: 19px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 8px 22px rgba(17,42,85,.06);
}
.month-toolbar { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 12px; }
.month-toolbar button {
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  border: 1px solid #e8dfc3;
  border-radius: 11px;
  color: var(--navy);
  background: white;
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(17,42,85,.06);
}
.month-toolbar button:disabled { cursor: default; opacity: .28; box-shadow: none; }
.month-titles { min-width: 0; text-align: center; }
.month-titles strong { font-size: 15px; letter-spacing: -.01em; }
.month-titles strong span { color: var(--muted); font-weight: 800; }
.calendar-weekdays, .calendar-month-panel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekdays { margin-bottom: 5px; }
.calendar-weekdays span { padding: 4px 0; color: #8c96a5; font-size: 11px; font-weight: 900; text-align: center; text-transform: uppercase; }
.month-day {
  position: relative;
  min-width: 0;
  min-height: 58px;
  padding: 6px 5px;
  overflow: hidden;
  border: 1px solid #ece9df;
  border-radius: 11px;
  background: #f8f8f6;
}
.month-day > span { display: block; color: #8b94a2; font-size: 11px; font-weight: 900; }
.month-day > b, .month-day > small { display: block; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.month-day > b { margin-top: 4px; color: #516078; font-size: 11px; line-height: 1; }
.month-day > small { margin-top: 4px; color: #8a94a3; font-size: 10px; font-weight: 800; }
.month-day.is-outside { opacity: .3; background: transparent; }
.month-day.has-payout::after { content: ""; position: absolute; top: 7px; right: 7px; width: 4px; height: 4px; border-radius: 50%; background: #aab2bf; }
.month-day.is-paid { border-color: #9bd9c4; background: linear-gradient(145deg, #f1fcf8, #dff7ee); }
.month-day.is-paid > b, .month-day.is-paid > small { color: #087451; }
.month-day.is-paid::after { background: var(--green); }
.month-day.is-next {
  z-index: 1;
  border-color: #dca900;
  background: linear-gradient(145deg, #fff9d8, #ffe384);
  box-shadow: 0 6px 14px rgba(218,153,0,.2), inset 0 0 0 1px rgba(255,255,255,.65);
  transform: translateY(-2px);
}
.month-day.is-next > span, .month-day.is-next > b, .month-day.is-next > small { color: #765100; }
.month-day.is-next::after { background: #d49100; box-shadow: 0 0 0 3px rgba(247,183,24,.24); }
.calendar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; margin-top: 13px; color: var(--muted); font-size: 12px; font-weight: 800; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 3px; background: #f3f2ee; border: 1px solid #d9d7cf; }
.calendar-legend i.paid { border-color: #8ccdb7; background: #dff7ee; }
.calendar-legend i.next { border-color: #dca900; background: #ffe384; }
.primary-btn, .secondary-btn, .danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.primary-btn { color: var(--navy); background: linear-gradient(180deg, #ffd957, var(--gold)); box-shadow: 0 7px 16px rgba(217, 146, 0, .22); }
.secondary-btn { color: white; background: var(--blue); }
.danger-btn { color: white; background: var(--red); }
.full { width: 100%; }
.notice { margin: 0 0 14px; padding: 13px 15px; border-radius: 14px; font-size: 12px; font-weight: 800; }
.notice.success { color: #087451; background: #ddf8ec; }
.notice.error { color: #9f2338; background: #ffe8ec; }

.balance-banner, .ref-hero {
  padding: 22px;
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.balance-banner span, .balance-banner strong, .ref-hero span, .ref-hero strong { display: block; }
.balance-banner span, .ref-hero span { color: #c8d8ef; font-size: 12px; }
.balance-banner strong, .ref-hero strong { margin-top: 5px; color: var(--gold); font-size: 34px; }
.balance-banner strong small, .ref-hero strong small { font-size: 12px; }
.form-card { margin-top: 14px; }
.fee-line { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.fee-line strong { color: var(--ink); }

.chain-badge { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.chain-badge > span { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 23px; font-weight: 900; }
.chain-badge strong, .chain-badge small { display: block; }
.chain-badge small { color: var(--muted); font-size: 11px; }
.address-box { margin-bottom: 13px; padding: 15px; border-radius: 14px; background: #f7f5ed; border: 1px dashed #cfc7ad; }
.address-box > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.address-box code { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; line-height: 1.6; }
.warning-card { display: flex; gap: 12px; margin-top: 14px; padding: 15px; background: #fff4dc; border: 1px solid #f4d486; border-radius: 16px; }
.warning-card > span { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; color: #8a5c00; background: var(--gold); border-radius: 50%; font-weight: 900; }
.warning-card p { margin: 0; color: #6f5a2c; font-size: 12px; line-height: 1.5; }
.warning-card strong { display: block; color: #5d4000; }

.tier-grid { display: grid; gap: 9px; margin: 14px 0; }
.tier-grid article,
.tier-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.tier-card > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  list-style: none;
  cursor: pointer;
}
.tier-card > summary::-webkit-details-marker { display: none; }
.tier-grid i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
  flex: 0 0 auto;
}
.tier-grid article div,
.tier-card summary div { flex: 1; min-width: 0; }
.tier-grid article div span,
.tier-grid article div strong,
.tier-card summary div span,
.tier-card summary div strong { display: block; }
.tier-grid article div span,
.tier-card summary div span { color: var(--muted); font-size: 12px; }
.tier-grid article div strong,
.tier-card summary div strong { font-size: 19px; }
.tier-grid article > b,
.tier-card summary > b { min-width: 36px; text-align: center; font-size: 20px; }
.tier-people {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
  padding-top: 12px;
}
.tier-person {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f6f9fd;
  border-radius: 12px;
}
.tier-person span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.tier-person small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.tier-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.invite-card code { display: block; margin: 7px 0 15px; overflow-wrap: anywhere; color: var(--blue); font-size: 13px; }
.invite-card > div > span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }

.cover-card { position: relative; min-height: 430px; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow); }
.cover-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 38, 79, .95), rgba(11, 38, 79, .08)); }
.cover-copy { position: relative; z-index: 1; max-width: 520px; padding: 55px 42px; color: white; }
.cover-copy h1 { max-width: 450px; margin-bottom: 16px; color: var(--gold); font-family: "Alfa Slab One", serif; }
.cover-copy p { color: #dce9f8; line-height: 1.6; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 15px 0; }
.feature-row article { padding: 17px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.feature-row span { display: block; font-size: 22px; }
.feature-row strong, .feature-row small { display: block; }
.feature-row strong { margin: 8px 0 2px; }
.feature-row small { color: var(--muted); }
.welcome-panel { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px; background: white; border: 1px solid var(--line); border-radius: 20px; }
.welcome-panel h2 { margin-bottom: 5px; }
.welcome-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-splash {
  display: none;
  min-height: 78vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px 22px 40px;
}
.auth-splash .eyebrow { margin-bottom: 10px; }
.auth-splash h2 { margin: 0 0 14px; font-family: "Alfa Slab One", serif; font-weight: 400; letter-spacing: .01em; }
.auth-splash p {
  min-height: 4.4em;
  max-width: 340px;
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  transition: opacity .35s ease;
}
.auth-splash p.is-swap { opacity: 0; }
.boot-vault {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 8px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle, #fff6c8, #f7b718 52%, #8a4e00);
  box-shadow: 0 16px 30px rgba(17,42,85,.18), inset 0 0 18px rgba(90,40,0,.2);
}
.coin-loader { font-size: 54px; animation: coin 1.1s ease-in-out infinite; }
.boot-track {
  width: min(280px, 78vw);
  height: 8px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 99px;
  background: #efe6c8;
  box-shadow: inset 0 1px 3px rgba(17,42,85,.12);
}
.boot-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d99200, #f7b718 40%, #ffe58a);
  box-shadow: 0 0 12px rgba(247,183,24,.55);
  animation: boot-fill 5.2s cubic-bezier(.15,.7,.2,1) forwards;
}
.tg-authing .auth-splash { display: flex; }
.tg-authing .public-home { display: none; }
@keyframes coin { 0%,100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(-13px) rotate(10deg); } }
@keyframes boot-fill { 0% { width: 8%; } 100% { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .boot-track i { animation: none; width: 100%; }
}

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.admin-stats article { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.admin-stats span, .admin-stats strong { display: block; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-stats strong { margin-top: 4px; font-size: 21px; }
.admin-status { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 12px; padding: 15px; color: #075e43; background: #dcf8ec; border-radius: 16px; }
.admin-status.paused { color: #922237; background: #ffe4e8; }
.admin-status span, .admin-status strong { display: block; }
.button-row { display: flex; gap: 7px; }
.admin-list article > div { flex: 1; }
.admin-list article span { display: block; color: var(--muted); font-size: 12px; }
.admin-list article p { margin: 0; text-align: right; }
.admin-list article p small { font-size: 11px; }
.treasury { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.reward-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 18px; }
.reward-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  color: white;
  text-align: left;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 9px 24px rgba(17, 42, 85, .14);
  cursor: pointer;
}
.reward-card i { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.18); font-size: 23px; font-style: normal; }
.reward-card span { flex: 1; min-width: 0; }
.reward-card small, .reward-card strong { display: block; }
.reward-card small { opacity: .74; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.reward-card strong { margin-top: 2px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.reward-card > b { flex: 0 0 auto; min-width: 70px; padding: 6px 9px; color: var(--navy); background: var(--gold); border-radius: 9px; font-size: 12px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reward-card:disabled { cursor: default; filter: saturate(.7); opacity: .82; }
.chest-reward-card { background: linear-gradient(135deg, #8b2c21, #d85c25); }
.wheel-reward-card { background: linear-gradient(135deg, var(--navy), #2867b1); }
.wheel-reward-card strong { overflow: visible; line-height: 1.18; text-overflow: clip; white-space: normal; }

body.game-open { overflow: hidden; }
.game-modal {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .24s ease, visibility .24s ease;
}
.game-modal.is-open { visibility: visible; opacity: 1; }
.chat-invite { z-index: 360; }
.chat-invite-dialog { max-width: 420px; }
.chat-invite-dialog .primary-btn { margin-top: 8px; }
.text-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.game-backdrop { position: absolute; inset: 0; background: rgba(8, 24, 53, .76); backdrop-filter: blur(8px); }
.game-dialog {
  position: relative;
  z-index: 3;
  width: min(100%, 510px);
  max-height: calc(100vh - 36px);
  padding: 28px 28px 23px;
  overflow: auto;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 50% -15%, rgba(255, 212, 75, .48), transparent 36%),
    linear-gradient(180deg, #fffdf4, #fff8df);
  border: 3px solid var(--gold);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.7);
  transform: translateY(18px) scale(.94);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.game-modal.is-open .game-dialog { transform: translateY(0) scale(1); }
.game-dialog h2 { margin: 5px 30px 7px; color: var(--navy); font-family: "Alfa Slab One", serif; font-size: clamp(23px, 6vw, 31px); line-height: 1.12; }
.game-kicker { display: inline-block; padding: 5px 10px; color: #7b4b00; background: #ffe388; border-radius: 99px; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.game-lead { max-width: 400px; margin: 0 auto 15px; color: #647289; font-size: 13px; line-height: 1.45; }
.game-close, .sound-toggle {
  position: absolute;
  z-index: 4;
  top: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(17,42,85,.08);
  cursor: pointer;
}
.game-close { right: 14px; color: var(--navy); font-size: 25px; }
.sound-toggle { left: 14px; font-size: 16px; }
.game-note { margin: 12px 0 0; color: #8b7655; font-size: 12px; }
.game-result { margin: 14px 0 7px; padding: 13px; color: #075d42; background: #dcf8ec; border: 1px solid #9cddc4; border-radius: 15px; animation: reward-pop .45s cubic-bezier(.2,.9,.25,1.3); }
.game-result strong, .game-result span { display: block; }
.game-result strong { font-size: 20px; }
.game-result span { margin-top: 2px; font-size: 12px; }

.wheel-stage { position: relative; width: 306px; height: 318px; margin: 5px auto 10px; perspective: 900px; }
.wheel-shadow { position: absolute; right: 16px; bottom: 0; left: 16px; height: 35px; border-radius: 50%; background: rgba(67,38,0,.25); filter: blur(13px); transform: scaleY(.42); }
.wheel-rim { position: absolute; inset: 4px 4px 16px; padding: 18px; border: 2px solid #9b5b00; border-radius: 50%; background: linear-gradient(145deg, #fff3a5 0%, #f7b718 30%, #b86f00 76%, #ffdf60 100%); box-shadow: inset 0 5px 7px rgba(255,255,255,.72), inset 0 -9px 13px rgba(106,56,0,.35), 0 14px 24px rgba(113,66,0,.28); transform: rotateX(5deg); }
.wheel-pointer { position: absolute; z-index: 8; top: -6px; left: 50%; width: 50px; height: 53px; padding: 6px; border: 2px solid #731725; border-radius: 18px 18px 24px 24px; background: linear-gradient(145deg, #ff6f67, #b91831); box-shadow: inset 0 3px rgba(255,255,255,.35), 0 7px 11px rgba(70,16,24,.28); transform: translateX(-50%); }
.wheel-pointer i { display: block; width: 0; height: 0; margin: 17px auto 0; border-top: 18px solid #fff3ad; border-right: 11px solid transparent; border-left: 11px solid transparent; filter: drop-shadow(0 2px 0 #761629); }
.wheel-lights { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.wheel-lights i { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4px; border: 1px solid #9c6500; border-radius: 50%; background: #fff9bd; box-shadow: 0 0 7px #fff269; transform: rotate(calc(var(--light) * 22.5deg)) translateY(-135px); animation: wheel-light 1.2s ease-in-out calc(var(--light) * -.07s) infinite alternate; }
.fortune-wheel {
  --wheel-turn: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 5px solid #fff8ce;
  border-radius: 50%;
  background: conic-gradient(
    from -25.714deg,
    #f7b718 0deg 51.428deg,
    #1d61a7 51.428deg 102.856deg,
    #ef5f3c 102.856deg 154.284deg,
    #20a47a 154.284deg 205.712deg,
    #f8cd48 205.712deg 257.14deg,
    #8b4bb3 257.14deg 308.568deg,
    #e53d58 308.568deg 360deg
  );
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.34), inset 0 0 24px rgba(47,27,0,.25), 0 2px 4px rgba(74,39,0,.3);
  transform: rotate(0);
}
.fortune-wheel::before { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from -25.714deg, transparent 0 50.3deg, rgba(255,255,255,.72) 50.3deg 51.43deg); pointer-events: none; }
.fortune-wheel::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 50%; background: radial-gradient(circle at 34% 26%, rgba(255,255,255,.28), transparent 23%), radial-gradient(circle, transparent 48%, rgba(255,255,255,.2) 49%, transparent 69%); pointer-events: none; }
.fortune-wheel.is-spinning { transform: rotate(var(--wheel-turn)); transition: transform 4.6s cubic-bezier(.12,.66,.12,1); }
.fortune-wheel > span {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 48px;
  margin: -10px 0 0 -24px;
  color: white;
  padding: 4px 2px;
  color: #fff;
  background: rgba(8,30,64,.24);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,.38);
  transform: rotate(calc(var(--i) * 51.428deg)) translateY(-97px) rotate(calc(var(--i) * -51.428deg));
}
.wheel-hub { position: absolute; z-index: 5; top: 50%; left: 50%; width: 78px; height: 78px; display: grid; place-items: center; margin: -39px 0 0 -39px; overflow: hidden; background: linear-gradient(145deg, #fff5bd, var(--gold)); border: 6px solid #fff3a4; border-radius: 50%; box-shadow: inset 0 0 0 2px #b36c00, 0 7px 14px rgba(64,37,0,.33); font-style: normal; }
.wheel-hub img { width: 100%; height: 100%; object-fit: cover; }
.spin-button { width: 100%; min-height: 54px; color: var(--navy); background: linear-gradient(180deg, #ffe46d, #f2ab0b); border: 1px solid #cc8200; border-radius: 17px; box-shadow: inset 0 3px rgba(255,255,255,.48), 0 9px 18px rgba(177,105,0,.25); font-weight: 900; cursor: pointer; }
.spin-button:hover { filter: brightness(1.04); transform: translateY(-1px); }
.spin-button:disabled { cursor: default; opacity: .75; }

.chest-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; margin: 22px 0 12px; }
.treasure-chest { min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.chest-scene { position: relative; display: block; height: 122px; perspective: 520px; transform-style: preserve-3d; transition: transform .35s ease; }
.treasure-chest small { display: flex; align-items: center; justify-content: center; min-height: 30px; margin-top: 5px; color: #765127; font-size: 12px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.chest-shadow { position: absolute; right: 8%; bottom: 7px; left: 8%; height: 20px; border-radius: 50%; background: rgba(77,37,5,.3); filter: blur(7px); transform: rotateX(68deg); }
.chest-lid, .chest-box { position: absolute; right: 7%; left: 7%; display: block; transform-style: preserve-3d; }
.chest-lid { z-index: 3; top: 20px; height: 43px; border: 3px solid #632117; border-radius: 48px 48px 7px 7px; background: linear-gradient(90deg, #8d261c 0%, #db5427 18%, #f0833d 50%, #c74425 79%, #7e2019 100%); box-shadow: inset 0 5px rgba(255,255,255,.2), inset 0 -6px rgba(87,24,13,.22), 0 6px 8px rgba(74,28,7,.25); transform-origin: 12% 100%; transition: transform .72s cubic-bezier(.2,.86,.2,1); }
.chest-lid i { position: absolute; right: 5px; bottom: 5px; left: 5px; height: 9px; border: 1px solid #8e5900; border-radius: 3px; background: linear-gradient(#ffe06a, #c98500); box-shadow: inset 0 2px rgba(255,255,255,.45); }
.chest-lid em, .chest-box em { position: absolute; z-index: 2; top: -3px; bottom: -3px; left: 50%; width: 18px; border: 2px solid #865100; background: linear-gradient(90deg, #c77c00, #ffe46a 48%, #b96d00); box-shadow: inset 2px 0 rgba(255,255,255,.35); transform: translateX(-50%); }
.chest-box { z-index: 2; top: 59px; height: 52px; border: 3px solid #632117; border-radius: 5px 5px 13px 13px; background: linear-gradient(105deg, #8d241a, #ef7334 45%, #b73522 76%, #751e18); box-shadow: inset 0 5px rgba(255,255,255,.14), inset 0 -9px rgba(69,17,11,.23), 0 8px 11px rgba(74,28,7,.28); transform: rotateX(-4deg); }
.chest-box::before { content: ""; position: absolute; right: -3px; bottom: -9px; left: -3px; height: 11px; border: 3px solid #632117; border-top: 0; border-radius: 0 0 13px 13px; background: #761f17; transform: rotateX(-46deg); transform-origin: top; }
.chest-box i { position: absolute; z-index: 1; top: 8px; right: 5px; left: 5px; height: 6px; border-radius: 2px; background: linear-gradient(90deg, #ba6f00, #ffe273, #ad6200); box-shadow: 0 21px #d38b0c; }
.chest-box b { position: absolute; z-index: 4; top: 9px; left: 50%; width: 27px; height: 31px; display: grid; place-items: center; color: #704800; background: linear-gradient(145deg, #fff089, #e4a70d); border: 2px solid #7c4900; border-radius: 7px 7px 9px 9px; box-shadow: inset 0 3px rgba(255,255,255,.5), 0 3px 5px rgba(65,35,0,.25); transform: translateX(-50%); }
.chest-glow { position: absolute; z-index: 0; top: 23px; left: 50%; width: 95%; height: 80px; border-radius: 50%; background: rgba(255,214,66,.9); filter: blur(21px); opacity: 0; transform: translateX(-50%); transition: opacity .4s; }
.treasure-chest:hover .chest-scene { transform: translateY(-5px) rotateY(-3deg); }
.treasure-chest.is-selected { animation: chest-shake .45s ease; }
.treasure-chest.is-revealed .chest-lid { transform: translate(-5px, -24px) rotateX(-58deg) rotateZ(-5deg); }
.treasure-chest.is-winner .chest-glow { opacity: 1; }
.treasure-chest.is-winner .chest-scene { animation: winner-float 1.2s ease-in-out infinite alternate; }
.treasure-chest.is-winner .chest-box b { color: #087451; background: #fff8a8; }
.treasure-chest.is-empty .chest-scene { filter: grayscale(.76); opacity: .5; }

.coin-rain { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.coin-rain i { position: absolute; top: -35px; left: var(--x); font-size: var(--size); font-style: normal; animation: coin-fall var(--speed) linear var(--delay) infinite; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.game-won .coin-rain i { animation-duration: calc(var(--speed) * .65); }
@keyframes coin-fall { to { transform: translate(var(--drift), calc(100vh + 80px)) rotate(720deg); } }
@keyframes wheel-light { to { background: #ffb91c; box-shadow: 0 0 3px #e38b00; } }
@keyframes chest-shake { 20% { transform: rotate(-3deg); } 45% { transform: rotate(3deg) scale(1.04); } 70% { transform: rotate(-2deg); } }
@keyframes winner-float { to { transform: translateY(-7px) scale(1.025); } }
@keyframes reward-pop { from { opacity: 0; transform: scale(.75); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 760px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .app-shell { display: block; }
  .side-nav { display: none; }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 8px 16px;
    background: rgba(255, 253, 247, .94);
    border-bottom: 1px solid rgba(22, 32, 55, .08);
    backdrop-filter: blur(14px);
  }
  .mobile-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: "Alfa Slab One", serif; color: var(--navy); }
  .mobile-brand img { width: 40px; height: 40px; object-fit: cover; border: 2px solid var(--gold); border-radius: 50%; }
  .mobile-header-actions { display: flex; align-items: center; gap: 8px; }
  .lang-picker--mobile { margin-top: 0; }
  .lang-picker--mobile .lang-picker-btn {
    min-width: 54px;
    min-height: 38px;
    padding: 0 10px;
    color: var(--navy);
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(17,42,85,.08);
  }
  .lang-picker--mobile .lang-picker-menu {
    left: auto;
    right: 0;
    bottom: auto;
    top: calc(100% + 8px);
    width: 188px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(17,42,85,.16);
  }
  .lang-picker--mobile .lang-picker-menu a { color: var(--ink); }
  .lang-picker--mobile .lang-picker-menu a span { color: var(--muted); }
  .lang-picker--mobile .lang-picker-menu a.on,
  .lang-picker--mobile .lang-picker-menu a:hover { color: var(--navy); background: #fff1b8; }
  .network-pill { padding: 6px 9px; border-radius: 99px; color: var(--green); background: #e1f8ef; font-size: 11px; font-weight: 900; }
  .network-pill i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: var(--green); border-radius: 50%; }
  .content { padding: 20px 14px 100px; }
  .page-head { margin-bottom: 17px; }
  .page-head h1 { font-size: 26px; }
  .page-head p { font-size: 14px; }
  .vault-card { min-height: 225px; border-radius: 23px; }
  .vault-content { padding: 25px 22px; }
  .vault-content > strong { font-size: 38px; }
  .reward-grid { grid-template-columns: 1fr; gap: 8px; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .quick-grid a { min-height: 105px; padding: 13px; }
  .stats-strip { margin-bottom: 21px; }
  .stats-strip div { padding: 13px; }
  .bottom-nav {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    padding: 6px 5px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -8px 25px rgba(17, 42, 85, .08);
    backdrop-filter: blur(15px);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #8b96a8; text-decoration: none; font-size: 11px; font-weight: 800; }
  .bottom-nav a b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; font-size: 17px; }
  .bottom-nav a.on { color: var(--navy); }
  .bottom-nav a.on b { background: var(--gold); }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { padding: 17px; }
  .cover-card { min-height: 510px; border-radius: 23px; }
  .cover-card::after { background: linear-gradient(0deg, rgba(11,38,79,.98), rgba(11,38,79,.1)); }
  .cover-copy { position: absolute; bottom: 0; padding: 25px 20px; }
  .cover-copy h1 { font-size: 31px; }
  .feature-row { grid-template-columns: 1fr; gap: 8px; }
  .feature-row article { display: grid; grid-template-columns: 42px 1fr; column-gap: 4px; padding: 13px; }
  .feature-row article span { grid-row: 1/3; }
  .feature-row strong { margin: 0; }
  .welcome-panel { align-items: stretch; flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-status { align-items: stretch; flex-direction: column; }
  .button-row, .button-row form, .button-row button { width: 100%; }
  .game-modal { align-items: end; padding: 0; }
  .game-dialog { width: 100%; max-height: calc(100vh - 18px); padding: 24px 16px calc(18px + env(safe-area-inset-bottom)); border-width: 2px 0 0; border-radius: 27px 27px 0 0; }
  .wheel-stage { width: min(78vw, 296px); height: min(81vw, 308px); }
  .wheel-lights i { transform: rotate(calc(var(--light) * 22.5deg)) translateY(calc(min(39vw, 148px) * -.9)); }
  .fortune-wheel > span { transform: rotate(calc(var(--i) * 51.428deg)) translateY(calc(min(39vw, 148px) * -.66)) rotate(calc(var(--i) * -51.428deg)); }
  .chest-stage { gap: 5px; }
  .chest-scene { height: 118px; }
  .chest-lid, .chest-box { right: 5%; left: 5%; }
}

@media (prefers-reduced-motion: reduce) {
  .game-dialog, .game-modal, .fortune-wheel.is-spinning, .chest-lid { transition-duration: .01ms; }
  .coin-rain i { animation: none; display: none; }
}

@media (max-width: 760px) {
  .cycle-hero { grid-template-columns: 1fr 104px; min-height: 210px; padding: 24px 20px; border-radius: 22px; }
  .cycle-hero h1 { max-width: 260px; font-size: 29px; }
  .cycle-hero p { max-width: 280px; font-size: 12px; }
  .cycle-badges { gap: 5px; margin-top: 16px; }
  .cycle-badges span { padding: 6px 8px; font-size: 11px; }
  .cycle-vault { width: 91px; height: 91px; border-width: 6px; }
  .vault-door { font-size: 30px; }
  .cycle-vault i, .cycle-vault b { padding: 3px 5px; font-size: 11px; }
  .gold-cycle-card { padding: 17px; border-radius: 20px; }
  .cycle-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .deal-summary { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .deal-icon { width: 44px; height: 44px; border-radius: 14px; }
  .deal-copy > strong { font-size: 14px; }
  .deal-copy > small { font-size: 12px; }
  .deal-result > strong { font-size: 14px; }
  .deal-calendar { padding: 16px 10px; }
  .month-calendar { padding: 10px 7px; border-radius: 16px; }
  .calendar-weekdays, .calendar-month-panel { gap: 3px; }
  .month-day { min-height: 52px; padding: 5px 3px; border-radius: 9px; }
  .month-day > b { font-size: 11px; }
  .month-day > small { font-size: 10px; }
}

@media (max-width: 390px) {
  .cycle-hero { grid-template-columns: 1fr; }
  .cycle-vault { position: absolute; right: -20px; bottom: -20px; opacity: .3; }
  .deal-summary { grid-template-columns: 42px minmax(0, 1fr); }
  .deal-result { grid-column: 2; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .deal-result > em { margin-top: 0; }
  .calendar-heading { align-items: flex-start; }
  .calendar-heading span { max-width: 210px; }
  .month-day { min-height: 49px; }
}

@media (max-width: 350px) {
  .mobile-header { padding-right: 10px; padding-left: 10px; }
  .mobile-brand span { display: none; }
  .mobile-header-actions { gap: 5px; }
  .header-contact { width: 34px; height: 34px; }
  .network-pill { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; font-size: 0; }
  .network-pill i { margin: 0; }
}
