/* =====================================================================
   Astroieons design system — "an observatory notebook"
   Night (Softieons ink) for brand surfaces, paper (cream) for work.
   Built on Bootstrap 5.3; these tokens override its defaults.
   ===================================================================== */

:root {
  --ink: #17151F;
  --ink-2: #211E2C;
  --ink-3: #2E2B3A;
  --ink-line: #3F3B4D;
  --paper: #FFFDF7;
  --paper-2: #F6F3EA;
  --line: #EDEAE0;
  --text: #17151F;
  --muted: #6B6678;
  --violet: #6C4CF7;
  --violet-2: #5A3BE6;
  --violet-soft: #EDE8FF;
  --lime: #B8F02F;
  --lime-ink: #3D5200;
  --sun: #FFC93C;
  --rose: #FFE4EF;
  --mint: #DCF6F1;
  --danger: #D9465F;

  /* day levels */
  --lvl-1: #9BD41E;  --lvl-1-bg: #F1FBD9;
  --lvl-2: #6C4CF7;  --lvl-2-bg: #EDE8FF;
  --lvl-3: #E8A20C;  --lvl-3-bg: #FFF4D6;
  --lvl-4: #7A7489;  --lvl-4-bg: #EEECF2;

  --card: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,21,31,.04), 0 8px 24px -12px rgba(23,21,31,.12);
  --font-ui: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Poppins', system-ui, sans-serif; /* numbers use Poppins with tabular figures */
  --font-code: ui-monospace, Menlo, Consolas, monospace;
  --sidebar-w: 268px;

  --bs-body-font-family: var(--font-ui);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-primary: var(--violet);
  --bs-primary-rgb: 108, 76, 247;
  --bs-link-color: var(--violet);
  --bs-link-color-rgb: 108, 76, 247;
  --bs-link-hover-color: var(--violet-2);
  --bs-border-radius: 12px;
  --bs-font-monospace: var(--font-mono);
  --bs-tertiary-bg: var(--paper-2);
}

[data-bs-theme="dark"] {
  --paper: #121019;
  --paper-2: #1A1824;
  --line: #2B2838;
  --text: #EDEAF5;
  --muted: #A29DB2;
  --card: #1C1A26;
  --violet-soft: #2A2348;
  --lvl-1-bg: #23300C; --lvl-2-bg: #2A2348; --lvl-3-bg: #3A2D0C; --lvl-4-bg: #2A2834;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-tertiary-bg: var(--paper-2);
  --bs-secondary-color: var(--muted);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-ui); background: var(--paper); color: var(--text); letter-spacing: .005em; }
.font-monospace, .mono { font-family: var(--font-mono) !important; font-variant-numeric: tabular-nums; }
code, .code { font-family: var(--font-code) !important; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.display em, .display i { font-style: normal; color: var(--violet); }
h1 em, h2 em, .page-title em, .auth-card h1 em { font-style: normal; color: var(--violet); }
.lp-hero h1 em, .auth-quote em, .lp-hero .display em { color: var(--sun); }
.lp-dark h2 em { color: var(--lime); }
a { text-underline-offset: 3px; }
::selection { background: var(--lime); color: var(--ink); }

/* ---------- buttons ---------- */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 12px; letter-spacing: .01em; }
.btn-lg { --bs-btn-border-radius: 14px; --bs-btn-padding-y: .8rem; }
.btn-primary {
  --bs-btn-bg: var(--violet); --bs-btn-border-color: var(--violet);
  --bs-btn-hover-bg: var(--violet-2); --bs-btn-hover-border-color: var(--violet-2);
  --bs-btn-active-bg: var(--violet-2); --bs-btn-active-border-color: var(--violet-2);
  --bs-btn-disabled-bg: var(--violet); --bs-btn-disabled-border-color: var(--violet);
  box-shadow: 0 8px 20px -10px rgba(108,76,247,.7);
}
.btn-outline-primary {
  --bs-btn-color: var(--violet); --bs-btn-border-color: rgba(108,76,247,.35);
  --bs-btn-hover-bg: var(--violet); --bs-btn-hover-border-color: var(--violet); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--violet); --bs-btn-active-border-color: var(--violet);
}
.btn-lime { --bs-btn-bg: var(--lime); --bs-btn-color: var(--ink); --bs-btn-border-color: var(--lime);
  --bs-btn-hover-bg: #A6DD1F; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #A6DD1F;
  --bs-btn-active-bg: #A6DD1F; --bs-btn-active-color: var(--ink); }
.btn-ghost-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.25);
  --bs-btn-hover-bg: rgba(255,255,255,.08); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: rgba(255,255,255,.45); }
.btn-check:checked + .btn-outline-primary, .btn-check:checked + .btn-outline-secondary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--text); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--paper-2); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--line); }

/* ---------- forms ---------- */
.form-control, .form-select { border-color: var(--line); border-radius: 12px; background-color: var(--card); padding: .65rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--violet); box-shadow: 0 0 0 .2rem rgba(108,76,247,.15); }
.form-label { font-weight: 600; font-size: .92rem; }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }
.form-text { color: var(--muted); }

