:root,
:root[data-skin="cream-note"] {
  --skin-focus-width: 2px;
  --skin-focus-offset: 3px;
  --skin-input-surface: var(--skin-surface);
  --skin-input-border: var(--skin-border);
  --skin-background: #fbfaf7;
  --skin-surface: #ffffff;
  --skin-surface-subtle: #f6f3ee;
  --skin-muted: #ede8e0;
  --skin-ink: #231f1c;
  --skin-ink-strong: #151311;
  --skin-subtle: #655b54;
  --skin-border: #dcd3c7;
  --skin-border-subtle: #ece5dc;
  --skin-accent: #8a4f3d;
  --skin-accent-hover: #754030;
  --skin-accent-ink: #ffffff;
  --skin-danger: #b91c1c;
  --skin-success: #2e7d32;
  --skin-focus: #9a8275;
  --cream: var(--skin-background);
  --ink: var(--skin-ink);
  --muted: var(--skin-subtle);
  --line: var(--skin-border);
  --gold: var(--skin-accent);
}

:root[data-skin="rose-diary"] {
  --skin-background: #fff8fa;
  --skin-surface: #ffffff;
  --skin-surface-subtle: #fdf0f4;
  --skin-muted: #f8e2ea;
  --skin-ink: #2c1b22;
  --skin-ink-strong: #1a0f14;
  --skin-subtle: #6e545e;
  --skin-border: #e5c9d3;
  --skin-border-subtle: #f2dfe6;
  --skin-accent: #9e3f65;
  --skin-accent-hover: #863354;
  --skin-accent-ink: #ffffff;
  --skin-danger: #b91c1c;
  --skin-success: #2e7d32;
  --skin-focus: #a17b8b;
  --cream: var(--skin-background);
  --ink: var(--skin-ink);
  --muted: var(--skin-subtle);
  --line: var(--skin-border);
  --gold: var(--skin-accent);
}

:root[data-skin="lavender-moon"] {
  --skin-background: #f9f8ff;
  --skin-surface: #ffffff;
  --skin-surface-subtle: #f2effc;
  --skin-muted: #e6e0f8;
  --skin-ink: #241e38;
  --skin-ink-strong: #161224;
  --skin-subtle: #5e5775;
  --skin-border: #d1c9e8;
  --skin-border-subtle: #e3ddf4;
  --skin-accent: #684fa3;
  --skin-accent-hover: #553e8c;
  --skin-accent-ink: #ffffff;
  --skin-danger: #b91c1c;
  --skin-success: #2e7d32;
  --skin-focus: #8e81aa;
  --cream: var(--skin-background);
  --ink: var(--skin-ink);
  --muted: var(--skin-subtle);
  --line: var(--skin-border);
  --gold: var(--skin-accent);
}

:root[data-skin="sage-garden"] {
  --skin-background: #f8fbf9;
  --skin-surface: #ffffff;
  --skin-surface-subtle: #edf5f0;
  --skin-muted: #dceadc;
  --skin-ink: #1b2a21;
  --skin-ink-strong: #101c15;
  --skin-subtle: #4a5e51;
  --skin-border: #d4e7db;
  --skin-border-subtle: #e3efe7;
  --skin-accent: #2d6a4f;
  --skin-accent-hover: #1b4332;
  --skin-accent-ink: #ffffff;
  --skin-danger: #a83d46;
  --skin-success: #2e7d32;
  --skin-focus: #758e7f;
  --cream: var(--skin-background);
  --ink: var(--skin-ink);
  --muted: var(--skin-subtle);
  --line: var(--skin-border);
  --gold: var(--skin-accent);
}

:root[data-skin="midnight-library"] {
  color-scheme: dark;
  --skin-input-surface: var(--skin-surface-subtle);
  --skin-input-border: #7785a6;
  --skin-background: #131622;
  --skin-surface: #1e2334;
  --skin-surface-subtle: #262d42;
  --skin-muted: #2c344d;
  --skin-ink: #f3eff8;
  --skin-ink-strong: #ffffff;
  --skin-subtle: #b4b8cb;
  --skin-border: #3a4360;
  --skin-border-subtle: #293046;
  --skin-accent: #d8ab74;
  --skin-accent-hover: #e8bf8b;
  --skin-accent-ink: #141722;
  --skin-danger: #f87171;
  --skin-success: #4ade80;
  --skin-focus: #788097;
  --cream: var(--skin-background);
  --ink: var(--skin-ink);
  --muted: var(--skin-subtle);
  --line: var(--skin-border);
  --gold: var(--skin-accent);
}

