:root {
  color-scheme: dark;
  --ink: #f4efe6;
  --muted: #aaa5b8;
  --dim: #777286;
  --night: #070711;
  --night-2: #0d0c1b;
  --panel: rgba(16, 14, 31, .72);
  --line: rgba(229, 218, 255, .14);
  --line-bright: rgba(229, 218, 255, .3);
  --violet: #bda4ff;
  --violet-deep: #7455cd;
  --gold: #efd8a0;
  --gold-deep: #ad8150;
  --aqua: #75e5d0;
  --rose: #e39cc5;
  --danger: #e78989;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 28%, rgba(102, 71, 160, .22), transparent 28rem),
    radial-gradient(circle at 10% 70%, rgba(42, 138, 132, .08), transparent 25rem),
    linear-gradient(180deg, #080713 0%, #06060e 100%);
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 0, transparent 35%, rgba(0,0,0,.42) 100%);
  z-index: -1;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#aether {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  opacity: .8;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 5vw, 72px) 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(7,7,17,.94), rgba(7,7,17,.55));
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.brand-sigil {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--gold);
  stroke-width: .8;
  filter: drop-shadow(0 0 12px rgba(239,216,160,.22));
}

.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 13px; letter-spacing: .18em; font-weight: 500; }
.brand small { margin-top: 4px; color: var(--dim); font-size: 8px; letter-spacing: .35em; }

.header-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.temple-time { display: flex; flex-direction: column; align-items: flex-end; min-width: 95px; }
.temple-time span { color: var(--muted); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; }
.temple-time strong { margin-top: 3px; font-family: var(--serif); color: var(--gold); font-size: 15px; letter-spacing: .08em; font-weight: 400; }

.icon-button, .menu-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.icon-button svg { width: 17px; fill: none; stroke: var(--muted); stroke-width: 1.3; }
.icon-button[aria-pressed="true"] { border-color: rgba(239,216,160,.45); background: rgba(239,216,160,.08); }
.icon-button[aria-pressed="true"] svg { stroke: var(--gold); }

.menu-button { display: none; position: relative; }
.menu-button span:not(.sr-only) { position: absolute; width: 15px; height: 1px; background: var(--ink); transition: transform .25s, top .25s; }
.menu-button span:first-child { top: 16px; }
.menu-button span:nth-child(2) { top: 22px; }
.menu-button[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

nav { display: flex; align-items: center; gap: clamp(15px, 2.4vw, 34px); margin-left: clamp(20px, 5vw, 70px); }
nav button {
  position: relative;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s;
}
nav button::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 0; height: 1px; background: var(--gold); transform: translateX(-50%); transition: width .25s; }
nav button:hover, nav button.active { color: var(--ink); }
nav button.active::after { width: 20px; }

main { min-height: 100vh; }
.view { min-height: 100vh; padding: 128px clamp(20px, 5vw, 72px) 70px; animation: viewIn .55s ease both; }
.view[hidden] { display: none !important; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sanctum-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(980px, 100%);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--gold);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .42em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; }
h1 { max-width: 820px; font-size: clamp(48px, 7.2vw, 90px); line-height: .95; letter-spacing: -.035em; }
h1 em, h2 em { color: var(--violet); font-weight: 400; }
.hero-copy { max-width: 590px; margin: 25px auto 0; color: var(--muted); font-family: var(--serif); font-size: clamp(16px, 2vw, 20px); line-height: 1.6; }

.reveal { animation: riseIn .9s cubic-bezier(.2,.7,.2,1) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.portal-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(410px, 88vw);
  aspect-ratio: 1;
  margin: 18px auto -2px;
}

.portal-stage::before {
  content: "";
  position: absolute;
  width: 86%;
  height: 86%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158,119,255,.14), transparent 66%);
  filter: blur(20px);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(.94); opacity: .65; } 50% { transform: scale(1.07); opacity: 1; } }

