@font-face {font-family:DalMyeongjo;src:url('/fonts/NanumMyeongjo-Bold.ttf') format('truetype');font-weight:700;font-display:swap;}
:root {
  color-scheme:light;
  --paper:#f9fafb; --panel:#fff; --raised:#e8edf5; --ink:#263451;
  --muted:#526078; --gold:#5b5176; --rose:#354773; --green:#34466d; --rule:#d3d9e0;
  --serif:DalMyeongjo,Batang,'바탕',Georgia,serif; --sans:'Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif;
  font:16px/1.58 var(--sans); background:#d9ecd9; color:var(--ink);
}
* {-webkit-tap-highlight-color:transparent;}
body {min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 20%,#edf7d9,#b6d8cb 70%);}
.handset {isolation:isolate;display:flex;flex-direction:column;width:min(100%,470px);height:100vh;height:100dvh;overflow:hidden;background:var(--paper);position:relative;padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);}
header {flex:none;padding-top:env(safe-area-inset-top);border-bottom:1px solid var(--rule);background:#fff5d9;}
.bar {width:100%;min-height:54px;padding:2px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px;}
.brand {display:inline-flex;align-items:center;gap:8px;min-height:44px;}
.brand strong {color:#254752;font:700 25px/1.1 var(--serif);letter-spacing:-.07em;}
.balance {display:flex;align-items:center;min-height:44px;margin:0;padding:3px 1px;gap:6px;background:none;color:#405a63;border:0;font-size:12px;font-weight:650;}
.balance > span:first-child {color:var(--gold);}
main {min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;margin:0;padding:20px 18px 26px;width:100%;background:var(--paper);scrollbar-width:thin;}

h1,h2,h3 {letter-spacing:-.055em;word-break:keep-all;}
h1 {font-size:28px;} h2 {font-size:22px;} h3 {font-size:18px;}
.sticker {display:block;flex:none;width:30px;height:30px;color:var(--gold);}
.tarot-print {display:block;aspect-ratio:3/5;background-image:url('/tarot-deck.webp');background-size:1300% 600%;background-repeat:no-repeat;}
.section-head {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.section-head a {display:inline-flex;align-items:center;min-height:44px;font-size:13px;font-weight:650;background:transparent;color:var(--rose);}
.section-head h2 {font-size:19px;}
.shelf {margin:0;}
.shelfhead,.stathead {gap:7px;align-items:center;}
.drawer-title {font-size:26px;}
.search,.field input,.field select,.field textarea,.sleep-compare select {color:var(--ink);background:#fffefa;border-color:#aebbac;}
.search input {width:91px;font-size:14px;}
input::placeholder,textarea::placeholder {color:#68787a;}
.tabs {flex-wrap:wrap;gap:2px 12px;margin:11px 0;}
.tabs button {color:var(--muted);font-size:14px;min-height:44px;padding:6px 1px;border:0;border-radius:0;background:transparent;}
.ratings input:checked+span {background:#d2e9de;border-color:#518c7c;color:#244746;}
.grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.book,.panel,.statcard,.entry,.empty,.record {background:var(--panel);border:1px solid var(--rule);border-radius:10px;}
.book {padding:12px;min-height:118px;}
.desk-icon .sticker {width:30px;height:30px;}
.booktext {padding:5px 0 0;position:static;}
.booktext h3 {font:700 17px/1.45 var(--serif);margin:3px 0;}
.booktext small,.booktext p,.facts dt,.axis,.textbtn,.kicker {color:var(--muted);}
.booktext p {font-size:13px;line-height:1.5;}
.go {display:none;}
.columns,.plans {grid-template-columns:1fr;}
.panel,.statcard,.entry,.empty,.record {padding:15px;}
.panel > small,.statcard > small {font:600 12px/1.5 var(--sans);letter-spacing:0;color:var(--gold);}
.featured {background:#fff1cc;border-color:#b7a16d;}
.statcard .mini button {min-height:36px;}
.metrics strong,.recordicon {color:var(--gold);}
.ratings span {color:var(--muted);background:#fffbef;}
.chart {background:repeating-linear-gradient(to top,#e4e4d1 0 1px,transparent 1px 20%);}
.chart div {background:#509b90;}
.sleep-groups > div,.sample,.badge {background:#eaf1df;color:var(--ink);border-color:#bdccba;}
.privacy,.sub,.muted,.hint,.wallet small,.sample-input,.facts dt,.kicker,#dialogBody .hint {color:var(--muted);}
.field input,.field select,.field textarea {font-size:16px;min-height:44px;}
.primary,.outline {border-radius:7px;min-height:44px;font-weight:700;padding:9px 14px;}
.primary {color:#fffdfa;background:var(--rose);border:1px solid #2e695f;}
.outline {background:transparent;color:var(--ink);border:1px solid #899f95;}
.notice,.quote,.plain-guide {background:#fff0c9;color:var(--ink);border-color:#bc8b4b;border-radius:12px;}
.quote {font:600 16px/1.6 var(--serif);}
.sectionTitle {font-size:19px;margin-top:18px;}
dialog {width:min(436px,calc(100% - 22px));max-height:90dvh;background:var(--paper);color:var(--ink);border:1px solid #a7ad96;border-radius:13px;}
dialog::backdrop {background:#243c4166;}
#dialogBody {padding:23px 18px;}
#dialogBody h2 {font:700 26px/1.35 var(--serif);}
#dialogBody p {overflow-wrap:anywhere;word-break:keep-all;}
.close,.screen-bar .close {color:var(--gold);min-height:44px;min-width:44px;}
dialog.reading-screen {inset:0;width:min(100vw,470px);max-width:100vw;height:100dvh;max-height:100dvh;margin:auto;border:0;border-radius:0;}
.reading-screen #dialogBody {padding:0;}
.screen-bar {position:sticky;top:0;z-index:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;min-height:54px;padding:env(safe-area-inset-top) 13px 0;background:#f6f1dd;border-bottom:1px solid var(--rule);text-align:center;font-weight:700;font-size:14px;}
.screen-bar .close {position:static;background:none;padding:0;font:34px/1 Georgia;}
.reading-screen #dialogBody h2 {padding:0;}
.reading-screen #readForm .primary {width:100%;min-height:48px;margin:14px 0 8px;}
#dialogBody .result-date,.spread-status,.card-meaning small {color:var(--muted);font-size:13px;}
.letter-actions {display:grid;gap:6px;}
.delivered-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;list-style:none;padding:0;margin:11px 0 16px;}
.delivered-cards > li > small {display:block;text-align:center;color:#415a65;font-size:13px;margin-bottom:6px;}
.flip-card {position:relative;display:block;width:100%;aspect-ratio:3/5.55;border:1px solid #a69774;border-radius:6px;overflow:hidden;padding:0;background:#fcf3da;color:var(--ink);}
.card-front,.card-back {position:absolute;inset:0;display:flex;flex-direction:column;backface-visibility:hidden;}
.card-front {transform:perspective(500px) rotateY(-180deg);}
.card-back {transform:perspective(500px) rotateY(0);}
.flip-card[data-revealed='true'] .card-front {transform:perspective(500px) rotateY(0);}
.flip-card[data-revealed='true'] .card-back {transform:perspective(500px) rotateY(180deg);}
.card-back {justify-content:flex-end;background:#d2e9df url('/daylight-back.webp') center/cover;}
.card-back small,.card-front b {display:block;text-align:center;padding:2px;background:#fff8e9;color:#374b50;font-size:13px;line-height:1.6;}
.card-front .tarot-print {width:100%;flex:1;min-height:0;}
.card-meaning {padding:9px 0;border-top:1px solid var(--rule);}
#dialogBody .reading-notes p {font-size:15px;margin:3px 0;}
.art-view {margin:2px 0 0;}
.art-view summary {display:list-item;width:fit-content;padding:6px 0;color:var(--gold);font-size:13px;}
.art-view .tarot-print {width:min(100%,220px);margin:5px auto 14px;border-radius:5px;box-shadow:0 0 0 1px #80998c;}
.tarot-face {background:#e6f1e7;color:var(--ink);border-color:#a9b5a2;}
.tarot-face .tarot-print {width:52px;margin:auto;}
.ink-balance {padding:18px 0 15px;border-block:1px solid var(--rule);background:none;}
.ink-balance figcaption {display:grid;gap:5px;word-break:keep-all;}
.ink-balance figcaption strong {color:var(--ink);font:700 26px/1.35 var(--serif);}
.ink-balance figcaption span,.ink-balance > small {color:var(--muted);font:400 14px/1.6 var(--sans);}
.ink-balance > small {font-size:13px;}
.ink-balance ul {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:14px 0 6px;padding:0;list-style:none;}
.ink-balance li {display:grid;justify-items:center;gap:2px;font-size:13px;}
.ink-scale {display:block;width:100%;height:4px;background:#e0e4e9;}
.ink-scale::before {content:"";display:block;height:100%;width:var(--share);background:var(--pigment);}
.ink-mark {width:100%;height:43px;display:grid;place-items:center;color:var(--pigment);font:700 25px var(--serif);}
.ink-0 {--pigment:#365e53;}.ink-1 {--pigment:#9b4554;}.ink-2 {--pigment:#805d32;}.ink-3 {--pigment:#59606f;}.ink-4 {--pigment:#405a83;}
.pillars th {background:#e7ebf1;color:var(--muted);}
.pillars td,.hex-pair figure {background:#fff;color:var(--ink);}
.pillars td small {display:block;font:500 12px/1.5 var(--sans);color:var(--muted);}
.pillars td.day-stem {background:#edf4ef;box-shadow:inset 0 0 0 2px #567869;}
#dialogBody .chart-guide {margin:8px 0;font-size:14px;}
.chart-copy {margin:14px 0;}
.chart-copy button {min-height:44px;}
.chart-copy [role="status"]:not(:empty) {display:block;margin-top:6px;font-size:14px;}
.chart-copy textarea:not([hidden]) {display:block;box-sizing:border-box;width:100%;margin-top:8px;}
.pillars caption,.hex-pair figcaption,.sample-content h3 {color:var(--gold);}
.pillars td,.pillars th,.facts > div {border-color:var(--rule);}
.facts > div {grid-template-columns:86px 1fr;}
#toast {bottom:calc(68px + env(safe-area-inset-bottom));background:#2d5c5e;color:#fff8de;}
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:2px solid #196866;outline-offset:2px;}
@media(min-width:600px) and (min-height:570px) {
  .handset,dialog.reading-screen {width:430px;height:min(876px,calc(100dvh - 24px));border:1px solid #b3c1b1;border-radius:18px;}
  .handset {box-shadow:0 15px 70px #456a5d33;}
}
@media(max-width:350px) {
  main {padding-inline:13px;}.studio-stage {margin-inline:-13px;}
  .shelfhead {flex-wrap:wrap;}
}
.deck-library > details {border-bottom:1px solid var(--rule);padding:3px 0;}
.deck-library summary {padding:13px 0;font-weight:650;}
.deck-library summary small {color:var(--gold);margin-left:5px;}
.deck-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 8px;margin-bottom:15px;}
.deck-grid button {background:transparent;text-align:center;padding:0;}
.deck-grid .tarot-print,.plate-preview .tarot-print {border-radius:5px;box-shadow:0 0 0 1px #b49f70;}
.deck-grid b {display:block;font-size:12px;font-weight:600;padding:5px 0;}
.plate-preview .tarot-print {width:min(100%,265px);margin:18px auto;}
.plate-preview + p {text-align:center;color:var(--gold);}
.reading-frontispiece {height:112px;margin:-19px -19px 17px;border-bottom:2px solid var(--rule);}
.atelier-window {background:#d8efdd url('/daylight-studio.webp') center 42%/cover;}
.shelfhead,.section-head:has(h1) {padding-bottom:10px;border-bottom:1px solid var(--rule);margin-bottom:12px;}
.book {background:linear-gradient(145deg,#f8f2d9,var(--panel) 70%);}
.book .desk-icon {border-bottom:1px solid #d1ceb3;padding-bottom:5px;width:fit-content;}
.topic-choices {display:flex;flex-wrap:wrap;gap:6px;}
.topic-choices label {position:relative;cursor:pointer;}
.topic-choices input {position:absolute;opacity:0;}
.topic-choices span {display:block;padding:7px 11px;min-height:40px;border:1px solid #c7c6ae;border-radius:16px;background:#fffdf4;font-size:14px;}
.topic-choices input:checked+span {background:#ccebe0;border:2px solid #42867c;padding:6px 10px;font-weight:700;}
.topic-choices input:focus-visible+span {outline:2px solid #196866;}
.draw-table {margin:16px 0 0;padding:14px 10px 9px;border:2px solid #94b4a1;border-radius:21px;background:radial-gradient(ellipse at 50% 30%,#e2f4d9,#c7e6d9);box-shadow:inset 0 0 0 4px #ecf6dd;}
.draw-table legend,.topic-choices legend {font:400 18px/1.4 var(--serif);color:#315455;}
.pick-hand {display:flex;align-items:center;justify-content:center;gap:4px;min-height:119px;padding:13px 0 5px;}
.pick-hand button {position:relative;flex:1;max-width:55px;min-width:0;aspect-ratio:3/5;background:#fff9d8 url('/daylight-back.webp') center/cover;border:2px solid #fff8db;border-radius:6px;box-shadow:0 2px 0 #71978b;transform:rotate(var(--tilt,0deg));transition:transform .18s ease-out,box-shadow .15s;}
.pick-hand button:nth-child(1) {--tilt:-9deg;}.pick-hand button:nth-child(2) {--tilt:-4deg;}.pick-hand button:nth-child(4) {--tilt:4deg;}.pick-hand button:nth-child(5) {--tilt:9deg;}
.pick-hand button[aria-pressed="true"] {transform:translateY(-9px) rotate(0);border-color:#ffc75f;box-shadow:0 0 0 2px #a67b35,0 5px 7px #43746a55;}
.pick-hand button:disabled {opacity:.56;cursor:default;}
.pick-hand b:not(:empty) {position:absolute;right:1px;top:-7px;border:2px solid #fffdf1;border-radius:50%;width:25px;height:25px;background:#205955;color:white;font:400 17px/21px var(--serif);}
#dialogBody .pick-count {margin:3px 0;text-align:center;color:#315c53;font-size:14px;font-weight:700;}
.flip-card.card-turning :is(.card-front,.card-back) {transition:transform .32s cubic-bezier(.3,.06,.26,1);}
@media (prefers-reduced-motion:reduce){.pick-hand button,.flip-card.card-turning :is(.card-front,.card-back){transition:none;}}
@media(max-width:345px){
  .pick-hand {display:grid;grid-template-columns:repeat(6,1fr);justify-items:center;gap:8px 4px;}
  .pick-hand button {grid-column:span 2;width:48px;transform:none;}
  .pick-hand button:nth-child(4) {grid-column:2/span 2;}
  .pick-hand button[aria-pressed="true"] {transform:translateY(-4px);}
}
/* 읽는 내용과 개인 풀이를 중심에 둔 화면 */
body {background:#dce0ea;}
header,.bar,.screen-bar {background:var(--paper);}
.bar {padding-inline:19px;min-height:58px;}
.brand {display:inline-flex;align-items:center;}
.brand strong {font:700 24px/1.2 var(--serif);color:var(--ink);}
#route-back,.screen-home {background:none;color:var(--ink);min-height:44px;min-width:44px;}
#route-back {font:28px/1 Georgia;margin-left:-9px;}
.screen-home {font-size:14px;}
[hidden] {display:none!important;}
main {padding:20px 20px calc(26px + env(safe-area-inset-bottom));}
.fortune-sections .facts > div {display:block;padding:12px 0;}
.fortune-sections dt {font-weight:700;color:var(--ink);}
.fortune-sections dd {margin-top:4px;font-weight:400;line-height:1.65;word-break:keep-all;}
.archive-tools {display:flex;align-items:center;gap:0;flex-wrap:wrap;border-block:1px solid var(--rule);margin:14px 0 24px;}
.archive-tools a {min-height:46px;display:inline-flex;align-items:center;gap:4px;flex:auto;justify-content:center;color:#384961;font-size:14px;font-weight:600;}
.archive-tools a+a {border-left:1px solid var(--rule);}
.result-actions {display:flex;gap:8px;flex-wrap:wrap;align-items:baseline;}
.pass-note {color:var(--muted);font-size:13px;}
.pass-note.saved-price {color:#30476a;border-left:2px solid #879abc;padding-left:9px;}
.reading-frontispiece,.atelier-window {display:none;}
.primary {background:#34466d;color:white;border:1px solid #34466d;box-shadow:none;border-radius:7px;}
.primary:disabled {background:#e2e4dc;border-color:#c9cdc2;color:#58625b;opacity:1;}
.screen-bar {border-color:var(--rule);font-family:var(--sans);}
.draw-table {box-shadow:none;background:#e8edf5;border:1px solid #bdc8dc;}
.draw-table {border-radius:12px;}
.topic-choices input:checked+span {background:#e4eee4;}
.ratings input:checked+span {background:#e5ebf3;}
.tabs button[aria-pressed='true'] {color:#233657;border:0;background:transparent;box-shadow:inset 0 -2px currentColor;font-weight:700;}
.shelfhead,.section-head:has(h1){border-color:var(--rule);}
.section-head span {font-size:13px;color:var(--muted);}
.grid {display:block;}
.book {position:relative;display:flex;align-items:center;flex-direction:row;gap:14px;width:100%;min-height:76px;padding:10px 0;background:transparent;border:0;border-bottom:1px solid var(--rule);border-radius:0;}
.book:hover {transform:none;box-shadow:none;background:#eef1f6;}
.book .desk-icon {padding:0;border:0;width:32px;}
.booktext {padding:0;}
.booktext small {color:var(--muted);}
.booktext h3 {margin:1px 0 2px;}
.booktext p {margin:0;}
.record {border:0;border-bottom:1px solid var(--rule);border-radius:0;padding:13px 1px;margin:0;background:transparent;}
.record .recordicon {display:none;}
.letter-message {font:700 18px/1.85 var(--serif);}
#dialogBody .quote {background:#edf0f7;border-left-color:#8595ba;color:#354562;}
.archive-tools b {font-variant-numeric:tabular-nums;}

#toast {bottom:calc(16px + env(safe-area-inset-bottom));}
@media(max-width:350px){main{padding-inline:14px;}}
.sr-only {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.bar.inner-bar {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;text-align:center;padding-inline:13px;min-height:52px;}
.inner-bar #route-back {margin:0;}
#route-title {font:700 15px/1.4 var(--sans);}
.archive-tools {display:grid;grid-template-columns:1fr;margin:0 0 24px;}
.archive-tools a {justify-content:space-between;gap:8px;padding:0 3px;min-height:46px;}
.archive-tools a+a {border-left:0;border-top:1px solid var(--rule);}
.archive-tools a::after {content:'›';font:20px Georgia;color:#5a6680;}
.archive-tools b {margin-left:auto;}
.shelfhead:has(.sr-only) .search {width:100%;background:var(--panel);border-color:var(--rule);border-radius:7px;min-height:44px;}
.shelfhead:has(.sr-only) .search input {width:100%;}
.section-head:has(>.sr-only:only-child) {margin:0;padding:0;border:0;}
#dialogBody .daily-kicker,.booktext small {font:600 12px/1.5 var(--sans);color:var(--muted);}
.booktext p {font-size:14px;}
#toast {word-break:keep-all;width:max-content;max-width:calc(100% - 32px);}

.pass-wallet {margin-bottom:22px;}
.pass-wallet p,.preview-price {color:var(--muted);font-size:14px;}
.single-offer p {margin:8px 0 14px;}
.single-offer button,.topup-controls button {min-height:46px;}
.reading-topup {padding-block:8px;}
.reading-topup > button {margin-top:10px;}
.reading-topup .primary,.reading-topup .outline {width:100%;}
.account-tools {margin-block:12px;}