html, body {
  background: var(--skin-background);
  color: var(--skin-ink);
}

:where(input:not([type=checkbox],[type=radio]), textarea, select) {
  background: var(--skin-input-surface) !important;
  color: var(--skin-ink) !important;
  border-color: var(--skin-input-border) !important;
}

/* Primary CTA Button System */
:where(.primary, .button.primary) {
  background: var(--skin-accent) !important;
  color: var(--skin-accent-ink) !important;
  border-color: var(--skin-accent) !important;
  transition: filter 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

:where(.primary, .button.primary):not(:disabled):hover {
  filter: brightness(1.08);
}

:where(.primary, .button.primary):disabled,
:where(.primary, .button.primary)[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed !important;
  filter: grayscale(0.3);
}

:where(.primary, .button.primary)[aria-busy="true"] {
  opacity: 0.75;
  pointer-events: none;
}

/* Secondary Button System */
:where(.secondary, .button.secondary) {
  color: var(--skin-ink) !important;
  border-color: var(--skin-border) !important;
  background: var(--skin-surface) !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

:where(.secondary, .button.secondary):not(:disabled):hover {
  background: var(--skin-surface-subtle) !important;
}

:where(.secondary, .button.secondary):disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
}

:focus-visible {
  outline-color:var(--skin-focus)!important;
  outline-width: 2px !important;
  outline-offset: 3px;
}

/* Calculation disclosures keep native focus and keyboard operation. */
.reading-common-basis>summary{border-radius:4px}
.reading-common-basis>summary:focus-visible{outline:2px solid var(--skin-focus);outline-offset:4px}
.reading-common-basis>summary:focus:not(:focus-visible){outline-style:none}

.error, [role="alert"] {
  color: var(--skin-danger);
  border-color: color-mix(in srgb, var(--skin-danger) 35%, transparent);
  background: color-mix(in srgb, var(--skin-danger) 10%, var(--skin-surface));
}

body > header {
  background: color-mix(in srgb, var(--skin-surface) 90%, transparent) !important;
  border-color: var(--skin-border) !important;
}

.site-navigation {
  background: var(--skin-surface) !important;
  border-color: var(--skin-border) !important;
}

/* Midnight Library Dark Theme Overrides for High Legibility & Surface Contrast */
:root[data-skin="midnight-library"] body[data-site-shell] > main {
  background-color: var(--skin-background) !important;
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.45);
}

:root[data-skin="midnight-library"] :where(
  .couple-sheet-panel,
  .couple-sheet-card .couple-birth,
  .couple-buybox,
  #theme-buybox,
  .annual-sample-bridge,
  .shop-card,
  article,
  [id$="-result"] article,
  .order-sheet-card,
  .profile-card,
  .account-card,
  .myshelf-book,
  .birth-preview,
  .site-footer,
  .order-price-card
) {
  background: var(--skin-surface) !important;
  color: var(--skin-ink) !important;
  border-color: var(--skin-border) !important;
}

:root[data-skin="midnight-library"] :where(
  .annual-sample-bridge h3,
  .couple-sheet-card label,
  .couple-sheet-card [id$="-result"] h3,
  .annual-price-val,
  .theme-sheet #theme-buybox .annual-price-val,
  .couple-buybox .annual-price-val
) {
  color: var(--skin-ink-strong) !important;
}

:root[data-skin="midnight-library"] :where(
  .annual-sample-bridge p,
  .couple-sheet-card [id$="-result"] p,
  .couple-sheet-card .note,
  .annual-price-sub,
  .price-original,
  .who-hint
) {
  color: var(--skin-subtle) !important;
}

:root[data-skin="midnight-library"] .annual-sample-bridge .annual-cta-btn {
  background: var(--skin-surface-subtle) !important;
  color: var(--skin-ink) !important;
  border-color: var(--skin-border) !important;
}

:root[data-skin="midnight-library"] .annual-sample-bridge .annual-cta-btn span {
  color: var(--skin-ink) !important;
}

:root[data-skin="midnight-library"] .couple-sheet-panel .secondary.button {
  background: var(--skin-surface-subtle) !important;
  color: var(--skin-ink) !important;
  border-color: var(--skin-border) !important;
}

