:root {
  color-scheme: dark;
  --ink: #080706;
  --panel: rgba(18, 16, 12, .88);
  --panel-strong: #15110c;
  --gold: #e8c36d;
  --gold-soft: #f6e5ad;
  --copper: #9b632f;
  --ivory: #f4eedc;
  --muted: #b9ad93;
  --line: rgba(232, 195, 109, .24);
  --ok: #9fd3ad;
  --danger: #f0a6a6;
  --shadow: 0 24px 80px rgba(0, 0, 0, .48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ivory); background: radial-gradient(circle at 50% -10%, #362817 0, #110e0a 35rem, #080706 70rem); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--gold-soft); }
a:hover { color: #fff4ca; }
:focus-visible { outline: 3px solid #fff0a7; outline-offset: 3px; }

.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .8rem 1rem; background: var(--gold); color: #171006; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.cosmos { position: fixed; inset: 0; pointer-events: none; overflow: hidden; opacity: .75; }
.cosmos::before, .cosmos::after { content: ""; position: absolute; inset: -30%; background-image: radial-gradient(circle, rgba(255,240,177,.7) 0 1px, transparent 1.4px); background-size: 83px 83px; transform: rotate(13deg); opacity: .12; }
.cosmos::after { background-size: 137px 137px; transform: rotate(-8deg) translate(2rem, 4rem); opacity: .08; }
.cosmos span { position: absolute; border: 1px solid rgba(232,195,109,.08); border-radius: 50%; }
.cosmos span:nth-child(1) { width: 42rem; height: 42rem; left: calc(50% - 21rem); top: 7rem; }
.cosmos span:nth-child(2) { width: 62rem; height: 62rem; left: calc(50% - 31rem); top: -3rem; }
.cosmos span:nth-child(3) { width: 82rem; height: 82rem; left: calc(50% - 41rem); top: -13rem; }

.site-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0; border-bottom: 1px solid rgba(232,195,109,.12); }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--ivory); text-decoration: none; }
.brand img { width: 72px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(232,195,109,.28)); }
.brand span { display: grid; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; letter-spacing: .22em; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.back-link { color: var(--muted); font-size: .88rem; text-decoration: none; }

main { position: relative; z-index: 1; width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 6rem; }
.app-shell { min-height: 60vh; }
.loading-card { width: min(34rem, 100%); margin: 12vh auto 0; display: grid; place-items: center; gap: 1rem; color: var(--muted); }
.orbit { width: 3.5rem; height: 3.5rem; border: 1px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { margin: 0 0 .7rem; color: var(--gold); font-size: .76rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; text-wrap: balance; }
h1 { max-width: 900px; margin: 0; font-size: clamp(2.5rem, 7vw, 5.8rem); line-height: .96; letter-spacing: -.045em; }
h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { margin: 0; font-size: 1.35rem; }
.lede { max-width: 760px; margin: 1.4rem 0 0; color: #d1c7b2; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.7; }
.hero { padding: clamp(2rem, 5vw, 5rem) 0 3rem; }
.hero-mark { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem; color: var(--gold); }
.hero-mark::before { content: ""; width: 3rem; height: 1px; background: var(--gold); }
.hero-actions, .toolbar, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .78rem 1.15rem; border: 1px solid var(--gold); border-radius: 999px; background: linear-gradient(135deg, #f1d98f, #bb7c36); color: #171006; font-weight: 780; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.button:hover { color: #171006; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(199,142,56,.24); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.secondary { background: rgba(232,195,109,.06); color: var(--gold-soft); border-color: var(--line); }
.button.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.button.danger { background: transparent; color: var(--danger); border-color: rgba(240,166,166,.25); }
.button.wide { width: 100%; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr); gap: clamp(1rem, 4vw, 3rem); align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 1.25rem; background: linear-gradient(145deg, rgba(32,27,19,.86), rgba(12,11,9,.94)); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.panel-body { padding: clamp(1.2rem, 4vw, 2rem); }
.guide-card { position: relative; overflow: hidden; min-height: 100%; }
.guide-card::after { content: "13:20"; position: absolute; right: -1rem; bottom: -2rem; color: rgba(232,195,109,.05); font: 700 8rem/1 Georgia,serif; pointer-events: none; }
.guide-card ul { margin: 1.3rem 0 0; padding: 0; list-style: none; color: var(--muted); }
.guide-card li { position: relative; padding: .65rem 0 .65rem 1.6rem; border-bottom: 1px solid rgba(232,195,109,.08); }
.guide-card li::before { content: "◇"; position: absolute; left: 0; color: var(--gold); }

.auth-card { overflow: hidden; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tab { padding: 1rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--gold-soft); background: rgba(232,195,109,.07); box-shadow: inset 0 -2px var(--gold); }
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field { display: grid; gap: .4rem; }
.field label { color: #d7ccb5; font-size: .86rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid rgba(232,195,109,.22); border-radius: .7rem; padding: .72rem .85rem; background: rgba(4,4,3,.66); color: var(--ivory); }
.password-field { position: relative; }
.password-field input { padding-right: 5.7rem; }
.password-visibility { position: absolute; top: 50%; right: .45rem; min-height: 2rem; padding: .28rem .55rem; border: 1px solid rgba(232,195,109,.28); border-radius: .48rem; transform: translateY(-50%); background: rgba(232,195,109,.08); color: var(--gold-soft); font-size: .72rem; font-weight: 700; cursor: pointer; }
.password-visibility:hover, .password-visibility:focus-visible { border-color: var(--gold); background: rgba(232,195,109,.16); outline: none; }
.field textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.field small { color: var(--muted); }
.check { display: grid; grid-template-columns: 1.2rem 1fr; gap: .7rem; align-items: start; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--gold); }
.inline-link { padding: 0; border: 0; background: none; color: var(--gold-soft); text-decoration: underline; cursor: pointer; }
.form-error { min-height: 1.2rem; color: var(--danger); font-size: .86rem; }

.status-card { width: min(720px, 100%); margin: 4rem auto 0; text-align: center; }
.status-symbol { width: 5rem; height: 5rem; display: grid; place-items: center; margin: 0 auto 1.3rem; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font: 2rem Georgia,serif; box-shadow: inset 0 0 30px rgba(232,195,109,.08); }
.status-card p { color: var(--muted); line-height: 1.7; }
.price { margin: 1rem 0; color: var(--gold-soft); font: 500 3.2rem Georgia,serif; }
.price small { font: 400 .85rem Inter,sans-serif; color: var(--muted); }

.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.dashboard-head p { margin: .6rem 0 0; color: var(--muted); }
.account-menu { display: flex; align-items: center; gap: .7rem; }
.account-menu span { color: var(--muted); font-size: .85rem; }
.resource-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.5rem; }
.resource { min-height: 110px; display: grid; align-content: center; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: rgba(232,195,109,.035); text-decoration: none; }
.resource strong { color: var(--ivory); }
.resource small { color: var(--muted); }

.day-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1rem; align-items: start; }
.day-nav { position: sticky; top: 1rem; }
.day-seal { display: grid; place-items: center; width: 8rem; aspect-ratio: 1; margin: 0 auto 1.2rem; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle, rgba(232,195,109,.16), transparent 67%); }
.day-seal-logo { width: 70%; height: 70%; object-fit: contain; transform: scale(var(--activation-logo-scale, 1)); transform-origin: center; filter: drop-shadow(0 5px 8px rgba(232,195,109,.22)); }
.day-meta { display: grid; gap: .75rem; margin: 0; }
.day-meta div { display: grid; gap: .2rem; padding-bottom: .7rem; border-bottom: 1px solid rgba(232,195,109,.1); }
.day-meta dt { color: var(--muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.day-meta dd { margin: 0; color: var(--ivory); }
.progress-label { display: flex; justify-content: space-between; margin: 1.2rem 0 .45rem; color: var(--muted); font-size: .78rem; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(232,195,109,.12); }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--copper), var(--gold-soft)); transition: width .5s ease; }