.orbit { position: absolute; inset: 7%; border: 1px solid rgba(214,194,255,.12); border-radius: 50%; animation: spin 34s linear infinite; }
.orbit-two { inset: 17%; border-color: rgba(239,216,160,.16); animation-duration: 21s; animation-direction: reverse; }
.orbit i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.orbit i:nth-child(1) { top: 12%; left: 17%; }
.orbit i:nth-child(2) { right: -2px; top: 48%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.orbit i:nth-child(3) { bottom: 8%; left: 35%; width: 3px; height: 3px; }
.orbit-two i:nth-child(1) { top: -3px; left: 46%; background: var(--aqua); box-shadow: 0 0 14px var(--aqua); }
.orbit-two i:nth-child(2) { bottom: 8%; right: 18%; }
@keyframes spin { to { transform: rotate(360deg); } }

.portal {
  position: relative;
  display: grid;
  place-items: center;
  width: 48%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.portal-aura { position: absolute; inset: -25%; border-radius: 50%; background: radial-gradient(circle, rgba(143,101,238,.3), rgba(90,59,153,.06) 46%, transparent 70%); filter: blur(10px); transition: transform .5s, opacity .5s; }
.portal-core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239,216,160,.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 38%, rgba(230,216,255,.22), transparent 22%),
    radial-gradient(circle, #291f47 0%, #161127 60%, #0a0913 100%);
  box-shadow: inset 0 0 32px rgba(183,154,255,.14), 0 0 0 8px rgba(189,164,255,.035), 0 0 45px rgba(105,72,176,.3);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s;
}
.portal-core::before, .portal-core::after { content: ""; position: absolute; border: 1px solid rgba(239,216,160,.14); border-radius: 50%; }
.portal-core::before { inset: 9px; }
.portal-core::after { inset: 16px; border-style: dashed; animation: spin 24s linear infinite; }
.portal:hover .portal-core { transform: scale(1.055); box-shadow: inset 0 0 45px rgba(183,154,255,.22), 0 0 0 11px rgba(189,164,255,.05), 0 0 70px rgba(119,79,207,.55); }
.portal:hover .portal-aura { transform: scale(1.16); opacity: .85; }
.portal-core svg { width: 56px; height: 56px; margin-bottom: 9px; fill: none; stroke: var(--gold); stroke-width: .85; opacity: .86; filter: drop-shadow(0 0 8px rgba(239,216,160,.25)); }
.portal-core strong { z-index: 1; font-size: 9px; letter-spacing: .4em; font-weight: 500; text-indent: .4em; }
.portal-core small { z-index: 1; width: 90px; margin-top: 7px; color: var(--muted); font-family: var(--serif); font-size: 10px; line-height: 1.2; }
.portal.completed .portal-core { border-color: rgba(117,229,208,.55); box-shadow: inset 0 0 40px rgba(117,229,208,.12), 0 0 55px rgba(72,182,163,.28); }
.portal.completed .portal-core svg { stroke: var(--aqua); }

.day-state { display: flex; align-items: center; justify-content: center; gap: 35px; width: 100%; color: var(--dim); font-size: 8px; letter-spacing: .2em; }
.day-state > div { display: flex; align-items: center; gap: 9px; }
.state-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); animation: pulse 2s infinite; }
.state-dot.complete { background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
@keyframes pulse { 50% { opacity: .35; } }

.temple-law { max-width: 650px; margin: 38px auto 0; padding: 22px 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #c8c2d2; font-family: var(--serif); font-size: 15px; line-height: 1.55; }
.temple-law span { display: block; margin-bottom: 8px; color: var(--gold); font-family: var(--sans); font-size: 7px; letter-spacing: .35em; }

.ritual-shell, .web-shell, .archive-shell { width: min(1140px, 100%); margin: 0 auto; }
.ritual-shell.narrow { width: min(900px, 100%); }
.ritual-heading { max-width: 720px; margin: 0 0 50px; }
.ritual-heading .back-link { display: none; }
.ritual-heading h2 { font-size: clamp(42px, 6vw, 72px); line-height: 1; letter-spacing: -.025em; }
.ritual-heading > p:last-child { max-width: 600px; margin: 20px 0 0; color: var(--muted); font-family: var(--serif); font-size: 18px; line-height: 1.55; }

.ritual-form { display: grid; gap: 28px; }
.date-field { position: relative; max-width: 310px; }
.field-mark { position: absolute; right: 17px; bottom: 15px; color: var(--gold); font-family: var(--serif); font-size: 13px; pointer-events: none; }

fieldset {
  display: grid;
  gap: 25px;
  margin: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(25,21,44,.7), rgba(11,10,21,.72));
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 80px rgba(0,0,0,.18);
}
legend { padding: 0 18px; color: var(--ink); font-family: var(--serif); font-size: 20px; }
legend span { margin-right: 10px; color: var(--gold); font-family: var(--sans); font-size: 9px; letter-spacing: .2em; }

.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field > span, .field > label, .alignment-field > span { color: #bbb5c7; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.field input, .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-bright);
  border-radius: 0;
  padding: 12px 2px 13px;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .25s, background .25s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--gold); background: linear-gradient(180deg, transparent, rgba(239,216,160,.025)); }