/* Preserve Kakao Login Brand Consistency across all skins */
:where(.kakao, .kakao-share, .kakao-login, #together-form > #create-or-join.kakao-login) {
  background: #fee500 !important;
  color: #191919 !important;
  border-color: #fee500 !important;
}

:where(.kakao, .kakao-share, .kakao-login):not(:disabled):hover {
  background: #f2da00 !important;
  border-color: #f2da00 !important;
  color: #191919 !important;
}

/* Shared reading surface: personal first chapter and purchased prose */
:root {
  --reading-font-size: 16.5px;
  --reading-line-height: 1.85;
  --reading-paragraph-gap: 1.25em;
  --reading-card-radius: 20px;
  --reading-card-padding: 24px;
  --reading-card-width: 586px;
  --reading-card-background: var(--skin-surface);
  --reading-card-border: var(--skin-border);
  --reading-card-ink: var(--skin-ink);
  --site-footer-gap: 48px;
}

/* Common Layout Padding & Safe Area Boundaries */
body[data-site-shell] > main {
  padding-block-end: calc(var(--site-footer-gap) + env(safe-area-inset-bottom, 0px));
}

body[data-site-navigation] .site-footer {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

body[data-site-navigation]:not(:has(.site-footer)) > main {
  padding-block-end: calc(96px + env(safe-area-inset-bottom, 0px));
}

#annual-entry-result,
.toon-book .toon-copy:is(.toon-example,.toon-pause,.toon-topics,.toon-boundary) {
  box-sizing: border-box;
  max-width: var(--reading-card-width);
  margin-inline: auto;
  padding: var(--reading-card-padding) !important;
  background: var(--reading-card-background) !important;
  color: var(--reading-card-ink) !important;
  border: 1px solid var(--reading-card-border) !important;
  border-radius: var(--reading-card-radius);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--skin-ink) 5%, transparent);
  font-size: var(--reading-font-size) !important;
  line-height: var(--reading-line-height) !important;
}

#annual-entry-result p,
.toon-book .toon-copy p {
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  margin-block: 0 var(--reading-paragraph-gap) !important;
  overflow-wrap: anywhere;
}

#annual-entry-result h3,
#annual-entry-result h4,
.toon-book .toon-copy h3 {
  color: var(--reading-card-ink) !important;
}

#annual-entry-result p:last-child,
.toon-book .toon-copy p:last-child {
  margin-block-end: 0 !important;
}

/* Account Skin Settings Section (Relocated from global footer) */
.account-skin-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--skin-surface);
  border: 1px solid var(--skin-border);
  border-radius: 16px;
  text-align: left;
}

.account-skin-section h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--skin-ink-strong);
}

.account-skin-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--skin-subtle);
  margin: 0 0 16px;
}

.skin-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skin-picker-select {
  flex: 1;
  max-width: 220px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--skin-border);
  border-radius: 10px;
  background: var(--skin-surface);
  color: var(--skin-ink);
  font-size: 14.5px;
  font-weight: 600;
}

.skin-status-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--skin-subtle);
  margin-top: 10px;
}

@media(max-width: 600px) {
  :root {
    --reading-card-padding: 20px;
  }
  .account-skin-section {
    padding: 16px 14px;
  }
  .skin-picker-row {
    flex-direction: column;
    align-items: stretch;
  }
  .skin-picker-select {
    max-width: 100%;
  }
}