/* ---------- cards & surfaces ---------- */
.card, .surface { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.list-group { --bs-list-group-border-color: var(--line); --bs-list-group-bg: var(--card); --bs-list-group-border-radius: var(--radius); }
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--line); }
.table thead th { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.badge { font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: .38em .7em; }
.alert { border-radius: 14px; border: 0; }
.alert-success { background: var(--mint); color: #0B5B4C; }
.alert-danger { background: var(--rose); color: #8A1C3A; }
.alert-warning { background: #FFF4D6; color: #6A4A00; }
.alert-info { background: var(--violet-soft); color: #3A2A8F; }
[data-bs-theme="dark"] .alert-success { background: #12352E; color: #9FE5D3; }
[data-bs-theme="dark"] .alert-danger { background: #3A1520; color: #FFB3C6; }
[data-bs-theme="dark"] .alert-warning { background: #3A2D0C; color: #FFD98A; }
[data-bs-theme="dark"] .alert-info { background: #2A2348; color: #CFC3FF; }
.progress { --bs-progress-bg: var(--paper-2); --bs-progress-bar-bg: var(--violet); border-radius: 999px; }
.dropdown-menu { border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: 9px; padding: .45rem .7rem; }
.dropdown-item:active { background: var(--violet); }
.text-bg-success { background: var(--lvl-1) !important; color: var(--ink) !important; }
.text-bg-primary { background: var(--violet) !important; }
.text-bg-secondary { background: var(--lvl-4) !important; }
.text-bg-warning { background: var(--sun) !important; color: var(--ink) !important; }
.text-bg-danger { background: var(--danger) !important; }
.text-bg-light { background: var(--paper-2) !important; color: var(--text) !important; }
.border-success { border-color: var(--lvl-1) !important; }
.border-primary { border-color: var(--lvl-2) !important; }
.border-warning { border-color: var(--lvl-3) !important; }
.border-secondary { border-color: var(--lvl-4) !important; }
.bg-body-tertiary { background: var(--paper-2) !important; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1030;
  background: radial-gradient(1200px 400px at -20% -10%, rgba(108,76,247,.25), transparent 60%), var(--ink);
  color: #CFCADB; display: flex; flex-direction: column; border-right: 1px solid #000;
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.brand-word { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.brand-word span { color: var(--sun); }
.sidebar nav { overflow-y: auto; padding: .25rem .75rem 1rem; flex: 1; scrollbar-width: thin; scrollbar-color: var(--ink-line) transparent; }
.nav-group { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #8A849A; padding: 1rem .75rem .4rem; }
.nav-item-link {
  display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin: 1px 0;
  color: #D9D5E4; text-decoration: none; border-radius: 10px; font-weight: 500; font-size: .95rem; transition: background .15s, color .15s;
}
.nav-item-link .bi { font-size: 1.05rem; opacity: .85; width: 1.2rem; text-align: center; }
.nav-item-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item-link.active { background: linear-gradient(90deg, rgba(108,76,247,.95), rgba(108,76,247,.7)); color: #fff; box-shadow: 0 8px 20px -10px rgba(108,76,247,.9); }
.nav-item-link .lock { margin-left: auto; font-size: .8rem; opacity: .6; }
.sidebar-foot { padding: 1rem 1.25rem 1.1rem; border-top: 1px solid var(--ink-3); font-size: .8rem; }
.sidebar-foot .who { display: flex; align-items: center; gap: .6rem; color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, var(--violet), #9B7BFF); color: #fff; flex: none; }
.powered { display: inline-flex; flex-direction: column; gap: .1rem; color: #8A849A; font-size: .72rem; margin-top: .9rem; text-decoration: none; line-height: 1.2; }
.powered-line { display: inline-flex; align-items: center; gap: .45rem; }
.powered.justify-content-center { align-items: center; }
.powered img { height: 13px; opacity: .85; }
.powered em { font-style: normal; font-size: .72rem; color: #B9B3C8; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1080px; margin: 0 auto; padding: 1.75rem 2rem 4rem; flex: 1; }
.content.narrow { max-width: 760px; }

/* page header */
.page-head { display: flex; gap: 1.25rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px dashed var(--line); }
.page-eyebrow { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 2.8vw, 2.1rem); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.page-desc { color: var(--muted); max-width: 62ch; margin: .6rem 0 0; font-size: 1rem; line-height: 1.5; }

/* mobile chrome */
.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.4); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(23,21,31,.5); z-index: 1025; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 1020; align-items: center; justify-content: space-between;
    padding: .7rem 1rem; background: rgba(23,21,31,.96); backdrop-filter: blur(8px); color: #fff; }
  .topbar .brand-word { font-size: 1.1rem; }
  .topbar button { background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; padding: .2rem; }
  .content { padding: 1.25rem 1rem 6.5rem; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020; justify-content: space-around;
    background: var(--card); border-top: 1px solid var(--line); padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem; text-decoration: none;
    color: var(--muted); font-size: .68rem; font-weight: 600; background: none; border: 0; padding: .25rem 0; }
  .tabbar .bi { font-size: 1.3rem; }
  .tabbar .active { color: var(--violet); }
  .page-head { margin-bottom: 1.1rem; padding-bottom: 1rem; }
  .page-desc { font-size: .95rem; }
}

/* impersonation / announcement ribbons */
.ribbon { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; padding: .5rem 1rem; font-size: .88rem; font-weight: 600; }
.ribbon-imp { background: var(--sun); color: var(--ink); }
.ribbon-ann { background: var(--violet-soft); color: #3A2A8F; }
[data-bs-theme="dark"] .ribbon-ann { background: #2A2348; color: #CFC3FF; }

/* ---------- reusable bits ---------- */
.stat { padding: 1.1rem 1.2rem; }
.stat .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .value { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.7rem; line-height: 1.15; margin-top: .2rem; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--paper-2); border: 1px solid var(--line); }
.level-1 { --lv: var(--lvl-1); --lvbg: var(--lvl-1-bg); }
.level-2 { --lv: var(--lvl-2); --lvbg: var(--lvl-2-bg); }
.level-3 { --lv: var(--lvl-3); --lvbg: var(--lvl-3-bg); }
.level-4 { --lv: var(--lvl-4); --lvbg: var(--lvl-4-bg); }
.level-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--lv); display: inline-block; }
.section-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .bi { font-size: 2.2rem; color: var(--violet); opacity: .6; display: block; margin-bottom: .6rem; }
.locked-card { border: 1px dashed rgba(108,76,247,.4); background: var(--violet-soft); border-radius: var(--radius); padding: 1.5rem; }

/* ---------- auth (login / register) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); }
.auth-sky { position: relative; overflow: hidden; color: #fff; padding: 2.5rem 3rem; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 80% 110%, rgba(108,76,247,.55), transparent 60%), radial-gradient(600px 300px at 0% 0%, rgba(184,240,47,.12), transparent 60%), var(--ink); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; margin-bottom: .4rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-2); border-radius: 14px; padding: 4px; margin: 1.5rem 0; }
.auth-tabs a { text-align: center; padding: .55rem; border-radius: 11px; text-decoration: none; color: var(--muted); font-weight: 600; }
.auth-tabs a.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.auth-quote { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 2.8vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; max-width: 16ch; }
.auth-quote em { color: var(--sun); }
.sky-stars { position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(1.2px 1.2px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 40% 70%, #FFE9A8 50%, transparent 51%), radial-gradient(1px 1px at 85% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 85%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 60% 45%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 10%, #CFC3FF 50%, transparent 51%), radial-gradient(1.2px 1.2px at 92% 88%, #fff 50%, transparent 51%);
  background-size: 260px 260px, 340px 340px, 410px 410px, 300px 300px, 380px 380px, 450px 450px, 290px 290px, 520px 520px;
  animation: drift 120s linear infinite; }
@keyframes drift { to { background-position: 260px 520px, -340px 340px, 410px -410px, 300px 600px, -380px 380px, 450px 900px, 290px -290px, -520px 520px; } }
@media (prefers-reduced-motion: reduce) { .sky-stars { animation: none; } }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.orbit-1 { width: 620px; height: 620px; right: -260px; bottom: -260px; }
.orbit-2 { width: 420px; height: 420px; right: -160px; bottom: -160px; border-color: rgba(108,76,247,.45); }
.orbit-3 { width: 240px; height: 240px; right: -70px; bottom: -70px; border-color: rgba(255,201,60,.35); }
.orbit-planet { position: absolute; right: 155px; bottom: 300px; width: 14px; height: 14px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 24px var(--lime); }
.sky-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 1rem 1.1rem; backdrop-filter: blur(6px); max-width: 360px; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-sky { padding: 1.5rem 1.25rem 2rem; min-height: 0; }
  .auth-sky .hide-sm { display: none !important; }
  .auth-quote { font-size: 2rem; }
  .orbit-1, .orbit-2 { display: none; }
}

/* ---------- landing ---------- */
.lp { background: var(--paper); }
.lp-nav { position: sticky; top: 0; z-index: 50; background: rgba(23,21,31,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.lp-nav a { color: #D9D5E4; text-decoration: none; font-weight: 500; }
.lp-nav a:hover { color: #fff; }
.lp-hero { position: relative; overflow: hidden; color: #fff; padding: 6rem 0 5rem;
  background: radial-gradient(1000px 520px at 85% 100%, rgba(108,76,247,.55), transparent 60%), radial-gradient(700px 360px at 0% 0%, rgba(184,240,47,.10), transparent 60%), var(--ink); }
.lp-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.08; letter-spacing: -.03em; }
.lp-hero h1 em { color: var(--sun); }
.lp-hero .lead { color: #CFCADB; font-size: 1.2rem; max-width: 56ch; }
.kicker { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
.lp-section { padding: 5.5rem 0; }
.lp-section h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.12; letter-spacing: -.025em; }
.lp-section .kicker { color: var(--violet); }
.lp-dark { background: var(--ink); color: #E9E6F2; }
.lp-dark .kicker { color: var(--lime); }
.lp-dark .muted { color: #A29DB2; }
.feature { padding: 1.5rem; height: 100%; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--violet-soft); color: var(--violet); margin-bottom: 1rem; }
.lp-dark .card { background: var(--ink-2); border-color: var(--ink-3); color: #E9E6F2; box-shadow: none; }
.lp-dark .feature .ico { background: rgba(108,76,247,.2); color: #CFC3FF; }
.system-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.mock { background: var(--card); border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(23,21,31,.5); color: var(--text); padding: 1.25rem; }
.price-card { padding: 2rem 1.75rem; height: 100%; position: relative; }
.price-card.hi { border: 2px solid var(--violet); box-shadow: 0 30px 60px -30px rgba(108,76,247,.6); }
.price { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 2.3rem; line-height: 1; letter-spacing: -.02em; }
.ribbon-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--violet); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 999px; }
.lp-foot { background: var(--ink); color: #A29DB2; padding: 3.5rem 0 2rem; }
.lp-foot a { color: #D9D5E4; text-decoration: none; }
.faq .accordion-item { border: 1px solid var(--line); border-radius: 14px !important; margin-bottom: .6rem; overflow: hidden; background: var(--card); }
.faq .accordion-button { font-weight: 600; background: var(--card); }
.faq .accordion-button:not(.collapsed) { color: var(--violet); background: var(--violet-soft); box-shadow: none; }
.step-num { align-self: flex-start; font-family: var(--font-mono); font-size: .8rem; color: var(--violet); border: 1px solid rgba(108,76,247,.35); border-radius: 999px; padding: .15rem .6rem; }

/* ---------- super admin accent ---------- */
.sadmin .sidebar { background: radial-gradient(1200px 400px at -20% -10%, rgba(184,240,47,.14), transparent 60%), #0F0E15; }
.sadmin .nav-item-link.active { background: var(--lime); color: var(--ink); box-shadow: 0 8px 20px -10px rgba(184,240,47,.7); }
.sadmin .page-eyebrow { color: #5E7F00; }
[data-bs-theme="dark"] .sadmin .page-eyebrow { color: var(--lime); }
.role-badge { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; background: var(--lime); color: var(--ink); border-radius: 6px; padding: .15rem .4rem; }

/* legacy markup inside pages: soften old bordered boxes into cards */
.content .border.rounded, .content .border.rounded-3 { border-color: var(--line) !important; border-radius: var(--radius-sm) !important; background: var(--card); }
.content details > summary { cursor: pointer; font-weight: 600; }
.content table.table { background: transparent; }

/* data tables placed directly on a page get card styling */
.content > .table-responsive, .content > table.table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .35rem .9rem; }
.content > .table-responsive > .table { margin-bottom: 0; }

/* Poppins headings throughout */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font-ui); font-weight: 600; letter-spacing: -.01em; }

/* =====================================================================
   Minimal pass: smaller scale, lighter weight, less decoration.
   Everything Bootstrap builds from rem shrinks with the root size.
   ===================================================================== */
html { font-size: 14px; }
body { font-size: 1rem; line-height: 1.55; }
:root { --sidebar-w: 228px; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23,21,31,.04); }
[data-bs-theme="dark"] { --shadow: none; }

h1, .h1 { font-size: 1.6rem; } h2, .h2 { font-size: 1.3rem; } h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.05rem; } h5, .h5 { font-size: 1rem; } h6, .h6 { font-size: .9rem; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; }
.fs-3 { font-size: 1.3rem !important; } .fs-4 { font-size: 1.1rem !important; } .fs-5 { font-size: 1rem !important; }
.lead { font-size: 1.05rem; }

/* page header */
.page-head { margin-bottom: 1.1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); align-items: center; }
.page-title { font-size: 1.35rem !important; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.page-desc { font-size: .9rem; margin-top: .25rem; max-width: 70ch; }
.page-eyebrow, .section-label, .nav-group, .kicker { font-family: var(--font-ui); letter-spacing: .08em; font-size: .68rem; font-weight: 600; }
.page-eyebrow { margin-bottom: .2rem; }
.display { font-weight: 600; }

/* content width + spacing */
.content { padding: 1.25rem 1.75rem 3rem; max-width: 1040px; }
.card-body { padding: 1rem; }
.card.price-card, .price-card { padding: 1.25rem; }
.stat { padding: .85rem 1rem; }
.stat .label { font-size: .7rem; letter-spacing: .06em; }
.stat .value { font-size: 1.35rem; font-weight: 600; }
.stat .sub { font-size: .78rem; }
.price { font-size: 1.6rem; font-weight: 600; }
.chip { font-size: .74rem; padding: .18rem .55rem; font-weight: 500; }
.badge { font-weight: 500; font-size: .7rem; padding: .3em .6em; }
.table { font-size: .9rem; }
.table thead th { font-size: .68rem; letter-spacing: .05em; }
.alert { padding: .6rem .85rem; font-size: .9rem; border-radius: 10px; }
.empty { padding: 2rem 1rem; } .empty .bi { font-size: 1.6rem; }

/* controls */
.btn { --bs-btn-font-weight: 500; --bs-btn-font-size: .9rem; --bs-btn-padding-y: .42rem; --bs-btn-padding-x: .85rem; --bs-btn-border-radius: 8px; }
.btn-sm { --bs-btn-font-size: .8rem; --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .6rem; --bs-btn-border-radius: 7px; }
.btn-lg { --bs-btn-font-size: .95rem; --bs-btn-padding-y: .6rem; --bs-btn-padding-x: 1.1rem; --bs-btn-border-radius: 9px; }
.btn-primary { box-shadow: none; }
.form-control, .form-select { padding: .45rem .7rem; font-size: .92rem; border-radius: 8px; }
.form-control-lg { padding: .55rem .8rem; font-size: .95rem; border-radius: 9px; }
.form-label { font-size: .85rem; font-weight: 500; margin-bottom: .3rem; }
.scale .btn { min-width: 2.6rem; min-height: 2.6rem; font-size: 1rem; }

/* sidebar */
.sidebar { background: var(--ink); }
.sidebar .brand { padding: 1rem 1rem .75rem; }
.brand-word { font-size: 1.05rem; font-weight: 600; }
.sidebar nav { padding: 0 .6rem .75rem; }
.nav-group { padding: .85rem .6rem .3rem; font-size: .62rem; }
.nav-item-link { padding: .42rem .6rem; font-size: .88rem; gap: .6rem; border-radius: 8px; }
.nav-item-link .bi { font-size: .95rem; }
.nav-item-link.active { background: rgba(108,76,247,.9); box-shadow: none; }
.sadmin .sidebar { background: #0F0E15; }
.sadmin .nav-item-link.active { box-shadow: none; }
.sidebar-foot { padding: .8rem 1rem; }
.avatar { width: 28px; height: 28px; font-size: .72rem; }
.powered { margin-top: .6rem; font-size: .66rem; }
.powered img { height: 11px; }

/* mobile chrome */
@media (max-width: 991.98px) {
  .content { padding: 1rem .9rem 5.5rem; }
  .topbar { padding: .55rem .9rem; }
  .tabbar .bi { font-size: 1.1rem; }
  .tabbar a, .tabbar button { font-size: .64rem; }
}

/* auth: quieter, smaller */
.auth { grid-template-columns: 1fr 1fr; }
.auth-sky { padding: 1.75rem 2.25rem; background: radial-gradient(700px 380px at 85% 110%, rgba(108,76,247,.35), transparent 60%), var(--ink); }
.auth-quote { font-size: clamp(1.35rem, 2.2vw, 1.9rem) !important; max-width: 18ch; line-height: 1.25; }
.auth-card { max-width: 360px; }
.auth-card h1 { font-size: 1.5rem !important; font-weight: 600; }
.auth-tabs { margin: 1.1rem 0; border-radius: 9px; padding: 3px; }
.auth-tabs a { padding: .4rem; border-radius: 7px; font-size: .88rem; }
.sky-card { padding: .7rem .85rem; border-radius: 10px; font-size: .85rem; max-width: 320px; }
.orbit-1, .orbit-2 { opacity: .6; }
@media (max-width: 991.98px) { .auth-sky { padding: 1.1rem 1rem 1.25rem; } .auth-sky .kicker, .auth-quote { display: none; } .auth-form { padding: 1.5rem 1rem; } }

/* landing: calmer scale */
.lp-nav .container { padding-top: .6rem !important; padding-bottom: .6rem !important; }
.lp-nav a { font-size: .9rem; }
.lp-hero { padding: 4rem 0 3.5rem; }
.lp-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem) !important; line-height: 1.15; font-weight: 600; }
.lp-hero .lead { font-size: 1rem; }
.lp-section { padding: 3.75rem 0; }
.lp-section h2 { font-size: clamp(1.45rem, 2.6vw, 2rem) !important; font-weight: 600; }
.feature { padding: 1.1rem; }
.feature .ico { width: 34px; height: 34px; font-size: 1rem; border-radius: 9px; margin-bottom: .7rem; }
.system-pill { padding: .35rem .7rem; font-size: .85rem; font-weight: 500; }
.mock { border-radius: 14px; padding: 1rem; box-shadow: 0 20px 50px -30px rgba(23,21,31,.5); }
.ribbon-pop { font-size: .62rem; }
.lp-foot { padding: 2.5rem 0 1.5rem; }

/* =====================================================================
   Motion. Subtle and quick; switched off entirely for reduced motion.
   ===================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lv, #6C4CF7) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 14px var(--lime); } 50% { box-shadow: 0 0 28px var(--lime); } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* page entrance: header first, then each block in turn */
.page-head { animation: fadeUp .4s ease both; }
.content > *:not(.page-head):not(script) { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; }
.content > *:nth-child(2) { animation-delay: .05s; } .content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; } .content > *:nth-child(5) { animation-delay: .2s; }
.content > *:nth-child(6) { animation-delay: .25s; } .content > *:nth-child(n+7) { animation-delay: .3s; }
.row > [class*="col"] > .card, .row > [class*="col"] > .stat { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; }
.row > [class*="col"]:nth-child(2) > .card { animation-delay: .06s; } .row > [class*="col"]:nth-child(3) > .card { animation-delay: .12s; }
.row > [class*="col"]:nth-child(4) > .card { animation-delay: .18s; } .row > [class*="col"]:nth-child(n+5) > .card { animation-delay: .24s; }
.alert { animation: slideDown .35s ease both; }
.ribbon { animation: slideDown .35s ease both; }

/* interactive feedback */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
a.card:hover, .feature:hover, .price-card:hover, .stat:hover, .card:has(> .card-body > a):hover {
  transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(23,21,31,.35); border-color: rgba(108,76,247,.35); }
.btn { transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.nav-item-link { transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item-link:hover { transform: translateX(3px); }
.nav-item-link.active .bi { animation: pop .35s ease; }
.chip { transition: background .15s ease, border-color .15s ease; }
.chip:hover { border-color: rgba(108,76,247,.35); }
.form-control, .form-select, .form-check-input { transition: border-color .15s ease, box-shadow .2s ease; }
.progress-bar { transform-origin: left; animation: growX .8s cubic-bezier(.2,.7,.2,1) both .15s; }
.level-dot { animation: pulseDot 2.4s ease-in-out infinite; }
.tabbar .active .bi { animation: pop .35s ease; display: inline-block; }
.sidebar .brand img { transition: transform .6s ease; }
.sidebar .brand:hover img, .lp-nav a:hover img { transform: rotate(-20deg) scale(1.05); }
.dropdown-menu.show { animation: fadeUp .18s ease both; }
.accordion-collapse.collapsing { transition: height .25s ease; }

/* brand surfaces */
.orbit-planet { animation: glow 3s ease-in-out infinite; }
.orbit-2 { animation: orbitSpin 80s linear infinite; }
.orbit-3 { animation: orbitSpin 50s linear infinite reverse; }
.lp-hero .mock { animation: floatY 6s ease-in-out infinite; }
.auth-card { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.auth-sky .sky-card { animation: fadeUp .6s ease both; }
.auth-sky .sky-card + .sky-card { animation-delay: .12s; }
.lp-hero h1, .lp-hero .lead, .lp-hero .kicker { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
.lp-hero .lead { animation-delay: .08s; }

/* scroll reveal (class added by script on landing page elements) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* full-width layout: content fills the space next to the menu with even gutters */
.content, .content.narrow { max-width: none; margin: 0; padding: 1.25rem 1.5rem 3rem; }
@media (min-width: 1800px) { .content, .content.narrow { padding-left: 2rem; padding-right: 2rem; } }
@media (max-width: 991.98px) { .content, .content.narrow { padding: 1rem .9rem 5.5rem; } }
.page-desc { max-width: 90ch; }

/* level cards: full outline in the level colour, no one-sided accent */
.level-card { border: 1px solid var(--lv) !important; background: linear-gradient(var(--lvbg), var(--lvbg)), var(--card, #fff); }

/* buttons hug their label on desktop (stacks used to stretch them edge to edge) */
.btn-lg { --bs-btn-font-size: .9rem; --bs-btn-padding-y: .48rem; --bs-btn-padding-x: 1.1rem; --bs-btn-border-radius: 8px; }
@media (min-width: 768px) {
  .content .vstack > .btn, .content .vstack > button.btn, .content .vstack > a.btn { align-self: flex-start; min-width: 130px; }
  .content .btn-lg.w-100 { width: auto !important; min-width: 160px; }
}

/* ---------- ease-of-use kit ---------- */
/* card heading: icon + title (+ optional action on the right) */
.card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.card-head h2, .card-head h3, .card-head .t { font-size: .95rem; font-weight: 600; margin: 0; }
.card-head > .bi { color: var(--violet); font-size: 1rem; }
.card-head .end { margin-left: auto; }
.card-sub { color: var(--muted); font-size: .82rem; margin: -.55rem 0 .85rem; }

/* compact rating scale: fixed-size square buttons that never stretch */
.scale { display: flex; flex-wrap: wrap; gap: .4rem; }
.scale .btn { flex: 0 0 auto !important; min-width: 2.5rem; min-height: 2.5rem; padding: .35rem .75rem; font-size: .9rem; }
.scale-hint { display: flex; justify-content: space-between; width: calc(5 * 2.5rem + 4 * .4rem); font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

/* side list: compact rows used for history panels */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list a, .side-list .row-i { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem .15rem; color: inherit; text-decoration: none; font-size: .86rem; border-radius: 6px; }
.side-list a:hover { background: var(--paper-2); padding-left: .45rem; padding-right: .45rem; }
.side-list a.current { color: var(--violet); font-weight: 600; }
.side-list .meta { color: var(--muted); font-size: .76rem; white-space: nowrap; }

/* form footer: primary action + secondary text, left aligned */
.form-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .25rem; }
.form-foot .hint { color: var(--muted); font-size: .8rem; }

/* small empty state inside a card */
.empty-sm { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.25rem .5rem; }
.empty-sm .bi { display: block; font-size: 1.4rem; margin-bottom: .35rem; opacity: .6; }

/* steps indicator for multi-step flows (Ask) */
.steps { display: flex; gap: .35rem; align-items: center; font-size: .76rem; color: var(--muted); margin-bottom: 1rem; flex-wrap: wrap; }
.steps .s { display: inline-flex; align-items: center; gap: .35rem; }
.steps .n { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line); font-size: .7rem; font-weight: 600; }
.steps .s.done .n { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.steps .s.on { color: var(--text); font-weight: 600; }
.steps .s.on .n { background: var(--violet); color: #fff; border-color: transparent; }
.steps .sep { width: 1.2rem; height: 1px; background: var(--line); }

/* choice pills (areas, sources) */
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills .btn { border-radius: 999px; }

/* ---------- tables: aligned, calm, consistent ---------- */
.content .table { font-variant-numeric: tabular-nums; margin-bottom: 0; }
.content .table > :not(caption) > * > * { padding: .6rem .75rem; vertical-align: middle; }
.content .table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.content .table thead th { white-space: nowrap; font-weight: 600; color: var(--muted); border-bottom-width: 1px; }
.content .table tbody tr > * { transition: background-color .18s ease; }
.content .table-hover tbody tr:hover > *, .tbl .table tbody tr:hover > * { --bs-table-bg-state: transparent; background-color: var(--paper-2); }
.content .table tbody tr:last-child > * { border-bottom: 0; }
.content .table .num, .content .table th.num { text-align: right; white-space: nowrap; }
/* table card: heading row + full-bleed table */
.tbl { overflow: hidden; }
.tbl > .card-head { padding: .9rem 1rem 0; margin-bottom: .6rem; }
.tbl .table thead th { background: var(--paper-2); border-top: 1px solid var(--line); }
.tbl .table > :not(caption) > * > *:first-child { padding-left: 1rem; }
.tbl .table > :not(caption) > * > *:last-child { padding-right: 1rem; }
.tbl .tbl-foot { padding: .65rem 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.cell-icon { width: 1.9rem; height: 1.9rem; border-radius: 8px; display: inline-grid; place-items: center; background: var(--violet-soft); color: var(--violet); font-size: .9rem; flex: 0 0 auto; }

/* ---------- dropdowns (Tom Select) in the app's style ---------- */
.ts-wrapper.form-select, .ts-wrapper.single { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.ts-wrapper .ts-control { min-height: 2.3rem; padding: .42rem 2rem .42rem .7rem !important; border: 1px solid var(--line) !important; border-radius: 8px !important; background: var(--card) !important; color: var(--text); font-size: .92rem; box-shadow: none !important; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ts-wrapper.single .ts-control::after { content: ""; position: absolute; right: .8rem; top: 50%; width: .45rem; height: .45rem; margin-top: -.3rem; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.ts-wrapper.single.dropdown-active .ts-control::after { transform: rotate(-135deg); margin-top: -.05rem; }
.ts-wrapper.focus .ts-control { border-color: var(--violet) !important; box-shadow: 0 0 0 3px rgba(108,76,247,.15) !important; }
.ts-wrapper .ts-control input { color: var(--text); font-size: .92rem; }
.ts-dropdown { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); box-shadow: 0 12px 32px -12px rgba(23,21,31,.25); margin-top: 4px; overflow: hidden; font-size: .9rem; z-index: 1060; animation: ddIn .14s ease-out; }
.ts-dropdown .ts-dropdown-content { max-height: 260px; padding: .25rem; }
.ts-dropdown .option { padding: .45rem .65rem; border-radius: 6px; }
.ts-dropdown .option.active { background: var(--violet-soft); color: var(--violet); }
.ts-dropdown .option.selected { font-weight: 600; }
.ts-dropdown .dropdown-input-wrap { padding: .4rem; border-bottom: 1px solid var(--line); }
.ts-dropdown .dropdown-input { border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--text); padding: .35rem .6rem; font-size: .88rem; width: 100%; }
.ts-dropdown .no-results { padding: .5rem .65rem; color: var(--muted); }
.form-select-sm + .ts-wrapper .ts-control, .ts-wrapper.form-select-sm .ts-control { min-height: 1.9rem; padding-top: .25rem !important; padding-bottom: .25rem !important; font-size: .84rem; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- draws: deck, casting and card reveal ---------- */
.deck-table { position: relative; background: radial-gradient(ellipse at 50% 120%, #2A2150 0%, #17151F 70%); border-radius: 14px; padding: 1rem 1rem 1.1rem; color: #EDEAF5; overflow: hidden; }
.deck-status { font-size: .85rem; text-align: center; min-height: 1.4rem; }
.deck-status .btn-link { color: #C9BEFF; font-size: .78rem; text-decoration: none; }
.fan { position: relative; height: 170px; margin-top: .5rem; }
.fan .fcard { bottom: 44px; }
.fcard { position: absolute; left: 50%; bottom: 8px; width: 62px; height: 96px; margin-left: -31px; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; padding: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 4px, transparent 4px 8px), linear-gradient(160deg, #6C4CF7, #3B2A99);
  box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; transform-origin: 50% 100%;
  transform: translate(0, 0) rotate(0deg); transition: transform .55s cubic-bezier(.2,.8,.2,1) var(--d, 0ms), opacity .35s, box-shadow .2s, filter .2s; }
.fcard::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255,201,60,.45); border-radius: 4px; }
.fan.spread .fcard { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
.fan.spread .fcard:hover, .fan.spread .fcard:focus-visible { transform: translate(var(--x), calc(var(--y) - 18px)) rotate(var(--r)); box-shadow: 0 0 0 2px #B8F02F, 0 10px 24px rgba(0,0,0,.5); z-index: 500; outline: none; transition-delay: 0ms; }
.fcard.taken { opacity: 0; transform: translate(var(--x), -90px) rotate(0deg) scale(.8) !important; pointer-events: none; transition-delay: 0ms; }
.fan.gather .fcard:not(.taken) { transform: translate(0, 30px) rotate(0deg) scale(.9); opacity: .4; transition-delay: 0ms; }
.deck-table[data-system="runes"] .fcard { width: 56px; height: 64px; margin-left: -28px; border-radius: 40% 40% 36% 36% / 46% 46% 40% 40%; background: radial-gradient(circle at 35% 30%, #8A8299, #4C4659 70%); }
.deck-table[data-system="runes"] .fcard::after { border-color: rgba(255,255,255,.12); border-radius: inherit; }
.slots { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.slot { width: 74px; height: 50px; border: 1px dashed rgba(255,255,255,.3); border-radius: 8px; display: grid; place-items: center; font-size: .66rem; color: #A29DB2; text-align: center; padding: 2px; transition: all .3s; }
.slot.filled { border-style: solid; border-color: #B8F02F; color: #17151F; background: #B8F02F; animation: pop .35s ease-out; font-weight: 600; }
@media (max-width: 575.98px) { .fan { height: 150px; } .fcard { width: 46px; height: 72px; margin-left: -23px; } .slot { width: 60px; } }

.cast-table { text-align: center; background: radial-gradient(ellipse at 50% 120%, #2A2150 0%, #17151F 70%); border-radius: 14px; padding: 1.5rem 1rem; color: #EDEAF5; }
.cast-table .small { color: #A29DB2 !important; }
.coins { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; height: 56px; align-items: center; }
.coin { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE08A, #E8A20C 70%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 3px 8px rgba(0,0,0,.4); position: relative; }
.coin::after { content: ""; position: absolute; inset: 15px; border: 2px solid rgba(23,21,31,.45); border-radius: 2px; }
.coins.chain .coin { width: 22px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #C9A27A, #6B4A2B 70%); }
.coins.chain .coin::after { display: none; }
.coins.tossing .coin { animation: toss .7s ease-in-out 2; }
.coins.tossing .coin:nth-child(2) { animation-delay: .1s; } .coins.tossing .coin:nth-child(3) { animation-delay: .2s; }
@keyframes toss { 0% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-34px) rotateX(540deg); } 100% { transform: translateY(0) rotateX(1080deg); } }

/* revealed spread */
.spread-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.flip { width: 112px; height: 168px; perspective: 900px; }
.spread-row.many .flip { width: 96px; height: 146px; }
.flip.stone { width: 120px; height: 150px; }
.flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 4px, transparent 4px 8px), linear-gradient(160deg, #6C4CF7, #3B2A99); border: 1px solid rgba(255,255,255,.2); }
.face.front { transform: rotateY(180deg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: .5rem .4rem; text-align: center; }
.face.front .pos { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.face.front .art { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: var(--violet-soft); color: var(--violet); }
.face.front.wands .art { background: #FFE9D6; color: #D9622B; } .face.front.cups .art { background: #DDEFFF; color: #2B78D9; }
.face.front.swords .art { background: #EEECF2; color: #4C4659; } .face.front.pentacles .art { background: #FFF4D6; color: #B07A00; }
.face.front .art.rev, .face.front .glyph.rev { transform: rotate(180deg); }
.face.front .name { font-size: .74rem; font-weight: 600; line-height: 1.2; }
.face.front .tag { font-size: .62rem; color: var(--muted); line-height: 1.2; }
.face.front .glyph { font-size: 2.2rem; line-height: 1; color: var(--violet); font-family: 'Segoe UI Historic', 'Noto Sans Runic', serif; }
.flip .flip-in { transform: rotateY(0deg); } /* past draws: already face up */
.flip .face.back { display: none; }
.reveal-now .flip .face.back { display: block; }
.reveal-now .flip .flip-in { transform: rotateY(180deg); animation: flipUp .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.35s + var(--i) * .35s); }
.reveal-now .flip { animation: dealIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * .12s); }
@keyframes flipUp { from { transform: rotateY(180deg); } to { transform: rotateY(0deg); } }
@keyframes dealIn { from { opacity: 0; transform: translateY(-30px) rotate(-6deg); } to { opacity: 1; transform: none; } }
/* front must be the visible side when flip-in is at 0deg */
.flip .face.front { transform: none; } .flip .face.back { transform: rotateY(180deg); }
.fresh-draw { box-shadow: 0 0 0 2px var(--violet), var(--shadow); }

/* I Ching hexagram drawn line by line */
.hexagram { display: flex; gap: 1.1rem; align-items: center; }
.hexagram .lines { display: flex; flex-direction: column; gap: 5px; width: 74px; }
.hexagram .ln { display: flex; gap: 0; height: 8px; }
.hexagram .ln span { flex: 1; background: var(--ink, #17151F); border-radius: 2px; }
[data-bs-theme="dark"] .hexagram .ln span { background: #EDEAF5; }
.hexagram .ln.yin { gap: 12px; }
.hexagram .ln.moving span { background: var(--violet); }
.reveal-now .hexagram .ln { animation: lineIn .35s ease-out both; animation-delay: calc((5 - var(--i)) * .18s + .1s); }
@keyframes lineIn { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal-now .flip, .reveal-now .flip .flip-in, .reveal-now .hexagram .ln, .coins.tossing .coin { animation: none !important; transform: none !important; } .reveal-now .flip .face.back { display: none; } }

/* ---------- people ---------- */
.person-avatar { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 auto; background: var(--violet-soft); color: var(--violet); transition: transform .25s; }
.person-card:hover .person-avatar { transform: rotate(-6deg) scale(1.06); }
.person-avatar.r-self { background: var(--violet); color: #fff; }
.person-avatar.r-spouse, .person-avatar.r-partner { background: #FFE3EA; color: #D9465F; }
.person-avatar.r-child { background: #FFF4D6; color: #B07A00; }
.person-avatar.r-parent { background: #E4F5D0; color: #4E7A00; }
.person-avatar.r-friend, .person-avatar.r-colleague { background: #DDEFFF; color: #2B78D9; }
.min-w-0 { min-width: 0; }
.add-card { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; color: var(--muted); min-height: 170px; }
.add-card .bi { font-size: 1.6rem; color: var(--violet); transition: transform .25s; }
.add-card:hover { border-color: var(--violet); color: var(--text); }
.add-card:hover .bi { transform: scale(1.15); }
/* person picker chips */
.person-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.person-pick label { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .7rem .35rem .4rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .86rem; background: var(--card); transition: all .18s; }
.person-pick label .person-avatar { width: 1.8rem; height: 1.8rem; font-size: .85rem; border-radius: 50%; }
.person-pick input:checked + label { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108,76,247,.15); color: var(--violet); font-weight: 600; }
.person-pick label:hover { transform: translateY(-1px); }

/* ---------- matchmaking ---------- */
@property --pp { syntax: '<number>'; inherits: false; initial-value: 0; }
.score-ring { --pp: var(--p); width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--card) 79%, transparent 80% 100%), conic-gradient(var(--violet) calc(var(--pp) * 1%), var(--paper-2) 0);
  animation: ringFill 1.2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ringFill { from { --pp: 0; } }
.score-num { font-size: 2.1rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.koota-bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.koota-bar span { display: block; height: 100%; width: var(--w); background: #9BD41E; border-radius: inherit; transform-origin: left; animation: growX .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.2s + var(--i) * .08s); }
.koota-bar span.mid { background: #E8A20C; } .koota-bar span.low { background: var(--danger); }

/* ---------- Ask: method tiles ---------- */
.method-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.method-tile { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; height: 100%; }
.method-tile:hover { transform: translateY(-1px); border-color: rgba(108,76,247,.4); }
.method-tile .mi { width: 2.1rem; height: 2.1rem; border-radius: 9px; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); flex: 0 0 auto; transition: all .2s; }
.method-tile .mt { font-size: .86rem; line-height: 1.3; padding-right: 1.1rem; }
.method-tile .tick { position: absolute; top: .55rem; right: .6rem; color: var(--violet); opacity: 0; transform: scale(.5); transition: all .2s; }
.btn-check:checked + .method-tile { border-color: var(--violet); background: color-mix(in srgb, var(--violet-soft) 45%, var(--card)); }
.btn-check:checked + .method-tile .mi { background: var(--violet); color: #fff; }
.btn-check:checked + .method-tile .tick { opacity: 1; transform: scale(1); }
.btn-check:disabled + .method-tile { cursor: default; opacity: .75; }
.btn-check:disabled:not(:checked) + .method-tile { opacity: .5; }
.btn-check:focus-visible + .method-tile { box-shadow: 0 0 0 3px rgba(108,76,247,.25); }

/* ---------- Ask: methods step ---------- */
.method-step { transition: opacity .25s; }
.method-step.is-skipped { opacity: .7; }
.deck-table.complete .deck-hint { color: #B8F02F; }
.palm-drop { display: grid; place-items: center; min-height: 220px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; padding: 1rem; background: var(--paper-2); transition: border-color .2s, background .2s; overflow: hidden; }
.palm-drop:hover { border-color: var(--violet); background: var(--violet-soft); }
.palm-drop .palm-empty .bi { font-size: 2.2rem; color: var(--violet); display: inline-block; animation: floatY 3s ease-in-out infinite; }
.palm-drop .palm-preview { max-height: 320px; max-width: 100%; border-radius: 8px; animation: fadeIn .4s ease; }
.coins.sm { margin: 0; height: 40px; gap: .4rem; }
.coins.sm .coin { width: 30px; height: 30px; }
.coins.sm .coin::after { inset: 10px; }

/* ---------- answer tabs, method cards, verses, Lal Kitab chart ---------- */
.answer-tabs { gap: .35rem; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; }
.answer-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-weight: 500; font-size: .9rem; padding: .55rem .8rem; white-space: nowrap; transition: color .15s, border-color .2s; }
.answer-tabs .nav-link:hover { color: var(--text); }
.answer-tabs .nav-link.active { color: var(--violet); border-bottom-color: var(--violet); background: none; }
.tab-pane.active .method-card, .tab-pane.active .verse-card { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * .06s); }
.verse { font-size: 1rem; line-height: 1.55; padding: .8rem 1rem; border-radius: 10px; background: linear-gradient(135deg, var(--violet-soft), color-mix(in srgb, #FFF4D6 60%, var(--card))); margin-bottom: 1rem; position: relative; }
.verse::before { content: "\201C"; position: absolute; top: -.35rem; left: .45rem; font-size: 2.2rem; color: var(--violet); opacity: .35; line-height: 1; }
.lk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; max-width: 560px; }
@media (max-width: 575.98px) { .lk-grid { grid-template-columns: repeat(4, 1fr); } }
.lk-house { position: relative; min-height: 62px; border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem .3rem .3rem; display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; background: var(--card); }
.lk-house.sleeping { background: repeating-linear-gradient(45deg, var(--paper-2) 0 5px, transparent 5px 10px); }
.lk-house .hn { position: absolute; top: 2px; left: 6px; font-size: .62rem; color: var(--muted); font-weight: 600; }
.lk-p { display: inline-flex; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; padding: 1px 5px; border-radius: 5px; background: var(--paper-2); border: 1px solid var(--line); }
.lk-p.pakka { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.lk-p.up { background: #E4F5D0; color: #4E7A00; border-color: transparent; }
.lk-p.down { background: #FFE3EA; color: #D9465F; border-color: transparent; }
.lk-p .bi { font-size: .55rem; }

/* centre labels inside fixed-size choice buttons (rating scales, pills) */
.scale .btn, .pills .btn, .btn-check + .btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.scale .btn { padding-top: 0; padding-bottom: 0; }
.person-pick { align-items: center; }
.person-pick > .btn { align-self: center; }

/* an open dropdown always sits above neighbouring cards */
body > .ts-dropdown { z-index: 2000; }
.card:has(.ts-wrapper.dropdown-active), [class*="col"]:has(.ts-wrapper.dropdown-active) { position: relative; z-index: 30; }

/* ---------- more motion: rows, lists, chips, icons, inputs ---------- */
.content .table tbody tr { animation: rowIn .4s cubic-bezier(.2,.7,.2,1) both; }
.content .table tbody tr:nth-child(1) { animation-delay: .12s; } .content .table tbody tr:nth-child(2) { animation-delay: .16s; }
.content .table tbody tr:nth-child(3) { animation-delay: .2s; } .content .table tbody tr:nth-child(4) { animation-delay: .24s; }
.content .table tbody tr:nth-child(5) { animation-delay: .28s; } .content .table tbody tr:nth-child(6) { animation-delay: .32s; }
.content .table tbody tr:nth-child(7) { animation-delay: .36s; } .content .table tbody tr:nth-child(n+8) { animation-delay: .4s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.side-list li { animation: rowIn .35s ease both; }
.side-list li:nth-child(2) { animation-delay: .05s; } .side-list li:nth-child(3) { animation-delay: .1s; } .side-list li:nth-child(4) { animation-delay: .15s; }
.side-list li:nth-child(5) { animation-delay: .2s; } .side-list li:nth-child(n+6) { animation-delay: .25s; }
.chip, .badge { animation: chipIn .35s cubic-bezier(.2,.8,.2,1) both; animation-delay: .15s; }
@keyframes chipIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.chip { transition: background-color .15s, transform .15s; }
a.chip:hover, .chip:hover { transform: translateY(-1px); }
.card-head > .bi, .cell-icon { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-head > .bi, tr:hover .cell-icon, .method-card:hover .cell-icon { transform: scale(1.15) rotate(-6deg); }
.form-control, .form-select, .ts-wrapper .ts-control { transition: border-color .15s, box-shadow .2s, background-color .15s; }
.form-control:focus { box-shadow: 0 0 0 3px rgba(108,76,247,.15); border-color: var(--violet); }
.empty .bi, .empty-sm .bi { animation: floatY 3.2s ease-in-out infinite; }
.page-title { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; }
.page-desc { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) .06s both; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; pointer-events: none; }
.btn-primary:hover::after { transform: translateX(120%); }
.answer-tabs .nav-link { position: relative; }
.tab-pane.fade { transition: opacity .25s ease; }
.ts-dropdown .option { transition: background-color .12s, color .12s, padding-left .12s; }
.ts-dropdown .option.active { padding-left: .85rem; }
@media (prefers-reduced-motion: reduce) {
  .content .table tbody tr, .side-list li, .chip, .badge, .empty .bi, .empty-sm .bi, .page-title, .page-desc { animation: none !important; }
  .btn-primary::after { display: none; }
}

/* ---------- monthly outlook calendar ---------- */
.legend { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; padding: .2rem .55rem; border-radius: 999px; background: var(--lvbg); color: var(--text); }
.legend .bi { color: var(--lv); } .legend b { font-weight: 600; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: .2rem; }
.cal-day { position: relative; min-height: 76px; border-radius: 10px; padding: .4rem .5rem; background: var(--lvbg, var(--paper-2)); border: 1px solid transparent;
  display: flex; flex-direction: column; justify-content: space-between; animation: chipIn .35s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 12ms);
  transition: transform .15s, box-shadow .15s; }
.cal-day:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(23,21,31,.45); }
.cal-num { font-size: .85rem; font-weight: 600; line-height: 1; }
.cal-icon { color: var(--lv); font-size: 1rem; align-self: flex-end; margin-top: -1rem; }
.cal-label { font-size: .68rem; color: var(--muted); font-weight: 500; }
.cal-day.is-today { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(108,76,247,.25); }
.cal-day.is-today .cal-num::after { content: "today"; margin-left: .3rem; font-size: .58rem; font-weight: 600; color: var(--violet); text-transform: uppercase; letter-spacing: .05em; }
.cal-flag { position: absolute; top: .45rem; right: .45rem; width: 7px; height: 7px; border-radius: 50%; }
.win-stronger .cal-flag { background: #5E8F00; } .win-review .cal-flag { background: var(--muted); }
.win-stronger .cal-icon, .win-review .cal-icon { margin-right: .6rem; }
.win-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.win-dot.strong { background: #9BD41E; } .win-dot.review { background: #7A7489; }
@media (max-width: 575.98px) {
  .cal { gap: 3px; }
  .cal-day { min-height: 50px; padding: .3rem; border-radius: 7px; }
  .cal-label { display: none; }
  .cal-icon { font-size: .8rem; margin-top: 0; align-self: center; }
  .cal-num { font-size: .75rem; }
  .cal-day.is-today .cal-num::after { display: none; }
  .cal-flag { top: 3px; right: 3px; width: 5px; height: 5px; }
}

/* ---------- panel motion: ripple, icon pop, progress shimmer, active glow, card glow ---------- */
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: rippleOut .6s ease-out forwards; pointer-events: none; }
@keyframes rippleOut { to { transform: scale(1); opacity: 0; } }
.card-head > .bi, .card-head > .cell-icon { animation: iconPop .5s cubic-bezier(.2,.8,.2,1.3) both; animation-delay: .2s; }
@keyframes iconPop { 0% { opacity: 0; transform: scale(.4) rotate(-25deg); } 100% { opacity: 1; transform: none; } }
.progress-bar { position: relative; overflow: hidden; }
.progress-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-100%); animation: shimmer 2.4s ease-in-out 1s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.nav-item-link.active { position: relative; }
.nav-item-link.active::before { content: ""; position: absolute; left: -.6rem; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: #B8F02F; box-shadow: 0 0 10px #B8F02F; animation: growY .35s ease both; }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.content .card { transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, opacity .6s ease; }
.content .card:hover { border-color: rgba(108,76,247,.28); box-shadow: 0 12px 28px -18px rgba(108,76,247,.45); }
.stat .value { display: inline-block; }
.stat:hover .label .bi, .stat:hover > .d-flex .bi { animation: iconPop .45s ease both; }
.alert .bi:first-child { animation: iconPop .5s ease .15s both; }
.chip .bi { transition: transform .2s; } .chip:hover .bi { transform: rotate(-12deg) scale(1.15); }
.side-list a .meta { transition: color .15s, transform .15s; } .side-list a:hover .meta { color: var(--violet); transform: translateX(-2px); }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
@media (prefers-reduced-motion: reduce) {
  .card-head > .bi, .card-head > .cell-icon, .alert .bi:first-child, .progress-bar::after, .nav-item-link.active::before { animation: none !important; }
}
.partner-box { border: 1px dashed rgba(217,70,95,.45); background: color-mix(in srgb, #FFE3EA 35%, var(--card)); border-radius: 12px; padding: .85rem 1rem; animation: fadeUp .35s ease both; }
.score-ring.sm { width: 84px; height: 84px; flex: 0 0 auto; }
.score-ring.sm .score-num { font-size: 1.35rem; }

/* phones: comfortable tap targets for compact buttons (desktop stays compact) */
@media (max-width: 767.98px) {
  .content .btn-sm, .content .pills .btn, .content label.btn, .content .btn-link.btn-sm, .ribbon .btn, .ribbon button, .deck-reshuffle { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; }
  .content .btn:not(.btn-sm) { min-height: 40px; }
  .person-pick label { min-height: 40px; }
  .answer-tabs .nav-link { min-height: 40px; }
  .side-list a { min-height: 40px; }
}
@media (max-width: 767.98px) {
  .lp-section .row.g-5, .lp-dark .row.g-5 { --bs-gutter-x: 1.5rem; }
  .lp-section .btn-sm, .lp-section label.btn { min-height: 34px; display: inline-flex; align-items: center; }
}

/* ---------- profile photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.photo-slot { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--paper-2); cursor: pointer; text-align: center; padding: .5rem; overflow: hidden; transition: border-color .2s, background .2s, transform .2s; }
.photo-slot:hover { border-color: var(--violet); background: var(--violet-soft); transform: translateY(-2px); }
.photo-slot .bi { font-size: 1.6rem; color: var(--violet); display: inline-block; transition: transform .3s; }
.photo-slot:hover .bi { transform: scale(1.15) rotate(-8deg); }
.photo-slot .photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .35s ease; }
.photo-slot.has-photo { border-style: solid; border-color: var(--violet); }
.photo-state { display: inline-block; margin-top: .35rem; font-size: .7rem; color: var(--muted); }
.photo-state.ok { color: #4E7A00; font-weight: 500; }
@media (max-width: 575.98px) { .photo-grid { gap: .4rem; } .photo-slot { padding: .25rem; } .photo-state { font-size: .62rem; } }

/* ---------- collapsible menu (rail) ---------- */
.sidebar { transition: width .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.main { transition: margin-left .25s cubic-bezier(.2,.8,.2,1); }
.rail-toggle { position: absolute; top: 1rem; right: .6rem; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255,255,255,.06); color: #CFCADB; display: none; align-items: center; justify-content: center; font-size: .8rem; transition: background .15s, transform .25s; z-index: 2; }
.rail-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }
@media (min-width: 992px) {
  .rail-toggle { display: inline-flex; }
  .sidebar .brand { padding-right: 2.6rem; }
  html.rail { --rail-w: 64px; }
  html.rail .main { margin-left: var(--rail-w); }
  html.rail .sidebar { width: var(--rail-w); overflow: hidden; }
  html.rail .sidebar .rail-toggle { transform: rotate(180deg); right: 18px; top: 3.2rem; }
  html.rail .sidebar:not(:hover) .brand-word, html.rail .sidebar:not(:hover) .role-badge,
  html.rail .sidebar:not(:hover) .nav-item-link span, html.rail .sidebar:not(:hover) .nav-item-link .lock,
  html.rail .sidebar:not(:hover) .sidebar-foot .flex-fill, html.rail .sidebar:not(:hover) .sidebar-foot .dropdown,
  html.rail .sidebar:not(:hover) .powered { display: none !important; }
  html.rail .sidebar:not(:hover) .nav-group { font-size: 0; padding: .5rem 0 .25rem; border-top: 1px solid rgba(255,255,255,.08); margin: .35rem .5rem 0; }
  html.rail .sidebar:not(:hover) .nav-item-link { justify-content: center; padding-left: 0; padding-right: 0; }
  html.rail .sidebar:not(:hover) .nav-item-link .bi { font-size: 1.1rem; margin: 0; }
  html.rail .sidebar:not(:hover) .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  html.rail .sidebar:not(:hover) .who { justify-content: center; }
  html.rail .sidebar:not(:hover) .nav-item-link.active::before { left: -.4rem; }
  html.rail .sidebar:hover { width: var(--sidebar-w); box-shadow: 12px 0 40px -12px rgba(0,0,0,.5); overflow: visible; }
  html.rail .sidebar:hover .rail-toggle { transform: none; right: .6rem; top: 1rem; }
}

/* ---------- Ask: conversations on the left ---------- */
.ask-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .ask-layout { grid-template-columns: 1fr; } .ask-layout .threads { order: 2; position: static; max-height: none; } }
.threads { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; padding: .75rem; overflow: hidden; }
.threads-head { padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.threads-search { position: relative; }
.threads-search .bi { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; }
.threads-search input { padding-left: 1.8rem; }
.threads-list { overflow-y: auto; margin: .5rem -.25rem 0; padding: 0 .25rem; scrollbar-width: thin; }
.thread { display: flex; gap: .55rem; align-items: flex-start; padding: .5rem .55rem; border-radius: 8px; color: inherit; text-decoration: none; transition: background .15s, transform .15s; animation: rowIn .3s ease both; }
.thread:hover { background: var(--paper-2); transform: translateX(2px); }
.thread.current { background: var(--violet-soft); }
.thread.current .thread-title { color: var(--violet); font-weight: 600; }
.thread-icon { margin-top: .15rem; font-size: .9rem; color: var(--muted); }
.thread-icon.s-answered { color: #5E8F00; } .thread-icon.s-generating { color: var(--violet); } .thread-icon.s-failed { color: var(--danger); }
.thread-text { min-width: 0; }
.thread-title { display: block; font-size: .85rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thread-meta { display: block; font-size: .72rem; color: var(--muted); margin-top: .1rem; }

/* ---------- motion everywhere: page transitions, nudges, pops, shakes ---------- */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root) { animation: vtOut .16s ease both; }
::view-transition-new(root) { animation: vtIn .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(8px); } }

.page-head { position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 64px; border-radius: 2px; background: linear-gradient(90deg, var(--violet), #B8F02F); transform-origin: left; animation: growX .6s cubic-bezier(.2,.8,.2,1) .2s both; }
.page-eyebrow .bi { display: inline-block; animation: iconPop .5s ease .1s both; }

.btn .bi-arrow-right, .btn .bi-chevron-right, a .bi-chevron-right, .btn .bi-box-arrow-up-right { transition: transform .2s ease; display: inline-block; }
.btn:hover .bi-arrow-right, .btn:hover .bi-chevron-right, a:hover > .bi-chevron-right { transform: translateX(3px); }
.btn .bi-chevron-left { transition: transform .2s; display: inline-block; } .btn:hover .bi-chevron-left { transform: translateX(-3px); }
.btn:hover .bi-plus-lg, .btn:hover .bi-person-plus { transform: rotate(90deg); transition: transform .3s; display: inline-block; }
.btn .bi-plus-lg, .btn .bi-person-plus { transition: transform .3s; display: inline-block; }

.btn-check:checked + .btn, .btn-check:checked + label { animation: pickPop .28s cubic-bezier(.2,.8,.2,1.4); }
@keyframes pickPop { 0% { transform: scale(.92); } 100% { transform: scale(1); } }
.form-check-input { transition: transform .15s, background-color .15s, border-color .15s; }
.form-check-input:checked { animation: pickPop .25s ease; }

.is-invalid, .alert-danger { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.spinner-border { animation-duration: .9s; }
.empty .spinner-border + .fw-semibold { background: linear-gradient(90deg, var(--text), var(--violet), var(--text)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: textShine 2s linear infinite; }
@keyframes textShine { to { background-position: -200% 0; } }

.tabbar a .bi, .tabbar button .bi { transition: transform .2s; display: inline-block; }
.tabbar a:active .bi { transform: scale(.85); }
.tabbar a.active .bi { animation: iconPop .4s ease; }

.dropdown-menu.show { animation: ddIn .16s ease-out; }
.modal.show .modal-dialog { animation: fadeUp .3s cubic-bezier(.2,.7,.2,1); }
.list-group-item { transition: background-color .15s, transform .15s; }
.list-group-item-action:hover { transform: translateX(3px); }
.avatar { transition: transform .3s; } .who:hover .avatar { transform: rotate(-10deg) scale(1.08); }
.brand-word span { display: inline-block; transition: transform .3s; } .brand:hover .brand-word span { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .page-head::after, .is-invalid, .alert-danger, .btn-check:checked + .btn, .btn-check:checked + label, .empty .spinner-border + .fw-semibold { animation: none !important; }
}

/* ---------- home ---------- */
.home-today { transition: transform .2s, box-shadow .2s; }
.home-today:hover { transform: translateY(-3px); }
.home-level-icon { font-size: 1.8rem; color: var(--lv); animation: floatY 4s ease-in-out infinite; }
.verse-of-day { background: linear-gradient(135deg, color-mix(in srgb, var(--violet-soft) 70%, var(--card)), color-mix(in srgb, #FFF4D6 45%, var(--card))); border-color: transparent; position: relative; overflow: hidden; }
.verse-of-day::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(108,76,247,.18), transparent 70%); animation: floatY 6s ease-in-out infinite; }
.verse-of-day .verse { background: rgba(255,255,255,.55); font-size: 1.05rem; }
[data-bs-theme="dark"] .verse-of-day .verse { background: rgba(0,0,0,.2); }
.quick { padding: .85rem 1rem; }
.quick.hot { border-color: rgba(108,76,247,.45); box-shadow: 0 0 0 3px rgba(108,76,247,.08); }
.quick.hot .cell-icon { animation: pulseDot 2.4s ease-in-out infinite; --lv: #6C4CF7; }
.method-mini { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .65rem; border-radius: 10px; background: var(--paper-2); height: 100%; animation: rowIn .35s ease both; animation-delay: calc(var(--i) * 50ms); transition: transform .15s; }
.method-mini:hover { transform: translateY(-2px); }
.report-cta { background: linear-gradient(120deg, #17151F, #2A2150); color: #EDEAF5; border: 0; }
.report-cta .text-secondary { color: #A29DB2 !important; }
.cta-orb { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #8B6DFF, #6C4CF7); color: #fff; font-size: 1.3rem; box-shadow: 0 0 24px rgba(108,76,247,.6); animation: floatY 3.5s ease-in-out infinite; }
.person-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem .35rem .4rem; border: 1px solid var(--line); border-radius: 999px; color: inherit; text-decoration: none; font-size: .86rem; transition: all .18s; }
.person-chip:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-1px); }
.person-chip .person-avatar { width: 1.8rem; height: 1.8rem; font-size: .85rem; border-radius: 50%; }

/* ---------- life report ---------- */
.life-line { position: relative; padding-left: 2.2rem; }
.life-line::before { content: ""; position: absolute; left: .85rem; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(var(--line), var(--violet) 50%, var(--line)); transform-origin: top; animation: growY 1s cubic-bezier(.2,.8,.2,1) both; }
.ll-item { position: relative; margin-bottom: .75rem; animation: rowIn .4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 60ms); }
.ll-dot { position: absolute; left: -2.2rem; top: .9rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-size: .8rem; color: var(--muted); z-index: 1; }
.is-past .ll-card { opacity: .82; }
.is-current .ll-dot { border-color: var(--violet); color: var(--violet); box-shadow: 0 0 0 5px rgba(108,76,247,.15); animation: pulseDot 2.2s ease-in-out infinite; --lv: #6C4CF7; }
.is-current .ll-card { border-color: var(--violet); box-shadow: 0 10px 30px -18px rgba(108,76,247,.6); }
.tone-supportive .ll-dot { color: #5E8F00; } .tone-demanding .ll-dot { color: var(--danger); } .tone-mixed .ll-dot { color: #E8A20C; }
.ll-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem .9rem; font-size: .78rem; color: var(--muted); }
.ll-areas span { display: flex; gap: .4rem; align-items: flex-start; }
.ll-areas .bi { color: var(--violet); margin-top: .1rem; }
.life-card.past { background: linear-gradient(160deg, color-mix(in srgb, #EEECF2 70%, var(--card)), var(--card)); }
.life-card.future { background: linear-gradient(160deg, color-mix(in srgb, var(--violet-soft) 80%, var(--card)), var(--card)); }
.conclusion-card { background: linear-gradient(135deg, color-mix(in srgb, var(--violet-soft) 60%, var(--card)), color-mix(in srgb, #E4F5D0 40%, var(--card))); border-color: transparent; }
@media (max-width: 575.98px) { .life-line { padding-left: 1.7rem; } .ll-dot { left: -1.75rem; width: 1.5rem; height: 1.5rem; } .life-line::before { left: .6rem; } }
.remedy-row { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; animation: rowIn .35s ease both; }
.remedy-row:last-child { border-bottom: 0; }
.due-card { border-color: rgba(108,76,247,.45); box-shadow: 0 0 0 3px rgba(108,76,247,.08); }
@media (max-width: 767.98px) { .remedy-row > form { width: 100%; } }

/* ---------- life report: motion ---------- */
/* hero */
.report-hero { position: relative; overflow: hidden; border-radius: 16px; background: radial-gradient(ellipse at 80% 20%, #3B2A99 0%, #221A48 45%, #17151F 100%); color: #EDEAF5; padding: 1.4rem 1.5rem; animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.rh-stars span { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .2; animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(1); } 50% { opacity: .9; transform: scale(1.8); } }
.rh-body { position: relative; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rh-text { flex: 1 1 320px; min-width: 0; }
.rh-kicker { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #B8F02F; font-weight: 600; }
.rh-title { font-size: 1.35rem; font-weight: 600; margin: .25rem 0 0; color: #fff; animation: fadeUp .5s ease .1s both; }
.rh-theme { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; padding: .22rem .6rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); animation: chipIn .4s cubic-bezier(.2,.8,.2,1.3) both; animation-delay: calc(.25s + var(--i) * .08s); }
.rh-theme .bi { color: #FFC93C; }
.rh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; max-width: 560px; }
.rh-stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: .55rem .65rem; display: flex; flex-direction: column; animation: fadeUp .45s ease both; animation-delay: calc(.35s + var(--i) * .08s); transition: background .2s, transform .2s; }
.rh-stat:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.rh-stat .bi { color: #B8F02F; font-size: .85rem; }
.rh-num { font-size: 1.4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rh-lbl { font-size: .66rem; color: #A29DB2; }
.rh-wheel { flex: 0 0 auto; width: 210px; height: 210px; }
.rh-wheel svg { width: 100%; height: 100%; overflow: visible; }
.rh-ring, .rh-planets { animation: wheelSpin 120s linear infinite; transform-origin: 0 0; }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.rh-glyph { fill: rgba(255,255,255,.55); font-size: 11px; }
.rh-glow { animation: glowPulse 4s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.rh-planet { animation: planetIn .6s ease both; animation-delay: calc(.5s + var(--i) * .09s); }
@keyframes planetIn { from { opacity: 0; } to { opacity: 1; } }
.rh-dot { fill: #6C4CF7; stroke: rgba(255,255,255,.6); stroke-width: 1; }
.rh-dot.p-sun { fill: #FFC93C; } .rh-dot.p-moon { fill: #EDEAF5; } .rh-dot.p-mars { fill: #F07A8E; } .rh-dot.p-mercury { fill: #9BD41E; }
.rh-dot.p-jupiter { fill: #E8A20C; } .rh-dot.p-venus { fill: #F48FB1; } .rh-dot.p-saturn { fill: #9EA3D8; } .rh-dot.p-rahu, .rh-dot.p-ketu { fill: #B9B3C8; }
.rh-ptxt { font-size: 7px; font-weight: 700; fill: #17151F; }
.rh-core { fill: #B8F02F; filter: drop-shadow(0 0 8px #B8F02F); animation: glowPulse 2.6s ease-in-out infinite; }
.rh-coretxt { font-size: 12px; fill: #17151F; }
@media (max-width: 767.98px) { .rh-wheel { width: 150px; height: 150px; margin: 0 auto; } .rh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-hero { padding: 1.1rem; } }

/* tabs: sliding underline, panes glide */
.report-tabs { position: relative; }
.report-tabs .nav-link.active { border-bottom-color: transparent; }
.tab-ink { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--violet), #B8F02F); transition: transform .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.report-tabs .nav-link .bi { display: inline-block; transition: transform .3s; }
.report-tabs .nav-link:hover .bi, .report-tabs .nav-link.active .bi { transform: scale(1.15) rotate(-8deg); }
.report-panes > .tab-pane.active { animation: paneIn .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* timeline: drawn line, items slide in alternately, current pulses */
.life-line::before { background: var(--line); animation: none; }
.life-line::after { content: ""; position: absolute; left: .85rem; top: .4rem; width: 2px; height: 0; border-radius: 2px; background: linear-gradient(var(--violet), #B8F02F); box-shadow: 0 0 8px rgba(108,76,247,.6); transition: height 1.4s cubic-bezier(.2,.8,.2,1) .2s; }
.life-line.drawn::after { height: var(--fill, 0%); }
.life-line .ll-item { animation: none; opacity: 0; transform: translateX(-14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.life-line .ll-item:nth-child(even) { transform: translateX(14px); }
.life-line .ll-item.in { opacity: 1; transform: none; }
.life-line .ll-item.in .ll-dot { animation: iconPop .5s cubic-bezier(.2,.8,.2,1.4) both; }
.is-current .ll-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--violet); animation: ringOut 2s ease-out infinite; }
@keyframes ringOut { from { transform: scale(.7); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.ll-card { transition: transform .2s, box-shadow .2s, border-color .2s; }
.ll-item:hover .ll-card { transform: translateX(4px); border-color: rgba(108,76,247,.35); }
.ll-areas span { transition: color .15s; }
.ll-areas span:hover { color: var(--text); }

/* cards: light follows the mouse */
.report-panes .method-card, .report-panes .verse-card { transition: transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden; }
.report-panes .method-card::after, .report-panes .verse-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(108,76,247,.10), transparent 55%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.report-panes .method-card:hover::after, .report-panes .verse-card:hover::after { opacity: 1; }

/* past / future life: drifting light */
.life-card { position: relative; overflow: hidden; }
.life-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(30px); opacity: .5; animation: drift 9s ease-in-out infinite alternate; }
.life-card.past::before { background: #CFCADB; left: -60px; bottom: -80px; }
.life-card.future::before { background: #B3A2FF; right: -60px; top: -80px; animation-delay: -4s; }
.life-card .card-body { position: relative; }
.life-card .card-head > .bi { animation: floatY 3.5s ease-in-out infinite; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, -20px) scale(1.15); } }

/* predictions: agreement bars fill */
.conf-bar { height: 4px; border-radius: 4px; background: var(--paper-2); margin-top: .35rem; overflow: hidden; width: 70px; }
.conf-bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--violet), #9BD41E); transform-origin: left; }
.tab-pane.active .conf-bar span { animation: growX .8s cubic-bezier(.2,.8,.2,1) .25s both; }

/* conclusion: steps tick in */
.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px dashed rgba(108,76,247,.2); }
.steps-list li:last-child { border-bottom: 0; }
.sl-tick { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: #fff; font-size: .8rem; }
.tab-pane.active .steps-list li { animation: rowIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.2s + var(--i) * .15s); }
.tab-pane.active .steps-list .sl-tick { animation: iconPop .45s cubic-bezier(.2,.8,.2,1.5) both; animation-delay: calc(.35s + var(--i) * .15s); }
.tab-pane.active .conclusion-card .card-head > .bi { animation: flagWave 1.6s ease-in-out .3s 2; display: inline-block; transform-origin: left bottom; }
@keyframes flagWave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(8deg); } }

/* verses fold in */
.tab-pane.active .verse-card { animation: verseIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * .1s); }
@keyframes verseIn { from { opacity: 0; transform: perspective(900px) rotateX(-12deg) translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .rh-ring, .rh-planets, .rh-glow, .rh-core, .rh-stars span, .life-card::before, .is-current .ll-dot::after { animation: none !important; }
  .life-line .ll-item { opacity: 1; transform: none; }
  .life-line::after { transition: none; }
}

.rh-glyph { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', 'DejaVu Sans', 'Apple Symbols', sans-serif; }
.answer-tabs { scrollbar-width: none; } .answer-tabs::-webkit-scrollbar { display: none; }

/* ---------- home: motion ---------- */
/* sky banner, coloured by the time of day */
.home-sky { position: relative; overflow: hidden; border-radius: 16px; min-height: 150px; padding: 1.4rem 1.5rem; margin-bottom: 1rem; color: #fff; isolation: isolate; animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.home-sky.sky-day { background: linear-gradient(160deg, #6C4CF7 0%, #8E7BFF 55%, #FFD98A 140%); }
.home-sky.sky-dawn { background: linear-gradient(160deg, #3B2A99 0%, #D9465F 75%, #FFC93C 130%); }
.home-sky.sky-dusk { background: linear-gradient(160deg, #2A2150 0%, #6C4CF7 55%, #F07A8E 125%); }
.home-sky.sky-night { background: radial-gradient(ellipse at 75% 20%, #3B2A99 0%, #221A48 45%, #17151F 100%); }
.sky-stars span { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; animation: twinkle 3.4s ease-in-out infinite; animation-delay: var(--d); z-index: -1; }
.sky-day .sky-stars, .sky-dawn .sky-stars { display: none; }
.sky-cloud { position: absolute; z-index: -1; height: 26px; width: 110px; border-radius: 30px; background: rgba(255,255,255,.28); filter: blur(1px); animation: cloudDrift 38s linear infinite; }
.sky-cloud::before, .sky-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.sky-cloud::before { width: 46px; height: 46px; left: 18px; top: -22px; }
.sky-cloud::after { width: 34px; height: 34px; left: 56px; top: -14px; }
.sky-cloud.c1 { top: 58%; left: -140px; }
.sky-cloud.c2 { top: 26%; left: -140px; transform: scale(.7); animation-duration: 52s; animation-delay: -20s; opacity: .7; }
.sky-night .sky-cloud { background: rgba(255,255,255,.06); }
@keyframes cloudDrift { to { transform: translateX(calc(100vw + 280px)); } }
.sky-arc { position: absolute; right: 4%; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.28); z-index: -1;
  transform: rotate(calc(-90deg + var(--arc) * 180deg)); animation: arcRise 1.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes arcRise { from { transform: rotate(-90deg); } }
.sky-body { position: absolute; left: 50%; top: -22px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; }
.sky-body.sun { background: radial-gradient(circle at 35% 35%, #FFF3C4, #FFC93C 60%, #E8A20C); box-shadow: 0 0 30px 8px rgba(255,201,60,.55); animation: sunGlow 3s ease-in-out infinite; }
.sky-body.moon { background: radial-gradient(circle at 35% 35%, #FFFFFF, #E4E0F0 65%); box-shadow: 0 0 26px 6px rgba(237,234,245,.35), inset -10px -4px 0 rgba(23,21,31,.25); animation: sunGlow 4s ease-in-out infinite; }
@keyframes sunGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
.sky-text { position: relative; max-width: 70%; }
.sky-kicker { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.85); }
.home-sky .sky-title { font-size: 1.7rem; font-weight: 600; margin: .2rem 0 .3rem; color: #fff; }
.home-sky .sky-title span { display: inline-block; animation: wordUp .55s cubic-bezier(.2,.8,.2,1.2) both; animation-delay: calc(.15s + var(--i) * .09s); }
@keyframes wordUp { from { opacity: 0; transform: translateY(14px) rotate(4deg); } to { opacity: 1; transform: none; } }
.home-sky .sky-sub { color: rgba(255,255,255,.9); font-size: .9rem; margin: 0; max-width: none; animation: fadeUp .5s ease .5s both; }
.sky-level { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; background: rgba(255,255,255,.2); font-weight: 500; }
.sky-level .bi { animation: spinSlow 12s linear infinite; display: inline-block; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .home-sky { padding: 1.1rem; } .home-sky .sky-title { font-size: 1.3rem; } .sky-text { max-width: 100%; } .sky-arc { width: 200px; height: 200px; bottom: -90px; right: -20px; } }

/* today card: rays turn, a sheen passes */
.home-today { position: relative; overflow: hidden; }
.home-today::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-15deg); animation: sheen 6s ease-in-out 1s infinite; pointer-events: none; }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.home-level-icon { animation: spinSlow 18s linear infinite, floatY 4s ease-in-out infinite; }
.level-4 .home-level-icon, .level-3 .home-level-icon { animation: floatY 4s ease-in-out infinite; }

/* verse appears word by word */
.word-reveal span { display: inline-block; opacity: 0; animation: wordIn .45s ease forwards; animation-delay: calc(.3s + var(--i) * .045s); }
@keyframes wordIn { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

/* week strip */
.week-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem .25rem; border-radius: 12px; background: var(--lvbg); text-decoration: none; color: var(--text); animation: chipIn .4s cubic-bezier(.2,.8,.2,1.3) both; animation-delay: calc(.2s + var(--i) * .07s); transition: transform .2s, box-shadow .2s; }
.week-day:hover { transform: translateY(-4px); box-shadow: 0 10px 20px -14px rgba(23,21,31,.5); }
.week-day .bi { color: var(--lv); font-size: 1.15rem; transition: transform .3s; }
.week-day:hover .bi { transform: scale(1.25) rotate(-10deg); }
.wd-name { font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.wd-label { font-size: .74rem; font-weight: 500; }
@media (max-width: 575.98px) { .week-strip { gap: .3rem; } .wd-label { display: none; } }

/* quick cards: lift and icon bounce */
.quick { transition: transform .2s, box-shadow .2s, border-color .2s; }
.quick:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -16px rgba(108,76,247,.55); }
.quick:hover .cell-icon { animation: bounceIcon .55s cubic-bezier(.2,.8,.2,1.4); }
@keyframes bounceIcon { 0% { transform: translateY(0); } 40% { transform: translateY(-6px) scale(1.1); } 100% { transform: none; } }
.row > [class*="col"]:nth-child(1) > .quick { animation-delay: .1s; } .row > [class*="col"]:nth-child(2) > .quick { animation-delay: .18s; }
.row > [class*="col"]:nth-child(3) > .quick { animation-delay: .26s; } .row > [class*="col"]:nth-child(4) > .quick { animation-delay: .34s; }

/* current period progress */
.period-progress { height: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.period-progress span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--violet), #B8F02F); transform-origin: left; animation: growX 1.2s cubic-bezier(.2,.8,.2,1) .4s both; position: relative; }
.period-progress span::after { content: ""; position: absolute; right: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #B8F02F; box-shadow: 0 0 8px #B8F02F; animation: glowPulse 1.8s ease-in-out infinite; }

/* report invitation orb, people chips, method minis */
.report-cta { position: relative; overflow: hidden; }
.report-cta::before { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(108,76,247,.45), transparent 70%); animation: drift 8s ease-in-out infinite alternate; }
.report-cta .card-body { position: relative; }
.person-chip { animation: chipIn .35s ease both; }
.person-chip:nth-child(2) { animation-delay: .06s; } .person-chip:nth-child(3) { animation-delay: .12s; } .person-chip:nth-child(n+4) { animation-delay: .18s; }
.person-chip:hover .person-avatar { transform: rotate(-10deg) scale(1.1); }
.person-chip .person-avatar { transition: transform .25s; }
.method-mini .cell-icon { transition: transform .3s; }
.method-mini:hover .cell-icon { transform: rotate(-10deg) scale(1.12); }

@media (prefers-reduced-motion: reduce) {
  .sky-cloud, .sky-stars span, .sky-body, .sky-arc, .sky-level .bi, .home-today::after, .home-level-icon, .period-progress span::after, .report-cta::before { animation: none !important; }
  .word-reveal span, .home-sky .sky-title span { opacity: 1; animation: none !important; }
}