.threshold { min-height: 540px; overflow: hidden; }
.threshold-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: clamp(1.2rem, 4vw, 2rem); border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(232,195,109,.08), transparent); }
.threshold-heading-copy { min-width: 0; }
.threshold-cycle-badge { flex: 0 0 auto; width: clamp(4.25rem, 8vw, 6.75rem); aspect-ratio: 1; display: grid; place-items: center; margin-top: .1rem; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle, rgba(232,195,109,.18), transparent 68%); box-shadow: inset 0 0 32px rgba(232,195,109,.08); }
.threshold-cycle-logo { width: 70%; height: 70%; object-fit: contain; transform: scale(var(--activation-logo-scale, 1)); transform-origin: center; filter: drop-shadow(0 5px 8px rgba(232,195,109,.22)); }
.threshold-index { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .65rem; color: var(--gold); font-size: .74rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.threshold-index::before { content: ""; width: 2rem; height: 1px; background: var(--gold); }
.threshold-content { padding: clamp(1.2rem, 4vw, 2rem); color: #d8ceba; font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.8; }
.threshold-content p { margin: 0 0 1rem; white-space: pre-line; }
.threshold-content a { overflow-wrap: anywhere; }
.threshold-actions { padding: 0 clamp(1.2rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem); }
.practice-steps { counter-reset: practice; display: grid; gap: .75rem; margin: 1.2rem 0; }
.practice-step { position: relative; padding: 1rem 1rem 1rem 3.2rem; border: 1px solid rgba(232,195,109,.16); border-radius: .8rem; background: rgba(232,195,109,.035); animation: reveal .4s ease both; }
.practice-step::before { content: attr(data-step); position: absolute; left: 1rem; top: 1rem; width: 1.45rem; height: 1.45rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-soft); font: 700 .72rem Inter,sans-serif; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin: 1rem 0 1.5rem; }
.summary-item { padding: .85rem; border: 1px solid rgba(232,195,109,.13); border-radius: .7rem; color: var(--muted); }
.completion { min-height: 500px; display: grid; place-items: center; text-align: center; padding: 2rem; }
.completion-symbol { width: 8rem; height: 8rem; display: grid; place-items: center; margin: 0 auto 1.6rem; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 3rem Georgia,serif; box-shadow: 0 0 80px rgba(232,195,109,.13), inset 0 0 40px rgba(232,195,109,.09); }
.completion p { max-width: 650px; color: var(--gold-soft); font: 1.35rem/1.7 Georgia,serif; }

.notes { margin-top: 1rem; }
.notes summary { cursor: pointer; color: var(--gold-soft); }
.notes .field { margin-top: 1rem; }
.calendar-panel { margin-top: 1.5rem; overflow: hidden; }
.calendar-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.3rem; border-bottom: 1px solid var(--line); }
.calendar-head p { margin: .35rem 0 0; color: var(--muted); font-size: .85rem; }
.frequency-machine { position: relative; margin: 1rem; padding: clamp(1rem, 3vw, 2rem); overflow: hidden; border: 1px solid #d8b650; border-radius: 1.15rem; background: radial-gradient(circle at 56% 48%, #fff 0 18%, transparent 18.2%), linear-gradient(145deg, #fffefb, #f8f2e3); color: #3c2a0b; box-shadow: inset 0 0 0 4px rgba(229,197,101,.1), 0 20px 60px rgba(0,0,0,.24); }
.frequency-machine::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .13; background-image: radial-gradient(circle, #8b6414 0 .7px, transparent .8px); background-size: 34px 34px; }
.frequency-machine-title { position: relative; z-index: 2; display: grid; justify-items: center; gap: .3rem; color: #8b6414; text-align: center; }
.frequency-machine-title strong { max-width: 100%; font: 800 clamp(1.15rem, 3.1vw, 2.3rem)/1.08 Georgia,serif; letter-spacing: .025em; }
.frequency-machine-title span { font: 800 clamp(.7rem, 1.4vw, .95rem)/1 Inter,sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.frequency-stage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,.78fr) minmax(42px,.12fr) minmax(0,1.12fr); align-items: center; width: min(100%, 980px); margin: .65rem auto 0; }
.frequency-wheel { min-width: 0; text-align: center; }
.frequency-wheel > p { position: relative; z-index: 4; min-height: 2.4em; margin: 0 0 .25rem; color: #3c2a0b; font-size: clamp(.55rem, 1.5vw, .9rem); font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.wheel-shell { position: relative; width: 100%; aspect-ratio: 1; margin: auto; }
.frequency-wheel-moon .wheel-shell { width: min(94%, 340px); }
.frequency-wheel-cycle .wheel-shell { width: min(100%, 470px); }
.wheel-rotor { --wheel-angle: 0deg; --wheel-counter-angle: 0deg; position: absolute; inset: 0; transform: rotate(var(--wheel-angle)); transform-origin: 50% 50%; transition: transform 1.05s cubic-bezier(.18,.78,.2,1); will-change: transform; }
.wheel-gear { position: absolute; inset: 1.5%; background: linear-gradient(135deg, #ead17f, #d8b13e 54%, #c99023); filter: drop-shadow(0 10px 10px rgba(112,80,13,.2)); }
.wheel-gear::before { content: ""; position: absolute; inset: 13%; border: 2px solid rgba(94,60,7,.42); border-radius: 50%; box-shadow: inset 0 0 40px rgba(255,255,255,.23); }
.wheel-token { position: absolute; z-index: 2; left: 50%; top: 50%; width: 12%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; transform: translate(-50%,-50%) rotate(var(--token-angle)) translateY(-350%) rotate(var(--token-counter-angle)); border: 2px solid #9b6d12; border-radius: 50%; background: #fffdf7; color: #6e4a08; box-shadow: 0 2px 8px rgba(91,58,5,.16); transition: background .35s ease, color .35s ease, box-shadow .35s ease, border-color .35s ease; }
.frequency-wheel-cycle .wheel-token { width: 8.8%; transform: translate(-50%,-50%) rotate(var(--token-angle)) translateY(-465%) rotate(var(--token-counter-angle)); }
.wheel-token-logo { display: block; width: 68%; height: 68%; object-fit: contain; transform: rotate(var(--wheel-counter-angle)) scale(var(--activation-logo-scale, 1)); transform-origin: center; transition: filter .35s ease, transform 1.05s cubic-bezier(.18,.78,.2,1); user-select: none; }
.wheel-token-cycle-logo { width: 70%; height: 70%; object-fit: contain; }
.wheel-token b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; font: 850 clamp(.42rem, 1.1vw, .7rem)/1 Inter,sans-serif; transform: rotate(var(--wheel-counter-angle)); transition: transform 1.05s cubic-bezier(.18,.78,.2,1); }
.wheel-token.is-selected { border-color: #fff; background: #3c2a0b; color: #ffe6a1; box-shadow: 0 0 0 3px #c99826, 0 0 22px rgba(139,100,20,.55); }
.wheel-token.is-selected .wheel-token-logo:not(.wheel-token-cycle-logo) { filter: brightness(0) saturate(100%) invert(87%) sepia(38%) saturate(607%) hue-rotate(348deg) brightness(105%) contrast(101%); }
.wheel-token.is-selected .wheel-token-cycle-logo { filter: brightness(.98) saturate(1.12) drop-shadow(0 0 4px rgba(255,230,161,.82)); }
.wheel-center { position: absolute; z-index: 3; inset: 50% auto auto 50%; width: 48%; aspect-ratio: 1; display: grid; place-content: center; gap: .1rem; transform: translate(-50%,-50%); border: 2px solid rgba(139,100,20,.38); border-radius: 50%; background: #fffdf8; box-shadow: 0 8px 28px rgba(104,72,10,.12); }
.frequency-wheel-cycle .wheel-center { width: 52%; }
.wheel-center strong { color: #3c2a0b; font: 850 clamp(2rem, 7vw, 5rem)/.85 Inter,sans-serif; }
.wheel-center span { color: #8b6414; font-size: clamp(.48rem, 1.2vw, .72rem); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.frequency-meeting { position: relative; z-index: 5; align-self: center; display: grid; justify-items: center; margin-top: 2rem; color: #8b6414; text-align: center; transform: translateY(clamp(2rem, 5vw, 3.25rem)); }
.frequency-meeting span { width: clamp(34px, 5vw, 56px); aspect-ratio: 1; display: grid; align-content: center; justify-items: center; gap: .08rem; padding: .15rem; border: 3px solid #fffdf8; border-radius: 50%; background: linear-gradient(135deg,#e1bd55,#b67a16); color: #fff; text-transform: uppercase; box-shadow: 0 0 0 2px #9b6d12; }
.frequency-meeting span strong { font: 900 clamp(.7rem, 1.7vw, 1rem)/.9 Inter,sans-serif; }
.frequency-meeting span small { font: 800 clamp(.38rem, .95vw, .55rem)/1 Inter,sans-serif; letter-spacing: .03em; }
.frequency-meeting i { width: 2px; height: clamp(38px, 8vw, 86px); background: #9b6d12; }
.frequency-meeting b { font-size: clamp(.45rem, 1vw, .68rem); line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
.frequency-selection { position: relative; z-index: 3; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .8rem; width: min(680px, 100%); margin: .6rem auto 0; padding: .75rem; border-radius: 1rem; background: #3c2a0b; color: #fff8e8; box-shadow: 0 12px 30px rgba(60,42,11,.2); }
.frequency-step { width: 44px; height: 44px; border: 1px solid rgba(255,230,161,.4); border-radius: 50%; background: rgba(255,255,255,.06); color: #ffe6a1; font-size: 1.25rem; cursor: pointer; transition: background .2s ease, transform .2s ease, opacity .2s ease; }
.frequency-step:hover { background: rgba(255,230,161,.15); transform: scale(1.05); }
.frequency-step:disabled { cursor: default; opacity: .25; transform: none; }
.frequency-coordinate { min-width: 0; display: grid; justify-items: center; gap: .18rem; text-align: center; }
.frequency-coordinate span { color: #d9c69b; font-size: .72rem; text-transform: capitalize; }
.frequency-coordinate strong { font: 650 clamp(1rem, 2.2vw, 1.35rem)/1.2 Georgia,serif; }
.frequency-coordinate small { max-width: 100%; overflow: hidden; color: #f1dfb5; font-size: clamp(.63rem, 1.5vw, .78rem); text-overflow: ellipsis; white-space: nowrap; }
.frequency-coordinate em { color: #e8c36d; font-size: .64rem; font-style: normal; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.calendar-grid-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.25rem 1rem .2rem; border-top: 1px solid var(--line); }
.calendar-grid-head .eyebrow { margin-bottom: .35rem; }
.calendar-grid-head h3 { font-size: clamp(1.35rem, 3vw, 2rem); }
.calendar-grid-head > p { max-width: 460px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: right; }
.calendar-body { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; padding: 1rem; }
.moon { position: relative; isolation: isolate; overflow: hidden; padding: .9rem; border: 1px solid rgba(255,255,255,.36); border-radius: .8rem; background: var(--moon-color, rgba(0,0,0,.15)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 24px rgba(0,0,0,.18); }
.moon::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: radial-gradient(circle at 88% 8%, rgba(255,255,255,.38), transparent 40%), linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.12)); }
.moon > * { position: relative; z-index: 1; }
.moon[data-moon-text-tone="dark"] { border-color: rgba(48,28,4,.42); }
.moon[data-moon-universe="CODE"], .calendar-body > .moon:nth-child(1) { --moon-color: #681D32; --moon-text: #FFFFFF; background: #681D32; }
.moon[data-moon-universe="SHUTTLE"], .calendar-body > .moon:nth-child(2) { --moon-color: #B72D42; --moon-text: #FFFFFF; background: #B72D42; }
.moon[data-moon-universe="THYMUS"], .calendar-body > .moon:nth-child(3) { --moon-color: #D9573F; --moon-text: #25160a; background: #D9573F; }
.moon[data-moon-universe="UNIVERSE"], .calendar-body > .moon:nth-child(4) { --moon-color: #C96B16; --moon-text: #25160a; background: #C96B16; }
.moon[data-moon-universe="CHAOS"], .calendar-body > .moon:nth-child(5) { --moon-color: #946B0B; --moon-text: #FFFFFF; background: #946B0B; }
.moon[data-moon-universe="ORDER"], .calendar-body > .moon:nth-child(6) { --moon-color: #397A49; --moon-text: #FFFFFF; background: #397A49; }
.moon[data-moon-universe="SCHOOL"], .calendar-body > .moon:nth-child(7) { --moon-color: #087B68; --moon-text: #FFFFFF; background: #087B68; }
.moon[data-moon-universe="MERKABAH"], .calendar-body > .moon:nth-child(8) { --moon-color: #087C8C; --moon-text: #FFFFFF; background: #087C8C; }
.moon[data-moon-universe="TOTEM"], .calendar-body > .moon:nth-child(9) { --moon-color: #176C91; --moon-text: #FFFFFF; background: #176C91; }
.moon[data-moon-universe="REVELATION"], .calendar-body > .moon:nth-child(10) { --moon-color: #355FAD; --moon-text: #FFFFFF; background: #355FAD; }
.moon[data-moon-universe="PRESENCE"], .calendar-body > .moon:nth-child(11) { --moon-color: #514AA5; --moon-text: #FFFFFF; background: #514AA5; }
.moon[data-moon-universe="FOUNDATION"], .calendar-body > .moon:nth-child(12) { --moon-color: #713C99; --moon-text: #FFFFFF; background: #713C99; }
.moon[data-moon-universe="KADISTU"], .calendar-body > .moon:nth-child(13) { --moon-color: #9B2FA7; --moon-text: #FFFFFF; background: #9B2FA7; }
.moon h3 { margin-bottom: .7rem; font: 600 .84rem Inter,sans-serif; color: var(--moon-text, var(--gold-soft)); letter-spacing: .08em; text-shadow: 0 1px 1px rgba(0,0,0,.32); text-transform: uppercase; }
.moon-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.moon-day { position: relative; aspect-ratio: 1; min-width: 0; display: grid; place-items: center; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.48); border-radius: .35rem; color: var(--moon-text, #8e846f); background: rgba(0,0,0,.15); font-size: .72rem; font-weight: 650; text-shadow: 0 1px 1px rgba(0,0,0,.34); cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.moon[data-moon-text-tone="dark"] .moon-day { border-color: rgba(48,28,4,.5); background: rgba(255,255,255,.21); text-shadow: none; }
.moon-day:hover { color: var(--moon-text, var(--gold-soft)); border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.14); transform: translateY(-1px); }
.moon-day.selected { z-index: 2; color: #fff4ca; border-color: #fff0a7; box-shadow: 0 0 0 2px rgba(232,195,109,.28), 0 0 18px rgba(232,195,109,.34); }
.moon-day.today { border-color: var(--gold); color: var(--gold-soft); background: rgba(232,195,109,.12); box-shadow: 0 0 15px rgba(232,195,109,.15); animation: breathe 2.8s ease-in-out infinite; }
.moon-day.complete { color: #d7f2df; background: rgba(83,145,101,.19); }
.moon-day.complete::after { content: "✓"; position: absolute; font-size: .55rem; transform: translate(.75rem,-.75rem); }
.moon-day.closed { color: var(--moon-text, #d7ccb5); background: repeating-linear-gradient(135deg, rgba(0,0,0,.1), rgba(0,0,0,.1) 3px, rgba(255,255,255,.08) 3px, rgba(255,255,255,.08) 5px); }
.moon-day.sealed { opacity: .42; }
@keyframes breathe { 50% { box-shadow: 0 0 28px rgba(232,195,109,.3); } }
.special-days { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1rem 1rem; }
.special-day { padding: .55rem .75rem; border: 1px dashed var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.legend { display: flex; flex-wrap: wrap; gap: .8rem; padding: 0 1rem 1.2rem; color: var(--muted); font-size: .72rem; }
.legend span::before { content: "◇"; margin-right: .3rem; color: var(--gold); }

.toast { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; max-width: min(420px, calc(100% - 2rem)); padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #1d1811; color: var(--ivory); box-shadow: var(--shadow); opacity: 0; transform: translateY(1rem); pointer-events: none; transition: .25s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(240,166,166,.4); color: #ffd5d5; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 840px) {
  .grid-2, .day-layout { grid-template-columns: 1fr; }
  .day-nav { position: static; }
  .resource-strip { grid-template-columns: repeat(2, 1fr); }
  .resource { min-height: auto; }
  .calendar-body { grid-template-columns: 1fr; }
  .calendar-grid-head { align-items: start; flex-direction: column; }
  .calendar-grid-head > p { text-align: left; }
  .dashboard-head { align-items: start; flex-direction: column; }
}

@media (max-width: 560px) {
  .site-header { align-items: flex-start; }
  .brand img { width: 58px; height: 36px; }
  .brand small { display: none; }
  .back-link { padding-top: .75rem; }
  main { width: min(100% - 1rem, 1180px); padding-top: 1.5rem; }
  .hero { padding-top: 2.5rem; }
  .form-row, .summary-grid { grid-template-columns: 1fr; }
  .resource-strip { grid-template-columns: 1fr; }
  .panel { border-radius: .9rem; }
  .threshold { min-height: 0; }
  .threshold-head { gap: .7rem; }
  .threshold-cycle-badge { width: 3.75rem; }
  .account-menu { width: 100%; justify-content: space-between; }
  .frequency-machine { margin: .5rem; padding: .8rem .45rem; border-radius: .8rem; }
  .frequency-stage { grid-template-columns: minmax(0,.8fr) minmax(30px,.1fr) minmax(0,1.1fr); }
  .frequency-meeting { margin-top: 1rem; transform: translateY(1.5rem); }
  .frequency-meeting i { height: 34px; }
  .frequency-meeting b { display: none; }
  .wheel-gear::before { border-width: 1px; }
  .wheel-token { border-width: 1px; }
  .frequency-selection { gap: .35rem; padding: .55rem .4rem; }
  .frequency-step { width: 38px; height: 38px; }
  .frequency-coordinate small { max-width: 210px; }
}

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