/* Account skin chooser: one canonical select, themed accessible dialog. */
.skin-picker-row .skin-picker-select{flex:none;width:100%;max-width:none;min-height:56px;height:56px;font-size:16px}
.skin-picker-row .skin-picker-select[hidden]{display:none!important}
.skin-picker-trigger{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:56px;padding:14px 16px;border:1px solid var(--skin-border);border-radius:12px;background:var(--skin-surface);color:var(--skin-ink);font:inherit;text-align:left;cursor:pointer}
.skin-picker-trigger>span:first-child{flex:1;min-width:0;font-weight:650}
.skin-picker-trigger .skin-picker-hint{font-size:13px;color:var(--skin-subtle)}
.skin-picker-trigger:disabled{opacity:.55;cursor:wait}
.skin-choice-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-width:none;max-height:85dvh;margin:auto;padding:20px;border:1px solid var(--skin-border);border-radius:20px;background:var(--skin-surface);color:var(--skin-ink);overflow:auto;overscroll-behavior:contain}
.skin-choice-dialog::backdrop{background:rgb(0 0 0 / .45)}
.skin-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.skin-dialog-heading h2{margin:0;font-size:20px;color:var(--skin-ink-strong)}
.skin-dialog-close{min-height:44px;min-width:44px;padding:8px;border:0;border-radius:10px;background:var(--skin-surface-subtle);color:var(--skin-ink);font:inherit;cursor:pointer}
.skin-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0;padding:0;margin:0 0 20px;min-width:0}
.skin-choice-card{position:relative;display:block;min-width:0;margin:0;cursor:pointer}
.skin-choice-card input{position:absolute;width:1px;height:1px;opacity:0}
.skin-choice-body{position:relative;display:flex;flex-direction:column;gap:10px;box-sizing:border-box;min-height:120px;padding:12px;border:2px solid var(--skin-border);border-radius:14px;background:var(--skin-surface);color:var(--skin-ink);font-size:14px;font-weight:600}
.skin-choice-preview{display:flex;flex-direction:column;gap:5px;min-height:44px;padding:10px;border-radius:8px;background:var(--preview-bg);border:1px solid var(--skin-border)}
.skin-choice-preview i{display:block;height:4px;width:65%;border-radius:2px;background:var(--preview-accent)}
.skin-choice-preview i:nth-child(2){width:90%;opacity:.6}.skin-choice-preview i:nth-child(3){width:45%;opacity:.4}
.skin-choice-check{position:absolute;right:8px;top:8px;display:none;width:22px;height:22px;box-sizing:border-box;flex-shrink:0;place-items:center;padding:0;line-height:1;border-radius:50%;background:var(--skin-accent);color:var(--skin-accent-ink)}
.skin-choice-card input:checked+.skin-choice-body{border-color:var(--skin-accent)}
.skin-choice-card input:checked+.skin-choice-body .skin-choice-check{display:grid}
.skin-choice-card input:focus-visible+.skin-choice-body{outline:2px solid var(--skin-focus);outline-offset:3px}
.skin-dialog-apply{box-sizing:border-box;width:100%;min-height:48px;border:0;border-radius:12px;background:var(--skin-accent);color:var(--skin-accent-ink);font:inherit;font-weight:700;cursor:pointer}
.skin-visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){.skin-choice-dialog{width:100%;max-height:85dvh;margin:auto 0 0;border-radius:20px 20px 0 0;padding:20px 16px calc(20px + env(safe-area-inset-bottom,0px))}}

