/* Mages Court - night sky, gold and lavender */
:root {
  --bg: #0a0920;
  --bg2: #15113a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(232, 195, 122, 0.22);
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #eeeaf9;
  --muted: #a8a2c6;
  --gold: #e8c37a;
  --gold-2: #f5dca6;
  --lav: #b8a6ff;
  --rose: #ff9db5;
  --ok: #8fe0b0;
  --warn: #ffd27a;
  --bad: #ff8f8f;
  --radius: 16px;
  --display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/*
 * The night sky lives on html, not body: the star canvas (#sky, z-index -1) is drawn above html's background but would
 * be hidden under a body background. The solid colour underneath is what iPhones use for the areas around the page and
 * when you scroll past the ends (otherwise white).
 */
html {
  scroll-behavior: smooth; color-scheme: dark; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(1200px 700px at 80% -10%, #2b1f6b 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #1d1550 0%, transparent 60%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) fixed var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
#sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.gold { color: var(--gold); }
.serif { font-family: var(--serif); font-style: italic; font-size: 1.25em; }
.glyph { font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Apple Symbols", serif; font-variant-emoji: text; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; padding: 32px 0 64px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 9, 32, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.08em; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand:hover { color: var(--gold-2); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 0.95rem; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--panel-strong); }
.nav .btn { margin-left: 6px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-soft); color: var(--text); border-radius: 10px; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 880px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; background: rgba(10, 9, 32, 0.97); border-bottom: 1px solid var(--line-soft); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 6px 0 0; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 32px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-footer .zodiac { letter-spacing: 0.5em; color: rgba(232, 195, 122, 0.55); font-size: 1.1rem; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: 600 0.95rem var(--sans); letter-spacing: 0.02em;
  cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--panel-strong); border-color: var(--gold); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #f2d595, #d9a957); color: #1a1238; border-color: transparent; box-shadow: 0 6px 24px rgba(232, 195, 122, 0.25); }
.btn.primary:hover { box-shadow: 0 8px 32px rgba(232, 195, 122, 0.4); color: #1a1238; }
.btn.small { padding: 6px 14px; font-size: 0.85rem; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: 0.55; cursor: default; }

label { display: block; font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25); color: var(--text); font: 1rem var(--sans);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 195, 122, 0.15); }
textarea { min-height: 110px; resize: vertical; }
select option { background: var(--bg2); }
input[type="file"] { padding: 9px; }
input[type="date"], input[type="time"] { color-scheme: dark; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 18px; color: var(--text); font-size: 0.92rem; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--gold); cursor: pointer; }
.banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; border-color: var(--line); background: rgba(232, 195, 122, 0.08); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.form-msg { min-height: 1.4em; font-size: 0.9rem; margin-top: 8px; }
.form-msg.err { color: var(--bad); }
.form-msg.ok { color: var(--ok); }

/* ---------- Cards & layout ---------- */
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; }
.card.glow { border-color: var(--line); box-shadow: 0 0 0 1px rgba(232, 195, 122, 0.05), 0 20px 60px rgba(0, 0, 0, 0.35); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.page-head { margin: 8px 0 28px; }
.page-head p { color: var(--muted); max-width: 620px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; border: 1px dashed var(--line-soft); border-radius: var(--radius); }
.divider { text-align: center; color: rgba(232, 195, 122, 0.5); letter-spacing: 1em; margin: 8px 0 0; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 24px; }
.hero h1 { background: linear-gradient(180deg, #fff6df 0%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-family: var(--serif); font-size: 1.45rem; font-style: italic; color: #d9d2f5; max-width: 34ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.wheel { width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 1; }
.wheel .spin { transform-origin: 200px 200px; animation: spin 240s linear infinite; }
.wheel .spin-rev { transform-origin: 200px 200px; animation: spin 180s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 16px; }
  .hero .lead { margin: 0 auto; }
  .hero .cta { justify-content: center; }
  .wheel { max-width: 300px; order: -1; }
}

.steps { counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } /* fill the row: 3 cards, no empty 4th column */
.step { position: relative; padding-top: 30px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700;
  background: linear-gradient(135deg, #f2d595, #d9a957); color: #1a1238;
}

/* ---------- Services ---------- */
.service { display: flex; flex-direction: column; }
.service .price { font-family: var(--display); font-size: 1.6rem; color: var(--gold); margin: 4px 0 10px; }
.service .delivery { font-size: 0.85rem; color: var(--lav); margin-bottom: 12px; }
.service p { color: var(--muted); flex: 1; }
.service .book { margin-top: 16px; }
.order-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* ---------- Booking ---------- */
.book-page { max-width: 760px; margin: 0 auto; }
.book-step { margin-bottom: 18px; }
.book-step > h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.book-step > h3 .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.95rem; background: linear-gradient(135deg, #f2d595, #d9a957); color: #1a1238; }
.book-step.done > h3 .num { background: rgba(143, 224, 176, 0.25); color: var(--ok); }
.book-step .chosen { color: var(--muted); font-size: 0.92rem; margin: -6px 0 0 42px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.2); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line); }
.choice.on { border-color: var(--gold); background: rgba(232, 195, 122, 0.1); }
.choice .grow { flex: 1; min-width: 0; }
.choice b { display: block; font-size: 1.02rem; }
.choice .price { color: var(--gold); font-family: var(--display); white-space: nowrap; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; max-width: 400px; margin: 0 auto; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 auto 12px; max-width: 400px; }
.cal-head b { font-family: var(--display); letter-spacing: 0.05em; }
.cal .dow { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 4px; }
.cal button { aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: none; color: rgba(255, 255, 255, 0.25); font: 600 0.95rem var(--sans); cursor: default; }
.cal button.open { color: var(--text); background: rgba(232, 195, 122, 0.1); border-color: var(--line); cursor: pointer; }
.cal button.open:hover { border-color: var(--gold); }
.cal button.on { background: linear-gradient(135deg, #f2d595, #d9a957); color: #1a1238; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 16px; }
.times button { padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); color: var(--text); font: 600 0.92rem var(--sans); cursor: pointer; }
.times button:hover { border-color: var(--gold); }
.times button.on { background: linear-gradient(135deg, #f2d595, #d9a957); color: #1a1238; border-color: transparent; }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 99px; border: 1px solid var(--line-soft); font-size: 0.85rem; margin: 0 6px 6px 0; }
.chip button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.hours-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.hours-row .ranges { display: flex; flex-direction: column; gap: 8px; }
.hours-row .range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hours-row .range input { width: auto; padding: 7px 10px; }
@media (max-width: 560px) { .hours-row { grid-template-columns: 1fr; } }

/* ---------- Categories ---------- */
.cat-section + .cat-section { margin-top: 44px; }
.cat-title { font-size: 1.5rem; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--gold-2); }
.choice-group { margin: 14px 0 6px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.choice-group:first-child { margin-top: 0; }
.cat-card ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.cat-card li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.cat-card li span:last-child { color: var(--gold); white-space: nowrap; }

/* ---------- Reviews ---------- */
.stars { color: var(--gold); letter-spacing: 0.12em; white-space: nowrap; }
.stars .off { color: rgba(255, 255, 255, 0.18); }
.review .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.review h3 { margin: 4px 0 6px; font-family: var(--serif); font-style: italic; font-size: 1.35rem; letter-spacing: 0; }
.review .who { font-weight: 600; }
.review .body { white-space: pre-line; color: #dcd6f2; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold); vertical-align: middle; }
.badge.lav { border-color: rgba(184, 166, 255, 0.4); color: var(--lav); }
.badge.ok { border-color: rgba(143, 224, 176, 0.4); color: var(--ok); }
.badge.warn { border-color: rgba(255, 210, 122, 0.4); color: var(--warn); }
.badge.bad { border-color: rgba(255, 143, 143, 0.4); color: var(--bad); }
.reply { margin-top: 14px; padding: 12px 16px; border-left: 2px solid var(--gold); background: rgba(232, 195, 122, 0.06); border-radius: 0 12px 12px 0; font-size: 0.95rem; }
.reply b { color: var(--gold); font-weight: 600; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.summary .big { font-family: var(--display); font-size: 3.4rem; color: var(--gold); line-height: 1; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 32px 1fr 32px; gap: 10px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.bar .track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, #d9a957, #f2d595); border-radius: 99px; }
.star-pick { display: flex; gap: 4px; font-size: 2rem; }
.star-pick button { font-size: inherit; background: none; border: none; cursor: pointer; color: rgba(255, 255, 255, 0.2); padding: 0 2px; line-height: 1; transition: color .1s, transform .1s; }
.star-pick button.on { color: var(--gold); }
.star-pick button:hover { transform: scale(1.12); }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
@media (max-width: 560px) { .summary { grid-template-columns: 1fr; text-align: center; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.tabs button { background: none; border: none; color: var(--muted); font: 600 0.95rem var(--sans); padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--rose); color: #2a0f1a; font-size: 0.75rem; }
[hidden] { display: none !important; }

/* ---------- Readings ---------- */
.reading { display: flex; gap: 18px; align-items: flex-start; }
.reading .icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, rgba(184, 166, 255, 0.25), rgba(232, 195, 122, 0.2)); border: 1px solid var(--line); }
.reading .info { flex: 1; min-width: 0; }
.reading h3 { margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-size: 1.45rem; letter-spacing: 0; }
.reading .note { white-space: pre-line; color: #d6d0ee; margin: 8px 0 0; }
.reading .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 520px) { .reading { flex-direction: column; } }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel); }
td select { width: auto; padding: 6px 10px; font-size: 0.85rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; flex: 1; min-width: 180px; }
.toolbar .check input { width: 20px; flex: none; min-width: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { padding: 16px 18px; }
.stat .n { font-family: var(--display); font-size: 1.9rem; color: var(--gold); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 0.85rem; }
.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--lav), var(--gold)); transition: width .2s; }
.temp-pass { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; padding: 10px 14px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; user-select: all; display: inline-block; margin: 6px 0; }
.back { display: inline-block; margin-bottom: 14px; cursor: pointer; }

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 20px auto; }
.auth .tabs { justify-content: center; }

#update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; gap: 14px; align-items: center;
  padding: 10px 12px 10px 18px; border-radius: 999px; background: #221b4d; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  font-size: 0.92rem; max-width: calc(100% - 32px); }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 50; padding: 12px 20px; border-radius: 12px; background: #221b4d; border: 1px solid var(--line); color: var(--text); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: rgba(255, 143, 143, 0.5); }

/* ---------- Admin: Sales ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: none; border: none; color: var(--muted); font: 600 0.85rem var(--sans); padding: 7px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(232, 195, 122, 0.16); color: var(--gold); }
.sales-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sales-head .big-n { font-family: var(--display); font-size: 2.1rem; color: var(--gold); line-height: 1; }
.sales-head .up { color: var(--ok); font-weight: 600; }
.sales-head .down { color: var(--bad); font-weight: 600; }
.chart { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 0.75rem; color: var(--muted); height: 200px; margin: -0.5em 0; }
.chart-plot { position: relative; height: 200px; }
.chart-plot .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.chart-plot .grid:last-of-type { border-top-color: rgba(255, 255, 255, 0.25); }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-bars .col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: pointer; min-width: 0; }
.chart-bars .bar { width: 100%; max-width: 36px; margin: 0 auto; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity 0.12s; }
.chart-bars .bar.zero { background: rgba(255, 255, 255, 0.12); }
.chart-bars .col.dim .bar { opacity: 0.35; }
.chart-x { display: flex; gap: 2px; font-size: 0.72rem; color: var(--muted); }
.chart-x span { flex: 1; min-width: 0; white-space: nowrap; overflow: visible; }
.chart .tip { position: absolute; top: 0; transform: translate(-50%, -100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 0.8rem; white-space: nowrap; pointer-events: none; z-index: 2; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.sales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.hbar-top b { font-weight: 600; white-space: nowrap; }
.hbar-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); margin: 5px 0 3px; }
.hbar-fill { height: 100%; border-radius: 99px; background: var(--gold); }

/* Discount code box on the booking page */
.code-box { margin: -4px 0 16px; }
.code-box form { display: flex; gap: 8px; }
.code-box input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.code-box .form-msg { margin-top: 6px; }

/* Readings page: jump to a group (Quick, Deep Dive...) */
.cat-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.cat-jump a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--gold-2); font-size: 0.9rem; }
.cat-jump a:hover { border-color: var(--gold); }
.cat-section { scroll-margin-top: 84px; } /* clear of the sticky header */

/* Birth time: Hour / Minute / AM-PM */
.time12 { display: flex; gap: 8px; }
.time12 select { flex: 1; min-width: 0; padding-left: 10px; padding-right: 6px; }
.time12 select:disabled { opacity: 0.5; }

/* Policy pages */
.policy { max-width: 760px; }
.policy h2 { font-size: 1.25rem; color: var(--gold-2); margin: 26px 0 10px; }
.policy h2:first-child { margin-top: 0; }
.policy ul { margin: 0 0 1em; padding-left: 1.2em; }
.policy li { margin-bottom: 6px; }
.policy-links { margin-top: 18px; }
.site-footer .legal a { color: var(--muted); }
.site-footer .legal a:hover { color: var(--gold-2); }
.secure { margin: 10px 0 0; color: var(--ok); }

/* Home: Today's sky and the Big 3 invitation */
.sky-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 8px; }
.sky-row:has(.sky-card[hidden]) { grid-template-columns: 1fr; }
.sky-moon { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.sky-emoji { font-size: 2.6rem; line-height: 1; }
.sky-list { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.sky-list li { padding: 6px 0; border-top: 1px solid var(--line-soft); }
.big3-card { display: flex; flex-direction: column; color: var(--text); }
.big3-card:hover { color: var(--text); border-color: var(--gold); }
.big3-card h3 { margin: 0 0 6px; }
.big3-card .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 760px) { .sky-row { grid-template-columns: 1fr; } }

/* Big 3 tool */
.place-wrap { position: relative; }
.place-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #1a1540; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.place-list button { display: block; width: 100%; text-align: left; padding: 11px 14px; background: none; border: 0; border-top: 1px solid var(--line-soft); color: var(--text); font: inherit; cursor: pointer; }
.place-list button:first-child { border-top: 0; }
.place-list button:hover, .place-list button.on { background: rgba(232, 195, 122, 0.12); }
.big3 { position: relative; overflow: hidden; }
.big3 h2 { margin: 2px 0 8px; color: var(--gold-2); }
.big3 p { margin: 0; }
.big3-sym { position: absolute; right: 18px; top: 6px; font-size: 3.4rem; color: rgba(232, 195, 122, 0.18); font-family: var(--serif); }

/* Messages about a booking */
.msgs { display: flex; flex-direction: column; gap: 10px; max-height: 440px; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 85%; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.theirs { align-self: flex-start; }
.msg-body { display: inline-block; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.msg.mine .msg-body { background: rgba(232, 195, 122, 0.16); border: 1px solid rgba(232, 195, 122, 0.35); border-bottom-right-radius: 4px; }
.msg.theirs .msg-body { background: var(--panel-strong); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.msg-meta { font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.msg-form { margin-top: 12px; }
.msg-form textarea { min-height: 76px; }
.msg-send { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #1a1238; font-size: 0.75rem; font-weight: 700; text-align: center; }
.thread-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; color: var(--text); font: inherit; cursor: pointer; }
.thread-row:hover { border-color: var(--line); }
.thread-row.unread { border-color: var(--gold); }
.thread-row .grow { flex: 1; min-width: 0; }
.thread-row .last { color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-img { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 14px; border: 1px solid var(--line-soft); margin-bottom: 4px; }
.msg.mine .msg-img { margin-left: auto; }
.msg-doc { display: inline-block; padding: 9px 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 4px; overflow-wrap: anywhere; }
.msg-file { margin-top: 8px; font-size: 0.88rem; overflow-wrap: anywhere; }
.msg-attach { cursor: pointer; }
.msg-form .progress { margin-top: 8px; }
.code-banner { margin: 18px 0 0; border-color: var(--gold); }
.danger-zone { border-top: 1px solid var(--line-soft); padding-top: 14px; }
