@font-face { font-family: 'Cinzel'; src: url('/static/fonts/cinzel-latin-ext.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF,U+AB30-AB6F; }
@font-face { font-family: 'Cinzel'; src: url('/static/fonts/cinzel-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-latin-ext.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF,U+AB30-AB6F; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-latin.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: dark;
  --night: #0c0c13;
  --surface: #24232d;
  --ink: #f1e5cf;
  --muted: #c5bec8;
  --gold: #e2c997;
  --edge: #887654;
  --serif: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--night);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; padding: 0 0 calc(96px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 48% 17%, #45344836, transparent 32%),
              radial-gradient(ellipse at 0% 43%, #2d1a4f70, transparent 48%),
              radial-gradient(ellipse at 94% 66%, #28384a2e, transparent 46%), #0a0b11;
  isolation: isolate;
}
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('/static/stars.svg') repeat; background-size: 620px 710px; }
.masthead, main, footer { width: min(100%, 554px); margin-inline: auto; padding-inline: clamp(18px, 5vw, 29px); }
.masthead { padding-top: max(19px, env(safe-area-inset-top)); display: flex; justify-content: center; align-items: center; gap: clamp(9px,3vw,18px); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, .mode-copy strong { font-family: var(--serif); }
.masthead h1 { font-size: clamp(1.03rem,4.8vw,1.83rem); letter-spacing: .125em; text-transform: uppercase; text-align: center; font-weight: 500; color: var(--gold); }
.header-moon, .planet-icon, .moon-badge svg, .planet-motion svg, .dock svg, .mode-option > svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.header-moon { width: clamp(13px,3.5vw,19px); height: 21px; color: var(--gold); }
p { line-height: 1.52; }
a { color: var(--gold); }
button, input, textarea { font: inherit; }
button { cursor: pointer; min-height: 41px; padding: 8px 14px; border: 1px solid var(--edge); border-radius: 12px; color: var(--ink); background: #282531; }
button:disabled { opacity: .54; cursor: default; }
:focus-visible { outline: 2px solid #fae4ae; outline-offset: 4px; }
.temple { text-align: center; padding: clamp(24px,4vh,42px) 0 clamp(20px,3.7vh,34px); }
.portrait-frame { position: relative; width: clamp(112px,17.5vh,171px); aspect-ratio: 1; border-radius: 50%; margin: 0 auto clamp(18px,3vh,28px); padding: 7px; isolation: isolate;
  border: 1px solid #c0a575; background: radial-gradient(circle, #f1d694 58%,#69503a 67%,#211a22 73%);
  box-shadow: 0 0 0 5px #dfc9980c,0 0 24px #f3ca8c4a,0 0 60px #cc97ac3b; }
.portrait-frame::before, .portrait-frame::after { position: absolute; content: ''; pointer-events: none; }
.portrait-frame::before { inset: -9px; border: 1px solid #e0c49393; border-radius: 50%; transform: rotate(-18deg); }
.portrait-frame::after { width: 5px; height: 5px; border-radius: 50%; background: #ffdf9e; top: 8%; left: 10%; box-shadow: 0 0 9px 2px #ffdd9d; }
.portrait-frame img { display: block; width: 100%; height: 100%; border: 1px solid #ffdfa5; border-radius: 50%; object-fit: cover; }
.temple h2, .temple-panel h2, .section-heading, .spread-heading h2 { color: var(--gold); font-weight: 500; text-align: center; }
.temple h2 { font-size: clamp(1.35rem,4.9vw,1.85rem); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 5px; }
.temple > p { color: var(--muted); font-size: clamp(.93rem,3.7vw,1.1rem); max-width: 365px; margin: 0 auto 15px; text-wrap: balance; }
.temple-start, .gold-button, .dock a[aria-current='page'] {
  color: #201b16; border: 1px solid #f2dcaa;
  background: linear-gradient(116deg,#d2ac73 0%,#f8e8be 46%,#d6b67e 78%,#b99560 100%);
}
.temple-start, .gold-button { display: inline-flex; min-height: 42px; justify-content: center; align-items: center; padding: 8px 27px; border-radius: 999px; text-decoration: none; font-weight: 650; box-shadow: inset 0 1px 1px #fff5dbb5,0 0 22px #e5c17d35; }
.temple-start:hover, .gold-button:hover { filter: brightness(1.07); }
.panel, .quota-strip, .mode-option, .entries > li {
  border: 1px solid var(--edge); border-radius: 16px;
  background: linear-gradient(141deg,#38313dcb,#24242bcb 50%,#171821e3);
  box-shadow: inset 0 1px 0 #ffedcb24,0 7px 24px #0003;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.panel { padding: 15px; margin-bottom: 12px; }
.temple-panel h2 { font-size: clamp(.94rem,3.9vw,1.27rem); letter-spacing: .14em; text-transform: uppercase; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 12px; }
.ornament { width: 12px; height: 12px; color: var(--gold); flex: 0 0 auto; }
.cosmic { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.cosmic-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 112px; padding: 10px 4px; border: 1px solid #a28d69b5; border-radius: 12px; background: linear-gradient(135deg,#f7ddaf15,#e3d1b909); text-align: center; }
.planet-icon { color: #ebcc89; width: 30px; height: 30px; stroke-width: 1.25; filter: drop-shadow(0 0 5px #deb36551); margin: 0 0 3px; }
.planet-label { font: 500 .71rem var(--serif); text-transform: uppercase; letter-spacing: .16em; color: var(--gold); }
.cosmic-tile strong { font-size: clamp(.9rem,3.7vw,1.12rem); font-weight: 650; color: #f0dfc2; }
.moon-badge, .planet-motion, .energy-line { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.moon-badge { border: 1px solid #d5be8825; background: #c9b2842b; padding: 2px 7px; border-radius: 20px; color: #f4e8d3; }
.moon-badge svg { width: 12px; height: 12px; }
.planet-motion svg { width: 14px; height: 14px; color: var(--gold); }
.planet-motion svg.retro { transform: rotate(180deg); }
.planet-note, .moon-badge { min-height: 20px; font-size: .74rem; line-height: 1.3; }
.planet-note { color: var(--muted); padding-top: 2px; }
.energy-line { width: 100%; margin: 10px 0 0; padding: 7px; border: 1px solid #c9b99535; border-radius: 10px; background: #c9c2d10b; font-size: .77rem; font-style: italic; color: #dcd6d8; text-align: center; }
.daily-panel { text-align: center; padding-block: 14px; }
.daily-panel h2 { margin-bottom: 4px; }
.daily-panel p { color: var(--muted); font-size: .86rem; font-style: italic; }
footer { text-align: center; padding-block: 13px 0; color: #b1a7ac; font-size: .74rem; }
footer a { display: inline-block; padding: 6px; color: #cbbd9f; text-underline-offset: 3px; }
.dock { z-index: 5; position: fixed; bottom: max(9px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px),512px); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #746958b5; border-radius: 35px; background: linear-gradient(145deg,#333039ed,#1b1f23ed); padding: 4px; box-shadow: 0 8px 30px #0007; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.dock a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; min-width: 0; min-height: 49px; border-radius: 28px; text-decoration: none; color: #d0c8c9; font-size: .74rem; }
.dock svg { width: 20px; height: 20px; }
.section-heading, .spread-heading h2 { font-size: clamp(1.35rem,5vw,1.8rem); letter-spacing: .055em; margin: 22px 0 16px; }
.quota-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 13px 17px; margin-top: 25px; gap: 7px; font-size: .82rem; }
.quota-strip strong { color: var(--gold); }
progress { width: 100%; height: 4px; grid-column: 1/-1; border: none; border-radius: 6px; overflow: hidden; appearance: none; background: #49414a; accent-color: var(--gold); }
progress::-webkit-progress-bar { background: #49414a; }
progress::-webkit-progress-value { background: linear-gradient(90deg,#a48151,#ead4a6); }
.mode-list { display: grid; gap: 12px; }
.mode-option { display: grid; grid-template-columns: 66px 1fr 18px; align-items: center; gap: 12px; padding: 15px 12px; min-height: 87px; text-align: left; }
.mode-option:hover:not(:disabled), .entries summary:hover { border-color: var(--gold); background-color: #3a3042; }
.mode-option > svg { width: 16px; height: 16px; color: var(--gold); }
.mode-copy { display: grid; gap: 4px; }
.mode-copy strong { font-size: 1.18rem; color: var(--gold); font-weight: 600; }
.mode-copy small, .manual, #draw-hint, .status, .spread-heading > span, .entry-date { font-size: .82rem; color: var(--muted); }
.spread-mark { position: relative; width: 64px; height: 53px; display: grid; place-items: center; }
.spread-mark i { position: absolute; width: 30px; height: 48px; border-radius: 3px; border: 1px solid #d6ac65; background: #201a24 url('/static/cards/back.webp') center/cover; box-shadow: 0 2px 4px #0009; }
.spread-2 i:first-child,.spread-3 i:first-child { transform: translateX(-9px) rotate(-16deg); }
.spread-2 i:last-child,.spread-3 i:last-child { transform: translateX(9px) rotate(16deg); }
.spread-3 i:nth-child(2) { z-index: 1; transform: translateY(-2px); }
.manual { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; }
input[type='checkbox'],input[type='radio'] { accent-color: #d6b981; }
.spread-heading { text-align: center; margin: 20px 0 10px; }
.spread-heading > span { letter-spacing: .09em; color: #d5b884; }
.spread-heading h2 { margin: 4px 0 10px; }
#draw-hint,.status { text-align: center; margin: 10px 0; }
.status:empty { display: none; }
.card-grid { display: grid; gap: 10px; margin: 12px 0; align-items: start; }
.card-grid.manual-grid { grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 356px; margin-inline: auto; }
.card-grid.revealed { grid-template-columns: repeat(var(--count,1),minmax(0,1fr)); text-align: center; }
.card-grid.count-2 { --count: 2; }.card-grid.count-3 { --count: 3; }
.card-back { border-radius: 8px; background: #17161c url('/static/cards/back.webp') center/100% 100%; aspect-ratio: .66; min-height: 0; padding: 0; border: 1px solid #9c8157; }
.card-back[aria-pressed='true'] { outline: 2px solid #ffe1a5; outline-offset: 2px; transform: translateY(-2px); }
.tarot-card { min-width: 0; }
.card-position { color: var(--gold); font-size: .75rem; display: block; margin-bottom: 6px; }
.flip { perspective: 800px; width: 100%; max-width: 178px; margin-inline: auto; }
.flip-inner { width: 100%; aspect-ratio: .60; position: relative; transform-style: preserve-3d; transform: rotateY(180deg); }
.reveal-in .flip-inner { animation: turn-card .8s cubic-bezier(.25,.7,.25,1) .34s both; }
.reveal-in:nth-child(2) .flip-inner { animation-delay: .65s; }
.reveal-in:nth-child(3) .flip-inner { animation-delay: .96s; }
.flip-inner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 7px; border: 1px solid #b29563; background: #16141b; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-inner > .reverse { object-fit: fill; }
.flip-inner > .face { transform: rotateY(180deg); }
.tarot-card figcaption { margin: 7px 0 3px; font-weight: 600; overflow-wrap: anywhere; font-size: .9rem; }
.tarot-card .original-name { font-size: .7rem; color: var(--muted); display: block; }
.individual-notes { display: grid; gap: 9px; margin: 12px 0; }
.individual-notes article { padding-block: 8px; border-bottom: 1px solid #d7bf812b; }
.individual-notes strong { color: var(--gold); font-size: .83rem; }
.individual-notes p,.reading-text p,.entries p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.reading-text h3 { color: var(--gold); font-size: 1.03rem; }
.reading-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.publisher { max-width: 350px; margin: 18px auto; display: block; }
.publisher img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid #9e856453; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { padding: 14px; margin: 10px 0; }
.entries details > summary, .diary-note summary { cursor: pointer; color: var(--gold); }
.entries summary small { display: block; padding-top: 4px; color: var(--muted); }
.entries details[open] summary { margin-bottom: 10px; }
.entries .card-grid { font-size: .8rem; }
.entry-date { display: block; margin-bottom: 7px; }
.entry-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.empty-state { padding: 25px 12px; }
.diary-note { margin-top: 18px; }
.fields, #reflection-form { display: grid; gap: 10px; }
.fields { padding-top: 12px; }
input:not([type='checkbox']):not([type='radio']),textarea { width: 100%; color: var(--ink); font: inherit; background: #17171f; border: 1px solid var(--edge); border-radius: 9px; padding: 8px; }
textarea { resize: vertical; }
dialog { color: var(--ink); border: 1px solid var(--edge); background: #22212c; border-radius: 18px; width: min(calc(100% - 28px),440px); max-height: 86vh; padding: 18px; }
dialog::backdrop { background: #090910c7; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-top h2 { font-size: 1.2rem; color: var(--gold); }
.dialog-top button { font-size: 1.4rem; }
fieldset { border: none; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin: 7px 0; color: var(--gold); }
legend small { color: var(--muted); font-size: .72rem; }
.moods { display: grid; grid-template-columns: repeat(5,1fr); }
.moods label,.tags label { position: relative; cursor: pointer; }
.moods label { text-align: center; font-size: .7rem; padding: 5px 1px; }
.moods input,.tags input { position: absolute; opacity: 0; }
.mood-orb { display: block; height: 18px; width: 18px; margin: 0 auto 4px; border-radius: 50%; border: 1px solid var(--gold); background: #25232c; }
.phase-2 { box-shadow: inset -3px 0 var(--gold); }.phase-3 { box-shadow: inset -8px 0 var(--gold); }.phase-4 { box-shadow: inset -13px 0 var(--gold); }.phase-5 { background: var(--gold); }
.moods input:checked + span,.moods input:focus-visible + span,.tags input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags label > span,.tag-label { display: inline-block; font-size: .76rem; padding: 5px 10px; background: #342d3c; color: #e4d5bd; border: 1px solid #7d6952; border-radius: 20px; }
.tags input:checked + span { background: #dcc18c; color: #211b17; }
.tags input:disabled + span { opacity: .5; }
.tag-label { margin: 5px 4px 0 0; }
.policy { padding-top: 22px; }
.policy article { margin-top: 13px; }
.policy h1,.policy h2 { color: var(--gold); }
.policy h1 { font-size: 1.5rem; }.policy h2 { font-size: 1.05rem; margin: 16px 0 5px; }
.policy p { margin-bottom: 9px; }
#arrival { position: fixed; inset: 0; z-index: 6; pointer-events: none; background: #0d0c14 url('/static/stars.svg') center/620px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; animation: welcome 1.45s ease-in-out forwards; }
#arrival strong { font: 500 1.5rem var(--serif); color: var(--gold); letter-spacing: .2em; }
#arrival p { font-size: .82rem; color: var(--muted); }
.arrival-orbit { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 1.9rem; margin-bottom: 8px; box-shadow: 0 0 30px #d7b37225; }
@keyframes welcome { 0%,65% {opacity:1;} 100% {opacity:0;visibility:hidden;} }
@keyframes turn-card { from {transform:rotateY(0);} to {transform:rotateY(180deg);} }
@media (max-width:370px) { .cosmic-tile {min-height:103px;} .mode-option {gap:7px;} .temple-panel {padding:12px;} }
@media (prefers-reduced-motion:reduce) { #arrival {display:none;} .reveal-in .flip-inner {animation:none;} }