.field input::placeholder, .field textarea::placeholder { color: #5d586a; }
.field input[type="date"] { color-scheme: dark; text-transform: uppercase; letter-spacing: .06em; }
.field-hint { color: var(--dim); font-family: var(--sans); font-size: 10px; line-height: 1.5; }
.field-grid { display: grid; gap: 22px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }

.element-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.element-picker label { cursor: pointer; }
.element-picker input { position: absolute; opacity: 0; pointer-events: none; }
.element-picker label > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 78px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 22px;
  transition: border-color .25s, background .25s, color .25s, transform .25s;
}
.element-picker small { margin-top: 6px; font-family: var(--sans); font-size: 7px; letter-spacing: .2em; text-transform: uppercase; }
.element-picker input:checked + span { border-color: rgba(239,216,160,.48); background: rgba(239,216,160,.07); color: var(--gold); transform: translateY(-2px); box-shadow: 0 9px 28px rgba(0,0,0,.18); }

.ritual-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 5px; }
.ritual-actions p { margin: 0; color: var(--dim); font-size: 9px; letter-spacing: .08em; }
.autosave-dot { display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 8px var(--aqua); }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 260px;
  padding: 17px 20px;
  border: 1px solid rgba(239,216,160,.48);
  background: linear-gradient(135deg, rgba(111,80,177,.38), rgba(34,26,58,.7));
  color: var(--ink);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.primary-button:hover { transform: translateY(-2px); background: linear-gradient(135deg, rgba(128,94,202,.5), rgba(46,35,76,.78)); box-shadow: 0 12px 36px rgba(91,60,160,.28); }
.primary-button svg { width: 17px; fill: none; stroke: var(--gold); stroke-width: 1.2; }
.mirror-button { border-color: rgba(117,229,208,.4); }
.mirror-button svg { stroke: var(--aqua); }

.mirror-form { padding: clamp(25px, 5vw, 52px); border: 1px solid var(--line); background: rgba(15,13,28,.72); backdrop-filter: blur(15px); }
.alignment-field { display: grid; gap: 18px; }
.alignment-scale input { width: 100%; accent-color: var(--violet); }
.alignment-scale > div { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; letter-spacing: .08em; }
.alignment-scale strong { color: var(--gold); font-family: var(--serif); font-size: 16px; font-weight: 400; }