/* Inputs have their own surface so dark cards remain distinguishable. */
:where(input:not([type=checkbox],[type=radio]),textarea,select)::placeholder{color:var(--skin-subtle);opacity:1}
:where(input:not([type=checkbox],[type=radio]),textarea,select):focus-visible{outline:2px solid var(--skin-focus);outline-offset:2px}
:where(input,textarea,select)[aria-invalid="true"]{border-color:var(--skin-danger)!important}
:where(input:not([type=checkbox],[type=radio]),textarea,select):disabled{background:var(--skin-muted)!important;color:var(--skin-subtle)!important;opacity:1;cursor:not-allowed}
:root:not([data-skin="midnight-library"]){color-scheme:light}
/* Product aliases follow the selected skin, including nested CTA labels. */
body[data-site-shell] :is(.shop-annual-detail,.shop-traditional-detail,.shop-couple-detail,.account-main,.together-page){--annual-ink:var(--skin-ink);--annual-muted:var(--skin-subtle);--annual-sage:var(--skin-accent);--annual-emerald:var(--skin-accent);--annual-sage-wash:var(--skin-background);--annual-celadon-soft:var(--skin-surface-subtle);--annual-border:var(--skin-border);--theme-primary:var(--skin-accent);--theme-primary-hover:var(--skin-accent-hover);--theme-soft:var(--skin-surface-subtle);--theme-wash:var(--skin-background);--theme-border:var(--skin-border);--theme-line:var(--skin-border-subtle);--theme-accent-text:var(--skin-accent);--theme-muted:var(--skin-subtle)}
body[data-site-shell] :is(.annual-buy-btn,.annual-cta-btn):not(.secondary){background:var(--skin-accent);color:var(--skin-accent-ink);border-color:var(--skin-accent)}
body[data-site-shell] :is(.annual-buy-btn,.annual-cta-btn):not(.secondary) :is(span,strong){color:inherit}
body[data-site-shell] :is(.sample-scene-card,.sample-scene-card .scene-prose,.account-card,.owner-invite,.share-preview,.together-page .form-section,#together-history){background:var(--skin-surface);color:var(--skin-ink);border-color:var(--skin-border)}
body[data-site-shell] .sample-scene-card :is(.scene-title,.scene-paragraphs p){color:var(--skin-ink)}
body[data-site-shell] .sample-scene-card .scene-caption{background:var(--skin-surface);color:var(--skin-ink);border-color:var(--skin-border)}
body[data-site-shell] .sample-scene-card .scene-speaker-role{color:var(--skin-subtle)}

body[data-site-shell] :is(#entry-title,#together-title,.birth-time-title){color:var(--skin-ink)}
body[data-site-shell] :is(.birth-time-unknown,.birth-time-help){color:var(--skin-subtle)}
body[data-site-shell] .birth-time-period button{background:var(--skin-input-surface);color:var(--skin-ink);border-color:var(--skin-input-border)}
body[data-site-shell] .birth-time-period button.is-selected{background:var(--skin-accent);color:var(--skin-accent-ink);border-color:var(--skin-accent)}
body[data-site-shell] :is(.together-page,#together-form){--theme-primary:var(--skin-accent);--theme-accent-text:var(--skin-accent)}

body[data-site-shell] .fortune-preview.fantasy-map{color:var(--skin-ink);border-color:var(--skin-border)}
body[data-site-shell] .fortune-preview.fantasy-map:not(:where(.shop-wunchin>.constellation-preview)){background:var(--skin-surface)}

body[data-site-shell] :is(.annual-section-head h2,.traditional-section-head h2,.shop-section h2,.shop-section h3,.plan-card h3){color:var(--skin-ink)}
body[data-site-shell] .annual-buy-btn:is(:hover,:focus-visible){background:var(--skin-accent-hover);color:var(--skin-accent-ink)}
body[data-site-shell] .annual-hero .annual-buy-btn{background:var(--skin-accent);color:var(--skin-accent-ink)}
body[data-site-shell] .annual-hero .annual-buy-btn span{color:inherit}
body[data-site-shell] .site-back-link{color:var(--skin-ink)}

body[data-site-shell] .shop-annual-detail{--theme-sub:var(--skin-accent-hover)}
body[data-site-shell] .shop-annual-detail .annual-cta-btn:not(.annual-preview-btn):not(.secondary),body[data-site-shell] .shop-annual-detail .annual-cta-btn:not(.annual-preview-btn):not(.secondary) span{color:var(--skin-accent-ink)!important}
body[data-site-shell] .toon-book{--toon-ink:var(--skin-ink);--toon-muted:var(--skin-subtle);--toon-paper:var(--skin-surface);--toon-line:var(--skin-border);--toon-accent:var(--skin-accent)}
body[data-site-shell] .toon-book{--toon-sage:var(--skin-accent);--toon-emerald:var(--skin-accent);--toon-sage-wash:var(--skin-background);--toon-celadon-soft:var(--skin-surface-subtle);--toon-border:var(--skin-border)}
body[data-site-shell] .toon-book :is(h1,h2,h3,.toon-next,.toon-caption,.toon-bubble){color:var(--skin-ink)}
body[data-site-shell] .toon-book :is(.toon-caption,.toon-bubble){background:var(--skin-surface);border-color:var(--skin-border)}
body[data-site-shell]{color:var(--skin-ink);background-color:var(--skin-background);--messenger-ink:var(--skin-ink);--messenger-muted:var(--skin-subtle);--messenger-paper:var(--skin-surface)}
body[data-site-shell] .toon-book nav a{color:var(--skin-ink);background:var(--skin-surface);border-color:var(--skin-border)}

body[data-site-shell] :is(.quick-badge,.shop-journal,.shop-daily-journal,.shop-free-details .topic-card){background:var(--skin-surface-subtle);color:var(--skin-ink);border-color:var(--skin-border)}
body[data-site-shell] .traditional-reader{--traditional-ink:var(--skin-ink);--traditional-muted:var(--skin-subtle)}
body[data-site-shell] .shop-traditional-detail{--trad-ink:var(--skin-ink);--trad-muted:var(--skin-subtle);--trad-border:var(--skin-border);--trad-sage:var(--skin-accent);--trad-wash:var(--skin-surface-subtle);--trad-sage-wash:var(--skin-background);--trad-celadon-soft:var(--skin-surface-subtle);--trad-emerald:var(--skin-accent);color:var(--skin-ink)}
body[data-site-shell] .traditional-reader{--book-ink:var(--skin-ink);--book-line:var(--skin-border);--book-sage:var(--skin-accent);--book-sage-wash:var(--skin-surface-subtle);--book-sage-border:var(--skin-border)}
body[data-site-shell] .traditional-cta-btn{background:var(--skin-accent);color:var(--skin-accent-ink)}
body[data-site-shell] .traditional-cta-btn span{color:inherit}
body[data-site-shell] .fortune-edge-label{background:var(--skin-surface);color:var(--skin-accent);border-color:var(--skin-border)}
body[data-site-shell] .measurement-status{background:var(--skin-surface-subtle);color:var(--skin-subtle)}
body[data-site-shell] .traditional-reader :is(.pillar-col.is-day-pillar,.traditional-strength,.traditional-stage.is-current,.traditional-structure,.structure-relation,.quality-contrast-card){background:var(--skin-surface-subtle);color:var(--skin-ink);border-color:var(--skin-border);--elem-color:var(--skin-accent);--elem-bg:var(--skin-muted);--elem-border:var(--skin-border)}
body[data-site-shell] .traditional-reader .pillar-col.is-day-pillar{box-shadow:inset 0 0 0 2px var(--skin-accent)}
body[data-site-shell] .annual-sample-bridge .traditional-cta-btn{color:var(--skin-accent-ink)!important;background:var(--skin-accent)!important}
body[data-site-shell] .traditional-cta-btn.traditional-buy-btn{background:var(--skin-accent)!important;color:var(--skin-accent-ink)!important}
body[data-site-shell] :is(input,select,textarea):user-invalid{border-color:var(--skin-danger)!important}
body[data-site-shell] .site-navigation a{color:var(--skin-subtle)}
body[data-site-shell] .site-navigation a[aria-current="page"]{color:var(--skin-accent)}

/* Finale uses an intentionally dark product backdrop in every skin. */
body[data-site-shell] .shop-detail-finale > h3{color:#ffffff}

/* Preserve the profile card's metallic finish without a light-theme glare. */
:root[data-skin="midnight-library"] .account-main .profile-card {
  background:linear-gradient(135deg,var(--skin-surface) 0%,var(--skin-surface-subtle) 38%,var(--skin-surface) 65%,var(--skin-surface) 100%)!important;
  border-color:var(--skin-border)!important;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .08),inset 0 -1px 0 rgb(0 0 0 / .18),0 10px 28px rgb(0 0 0 / .20);
}
:root[data-skin="midnight-library"] .account-main .profile-card::before {
  background:linear-gradient(100deg,transparent,rgb(255 255 255 / .07),transparent);
}

/* Decorative guide boxes use surface separation; controls keep their borders. */
:root[data-skin="midnight-library"] body[data-site-shell] .shop-home :is(.shop-wunchin,.shop-how,.shop-how li,.wunchin-steps li,.shop-reassurance,.daily-home-banner){
  border-color:var(--skin-border-subtle);
  box-shadow:none;
}

/* Guide relationship preview uses the chosen skin while retaining its orbit artwork. */
body[data-site-shell] .shop-wunchin .fortune-orbit-me{background:var(--skin-accent)!important;color:var(--skin-accent-ink)!important}
body[data-site-shell] .shop-wunchin .fortune-orbit-me :is(strong,svg){color:inherit!important}
body[data-site-shell] .shop-wunchin .fortune-orbit-node>span{background:var(--skin-surface)!important;color:var(--skin-ink)!important;border-color:var(--skin-border)!important}
body[data-site-shell] .shop-wunchin .fortune-orbit-node>span>strong{color:inherit!important}
body[data-site-shell] .shop-wunchin .fortune-orbit-node:is(:hover,:focus-visible,[aria-pressed=true])>span{background:var(--skin-accent)!important;color:var(--skin-accent-ink)!important}
/* Only the authored seven-pixel panel divider is covered; portraits are unchanged. */
:root[data-skin="midnight-library"] body[data-site-shell] .sample-scene-card[data-scene="choices"] .scene-media::after{content:"";position:absolute;inset-block:0;left:49.583333%;width:.729167%;background:var(--skin-background);pointer-events:none;z-index:1}
body[data-site-shell] .shop-annual-detail .annual-sample-bridge{background:linear-gradient(180deg,var(--skin-surface),var(--skin-background));border-color:var(--skin-border)}

body[data-site-shell] .shop-wunchin .wunchin-steps b{background:var(--skin-accent);color:var(--skin-accent-ink)}
body[data-site-shell] .shop-wunchin .fortune-return{background:var(--skin-surface-subtle);border-color:var(--skin-border)}
body[data-site-shell] .shop-wunchin .fortune-return>svg{border-color:var(--skin-border)}
body[data-site-shell] .shop-wunchin .fortune-example-choices button[aria-pressed=true]{background:var(--skin-accent);color:var(--skin-accent-ink)}
body[data-site-shell] .shop-wunchin .fortune-quote{border-left-color:var(--skin-border-subtle)}
body[data-site-shell] .shop-wunchin .fortune-example-choices button:focus-visible{outline-color:var(--skin-focus)}

/* Reading landing targets receive focus for assistive technology, not a panel-sized control ring.
   Keep normal keyboard indicators on links, buttons, fields, summaries and modal controls. */
body[data-site-shell] :is(#premium-document,[data-reading-anchor][tabindex="-1"],#theme-sheet-result,#couple-sheet-result,#annual-entry-result,#season-result)[tabindex="-1"]:focus {
  outline-style:none;
}
body[data-site-shell] :is(#premium-document,[data-reading-anchor][tabindex="-1"],#theme-sheet-result,#couple-sheet-result,#annual-entry-result,#season-result)[tabindex="-1"]:focus-visible > :is(h1,h2,h3):first-of-type {
  text-decoration-line:underline;
  text-decoration-color:var(--skin-focus);
  text-decoration-thickness:1px;
  text-underline-offset:.25em;
}

/* One focus treatment across consumer controls; errors keep their semantic border.
   Pointer mode removes decoration only, including stale native :focus-visible. */
:is(body[data-site-shell],body.season-reader) :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):not([tabindex="-1"]):focus-visible {
  outline:var(--skin-focus-width) solid var(--skin-focus)!important;
  outline-offset:var(--skin-focus-offset);
  box-shadow:none!important;
}
:is(body[data-site-shell],body.season-reader) :is(input,select,textarea):focus:not([aria-invalid="true"],.is-invalid) {
  border-color:var(--skin-input-border)!important;
  box-shadow:none!important;
}
:root[data-focus-input="pointer"] :is(body[data-site-shell],body.season-reader) :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus {
  outline-style:none!important;
  box-shadow:none!important;
}
:root[data-focus-input="pointer"] :is(.reading-common-basis>summary,.skin-choice-card input:focus+.skin-choice-body,.guide-radio:has(input:focus),.journal-chip:has(input:focus),.journal-mood-choice input:focus+.journal-chip-label) {
  outline-style:none!important;
  box-shadow:none!important;
}
:is(body[data-site-shell],body.season-reader) :is(dialog,[role="dialog"]):focus {outline:none;}
/* The visible selection wrapper carries the single keyboard ring. */
:is(.guide-radio:has(input:focus-visible),.journal-chip:has(input:focus-visible),.skin-choice-card input:focus-visible+.skin-choice-body,.journal-mood-choice input:focus-visible+.journal-chip-label) {
  outline:var(--skin-focus-width) solid var(--skin-focus);
  outline-offset:var(--skin-focus-offset);
}
/* Product CTA specificity otherwise retains its fixed pink/green glow. */
:root[data-skin] body[data-site-shell] .shop-annual-detail[class*="shop-"] .annual-cta-btn:focus {
  box-shadow:none!important;
}

/* Final consumer QA: calm links and a single, flowing annual reader. */
body[data-site-shell] .site-footer,body[data-site-shell] .site-footer a{color:var(--skin-subtle)}
body[data-site-shell] .site-footer a{text-decoration:underline;text-underline-offset:.2em}
body[data-site-shell] .site-footer a:hover{color:var(--skin-ink)}
body[data-site-shell] .site-footer a:focus-visible{outline:2px solid var(--skin-focus);outline-offset:3px}
body[data-site-shell]:has(.shop-detail) .measurement-settings{margin-inline:auto;width:calc(100% - 32px);max-width:var(--site-content-width,540px);box-sizing:border-box}
body[data-site-shell] :is(.annual-sample-viewer,.annual-reading-book){background:transparent!important;background-image:none!important;border:0!important;border-radius:0;box-shadow:none!important;overflow:visible}
body[data-site-shell] .annual-reading-book .toon-book-title{display:block;position:static;width:100%;max-width:none;box-sizing:border-box;text-align:center;background:transparent;border:0;padding:24px 16px}
body[data-site-shell] .annual-reading-book .toon-book-title> :is(h1,h2){display:block;width:100%;margin-inline:auto;text-align:center}
body[data-site-shell] .annual-reading-book .toon-book-title>nav{justify-content:center;width:100%}
body[data-site-shell] .annual-reading-book>.toon-chapter{padding-inline:0;background:transparent;border:0;box-shadow:none}
body[data-site-shell] .annual-reading-book .toon-heading{background:transparent;border:0;box-shadow:none;padding-inline:16px}
body[data-site-shell] .annual-reading-book .toon-copy{background:transparent!important;border:0!important;box-shadow:none!important;padding-inline:16px!important}
body[data-site-shell] .annual-reading-book .toon-book-title .annual-sample-contents{list-style:none;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px;font-size:15px;line-height:1.8}
body[data-site-shell] .shop-owned-access{display:block;flex-basis:100%;width:100%;font-size:14px;line-height:1.7;color:var(--skin-accent);text-decoration:underline;text-underline-offset:3px}

/* /guide preview only: preserve full hit areas while shrinking the visible nodes. */
body[data-site-shell] .shop-home .shop-wunchin button.fortune-orbit-node{min-height:64px!important;justify-content:center}
body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-node>span{
 width:51.2px;height:51.2px;border-radius:50%;
}
body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-node>span>strong{font-size:12.8px;opacity:1}
/* Preserve existing skin colors for selected, hover and keyboard-focus states. */
:root:not([data-skin="midnight-library"]) body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-node:not([aria-pressed=true]):not(:hover):not(:focus-visible)>span{
 background:rgba(72,67,77,.7)!important;color:#fff!important;
}
body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me{
 width:57.6px;height:57.6px;min-height:57.6px;
}
body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me strong{font-size:15.2px;opacity:1}
body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me svg{width:14.4px;height:14.4px}
@media(max-width:600px){
 body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me{width:51.2px;height:51.2px;min-height:51.2px}
 body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me strong{font-size:13.6px}
 body[data-site-shell] .shop-home .shop-wunchin .fortune-orbit-me svg{width:12.8px;height:12.8px}
}

/* Actual standalone and embedded order-sheet DOM, dark skin only. */
:root[data-skin="midnight-library"] :is(.order-sheet-panel,.order-sheet-step){background:var(--skin-surface);color:var(--skin-ink);border-color:var(--skin-border)}
:root[data-skin="midnight-library"] .order-sheet-product-card{background:var(--skin-surface-subtle);border-color:var(--skin-border)}
:root[data-skin="midnight-library"] :is(.order-sheet-header h2,.order-sheet-header h3,.order-sheet-step-title,.order-sheet-product-title,.order-sheet-price-val,.order-sheet-consent){color:var(--skin-ink)}
:root[data-skin="midnight-library"] :is(.order-sheet-spec,.order-sheet-note,.order-sheet-details,.order-sheet-status,.order-sheet-price-orig){color:var(--skin-subtle)}
:root[data-skin="midnight-library"] :is(.order-sheet-fallback a,.order-sheet-details a,.order-sheet-consent a){color:var(--skin-accent)}
:root[data-skin="midnight-library"] :is(.order-sheet-close,.order-sheet-back-btn){background:var(--skin-surface-subtle);color:var(--skin-ink);border-color:var(--skin-border)}
:root[data-skin="midnight-library"] .order-sheet-handle{background:var(--skin-border)}
:root[data-skin="midnight-library"] .order-sheet-pay-btn:disabled{background:var(--skin-muted)!important;color:var(--skin-subtle)!important;box-shadow:none}
