:root {
  color-scheme: dark;
  --ink: #0b0e19;
  --panel: #151a2c;
  --gold: #e1bd84;
  --paper: #f3e7d3;
  --muted: #b8b4c4;
  --stroke: #b88f5550;
  --serif: "Palatino Linotype", Georgia, serif;
  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  --safe-inline: max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px),
    calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px)),
    calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px)));
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 75% 7%, #222944 0, transparent 36rem), var(--ink); color: var(--paper); min-height: 100dvh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: var(--gold); }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; }
h1 { font-size: clamp(2.15rem, 7vw, 4.35rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.45rem); }
h3 { font-size: 1.35rem; }
.shell { width: min(100% - 36px - 2 * var(--safe-inline), 950px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--stroke); background: #0b0e19af; padding-top: var(--safe-top); }
.topbar-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; }
.brand { background: none; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.28rem; letter-spacing: .01em; }
.brand img { border-radius: 50%; }
.language, .secondary, .danger, .close { background: #161b2a; border: 1px solid var(--stroke); border-radius: 9px; padding: 9px 14px; }
.language { color: var(--gold); font-size: .875rem; }
main { padding-block: 22px calc(var(--app-nav-height, 66px) + var(--app-bottom-offset, 0px) + 34px); }
.keyboard-open main { padding-bottom: calc(var(--app-bottom-offset, 0px) + 16px); }
main:focus { outline: none; }
.screen { animation: visit .32s ease both; }
@keyframes visit { from { opacity: .25; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.initial, .muted, .intro { color: var(--muted); }
.demotag { font-size: .82rem; color: var(--gold); margin-bottom: 14px; }
.hero { isolation: isolate; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 335px; padding: clamp(26px, 5vw, 52px); border: 1px solid var(--stroke); border-radius: 24px; background: radial-gradient(ellipse at 83% 41%, #343653, #181e34 48%, #111626 85%); }
.hero-copy { position: relative; display: grid; gap: 16px; align-content: center; z-index: 2; }
.hero h1 { color: #f5e2c3; }
.hero .intro { max-width: 32ch; }
.hero .intro-short { display: none; }
.eyebrow { color: var(--gold); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; width: fit-content; align-self: start; border-radius: 10px; padding: 11px 18px; border: 1px solid #f2cf9b; background: linear-gradient(120deg, #eed3a7, #c79a62); color: #221a19; font-weight: 650; }
.primary:hover { filter: brightness(1.08); }
.hero-art { position: relative; min-height: 245px; pointer-events: none; }
.orbit { position: absolute; width: 285px; height: 285px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid #cfa97338; box-shadow: 0 0 0 15px #cfa9730a, 0 0 0 32px #cfa97316; }
.hero-card { position: absolute; width: 36%; max-width: 150px; top: 50%; left: 50%; border-radius: 6px; box-shadow: 0 10px 30px #05060c80; }
.hero-card.left { transform: translate(-94%, -43%) rotate(-16deg); opacity: .86; }
.hero-card.right { transform: translate(-7%, -44%) rotate(15deg); opacity: .88; }
.hero-card.front { transform: translate(-50%, -53%); z-index: 1; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 14px; gap: 10px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode { min-height: 118px; text-align: left; background: linear-gradient(140deg, #1b2137, #111625); border: 1px solid var(--stroke); border-radius: 13px; padding: 14px; display: grid; gap: 7px; align-content: start; transition: border-color .2s, transform .2s; }
.mode:hover { border-color: var(--gold); transform: translateY(-2px); }
.mode strong { font-family: var(--serif); line-height: 1.15; font-weight: 400; font-size: 1.16rem; }
.mode small, .stamp { color: var(--muted); font-size: .85rem; }
.glyph { color: var(--gold); width: 23px; height: 23px; display: block; }
.tabs { background: #0c101deE; border-top: 1px solid var(--stroke); backdrop-filter: blur(16px); position: fixed; z-index: 4; bottom: var(--app-bottom-offset, 0px); width: 100%; padding: 7px calc(12px + var(--safe-inline)) calc(7px + var(--safe-bottom)); display: flex; justify-content: center; }
.keyboard-open .tabs { visibility: hidden; }
.tabs:empty { display: none; }
.tab { flex: 0 1 170px; min-width: 0; background: none; border: 0; border-radius: 8px; color: var(--muted); display: grid; justify-items: center; gap: 3px; padding: 5px 4px; font-size: .86rem; }
.tab[aria-current="page"] { color: var(--gold); background: #262037; }
.reading-page, .form-page { max-width: 680px; margin-inline: auto; }
.reading-content, .reading-actions { display: contents; }
.screen > .spread-exit, .reading-actions > .spread-exit { margin-top: 13px; }
.screen.spread-fade-out { animation: spread-fade-out .6s ease both; }
.screen.spread-fade-in { animation: spread-fade-in .6s ease both; }
@keyframes spread-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes spread-fade-in { from { opacity: 0; } to { opacity: 1; } }
.screen-head { display: grid; gap: 9px; margin: 12px 0 20px; }
.screen-head, .about, .history-line { overflow-wrap: anywhere; }
.screen-head h1 { font-size: clamp(2.05rem, 6vw, 3.1rem); }
.question-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.question-preview-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.question-toggle {
  justify-self: start; min-height: 28px; padding: 0; border: 0; background: none;
  color: var(--gold); font-size: .85rem; text-align: start;
}
.form, .interpretation, .card-meanings, .empty, .notice-box { background: #151a2de6; border: 1px solid var(--stroke); border-radius: 16px; padding: clamp(16px, 4vw, 27px); }
.about { display: grid; gap: 12px; }
.access-panel { display: grid; gap: 16px; }
.form { display: grid; gap: 17px; }
.form label { display: grid; gap: 7px; }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; background: #0b101e; color: var(--paper); border: 1px solid var(--stroke); border-radius: 9px; }
textarea { min-height: 115px; resize: vertical; }
.setting-switch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.setting-switch-detail, .notice-time:not([hidden]) { display: grid; gap: 5px; }
.settings-switch {
  position: relative; width: 76px; min-height: 44px; padding: 0 9px 0 30px;
  background: #0b101e; color: var(--muted); border: 1px solid var(--stroke); border-radius: 24px;
  font-size: .75rem; font-weight: 650; letter-spacing: .08em;
}
.settings-switch::before {
  content: ""; position: absolute; width: 17px; height: 17px; inset: 50% auto auto 10px;
  background: var(--muted); border-radius: 50%; transform: translateY(-50%);
  transition: transform .18s ease, background .18s ease;
}
.settings-switch[aria-checked="true"] { padding: 0 30px 0 9px; color: var(--gold); border-color: #b18a59; background: #291f24; }
.settings-switch[aria-checked="true"]::before { transform: translate(37px, -50%); background: var(--gold); }
.time-parts { display: flex; align-items: center; gap: 8px; }
.time-parts select { width: auto; min-width: 4.4rem; font-variant-numeric: tabular-nums; }
.time-parts span { color: var(--gold); }
.error { color: #ffc7bc; white-space: pre-wrap; margin-block: 8px; }
.drawbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawbar .secondary, .card-slot { -webkit-tap-highlight-color: transparent; }
.drawbar .secondary:disabled { opacity: 1; }
.draw-board { position: relative; }
.draw-cue {
  position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; padding: 0 8px;
  pointer-events: none; text-align: center; font: clamp(1.65rem, 6vw, 2.85rem)/1.12 var(--serif);
  color: #ffdc99; text-shadow: 0 0 7px #0b0e19, 0 0 16px #100b16, 0 0 16px #e7af6570;
  animation: draw-cue 3.5s ease-in-out both;
}
@keyframes draw-cue {
  0%, 50%, 100% { text-shadow: 0 0 7px #0b0e19, 0 0 16px #100b16, 0 0 16px #e7af6570; }
  25%, 75% { text-shadow: 0 0 7px #0b0e19, 0 0 16px #100b16, 0 0 34px #ffd588e0; }
}
.card-grid { max-width: 407px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(7px, 2vw, 13px); }
.card-slot { aspect-ratio: 3/5; perspective: 830px; border: 0; padding: 0; border-radius: 9px; background: none; position: relative; transition: opacity .36s, transform .36s; }
.card-slot:disabled { opacity: 1; }
.card-slot:hover:not(:disabled) { box-shadow: 0 0 16px #e5b76745; }
.card-slot.chosen { box-shadow: 0 0 15px #e5b76758; }
.card-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .63s cubic-bezier(.3,.65,.26,1); }
.chosen .card-flip { transform: rotateY(180deg); }
.card-face { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-front { transform: rotateY(180deg); }
.card-front.reversed { transform: rotateY(180deg) rotate(180deg); }
.shuffling .card-slot { animation: shuffle .52s cubic-bezier(.21,.7,.4,1) backwards; }
.shuffling .card-slot:nth-child(3n+1) { animation-delay: 80ms; }
.shuffling .card-slot:nth-child(3n+2) { animation-delay: 35ms; }
@keyframes shuffle { from { opacity: 0; transform: translateY(25px) scale(.82) rotate(-8deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
.daily-page { position: relative; }
.daily-page .screen-head { text-align: center; }
.daily-in-progress::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 24%, #02040c85 100%);
  animation: daily-focus 2.5s ease both;
}
.daily-reveal { text-align: center; margin: 0 auto; }
.daily-card {
  position: relative; display: block; isolation: isolate; aspect-ratio: 3 / 5; z-index: 2;
  width: min(calc(100% - 28px), var(--daily-width, max(130px, calc((var(--app-content-height, 690px) - 156px) * .6))), 340px);
  margin: 0 auto; padding: 0; border: 0; border-radius: 9px; background: none;
  box-shadow: 0 0 26px #d09c553a; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.daily-card:disabled { opacity: 1; }
.daily-face, .daily-aura { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.daily-face { object-fit: contain; }
.daily-front { opacity: 0; }
.daily-aura {
  opacity: 0; border-radius: inherit;
  box-shadow: 0 0 10px #ffe3a76e, 0 0 33px #d1a06262, 0 0 60px #945b362e;
}
.daily-fragments {
  position: absolute; inset: -17% -31%; width: 162%; height: 134%;
  max-width: none; pointer-events: none;
}
.daily-instruction { margin: 12px auto 4px; color: var(--gold); font-family: var(--serif); font-size: 1.08rem; }
.daily-instruction-out { animation: spread-fade-out .35s ease both; }
.daily-awakening:not(.daily-opening) { box-shadow: 0 0 28px #e6b66e50; }
.daily-opening { animation: daily-lift 2.5s ease-in-out both; }
.daily-opening .daily-aura { animation: daily-aura 2.5s ease-in-out both; }
.daily-opening:not(.daily-with-fragments) .daily-back { animation: daily-back 2.5s ease-in-out both; }
.daily-opening:not(.daily-with-fragments) .daily-front { animation: daily-front 2.5s ease-in-out both; }
.daily-fractured .daily-back { visibility: hidden; }
.daily-fractured .daily-front { opacity: 1; }
.daily-art-handoff { position: fixed; z-index: 3; pointer-events: none; transform-origin: top left; }
.daily-art-handoff img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.daily-art-in-flight { visibility: hidden; }
.daily-result { animation: none; }
.daily-result :is(.result-position, .name, .result-orientation, .card-meanings, .interpretation, .reading-actions) { animation: spread-fade-in .46s ease both; }
@keyframes daily-lift {
  from { transform: translateY(0) scale(1); }
  20%, 61% { transform: translateY(-4px) scale(1.019); }
  to { transform: translateY(0) scale(1); }
}
@keyframes daily-focus {
  0%, 100% { opacity: 0; }
  21%, 73% { opacity: .87; }
}
@keyframes daily-aura {
  0%, 100% { opacity: 0; }
  43% { opacity: .16; }
  66% { opacity: .68; }
  84% { opacity: .36; }
}
@keyframes daily-back {
  0%, 49% { opacity: 1; }
  73%, 100% { opacity: 0; }
}
@keyframes daily-front {
  0%, 59% { opacity: 0; }
  94%, 100% { opacity: 1; }
}
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; margin: 14px auto 22px; max-width: 550px; align-items: start; }
.results.one { grid-template-columns: minmax(0, 185px); justify-content: center; }
.revealed { display: contents; text-align: center; }
.revealed:nth-child(1) { --result-column: 1; }
.revealed:nth-child(2) { --result-column: 2; }
.revealed:nth-child(3) { --result-column: 3; }
.revealed > * { grid-column: var(--result-column); min-width: 0; overflow-wrap: anywhere; }
.revealed .result-position { grid-row: 1; align-self: stretch; }
.revealed button { grid-row: 2; width: 100%; border: 0; border-radius: 8px; padding: 0; background: none; }
.revealed button, .card-slot.chosen { -webkit-tap-highlight-color: transparent; }
.revealed img { border-radius: inherit; width: 100%; aspect-ratio: 3 / 5; }
img.reversed { transform: rotate(180deg); }
.revealed .name { grid-row: 3; font-family: var(--serif); line-height: 1.15; overflow-wrap: normal; word-break: normal; hyphens: none; }
.revealed .result-orientation { grid-row: 4; }
.card-meanings { display: grid; gap: 11px; margin-bottom: 12px; overflow-wrap: anywhere; }
.card-meaning { display: grid; gap: 5px; }
.card-meaning + .card-meaning { border-top: 1px solid var(--stroke); padding-top: 10px; }
.card-meaning-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.interpretation { display: grid; gap: 11px; white-space: normal; overflow-wrap: anywhere; }
.interpretation p { white-space: pre-wrap; }
.reading-reveal { animation: spread-fade-in .32s ease both; }
.reading-output { min-height: 1lh; }
.reading-waiting {
  display: grid; gap: 6px;
  animation: spread-fade-in .32s ease both;
}
.reading-waiting-title { color: var(--gold); animation: reading-wait-glow 1.6s ease-in-out infinite alternate; }
.reading-waiting-help { color: var(--muted); font-size: .85rem; }
.reading-waiting-dots { display: flex; align-items: center; gap: 6px; min-height: 14px; }
.reading-waiting-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  animation: reading-dot-pulse 1.35s ease-in-out infinite;
}
.reading-waiting-dots span:nth-child(2) { animation-delay: .16s; }
.reading-waiting-dots span:nth-child(3) { animation-delay: .32s; }
.reading-waiting-out { animation: spread-fade-out .18s ease both; }
@keyframes reading-wait-glow { from { color: #bc9865; } to { color: #f2d5a4; } }
@keyframes reading-dot-pulse {
  0%, 60%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
.zoom { background: #0c1120; border: 1px solid var(--stroke); border-radius: 15px; padding: 14px; color: var(--paper); max-width: min(93vw - 2 * var(--safe-inline), 450px); width: min(426px, max(120px, calc((var(--app-viewport, 100dvh) - var(--safe-top) - var(--safe-bottom) - 104px) * .6 + 30px))); max-height: calc(var(--app-viewport, 100dvh) - var(--safe-top) - var(--safe-bottom) - 16px); inset-block: var(--safe-top) calc(var(--safe-bottom) + var(--app-bottom-offset, 0px)); }
.zoom::backdrop { background: #03050bc9; }
.zoom form { text-align: right; margin-bottom: 8px; }
.zoom img { width: 100%; height: auto; aspect-ratio: 3 / 5; object-fit: contain; margin: auto; }
.zoom p { text-align: center; margin-top: 6px; }
.close { font-size: 1.4rem; line-height: 1; }
.history { display: grid; gap: 9px; }
.history-line { display: flex; gap: 8px; padding: 10px; border: 1px solid var(--stroke); border-radius: 10px; background: #151a2d; align-items: center; }
.history-open { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; background: none; text-align: left; border: 0; }
.history-open img { width: 32px; height: 54px; border-radius: 4px; }
.history-open span { overflow-wrap: anywhere; }
.danger { color: #ffc9bd; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 680px), (max-height: 560px) and (pointer: coarse) {
  body.reading-active main { height: var(--app-content-height, calc(100dvh - 135px)); padding: 0; }
  .reading-page { display: grid; height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
  .reading-content { display: block; overflow-y: auto; overscroll-behavior-y: contain; padding: 10px 0; }
  .reading-actions { display: block; padding: 4px 0 6px; }
  .reading-actions > .spread-exit { margin: 0; min-height: 40px; padding: 6px 12px; }
  body.drawing .topbar-inner { min-height: 42px; }
  body.drawing .brand { gap: 8px; font-size: 1.06rem; }
  body.drawing .brand img { width: 28px; height: 28px; }
  body.drawing .language { min-height: 34px; padding: 4px 10px; }
  .draw-page { row-gap: 10px; }
  .draw-page .reading-content { padding-block: 3px 0; }
  .draw-page .screen-head { gap: 3px; margin: 2px 0 5px; overflow-wrap: anywhere; }
  .draw-page .screen-head h1 { font-size: clamp(1.25rem, 5.2vw, 1.6rem); }
  .draw-page .drawbar { gap: 4px 8px; margin-bottom: 5px; font-size: .82rem; }
  .draw-page .drawbar .secondary { min-height: 36px; padding: 4px 8px; }
  .draw-page .card-grid { width: min(100%, var(--draw-grid-width, 100%)); gap: var(--draw-row-gap, 6px) 6px; margin-bottom: 0; }
  .daily-page .reading-content { padding-block: 6px 8px; }
  .daily-page .screen-head { margin: 3px 0 12px; }
  .daily-page .screen-head h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .results:not(.one) .revealed .name { font-size: clamp(.7rem, 3.6vw, 1rem); }
  main:has(> .home-screen) { padding-block: 11px calc(var(--app-nav-height, 66px) + var(--app-bottom-offset, 0px) + 10px); }
  .home-screen { --home-space: var(--app-content-height, 620px); }
  .home-screen .demotag { margin-bottom: 7px; }
  .home-screen .hero {
    grid-template-columns: minmax(0, 1fr) clamp(86px, 29vw, 122px);
    gap: 5px; min-height: clamp(126px, calc(126px + (var(--home-space) - 450px) * .27), 231px); padding: 10px 13px; border-radius: 17px;
  }
  .home-screen .hero-copy { gap: 6px; }
  .home-screen .hero h1 { font-size: clamp(1.35rem, 5.5vw, 1.75rem); }
  .home-screen .hero .intro { font-size: .82rem; }
  .home-screen .intro-full, .home-screen .hero .primary { display: none; }
  .home-screen .intro-short { display: inline; }
  .home-screen .hero-art { min-height: clamp(102px, calc(102px + (var(--home-space) - 450px) * .19), 180px); align-self: center; overflow: hidden; }
  .home-screen .hero-card { width: clamp(33px, calc(10vw + max(0px, (var(--home-space) - 450px) * .05)), 62px); }
  .home-screen .orbit {
    width: min(66px, 72%); height: auto; aspect-ratio: 1;
    box-shadow: 0 0 0 6px #cfa9730a, 0 0 0 12px #cfa97316;
  }
  .home-screen .section-title { margin: clamp(14px, calc(14px + (var(--home-space) - 450px) * .04), 26px) 0 8px; }
  .home-screen .section-title h2 { font-size: 1.45rem; }
  .home-screen .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(7px, calc(7px + (var(--home-space) - 450px) * .017), 13px); }
  .home-screen .mode {
    grid-template-columns: 19px minmax(0, 1fr);
    align-content: center; align-items: start; gap: 4px 7px;
    min-height: clamp(82px, calc(82px + (var(--home-space) - 450px) * .185), 153px); padding: 8px 9px;
  }
  .home-screen .mode .glyph { width: 18px; height: 18px; }
  .home-screen .mode strong { font-size: 1rem; }
  .home-screen .mode small { grid-column: 1 / -1; font-size: .78rem; line-height: 1.3; }
}
@media (max-width: 410px) {
  .shell { width: calc(100% - 26px - 2 * var(--safe-inline)); }
}
.landscape-ui {
  --landscape-top: max(var(--safe-top), var(--landscape-tg-top, 0px), var(--landscape-fullscreen-top, 0px));
  --landscape-bottom: max(var(--safe-bottom), var(--landscape-tg-bottom, 0px));
  --landscape-inline: max(var(--safe-inline), var(--landscape-tg-inline, 0px));
  --landscape-height: max(0px, calc(var(--app-viewport, 100dvh) - var(--landscape-top) - var(--app-nav-height, 37px)));
  --landscape-card-cap: max(24px, calc((var(--landscape-height) - 20px) * .6));
  overflow: hidden;
}
.app-viewport { display: contents; }
.landscape-ui body { overflow: hidden; }
.landscape-ui body::before {
  content: ""; position: fixed; z-index: 4; inset: 0 0 auto;
  height: calc(var(--landscape-top) + var(--app-visual-top, 0px)); background: var(--ink); pointer-events: none;
}
.landscape-ui .app-viewport {
  display: block; position: fixed; inset: calc(var(--landscape-top) + var(--app-visual-top, 0px)) 0 auto;
  height: var(--landscape-height); overflow: hidden auto; overscroll-behavior: contain;
  scroll-padding-block: 6px; -webkit-overflow-scrolling: touch;
}
.landscape-ui .shell { width: min(100% - 28px - 2 * var(--landscape-inline), 950px); }
.landscape-ui .topbar { padding-top: 0; }
.landscape-ui .topbar-inner, .landscape-ui body.drawing .topbar-inner { min-height: 34px; }
.landscape-ui .brand, .landscape-ui body.drawing .brand { gap: 6px; font-size: 1rem; }
.landscape-ui .brand img, .landscape-ui body.drawing .brand img { width: 22px; height: 22px; }
.landscape-ui .language, .landscape-ui body.drawing .language { min-height: 28px; padding: 2px 8px; font-size: .8rem; }
.landscape-ui .tabs {
  align-items: center; gap: 3px;
  padding: 1px calc(8px + var(--landscape-inline)) calc(1px + var(--landscape-bottom));
}
.landscape-ui .tab {
  flex-basis: 110px; display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 33px; padding: 2px 4px; font-size: .76rem; line-height: 1.17;
}
.landscape-ui .tab .glyph { flex: none; width: 15px; height: 15px; }
.landscape-ui .tabs .reading-actions {
  display: block; flex: 0 1 auto; min-width: 0; padding: 0; margin-inline-end: auto;
}
.landscape-ui .tabs .reading-actions > .spread-exit {
  margin: 0; min-height: 32px; padding: 3px 7px; font-size: .76rem; line-height: 1.15;
}
.landscape-ui main, .landscape-ui body.reading-active main, .landscape-ui main:has(> .home-screen) {
  height: auto; padding-block: 6px 13px;
}
.landscape-ui .reading-page { display: block; height: auto; }
.landscape-ui .reading-content, .landscape-ui .draw-page .reading-content, .landscape-ui .daily-page .reading-content {
  display: block; overflow: visible; overscroll-behavior-y: auto; padding: 0;
}
.landscape-ui .screen-head { margin: 2px 0 6px; gap: 3px; }
.landscape-ui .screen-head h1, .landscape-ui .draw-page .screen-head h1, .landscape-ui .daily-page .screen-head h1 {
  font-size: clamp(1.16rem, 2.6vw, 1.55rem);
}
.landscape-ui .screen-head .intro { font-size: .84rem; line-height: 1.35; }
.landscape-ui .form-page .form { padding: 11px; gap: 8px; }
.landscape-ui .form-page textarea { min-height: 72px; }
.landscape-ui .primary { min-height: 36px; padding: 5px 11px; }
.landscape-ui .draw-page .drawbar { margin-bottom: 5px; font-size: .8rem; }
.landscape-ui .draw-page .drawbar .secondary { min-height: 30px; padding: 3px 7px; }
.landscape-ui .draw-page .card-grid {
  --landscape-card: min(var(--landscape-card-cap), var(--landscape-card-fit, 100px));
  width: min(100%, calc(3 * var(--landscape-card) + 14px)); gap: 7px; margin-bottom: 0;
}
.landscape-ui .daily-card {
  width: min(calc(100% - 26px), var(--landscape-card-cap), clamp(66px, calc((var(--app-content-height, 250px) - 44px) * .6), 155px));
}
.landscape-ui .daily-instruction { margin-top: 6px; font-size: .94rem; }
.landscape-ui .results {
  --landscape-result-card: min(var(--landscape-card-cap), clamp(44px, calc((var(--app-content-height, 250px) - 38px) * .47), 108px));
  width: min(100%, calc(3 * var(--landscape-result-card) + 16px)); gap: 3px 8px; margin-block: 5px 9px;
}
.landscape-ui .results.one { width: min(100%, var(--landscape-result-card)); }
.landscape-ui .results .stamp { font-size: .75rem; line-height: 1.25; }
.landscape-ui .results .name { font-size: .87rem; }
.landscape-ui .zoom {
  inset-block: var(--landscape-top) calc(var(--landscape-bottom) + var(--app-bottom-offset, 0px));
  max-height: calc(var(--app-viewport, 100dvh) - var(--landscape-top) - var(--landscape-bottom) - 8px);
  width: min(426px, max(60px, calc((var(--app-viewport, 100dvh) - var(--landscape-top) - var(--landscape-bottom) - 78px) * .6 + 20px)));
  padding: 8px;
}
.landscape-ui .zoom .close { padding: 4px 9px; }
.landscape-ui .zoom p { font-size: .85rem; }
.landscape-ui .home-screen .hero {
  grid-template-columns: minmax(0, 1fr) minmax(85px, 24%);
  min-height: 66px; padding: 5px 9px; border-radius: 13px;
}
.landscape-ui .home-screen .hero-copy { gap: 3px; }
.landscape-ui .home-screen .hero h1 { font-size: clamp(1.13rem, 3vw, 1.43rem); }
.landscape-ui .home-screen .hero .intro { font-size: .77rem; }
.landscape-ui .home-screen .intro-full, .landscape-ui .home-screen .hero .primary { display: none; }
.landscape-ui .home-screen .intro-short { display: inline; }
.landscape-ui .home-screen .hero-art { min-height: 55px; align-self: center; overflow: hidden; }
.landscape-ui .home-screen .hero-card { width: 27px; }
.landscape-ui .home-screen .orbit { width: 43px; height: 43px; box-shadow: 0 0 0 5px #cfa9730a, 0 0 0 9px #cfa97316; }
.landscape-ui .home-screen .section-title { margin: 6px 0 5px; }
.landscape-ui .home-screen .section-title h2 { font-size: 1.28rem; }
.landscape-ui .home-screen .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.landscape-ui .home-screen .mode {
  grid-template-columns: 16px minmax(0, 1fr); min-height: 48px; padding: 4px 7px; gap: 2px 5px;
}
.landscape-ui .home-screen .mode .glyph { width: 15px; height: 15px; }
.landscape-ui .home-screen .mode strong { font-size: .92rem; }
.landscape-ui .home-screen .mode small { grid-column: 1 / -1; font-size: .73rem; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reading-waiting-title, .reading-waiting-dots span { animation: none; }
  .draw-cue { animation: reduced-cue 3.5s linear both !important; }
  .daily-opening, .daily-opening .daily-back, .daily-opening .daily-front { animation-duration: .18s !important; }
  .daily-opening .daily-aura, .daily-in-progress::before { display: none; }
  @keyframes daily-lift { from, to { transform: none; } }
  @keyframes reduced-cue { from, to { opacity: 1; } }
}