.web-heading, .archive-heading { margin-bottom: 35px; }
.web-frame {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(112,77,185,.15), transparent 37%),
    rgba(8,7,17,.65);
  backdrop-filter: blur(12px);
}
.web-frame::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px); background-size: 44px 44px; }
#livingWeb { position: relative; display: block; width: 100%; height: auto; min-height: 520px; }
.web-line { stroke: rgba(189,164,255,.16); stroke-width: 1; stroke-dasharray: 2 7; animation: dash 20s linear infinite; }
.web-spine { stroke: rgba(239,216,160,.2); stroke-width: .8; }
@keyframes dash { to { stroke-dashoffset: -100; } }
.web-node { cursor: pointer; }
.web-node circle.outer { fill: rgba(7,7,17,.7); stroke: var(--violet); stroke-width: 1; transition: r .25s, fill .25s; }
.web-node circle.inner { fill: var(--violet); filter: drop-shadow(0 0 8px var(--violet)); }
.web-node.complete circle.outer { stroke: var(--aqua); }
.web-node.complete circle.inner { fill: var(--aqua); filter: drop-shadow(0 0 8px var(--aqua)); }
.web-node.today circle.outer { stroke: var(--gold); stroke-width: 1.8; }
.web-node.today circle.inner { fill: var(--gold); filter: drop-shadow(0 0 12px var(--gold)); }
.web-node:hover circle.outer { r: 15; fill: rgba(189,164,255,.12); }
.web-node text { fill: #9d97aa; font-family: var(--sans); font-size: 8px; letter-spacing: .08em; text-anchor: middle; pointer-events: none; }
.center-node .ring { fill: rgba(18,14,33,.86); stroke: rgba(239,216,160,.35); stroke-width: 1; }
.center-node .core { fill: var(--gold); filter: drop-shadow(0 0 14px var(--gold)); }
.center-node text { fill: var(--gold); font-family: var(--serif); font-size: 10px; text-anchor: middle; letter-spacing: .18em; }
.web-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.web-empty[hidden] { display: none; }
.web-empty > span { color: var(--gold); font-size: 42px; animation: breathe 4s infinite; }
.web-empty strong { margin-top: 12px; font-family: var(--serif); font-size: 25px; font-weight: 400; }
.web-empty p { max-width: 340px; color: var(--muted); font-family: var(--serif); line-height: 1.5; }
.web-empty button, .archive-empty button { padding: 11px 18px; border: 1px solid var(--line-bright); background: rgba(189,164,255,.06); color: var(--ink); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.web-legend { display: flex; justify-content: center; gap: 26px; padding: 18px; border: 1px solid var(--line); border-top: 0; color: var(--dim); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.web-legend span { display: flex; align-items: center; gap: 7px; }
.web-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 7px var(--violet); }
.web-legend i.complete { background: var(--aqua); box-shadow: 0 0 7px var(--aqua); }
.web-legend i.today { background: var(--gold); box-shadow: 0 0 7px var(--gold); }

.selected-entry { margin-top: 28px; padding: 30px; border: 1px solid var(--line); background: rgba(15,13,28,.75); }
.selected-entry h3 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.selected-entry .entry-kicker { color: var(--gold); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; }
.selected-entry p { color: #c4bdcc; font-family: var(--serif); font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.selected-entry button { padding: 10px 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 8px; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }

.archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding: 20px 24px; border: 1px solid var(--line); background: rgba(15,13,28,.65); }
.archive-stats { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 9px; }
.archive-stats strong { color: var(--gold); font-family: var(--serif); font-size: 28px; font-weight: 400; }
.archive-stats span { margin-right: 15px; color: var(--dim); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.data-actions { display: flex; gap: 9px; }
.data-actions button, .import-button { padding: 11px 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 8px; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.import-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.archive-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.archive-card { position: relative; min-height: 240px; padding: 25px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(23,19,40,.82), rgba(10,9,19,.78)); cursor: pointer; transition: transform .25s, border-color .25s; }
.archive-card:hover { transform: translateY(-4px); border-color: rgba(239,216,160,.36); }
.archive-card::after { content: attr(data-element); position: absolute; right: 15px; bottom: -18px; color: rgba(255,255,255,.025); font-family: var(--serif); font-size: 86px; }
.archive-card time { color: var(--gold); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; }
.archive-card h3 { margin: 18px 0 10px; font-family: var(--serif); font-size: 25px; line-height: 1.1; font-weight: 400; }
.archive-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-family: var(--serif); font-size: 14px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.archive-card footer { position: absolute; left: 25px; right: 25px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; background: none; color: var(--dim); font-size: 7px; letter-spacing: .15em; }
.status-pill { display: flex; align-items: center; gap: 6px; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }
.status-pill.complete i { background: var(--aqua); box-shadow: 0 0 7px var(--aqua); }
.archive-empty { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; border: 1px solid var(--line); color: var(--muted); text-align: center; }
.archive-empty[hidden] { display: none; }
.archive-empty > span { color: var(--gold); font-size: 35px; }

.seal-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  background: rgba(5,4,11,.88);
  backdrop-filter: blur(14px);
  transition: opacity .5s, visibility .5s;
}
.seal-overlay.active { visibility: visible; opacity: 1; }
.seal-overlay svg { position: relative; width: min(210px, 50vw); fill: none; stroke: var(--gold); stroke-width: .7; transform: scale(.7) rotate(-40deg); filter: drop-shadow(0 0 18px rgba(239,216,160,.35)); }
.seal-overlay.active svg { animation: sealIn 1.4s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes sealIn { 55% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
.seal-overlay strong { margin-top: 35px; font-family: var(--serif); font-size: clamp(20px, 4vw, 34px); font-weight: 400; letter-spacing: .14em; }
.seal-overlay small { margin-top: 12px; color: var(--muted); font-family: var(--serif); font-size: 15px; }
.seal-flare { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: white; box-shadow: 0 0 70px 55px rgba(166,126,255,.2), 0 0 150px 90px rgba(239,216,160,.08); }
.seal-overlay.active .seal-flare { animation: flare 1.5s ease-out; }
@keyframes flare { 0% { transform: scale(.1); opacity: 0; } 40% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(1); opacity: .45; } }

.toast { position: fixed; z-index: 70; left: 50%; bottom: 28px; max-width: calc(100vw - 35px); padding: 12px 18px; border: 1px solid var(--line-bright); background: rgba(18,15,32,.96); color: var(--ink); font-size: 10px; letter-spacing: .08em; transform: translate(-50%, 25px); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.entry-dialog { width: min(720px, calc(100% - 30px)); max-height: 85vh; padding: clamp(26px, 5vw, 48px); overflow: auto; border: 1px solid var(--line-bright); background: #0f0d1c; color: var(--ink); box-shadow: 0 30px 120px rgba(0,0,0,.7); }
.entry-dialog::backdrop { background: rgba(4,3,9,.82); backdrop-filter: blur(7px); }
.dialog-close { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: var(--muted); font-family: var(--serif); font-size: 30px; cursor: pointer; }
.entry-dialog .dialog-kicker { color: var(--gold); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; }
.entry-dialog h2 { margin: 12px 0 24px; font-size: 40px; }
.entry-dialog h3 { margin: 26px 0 9px; color: var(--gold); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; }
.entry-dialog p, .entry-dialog li { color: #c7c0d0; font-family: var(--serif); font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.entry-dialog ul { padding-left: 20px; }
.reality-update,
.manifestation-detail {
  position: relative;
  margin: 34px 0;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(117,229,208,.3);
  background: linear-gradient(135deg, rgba(35,93,91,.18), rgba(21,17,39,.7));
  box-shadow: inset 0 0 36px rgba(117,229,208,.035);
}
.reality-update::after,
.manifestation-detail::after {
  content: "";
  position: absolute;
  top: -35px;
  right: -35px;
  width: 95px;
  height: 95px;
  border: 1px solid rgba(117,229,208,.16);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(117,229,208,.06);
}
.reality-update > span,
.manifestation-detail > span { color: var(--aqua); font-size: 7px; letter-spacing: .28em; text-transform: uppercase; }
.reality-update h3,
.manifestation-detail h3 { margin-top: 10px; color: var(--ink); font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.reality-update h4,
.manifestation-detail h4 { margin: 23px 0 8px; color: var(--aqua); font-size: 7px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.reality-update p:last-child,
.manifestation-detail p:last-child { margin-bottom: 0; }
.manifestation-detail { border-color: rgba(189,164,255,.34); background: linear-gradient(135deg, rgba(189,164,255,.1), rgba(8,229,228,.035)); }
.manifestation-detail > span,
.manifestation-detail h4 { color: var(--lavender); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-actions button { padding: 11px 15px; border: 1px solid var(--line); background: rgba(189,164,255,.05); color: var(--muted); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }

body > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px clamp(20px, 5vw, 72px); border-top: 1px solid rgba(255,255,255,.05); color: #5f5a6c; font-size: 7px; letter-spacing: .18em; }
body > footer p { margin: 0; font-family: var(--serif); font-size: 11px; letter-spacing: .04em; }

@media (max-width: 900px) {
  .site-header { min-height: 75px; }
  .brand strong { font-size: 11px; }
  .brand small { display: none; }
  .brand-sigil { width: 35px; height: 35px; }
  .temple-time { display: none; }
  .menu-button { display: grid; }
  nav {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 12px 20px 25px;
    border-bottom: 1px solid var(--line);
    background: rgba(8,7,18,.98);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s, opacity .35s;
  }
  nav.open { transform: none; opacity: 1; pointer-events: auto; }
  nav button { padding: 15px; text-align: left; }
  nav button::after { left: 15px; transform: none; }
  .view { padding-top: 112px; }
  .field-grid.three { grid-template-columns: 1fr; }
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { padding-left: 16px; padding-right: 16px; }
  .brand span { max-width: 175px; }
  .brand strong { font-size: 9px; line-height: 1.35; }
  .header-actions { gap: 8px; }
  .view { padding: 105px 16px 54px; }
  .sanctum-wrap { min-height: calc(100vh - 150px); }
  .eyebrow { margin-bottom: 15px; font-size: 7px; letter-spacing: .3em; }
  h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-copy { margin-top: 18px; font-size: 16px; }
  .portal-stage { width: min(345px, 96vw); margin-top: 5px; }
  .portal { width: 51%; }
  .day-state { gap: 16px; font-size: 6.5px; }
  .temple-law { margin-top: 27px; padding: 18px 8px; font-size: 13px; }
  .ritual-heading { margin-bottom: 35px; }
  .ritual-heading .back-link { display: inline-block; margin-bottom: 28px; padding: 0; border: 0; background: none; color: var(--dim); font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
  .ritual-heading h2 { font-size: 43px; }
  .ritual-heading > p:last-child { font-size: 15px; }
  fieldset { gap: 24px; padding: 23px 18px; }
  legend { padding: 0 9px; font-size: 17px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .field input, .field textarea { font-size: 16px; }
  .element-picker { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .element-picker label > span { height: 62px; font-size: 18px; }
  .element-picker small { font-size: 5.5px; letter-spacing: .08em; }
  .ritual-actions { flex-direction: column-reverse; align-items: stretch; }
  .primary-button { width: 100%; min-width: 0; }
  .ritual-actions p { text-align: center; }
  .mirror-form { padding: 22px 17px; }
  .web-frame, #livingWeb { min-height: 420px; }
  #livingWeb { transform: scale(1.2); transform-origin: center; }
  .web-legend { flex-wrap: wrap; gap: 10px 18px; }
  .archive-toolbar { flex-direction: column; align-items: stretch; }
  .archive-stats { grid-template-columns: auto auto; }
  .data-actions button, .import-button { flex: 1; text-align: center; }
  .archive-list { grid-template-columns: 1fr; }
  .archive-card { min-height: 225px; }
  body > footer { flex-direction: column; text-align: center; }
}

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