:root {
  --bg: #101412;
  --surface: #18201d;
  --surface-2: #222824;
  --surface-strong: #151b18;
  --text: #f4f0e8;
  --muted: #b6afa4;
  --line: #353a34;
  --gold: #d9b760;
  --rose: #d77c73;
  --teal: #64b6a5;
  --ink: #101412;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  background:
    linear-gradient(180deg, rgba(16, 20, 18, 0.92), rgba(16, 20, 18, 1)),
    repeating-linear-gradient(90deg, rgba(217, 183, 96, 0.05) 0 1px, transparent 1px 92px);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

body.standalone-locked .app-shell {
  display: none;
}

.standalone-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding:
    max(28px, env(safe-area-inset-top, 0))
    max(16px, env(safe-area-inset-right, 0))
    max(28px, env(safe-area-inset-bottom, 0))
    max(16px, env(safe-area-inset-left, 0));
}

.standalone-auth[hidden] {
  display: none;
}

.standalone-auth-panel {
  width: min(100%, 440px);
  padding: 26px;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(34, 40, 36, 0.96), rgba(16, 20, 18, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(100, 182, 165, 0.18), transparent 38%);
  box-shadow: var(--shadow);
}

.standalone-auth-copy {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.64);
}

.auth-segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-segmented button.active {
  color: var(--ink);
  background: var(--gold);
}

.standalone-auth-form {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.standalone-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.standalone-auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 20, 18, 0.76);
}

.standalone-auth-form input:focus {
  outline: 2px solid rgba(100, 182, 165, 0.42);
  border-color: rgba(100, 182, 165, 0.78);
}

.standalone-auth-form[data-mode="login"] .standalone-register-only {
  display: none;
}

.standalone-auth-help,
.standalone-auth-security,
.standalone-auth-status,
.standalone-auth-error {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.standalone-auth-help {
  color: var(--muted);
}

.standalone-auth-security {
  padding: 10px 12px;
  border: 1px solid rgba(100, 182, 165, 0.24);
  border-radius: 8px;
  color: rgba(244, 240, 232, 0.82);
  background: rgba(100, 182, 165, 0.08);
}

.standalone-auth-status {
  min-height: 1.3em;
  color: var(--teal);
}

.standalone-auth-status[data-tone="working"] {
  color: var(--gold);
}

.standalone-auth-error {
  min-height: 1.3em;
  color: var(--rose);
}

.standalone-telegram-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--teal);
  text-decoration: none;
}

.standalone-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 240, 232, 0.12);
}

.standalone-legal-links a {
  color: rgba(244, 240, 232, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.standalone-legal-links a:hover,
.standalone-legal-links a:focus-visible {
  color: var(--teal);
}

.standalone-guest-button {
  width: 100%;
  margin-top: 4px;
}

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(18px, env(safe-area-inset-top, 0))
    max(14px, env(safe-area-inset-right, 0))
    max(28px, env(safe-area-inset-bottom, 0))
    max(14px, env(safe-area-inset-left, 0));
}

.topbar,
.section-heading,
.action-row,
.tabs {
  display: flex;
  align-items: center;
}

.topbar,
.section-heading {
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.topbar-logout {
  min-height: 42px;
  padding-inline: 12px;
}

.eyebrow,
.muted,
.status-pill {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(34, 40, 36, 0.72);
}

.status-pill.online {
  color: var(--teal);
  border-color: rgba(100, 182, 165, 0.6);
}

.status-pill.offline {
  color: var(--rose);
  border-color: rgba(215, 124, 115, 0.55);
}

.account-pill {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 3px 8px;
  border: 1px solid rgba(100, 182, 165, 0.36);
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.82);
  background: rgba(100, 182, 165, 0.08);
  font-size: 0.82rem;
}

.account-pill[hidden] {
  display: none;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 1.7rem;
  line-height: 1.12;
}

h2 {
  margin: 3px 0 0;
  font-size: 1.25rem;
}

h3 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button,
.product-button,
.reader-button,
.settings-link {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--surface);
  color: var(--gold);
  border-color: var(--line);
  font-size: 1.1rem;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  gap: 8px;
  margin: 18px 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 32, 29, 0.94);
  backdrop-filter: blur(12px);
}

.tab {
  min-width: 0;
  height: 42px;
  flex: 1;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.tab span {
  display: inline-block;
  margin-right: 4px;
  color: var(--gold);
}

.tab.active {
  background: var(--gold);
  color: var(--ink);
}

.tab.active span {
  color: var(--ink);
}

.tabs-more {
  position: relative;
  flex: 0 0 112px;
}

.tabs-more summary {
  display: grid;
  height: 42px;
  grid-template-columns: auto auto;
  gap: 4px;
  place-content: center;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.tabs-more summary::-webkit-details-marker {
  display: none;
}

.tabs-more summary span:first-child {
  color: var(--gold);
}

.tabs-more.active summary,
.tabs-more[open] summary {
  border-color: rgba(217, 183, 96, 0.3);
  background: rgba(217, 183, 96, 0.08);
  color: var(--text);
}

.tabs-more-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  display: grid;
  width: min(220px, calc(100vw - 32px));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(217, 183, 96, 0.26);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
}

.tabs-more-panel .tab {
  display: flex;
  align-items: center;
  width: 100%;
  flex: none;
  justify-content: flex-start;
  padding-inline: 10px;
  text-align: left;
}

.tab[data-priority="core"]:not(.active) {
  color: var(--text);
  border-color: rgba(217, 183, 96, 0.28);
  background: rgba(217, 183, 96, 0.08);
}

.tab[data-priority="play"],
.tab[data-priority="meta"] {
  opacity: 0.84;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

[hidden] {
  display: none !important;
}

.daily-oracle {
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
}

.daily-date-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 4px 1px 8px;
}

.daily-date-item {
  display: grid;
  min-width: 48px;
  gap: 5px;
  justify-items: center;
  color: rgba(244, 240, 232, 0.46);
  font-weight: 700;
}

.daily-date-item span:first-child {
  font-size: 0.78rem;
}

.daily-date-item span:last-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.08);
}

.daily-date-item.active {
  color: var(--text);
}

.daily-date-item.active span:last-child {
  border: 1px solid rgba(244, 240, 232, 0.5);
  background: rgba(244, 240, 232, 0.14);
  box-shadow: 0 0 0 8px rgba(244, 240, 232, 0.06);
}

.daily-date-item.checked span:last-child {
  color: var(--ink);
  background: rgba(217, 183, 96, 0.82);
}

.daily-date-item.active.checked span:last-child {
  border-color: rgba(255, 250, 241, 0.72);
  box-shadow:
    0 0 0 8px rgba(244, 240, 232, 0.08),
    0 0 18px rgba(217, 183, 96, 0.28);
}

.tarot-focus-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(33, 39, 35, 0.94), rgba(13, 17, 16, 0.92)),
    radial-gradient(circle at 12% 0, rgba(217, 183, 96, 0.18), transparent 34%);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
}

.tarot-focus-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.tarot-focus-heading h2 {
  margin: 3px 0 0;
  font-size: 1.34rem;
  line-height: 1.2;
}

.tarot-focus-heading p:last-child {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  line-height: 1.55;
}

.tarot-focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tarot-focus-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-height: 70px;
  padding: 11px;
  border: 1px solid rgba(244, 240, 232, 0.14);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.62);
}

.tarot-focus-action.primary {
  border-color: rgba(217, 183, 96, 0.48);
  background: rgba(217, 183, 96, 0.12);
}

.tarot-focus-action.done {
  border-color: rgba(100, 182, 165, 0.5);
  background: rgba(100, 182, 165, 0.1);
}

.tarot-focus-action span {
  grid-row: span 2;
  color: var(--gold);
  font-weight: 900;
}

.tarot-focus-action strong,
.tarot-focus-action small {
  min-width: 0;
}

.tarot-focus-action small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.daily-loop-panel,
.onboarding-panel,
.npc-consult-panel,
.economy-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(217, 183, 96, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(34, 40, 36, 0.9), rgba(16, 20, 18, 0.88)),
    radial-gradient(circle at 100% 0, rgba(100, 182, 165, 0.12), transparent 36%);
}

.daily-loop-heading,
.onboarding-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.daily-loop-heading h2,
.onboarding-heading h3,
.economy-panel h3 {
  margin: 0;
  line-height: 1.25;
}

.daily-loop-heading > span {
  display: grid;
  min-width: 52px;
  min-height: 52px;
  place-items: center;
  border: 1px solid rgba(217, 183, 96, 0.42);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 900;
}

.daily-loop-panel > p,
.onboarding-panel > p,
.economy-panel p,
.npc-consult-copy p,
.npc-consult-copy small {
  margin: 0;
  color: rgba(244, 240, 232, 0.68);
  line-height: 1.55;
}

.daily-loop-steps,
.onboarding-task-list,
.economy-rule-list {
  display: grid;
  gap: 8px;
}

.daily-loop-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.daily-loop-step,
.onboarding-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.48);
}

.daily-loop-step.done,
.onboarding-task.done {
  border-color: rgba(100, 182, 165, 0.48);
  background: rgba(100, 182, 165, 0.1);
}

.daily-loop-step.optional,
.onboarding-task.optional {
  border-color: rgba(244, 240, 232, 0.09);
  color: rgba(244, 240, 232, 0.82);
  background: rgba(16, 20, 18, 0.34);
}

.daily-loop-step span,
.onboarding-task span {
  color: var(--gold);
  font-weight: 900;
}

.daily-loop-step strong,
.onboarding-task strong {
  line-height: 1.25;
}

.daily-loop-step em,
.onboarding-task small {
  grid-column: 2;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(217, 183, 96, 0.2);
  border-radius: 999px;
  color: rgba(217, 183, 96, 0.86);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.daily-loop-step small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.75rem;
}

.optional-flow {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(244, 240, 232, 0.08);
}

.optional-flow summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.optional-flow summary::marker {
  color: var(--gold);
}

.optional-flow p {
  margin: 0;
  color: rgba(244, 240, 232, 0.62);
  line-height: 1.5;
}

.starter-side-lock {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(217, 183, 96, 0.32);
  border-radius: 8px;
  background: rgba(217, 183, 96, 0.06);
}

.starter-side-lock strong {
  color: var(--gold);
  font-size: 0.86rem;
}

.starter-side-lock p {
  margin: 0;
  color: rgba(244, 240, 232, 0.66);
  font-size: 0.82rem;
  line-height: 1.45;
}

.onboarding-panel[hidden] {
  display: none;
}

.onboarding-heading .secondary-button {
  min-width: 132px;
}

.onboarding-panel > small {
  color: var(--gold);
  font-weight: 900;
}

.economy-rule-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.economy-heading {
  display: grid;
  gap: 4px;
}

.economy-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.economy-resource-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.46);
}

.economy-resource-card.points {
  border-color: rgba(217, 183, 96, 0.3);
}

.economy-resource-card.stardust {
  border-color: rgba(100, 182, 165, 0.32);
}

.economy-resource-card.elements {
  border-color: rgba(244, 240, 232, 0.18);
}

.economy-resource-card span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.economy-resource-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.economy-resource-card p,
.economy-resource-card small {
  margin: 0;
  color: rgba(244, 240, 232, 0.68);
  line-height: 1.45;
}

.economy-resource-card small {
  color: rgba(217, 183, 96, 0.78);
  font-size: 0.76rem;
}

.economy-resource-card button {
  width: 100%;
  min-height: 36px;
}

.economy-flow {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(100, 182, 165, 0.2);
  border-radius: 8px;
  background: rgba(100, 182, 165, 0.06);
}

.economy-flow > strong {
  color: var(--text);
  font-size: 0.88rem;
}

.economy-flow > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.economy-flow button {
  min-height: 38px;
  padding: 8px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  color: rgba(244, 240, 232, 0.82);
  background: rgba(16, 20, 18, 0.42);
}

.economy-flow button:hover,
.economy-flow button:focus-visible {
  border-color: rgba(217, 183, 96, 0.6);
  color: var(--text);
}

.economy-rules .economy-rule-list {
  margin-top: 10px;
}

.economy-rule-list span {
  padding: 9px 10px;
  border: 1px solid rgba(100, 182, 165, 0.2);
  border-radius: 8px;
  color: rgba(244, 240, 232, 0.72);
  background: rgba(100, 182, 165, 0.06);
  line-height: 1.45;
}

.daily-ritual {
  display: grid;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% -12%, rgba(217, 183, 96, 0.18), transparent 40%),
    linear-gradient(145deg, rgba(100, 182, 165, 0.08), rgba(10, 13, 15, 0.58)),
    rgba(24, 32, 29, 0.9);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.daily-ritual h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
}

.daily-ritual p {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}

.daily-ritual-deck {
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  justify-self: center;
  padding: 10px 4px 2px;
}

.ritual-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 420 / 680;
  padding: 0;
  border: 1px solid rgba(217, 183, 96, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(217, 183, 96, 0.18), rgba(100, 182, 165, 0.1)),
    rgba(16, 20, 18, 0.92);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition:
    transform 320ms ease,
    opacity 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.ritual-card span {
  position: absolute;
  inset: 8px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 246, 212, 0.22) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, rgba(217, 183, 96, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(100, 182, 165, 0.18), rgba(215, 124, 115, 0.16)),
    var(--surface);
}

.ritual-card span::before,
.ritual-card span::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 999px;
}

.ritual-card span::before {
  inset: 16%;
}

.ritual-card span::after {
  inset: 28%;
  transform: rotate(45deg);
}

.ritual-card:nth-child(1) {
  transform: rotate(-10deg) translateY(22px);
}

.ritual-card:nth-child(2) {
  transform: rotate(-5deg) translateY(8px);
}

.ritual-card:nth-child(3) {
  transform: translateY(-8px);
}

.ritual-card:nth-child(4) {
  transform: rotate(5deg) translateY(8px);
}

.ritual-card:nth-child(5) {
  transform: rotate(10deg) translateY(22px);
}

.ritual-card:hover,
.ritual-card:focus-visible,
.ritual-card.selected {
  border-color: rgba(217, 183, 96, 0.9);
  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(217, 183, 96, 0.12);
}

.ritual-card.selected {
  transform: translateY(-18px) scale(1.04);
}

.daily-ritual.drawing .ritual-card:not(.selected) {
  opacity: 0.48;
  transform: scale(0.94);
}

.daily-ritual .primary-button {
  width: fit-content;
  min-width: 168px;
  justify-self: center;
}

.daily-draw-reveal {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: 520px;
  padding: 28px 18px;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(217, 183, 96, 0.22), transparent 38%),
    linear-gradient(145deg, rgba(215, 124, 115, 0.1), rgba(10, 13, 15, 0.62)),
    rgba(24, 32, 29, 0.92);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.daily-draw-reveal .daily-kicker {
  margin: 0;
  color: var(--gold);
}

.daily-reveal-card {
  position: relative;
  width: min(58vw, 220px);
  aspect-ratio: 420 / 680;
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.55);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.82);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.38),
    0 0 0 10px rgba(217, 183, 96, 0.07);
  animation: dailyRevealCard 880ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.daily-reveal-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.daily-draw-reveal h2 {
  max-width: 34rem;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.28;
}

.daily-draw-reveal p:last-child {
  margin: 0;
  color: var(--muted);
}

.daily-energy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 180px);
  gap: 18px;
  align-items: center;
  min-height: 220px;
  padding: 22px 8px 10px;
}

.daily-kicker {
  margin: 0 0 14px;
  color: var(--text);
  font-weight: 800;
}

.daily-score {
  display: flex;
  align-items: end;
  gap: 10px;
}

.daily-score strong {
  color: #fffaf1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.8rem;
  line-height: 0.88;
  text-shadow: 0 0 18px rgba(255, 116, 72, 0.42);
}

.daily-score span {
  margin-bottom: 0.72rem;
  color: rgba(244, 240, 232, 0.48);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.3rem;
}

.daily-stars {
  display: flex;
  gap: 4px;
  min-height: 24px;
  margin-top: 12px;
}

.daily-stars span {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: rgba(244, 240, 232, 0.22);
}

.daily-stars span.active {
  background: linear-gradient(135deg, #ff4b72, #ff8e5f);
  box-shadow: 0 0 14px rgba(255, 95, 86, 0.42);
}

.daily-reward-note {
  display: block;
  max-width: 320px;
  margin-top: 10px;
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.daily-moon {
  position: relative;
  display: grid;
  width: min(100%, 178px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 48%, rgba(255, 220, 142, 0.2) 0 35%, transparent 36%),
    radial-gradient(circle, rgba(217, 183, 96, 0.16), rgba(100, 182, 165, 0.04) 56%, transparent 58%);
  box-shadow: inset 0 0 0 1px rgba(217, 183, 96, 0.22);
}

.daily-moon::before,
.daily-moon::after {
  position: absolute;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #e7dd6a;
  box-shadow: 0 0 16px rgba(231, 221, 106, 0.84);
}

.daily-moon::before {
  top: 28%;
  right: 13%;
}

.daily-moon::after {
  bottom: 26%;
  left: 16%;
}

.daily-moon span {
  position: relative;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 38%, #fff0d1 0 9%, transparent 10%),
    radial-gradient(circle at 58% 64%, rgba(255, 255, 255, 0.32) 0 7%, transparent 8%),
    radial-gradient(circle at 38% 58%, #ef748d 0 0, #ffc46d 34%, #79403b 64%, #221513 100%);
  box-shadow:
    inset -34px 0 0 rgba(20, 17, 18, 0.78),
    0 0 28px rgba(255, 132, 93, 0.44);
}

.daily-feature-card,
.daily-question-card,
.daily-mini-panel,
.daily-overview-card,
.daily-section-card {
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 118, 76, 0.1), rgba(10, 13, 15, 0.56)),
    rgba(24, 32, 29, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.daily-feature-card {
  display: grid;
  grid-template-columns: minmax(138px, 170px) minmax(0, 1fr) 88px;
  gap: 20px;
  align-items: center;
  min-height: 248px;
  padding: 22px;
}

.daily-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 420 / 680;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(16, 20, 18, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.daily-card-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.daily-feature-card.revealed .daily-card-thumb {
  animation: cardReveal 420ms ease both;
}

.daily-card-sigil {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 245, 211, 0.58);
  border-radius: 50%;
  background: rgba(16, 20, 18, 0.76);
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
}

.daily-card-name-line {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.daily-feature-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.28;
}

.daily-feature-copy p {
  margin: 6px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.daily-card-progress {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.daily-card-progress::before {
  display: block;
  width: 46px;
  height: 46px;
  content: "";
  border-radius: 10px;
  background:
    linear-gradient(160deg, #ff6a57, #ffd083),
    var(--gold);
  box-shadow: inset 0 -18px 24px rgba(16, 20, 18, 0.28);
}

.daily-card-progress small {
  color: rgba(244, 240, 232, 0.52);
  font-size: 0.76rem;
  line-height: 1.35;
}

.daily-question-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 18px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.daily-question-card strong,
.daily-question-card small {
  display: block;
}

.daily-question-card strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.daily-question-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.daily-question-orb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%, #ffebbe 0 5%, transparent 7%),
    radial-gradient(circle at 50% 62%, #ff6f5f, #7d2c32 58%, #191817 60%);
  box-shadow: 0 18px 32px rgba(255, 111, 95, 0.25);
}

.daily-chevron {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.13);
  color: var(--text);
  font-size: 1.5rem;
}

.daily-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.daily-mini-panel {
  min-height: 148px;
  padding: 18px;
}

.daily-mini-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  vertical-align: middle;
}

.daily-mini-dot.calm {
  background: linear-gradient(135deg, #ffd85a, #65c7ae);
}

.daily-mini-dot.alert {
  background: linear-gradient(135deg, #ff6b67, #d9547b);
}

.daily-mini-panel p {
  display: inline-block;
  margin: 0 0 14px 8px;
  color: var(--muted);
  font-weight: 700;
}

.daily-mini-panel strong {
  display: block;
  color: var(--text);
  line-height: 1.72;
  white-space: pre-line;
}

.daily-overview-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.daily-medal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 38%, #fff6da, #ad7765 48%, #2b2725 100%);
  color: #131614;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.daily-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.daily-section-stack {
  display: grid;
  gap: 14px;
}

.daily-section-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.daily-section-card::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  content: "";
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 75, 114, 0.95), rgba(255, 210, 101, 0.88));
  filter: blur(0.2px);
  transform: rotate(45deg);
  opacity: 0.86;
}

.daily-section-card h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 1.28rem;
}

.daily-section-card h3::before {
  width: 4px;
  height: 28px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8d68, var(--gold));
}

.daily-section-card p {
  max-width: 42rem;
  margin: 0;
  color: rgba(244, 240, 232, 0.68);
  font-size: 1rem;
  line-height: 1.95;
  white-space: pre-line;
}

.section-note {
  max-width: 46rem;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.action-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.danger-button,
.product-button,
.reader-button,
.settings-link {
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
}

.primary-button {
  background: var(--gold);
  color: var(--ink);
}

.secondary-button {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.danger-button {
  border-color: rgba(215, 124, 115, 0.5);
  background: rgba(215, 124, 115, 0.12);
  color: #ffd9d3;
}

.progress-track {
  height: 10px;
  margin: 14px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

#deck-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--rose));
  transition: width 220ms ease;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.mini-card,
.achievement-item,
.product-card,
.workshop-recipe {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mini-card {
  display: grid;
  min-height: 282px;
  grid-template-rows: auto auto auto minmax(72px, 1fr) auto;
  justify-items: center;
  align-content: start;
  gap: 7px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
}

.mini-card:not(.locked) {
  box-shadow: inset 0 0 0 1px rgba(217, 183, 96, 0.08);
}

.mini-card.tier-bronze {
  border-color: rgba(181, 116, 70, 0.78);
}

.mini-card.tier-silver {
  border-color: rgba(198, 211, 224, 0.84);
}

.mini-card.tier-gold {
  border-color: rgba(233, 195, 96, 0.92);
  box-shadow: 0 0 18px rgba(217, 183, 96, 0.14);
}

.mini-card.tier-platinum {
  border-color: rgba(221, 236, 230, 0.95);
  box-shadow: 0 0 20px rgba(178, 235, 220, 0.16);
}

.mini-card.tier-diamond {
  border-color: rgba(136, 226, 255, 0.98);
  box-shadow: 0 0 22px rgba(136, 226, 255, 0.18);
}

.mini-card.tier-rainbowDiamond {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #ff6c8d, #f2c66d, #64d3b5, #88e2ff, #d6a4ff) border-box;
  border-width: 2px;
}

.mini-card-image {
  width: min(100%, 92px);
  aspect-ratio: 420 / 680;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.mini-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mini-card strong {
  font-size: 0.9rem;
  line-height: 1.28;
}

.mini-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.mini-card-meaning {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.48;
}

.collection-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(217, 183, 96, 0.45);
  border-radius: 999px;
  color: var(--gold) !important;
  font-size: 0.72rem !important;
}

.skin-marker {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(100, 182, 165, 0.48);
  border-radius: 999px;
  color: var(--teal) !important;
  font-size: 0.7rem !important;
}

.mini-card.locked {
  color: var(--text);
  background: rgba(34, 40, 36, 0.65);
}

.mini-card.locked .mini-card-image {
  opacity: 0.8;
  filter: saturate(0.78) brightness(0.86);
}

.mini-card.locked .collection-chip {
  color: var(--muted) !important;
  border-color: var(--line);
}

.skin-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 7, 6, 0.78);
  backdrop-filter: blur(14px);
}

.skin-modal-card {
  position: relative;
  display: grid;
  width: min(100%, 900px);
  max-height: min(92vh, 780px);
  grid-template-columns: minmax(210px, 320px) minmax(0, 1fr);
  gap: 20px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(217, 183, 96, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0, rgba(217, 183, 96, 0.14), transparent 38%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.skin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.skin-preview {
  align-self: start;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.skin-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 420 / 680;
  object-fit: cover;
}

.skin-modal-copy {
  min-width: 0;
  padding-right: 42px;
}

.skin-modal-copy h2 {
  margin: 2px 0 8px;
  line-height: 1.25;
}

.skin-modal-copy > p:not(.muted) {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.skin-pack-options {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.skin-pack-title {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.skin-pack-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(217, 183, 96, 0.24);
  border-radius: 8px;
  background: rgba(217, 183, 96, 0.08);
}

.skin-pack-cover {
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.26);
  border-radius: 6px;
  background: rgba(16, 20, 18, 0.72);
}

.skin-pack-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.skin-pack-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.skin-pack-copy h3 {
  margin: 0;
  font-size: 0.95rem;
}

.skin-pack-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.skin-pack-action {
  width: fit-content;
  min-width: 132px;
}

.skin-options {
  display: grid;
  gap: 10px;
}

.skin-option {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.42);
}

.skin-option.equipped {
  border-color: rgba(100, 182, 165, 0.86);
  box-shadow: inset 0 0 0 1px rgba(100, 182, 165, 0.16);
}

.skin-option-image {
  overflow: hidden;
  border-radius: 6px;
  background: rgba(16, 20, 18, 0.72);
}

.skin-option-image img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 420 / 680;
  object-fit: cover;
}

.skin-option-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.skin-option-copy h3 {
  margin: 4px 0;
  font-size: 1rem;
}

.skin-option-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.skin-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid rgba(217, 183, 96, 0.4);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}

.skin-action {
  width: fit-content;
  min-width: 116px;
}

.reader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.reader-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.reader-card.current {
  border-color: rgba(217, 183, 96, 0.9);
}

.reader-card.selected {
  box-shadow:
    inset 0 0 0 1px rgba(100, 182, 165, 0.38),
    0 14px 34px rgba(0, 0, 0, 0.22);
}

.reader-card.locked {
  background: rgba(34, 40, 36, 0.72);
}

.reader-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(16, 20, 18, 0.76);
}

.reader-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.reader-card.locked .reader-portrait img {
  filter: saturate(0.78) brightness(0.82);
}

.reader-meta {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.reader-title-row {
  display: grid;
  gap: 8px;
}

.reader-title-row h3 {
  margin: 0;
  line-height: 1.28;
}

.reader-meta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.reader-level-note {
  color: rgba(244, 240, 232, 0.62);
  line-height: 1.45;
}

.reader-badge {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(217, 183, 96, 0.45);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.76rem;
}

.reader-button {
  width: 100%;
  background: var(--gold);
  color: var(--ink);
}

.reader-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.reader-profile-open {
  width: 100%;
  min-height: 44px;
}

.reader-card.locked .reader-button {
  background: var(--teal);
}

.reader-profile-panel {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(34, 40, 36, 0.94), rgba(16, 20, 18, 0.96)),
    radial-gradient(circle at 88% 0, rgba(100, 182, 165, 0.13), transparent 36%);
}

.reader-profile-panel[hidden] {
  display: none;
}

.reader-profile-layout {
  display: grid;
  grid-template-columns: minmax(168px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px;
}

.reader-profile-portrait {
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.48);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.74);
}

.reader-profile-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.reader-profile-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.reader-profile-heading {
  display: grid;
  gap: 4px;
}

.reader-profile-heading span,
.reader-profile-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reader-profile-heading h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.24;
}

.reader-profile-heading small {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(217, 183, 96, 0.42);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.76rem;
}

.reader-profile-copy p {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  line-height: 1.65;
}

.reader-profile-copy blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(100, 182, 165, 0.8);
  border-radius: 6px;
  color: #fff6de;
  background: rgba(100, 182, 165, 0.09);
  line-height: 1.62;
}

.reader-profile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reader-profile-meta > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.45);
}

.reader-profile-meta strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.reader-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reader-profile-tags em {
  padding: 4px 8px;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.86);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.2;
  background: rgba(217, 183, 96, 0.08);
}

.reader-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reader-profile-action {
  min-width: 168px;
}

.cottage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 14px;
  align-items: start;
  margin-top: 16px;
}

.cottage-scene {
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(55, 48, 52, 0.9) 0 38%, rgba(38, 43, 38, 0.95) 38% 100%),
    linear-gradient(90deg, rgba(217, 183, 96, 0.12), rgba(100, 182, 165, 0.1));
  box-shadow: inset 0 -120px 120px rgba(0, 0, 0, 0.24), 0 18px 42px rgba(0, 0, 0, 0.26);
}

.cottage-room {
  position: relative;
  min-height: 620px;
  padding: 24px;
}

.cottage-room::before {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 42%;
  background:
    repeating-linear-gradient(90deg, rgba(217, 183, 96, 0.09) 0 1px, transparent 1px 82px),
    linear-gradient(180deg, rgba(16, 20, 18, 0.06), rgba(16, 20, 18, 0.58));
  transform: perspective(460px) rotateX(58deg);
  transform-origin: bottom;
}

.cottage-reader-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 160px;
  align-items: flex-end;
  justify-content: center;
  margin-top: 18px;
}

.cottage-reader-avatar {
  width: min(29%, 132px);
  min-width: 86px;
  margin: 0;
  text-align: center;
  cursor: pointer;
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.cottage-reader-avatar:hover,
.cottage-reader-avatar:focus-visible {
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-4px);
}

.cottage-reader-avatar img {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(217, 183, 96, 0.52);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.82);
}

.cottage-reader-avatar figcaption {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}

.cottage-reader-avatar figcaption small {
  color: rgba(244, 240, 232, 0.62);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
}

.cottage-reader-note {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 6px;
  max-width: 560px;
  margin: 12px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(100, 182, 165, 0.24);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.cottage-reader-note.active {
  border-color: rgba(217, 183, 96, 0.44);
  background:
    linear-gradient(90deg, rgba(217, 183, 96, 0.1), rgba(100, 182, 165, 0.08)),
    rgba(16, 20, 18, 0.7);
}

.cottage-reader-note span {
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cottage-reader-note p {
  margin: 0;
  color: rgba(244, 240, 232, 0.76);
  line-height: 1.58;
}

.cottage-reader-note strong {
  color: var(--gold);
  font-size: 0.82rem;
}

.cottage-slot-map {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, minmax(88px, 1fr));
  gap: 12px;
  min-height: 360px;
  margin-top: 18px;
}

.cottage-slot {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px dashed rgba(244, 240, 232, 0.24);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.42);
}

.cottage-slot.filled {
  border-style: solid;
  background: rgba(34, 40, 36, 0.88);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.cottage-slot span {
  color: var(--muted);
  font-size: 0.76rem;
}

.cottage-slot strong {
  color: var(--text);
  line-height: 1.25;
}

.cottage-slot button {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 999px;
  background: rgba(16, 20, 18, 0.56);
  color: var(--gold);
  font-size: 0.74rem;
}

.slot-wall {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.slot-window {
  grid-column: 5 / 7;
  grid-row: 1 / 3;
}

.slot-table {
  grid-column: 2 / 6;
  grid-row: 2 / 4;
}

.slot-center {
  grid-column: 3 / 5;
  grid-row: 4;
}

.slot-door {
  grid-column: 1 / 3;
  grid-row: 3 / 5;
}

.decor-clarity {
  border-color: rgba(244, 212, 120, 0.62);
}

.decor-tide {
  border-color: rgba(100, 182, 165, 0.68);
}

.decor-grounding {
  border-color: rgba(141, 169, 118, 0.68);
}

.decor-cross {
  border-color: rgba(205, 171, 255, 0.62);
}

.cottage-panel {
  display: grid;
  gap: 14px;
}

.cottage-panel > div {
  border: 1px solid rgba(217, 183, 96, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(34, 40, 36, 0.74);
}

.cottage-panel h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.cottage-decor-list,
.cottage-reader-list {
  display: grid;
  gap: 10px;
}

.cottage-decor-card,
.cottage-reader-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.14);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.42);
}

.cottage-decor-card.locked {
  opacity: 0.68;
}

.cottage-decor-card.placed,
.cottage-reader-toggle.visible {
  background: rgba(100, 182, 165, 0.12);
}

.cottage-decor-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(217, 183, 96, 0.38);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 900;
}

.cottage-decor-card h3,
.cottage-reader-toggle h3 {
  margin: 0;
  font-size: 0.92rem;
}

.cottage-decor-card p,
.cottage-reader-toggle p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.cottage-reader-toggle small {
  display: block;
  margin-top: 4px;
  color: rgba(244, 240, 232, 0.62);
  font-size: 0.72rem;
  line-height: 1.42;
}

.cottage-reader-toggle img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(217, 183, 96, 0.42);
  border-radius: 8px;
}

.cottage-place-button,
.cottage-reader-toggle button {
  min-width: 104px;
}

.cottage-adventure-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cottage-adventure-tags span {
  padding: 5px 9px;
  border: 1px solid rgba(100, 182, 165, 0.42);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.cottage-adventure-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 240, 232, 0.12);
}

.cottage-adventure-copy {
  display: grid;
  gap: 6px;
}

.cottage-adventure-copy p {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cottage-adventure-copy h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.cottage-adventure-copy > span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.cottage-adventure-tags.compact {
  margin-top: 2px;
}

.cottage-adventure-start {
  width: 100%;
  min-height: 44px;
}

.adventure-choice-list {
  display: grid;
  gap: 8px;
}

.adventure-choice-button {
  display: grid;
  width: 100%;
  min-height: 62px;
  justify-items: start;
  gap: 5px;
  text-align: left;
  white-space: normal;
}

.adventure-choice-button strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.adventure-choice-button span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.adventure-outcome {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: rgba(100, 182, 165, 0.1);
}

.adventure-outcome strong {
  font-size: 0.92rem;
}

.adventure-outcome p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.adventure-reward-line {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
}

.achievement-list,
.shop-list,
.workshop-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.achievement-item,
.product-card,
.workshop-recipe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.achievement-item.done {
  border-color: rgba(100, 182, 165, 0.75);
}

.achievement-badge {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}

.achievement-copy {
  flex: 1;
}

.achievement-copy p,
.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.achievement-copy small {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold);
  font-weight: 800;
}

.product-card.featured {
  border-color: rgba(217, 183, 96, 0.88);
}

.shop-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 183, 96, 0.2);
  border-radius: 8px;
  color: rgba(244, 240, 232, 0.72);
  background: rgba(16, 20, 18, 0.48);
  line-height: 1.5;
}

.shop-channel-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(100, 182, 165, 0.24);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.5);
}

.shop-channel-panel.attention {
  border-color: rgba(217, 183, 96, 0.72);
  box-shadow: 0 0 0 3px rgba(217, 183, 96, 0.1);
}

.shop-channel-panel.app-unavailable,
.shop-channel-panel.web-unavailable {
  border-color: rgba(215, 124, 115, 0.34);
  background: linear-gradient(135deg, rgba(215, 124, 115, 0.1), rgba(16, 20, 18, 0.52));
}

.shop-channel-panel.telegram {
  border-color: rgba(100, 182, 165, 0.4);
}

.shop-channel-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.shop-channel-panel strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.98rem;
}

.shop-channel-panel p {
  margin: 4px 0 0;
  color: rgba(244, 240, 232, 0.68);
  line-height: 1.5;
}

.shop-channel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.shop-channel-actions button {
  min-height: 38px;
  white-space: nowrap;
}

.product-button {
  flex: 0 0 auto;
  background: var(--teal);
  color: var(--ink);
}

.product-button.unavailable {
  border-color: rgba(244, 240, 232, 0.16);
  color: rgba(244, 240, 232, 0.62);
  background: rgba(244, 240, 232, 0.08);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.settings-card {
  display: grid;
  gap: 8px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid rgba(217, 183, 96, 0.24);
  border-radius: 8px;
  background: rgba(24, 32, 29, 0.72);
}

.settings-profile-card {
  border-color: rgba(100, 182, 165, 0.32);
  background: linear-gradient(145deg, rgba(100, 182, 165, 0.1), rgba(24, 32, 29, 0.76));
}

.settings-card span {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-card strong {
  color: var(--text);
  line-height: 1.35;
}

.settings-card p,
.settings-card small {
  margin: 0;
  color: rgba(244, 240, 232, 0.7);
  line-height: 1.55;
}

.settings-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.workshop-balances {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.element-balance {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(217, 183, 96, 0.3);
  border-radius: 8px;
  background: rgba(34, 40, 36, 0.7);
}

.element-balance span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.element-balance strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 1.32rem;
}

.element-fire {
  border-color: rgba(215, 124, 115, 0.5);
}

.element-water {
  border-color: rgba(100, 182, 165, 0.52);
}

.element-air {
  border-color: rgba(244, 240, 232, 0.38);
}

.element-earth {
  border-color: rgba(217, 183, 96, 0.5);
}

.element-spirit {
  border-color: rgba(205, 171, 255, 0.48);
}

.workshop-recipe {
  align-items: stretch;
}

.workshop-recipe.locked {
  opacity: 0.82;
}

.workshop-recipe-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.workshop-recipe-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.workshop-recipe-heading h3 {
  margin: 0;
}

.workshop-recipe-heading span {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.workshop-recipe p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.workshop-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workshop-requirements span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
}

.workshop-requirements span.ready {
  color: var(--teal);
  border-color: rgba(100, 182, 165, 0.54);
}

.workshop-craft-button {
  min-width: 116px;
  align-self: center;
}

.reading-panel {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.reading-panel > * {
  min-width: 0;
  max-width: 100%;
}

.reading-reader-strip,
.reading-form,
.reading-pick-stage,
.reading-history,
.reading-empty,
.reading-result {
  border: 1px solid rgba(217, 183, 96, 0.28);
  border-radius: 8px;
  width: 100%;
  min-width: 0;
  background:
    linear-gradient(160deg, rgba(34, 40, 36, 0.92), rgba(16, 20, 18, 0.96)),
    radial-gradient(circle at 84% 0, rgba(100, 182, 165, 0.16), transparent 34%);
}

.reading-reader-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 236px;
  overflow: hidden;
  padding: 18px;
}

.reading-reader-strip::before {
  position: absolute;
  inset: -30% auto auto -8%;
  width: 270px;
  height: 270px;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 183, 96, 0.24), transparent 58%),
    radial-gradient(circle at 40% 35%, rgba(100, 182, 165, 0.18), transparent 48%);
  pointer-events: none;
}

.reading-reader-portrait-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.56);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.8);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(217, 183, 96, 0.14);
}

.reading-reader-portrait-frame::after {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.reading-reader-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transform: scale(1.02);
}

.reading-reader-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.reading-reader-strip span,
.reading-field span,
.reading-options span,
.reading-hint,
.reading-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.reading-reader-strip strong {
  display: block;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.25;
}

.reading-reader-copy p {
  max-width: 44rem;
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  line-height: 1.65;
}

.reading-reader-copy blockquote {
  max-width: 48rem;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(100, 182, 165, 0.8);
  border-radius: 6px;
  color: #fff6de;
  background: rgba(100, 182, 165, 0.1);
  line-height: 1.68;
}

.reading-reader-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.reading-reader-chip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-height: 58px;
  padding: 7px 8px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.54);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.reading-reader-chip:hover,
.reading-reader-chip:focus-visible,
.reading-reader-chip.active {
  border-color: rgba(217, 183, 96, 0.72);
  background: rgba(217, 183, 96, 0.12);
}

.reading-reader-chip.active {
  box-shadow: inset 0 0 0 1px rgba(100, 182, 165, 0.28);
}

.reading-reader-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.reading-reader-chip img {
  grid-row: 1 / span 2;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(217, 183, 96, 0.36);
  border-radius: 50%;
  object-fit: cover;
  transform: none;
}

.reading-reader-chip span {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-reader-chip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-question-helper {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.32);
}

.reading-question-helper.compact {
  padding: 10px 12px;
}

.reading-question-helper-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr) auto;
  gap: 10px;
  align-items: start;
}

.reading-question-helper-heading strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.reading-question-helper-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reading-question-quality {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(34, 40, 36, 0.68);
}

.reading-question-quality span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.reading-question-quality small {
  color: rgba(244, 240, 232, 0.66);
  font-size: 0.72rem;
  line-height: 1.35;
}

.reading-question-quality.ready {
  border-color: rgba(100, 182, 165, 0.44);
  background: rgba(100, 182, 165, 0.1);
}

.reading-question-quality.closed,
.reading-question-quality.short {
  border-color: rgba(217, 183, 96, 0.38);
  background: rgba(217, 183, 96, 0.08);
}

.reading-question-template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-question-helper.compact .reading-question-template-list {
  display: none;
}

.reading-assist-toggle {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(217, 183, 96, 0.32);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
  background: rgba(217, 183, 96, 0.08);
}

.reading-assist-toggle:hover,
.reading-assist-toggle:focus-visible {
  border-color: rgba(217, 183, 96, 0.72);
  color: var(--text);
  background: rgba(217, 183, 96, 0.14);
}

.reading-question-template {
  min-height: 34px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.86);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: left;
  background: rgba(16, 20, 18, 0.56);
}

.reading-question-template:hover,
.reading-question-template:focus-visible {
  border-color: rgba(217, 183, 96, 0.68);
  color: var(--text);
  background: rgba(217, 183, 96, 0.1);
}

.reading-spread-advisor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(217, 183, 96, 0.22);
  border-radius: 8px;
  background: rgba(34, 40, 36, 0.42);
}

.reading-spread-advisor.compact {
  padding: 10px 12px;
}

.reading-spread-advisor-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.58fr);
  gap: 10px;
  align-items: start;
}

.reading-spread-advisor-heading strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.reading-spread-advisor-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reading-spread-cost {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(100, 182, 165, 0.32);
  border-radius: 8px;
  background: rgba(100, 182, 165, 0.08);
}

.reading-spread-cost.insufficient {
  border-color: rgba(217, 183, 96, 0.42);
  background: rgba(217, 183, 96, 0.08);
}

.reading-spread-cost span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
}

.reading-spread-cost small {
  color: rgba(244, 240, 232, 0.66);
  font-size: 0.72rem;
  line-height: 1.35;
}

.reading-spread-recommendation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.reading-spread-advisor.compact .reading-spread-recommendation-list {
  display: none;
}

.reading-spread-recommendation {
  display: grid;
  gap: 8px;
  align-content: space-between;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.11);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.5);
}

.reading-spread-recommendation:hover,
.reading-spread-recommendation:focus-visible,
.reading-spread-recommendation.active {
  border-color: rgba(217, 183, 96, 0.68);
  background: rgba(217, 183, 96, 0.1);
}

.reading-spread-recommendation.insufficient {
  border-color: rgba(217, 183, 96, 0.24);
}

.reading-spread-recommendation span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reading-spread-recommendation strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.25;
}

.reading-spread-recommendation small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.reading-spread-recommendation em {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  background: rgba(217, 183, 96, 0.1);
}

.reading-draw-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(100, 182, 165, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(16, 20, 18, 0.72), rgba(34, 40, 36, 0.62)),
    rgba(16, 20, 18, 0.36);
}

.reading-draw-summary.needs-question,
.reading-draw-summary.insufficient {
  border-color: rgba(217, 183, 96, 0.38);
}

.reading-draw-summary-heading {
  display: grid;
  gap: 3px;
}

.reading-draw-summary-heading strong {
  color: var(--text);
  font-size: 0.92rem;
}

.reading-draw-summary-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reading-draw-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(112px, 0.75fr));
  gap: 8px;
}

.reading-draw-summary-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.42);
}

.reading-draw-summary-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.reading-draw-summary-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-reader-recommendation {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(100, 182, 165, 0.28);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.36);
}

.reading-reader-recommendation[hidden] {
  display: none;
}

.reading-reader-recommendation-copy {
  display: grid;
  gap: 3px;
}

.reading-reader-recommendation-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}

.reading-reader-recommendation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reading-reader-recommendation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
}

.reading-reader-recommendation-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.58);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.reading-reader-recommendation-card:hover,
.reading-reader-recommendation-card:focus-visible,
.reading-reader-recommendation-card.active {
  border-color: rgba(217, 183, 96, 0.74);
  background: rgba(217, 183, 96, 0.1);
}

.reading-reader-recommendation-card.locked {
  border-color: rgba(100, 182, 165, 0.24);
}

.reading-reader-recommendation-card img {
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(217, 183, 96, 0.34);
  border-radius: 50%;
  object-fit: cover;
}

.reading-reader-recommendation-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reading-reader-recommendation-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-reader-recommendation-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-reader-recommendation-card em {
  max-width: 7.5rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.reading-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.npc-consult-panel {
  margin: 0;
  padding: 12px 14px;
}

.npc-consult-details {
  border-top: 0;
  padding-top: 0;
}

.npc-consult-copy {
  display: grid;
  gap: 6px;
}

.npc-consult-copy h3 {
  margin: 0;
}

.npc-consult-status {
  color: var(--gold);
  font-weight: 900;
}

.npc-choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.npc-choice-list strong {
  grid-column: 1 / -1;
}

.npc-choice-list button {
  white-space: normal;
}

.npc-consult-outcome {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: rgba(100, 182, 165, 0.1);
}

.npc-consult-outcome p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.npc-consult-outcome span {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.reading-field,
.reading-options label {
  display: grid;
  gap: 7px;
}

.reading-field textarea,
.reading-options select,
.reading-followup-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 20, 18, 0.76);
}

.reading-field textarea {
  min-height: 116px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

.reading-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reading-options select,
.reading-followup-form input {
  min-height: 44px;
  padding: 0 12px;
}

.reading-field textarea:focus,
.reading-options select:focus,
.reading-followup-form input:focus {
  outline: 2px solid rgba(100, 182, 165, 0.42);
  border-color: rgba(100, 182, 165, 0.78);
}

.reading-hint,
.reading-status {
  margin: 0;
  line-height: 1.5;
}

.reading-status.offline {
  color: var(--rose);
}

.reading-status.online {
  color: var(--teal);
}

.reading-pick-stage {
  display: grid;
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 15% 0, rgba(217, 183, 96, 0.18), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(100, 182, 165, 0.16), transparent 34%),
    linear-gradient(155deg, rgba(34, 40, 36, 0.94), rgba(16, 20, 18, 0.97));
}

.reading-pick-stage[hidden] {
  display: none;
}

.reading-pick-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.reading-pick-heading h3 {
  margin: 2px 0 0;
  color: #fff8e8;
  font-size: 1.1rem;
  line-height: 1.35;
}

.reading-pick-heading > span {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 183, 96, 0.44);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.reading-pick-instruction {
  max-width: 46rem;
  margin: 0;
  color: rgba(244, 240, 232, 0.74);
  line-height: 1.65;
}

.reading-pick-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.reading-pick-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(217, 183, 96, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 183, 96, 0.16), rgba(100, 182, 165, 0.14)),
    url("./assets/cards/back.svg") center / cover;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform: translateY(0) rotate(var(--tilt, 0deg));
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.reading-pick-card:nth-child(3n + 1) {
  --tilt: -2deg;
}

.reading-pick-card:nth-child(3n + 2) {
  --tilt: 1deg;
}

.reading-pick-card:nth-child(3n) {
  --tilt: 2deg;
}

.reading-pick-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.14) 50%, transparent 82%);
  opacity: 0;
  transform: translateX(-60%);
  transition:
    opacity 180ms ease,
    transform 260ms ease;
}

.reading-pick-card:hover:not(:disabled),
.reading-pick-card:focus-visible {
  border-color: rgba(217, 183, 96, 0.88);
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(217, 183, 96, 0.2);
  outline: none;
  transform: translateY(-8px) rotate(var(--tilt, 0deg));
}

.reading-pick-card:hover:not(:disabled)::after,
.reading-pick-card:focus-visible::after {
  opacity: 1;
  transform: translateX(60%);
}

.reading-pick-card.picked {
  border-color: rgba(100, 182, 165, 0.82);
  filter: saturate(0.84) brightness(0.86);
  transform: translateY(8px) scale(0.94);
}

.reading-pick-card:disabled {
  cursor: default;
}

.reading-pick-card span {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(244, 240, 232, 0.24);
  border-radius: 50%;
  color: #fff8e8;
  background: rgba(16, 20, 18, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
}

.reading-pick-card span:empty {
  opacity: 0;
}

.reading-draw-ritual {
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 176px;
  padding: 18px;
  border: 1px solid rgba(100, 182, 165, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(100, 182, 165, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(16, 20, 18, 0.96), rgba(34, 40, 36, 0.86));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 232, 0.04);
}

.reading-draw-ritual[hidden] {
  display: none;
}

.reading-draw-deck {
  position: relative;
  min-height: 136px;
}

.reading-draw-deck span {
  position: absolute;
  top: 8px;
  left: calc(50% - 42px);
  width: 84px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(217, 183, 96, 0.54);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 183, 96, 0.18), rgba(100, 182, 165, 0.16)),
    url("./assets/cards/back.svg") center / cover;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
  transform-origin: 50% 120%;
  animation: readingShuffle 1.25s ease-in-out infinite;
}

.reading-draw-deck span:nth-child(1) {
  transform: translateX(-62px) rotate(-17deg);
  animation-delay: 0ms;
}

.reading-draw-deck span:nth-child(2) {
  transform: translateX(-31px) rotate(-8deg);
  animation-delay: 110ms;
}

.reading-draw-deck span:nth-child(3) {
  transform: rotate(0deg);
  animation-delay: 220ms;
}

.reading-draw-deck span:nth-child(4) {
  transform: translateX(31px) rotate(8deg);
  animation-delay: 330ms;
}

.reading-draw-deck span:nth-child(5) {
  transform: translateX(62px) rotate(17deg);
  animation-delay: 440ms;
}

.reading-draw-ritual p {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reading-draw-ritual strong {
  display: block;
  color: #fff6de;
  font-size: 1.1rem;
  line-height: 1.55;
}

.reading-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.reading-history {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.reading-history[hidden] {
  display: none;
}

.reading-history-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.reading-history-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.reading-history-heading small {
  color: var(--muted);
  font-size: 0.78rem;
}

.reading-history-list {
  display: grid;
  gap: 8px;
}

.reading-history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 18, 0.5);
  cursor: pointer;
}

.reading-history-item.active {
  border-color: rgba(100, 182, 165, 0.72);
  background: rgba(100, 182, 165, 0.12);
}

.reading-history-item strong {
  overflow: hidden;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-history-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 16px 0 12px;
}

.history-toolbar label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
  color: var(--muted);
  font-size: 0.86rem;
}

.history-toolbar select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 20, 18, 0.78);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(24, 32, 29, 0.7);
}

.history-card.active {
  border-color: rgba(100, 182, 165, 0.64);
  background: rgba(100, 182, 165, 0.1);
}

.history-card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.history-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(217, 183, 96, 0.28);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.76rem;
}

.history-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.history-open-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 10px;
}

.history-meta,
.history-preview,
.history-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.history-card-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-card-strip span {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.78);
  background: rgba(16, 20, 18, 0.42);
  font-size: 0.8rem;
}

.history-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.history-feedback-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-feedback-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 20, 18, 0.48);
  cursor: pointer;
}

.history-feedback-button.active {
  color: var(--ink);
  border-color: rgba(217, 183, 96, 0.72);
  background: var(--gold);
}

.reading-result {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: visible;
  padding: 18px;
  background:
    radial-gradient(circle at 15% 0, rgba(217, 183, 96, 0.14), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(213, 84, 123, 0.12), transparent 36%),
    linear-gradient(160deg, rgba(34, 40, 36, 0.94), rgba(16, 20, 18, 0.98));
}

.reading-result > *,
.reading-answer > *,
.reading-card-list,
.reading-card-insights,
.reading-structured,
.reading-structured-grid,
.reading-followup-suggestions {
  min-width: 0;
  max-width: 100%;
}

.reading-result::before {
  width: 100%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(217, 183, 96, 0.72), rgba(100, 182, 165, 0.56), transparent);
}

.reading-result-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.reading-result-heading > div {
  min-width: 0;
}

.reading-result-heading h3 {
  margin: 3px 0 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reading-result-heading > span {
  flex: 0 0 auto;
  border: 1px solid rgba(217, 183, 96, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
}

.reading-question-frame {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.36);
}

.reading-question-frame > strong {
  font-size: 0.95rem;
}

.reading-question-frame > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reading-question-frame span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: rgba(244, 240, 232, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

.reading-question-frame small {
  color: var(--muted);
  font-size: 0.74rem;
}

.reading-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
  align-items: stretch;
  overflow: visible;
}

.reading-card-list[data-layout="single"] {
  grid-template-columns: minmax(220px, 330px);
  justify-content: center;
}

.reading-card-list[data-layout="three_line"] {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.reading-card-list[data-layout="cross"] {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  grid-template-areas:
    ". external ."
    "past core future"
    ". shadow .";
  align-items: center;
}

.reading-card-list[data-layout="cross"] .reading-card[data-position-key="core"] {
  grid-area: core;
}

.reading-card-list[data-layout="cross"] .reading-card[data-position-key="past"] {
  grid-area: past;
}

.reading-card-list[data-layout="cross"] .reading-card[data-position-key="future"] {
  grid-area: future;
}

.reading-card-list[data-layout="cross"] .reading-card[data-position-key="external"] {
  grid-area: external;
}

.reading-card-list[data-layout="cross"] .reading-card[data-position-key="shadow"] {
  grid-area: shadow;
}

.reading-card-list[data-layout="celtic_cross"] {
  grid-template-columns: repeat(5, minmax(106px, 1fr));
  grid-template-areas:
    ". . crowning . outcome"
    "past core crossing future hopes_fears"
    ". . foundation . external"
    ". . self_view . .";
  align-items: center;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card {
  min-height: 286px;
  padding: 10px;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card img {
  width: min(100%, 174px);
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="core"] {
  grid-area: core;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="crossing"] {
  grid-area: crossing;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="foundation"] {
  grid-area: foundation;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="past"] {
  grid-area: past;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="crowning"] {
  grid-area: crowning;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="future"] {
  grid-area: future;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="self_view"] {
  grid-area: self_view;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="external"] {
  grid-area: external;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="hopes_fears"] {
  grid-area: hopes_fears;
}

.reading-card-list[data-layout="celtic_cross"] .reading-card[data-position-key="outcome"] {
  grid-area: outcome;
}

.reading-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(96px, 1fr);
  gap: 12px;
  justify-items: center;
  min-height: 332px;
  padding: 12px;
  border: 1px solid rgba(217, 183, 96, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(244, 240, 232, 0.06), transparent 22%),
    rgba(16, 20, 18, 0.68);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  transform: translateY(12px) rotateY(18deg);
  opacity: 0;
  animation: readingCardEnter 520ms ease forwards;
  animation-delay: calc(var(--card-index, 0) * 110ms);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.reading-card:hover,
.reading-card:focus-within {
  z-index: 3;
  border-color: rgba(217, 183, 96, 0.88);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(217, 183, 96, 0.2);
  transform: translateY(-8px) scale(1.06);
}

.reading-card img {
  width: min(100%, 218px);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.reading-card div {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  align-content: start;
  text-align: center;
}

.reading-card span,
.reading-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.reading-card strong {
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.25;
}

.reading-card:focus-visible {
  outline: 2px solid rgba(100, 182, 165, 0.68);
  outline-offset: 3px;
}

.reading-answer {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(217, 183, 96, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(217, 183, 96, 0.1), transparent 44%),
    rgba(16, 20, 18, 0.46);
}

.reading-answer::before {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  content: "";
  border: 1px solid rgba(100, 182, 165, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(217, 183, 96, 0.2), transparent 58%);
}

.reading-answer-kicker {
  width: fit-content;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reading-answer h3,
.reading-messages h3 {
  margin: 0;
  font-size: 1rem;
}

.reading-card-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.reading-card-insight {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(100, 182, 165, 0.24);
  border-radius: 8px;
  background: rgba(100, 182, 165, 0.07);
}

.reading-card-insight span {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
}

.reading-card-insight strong {
  color: #fff8e8;
  font-size: 0.95rem;
  line-height: 1.35;
}

.reading-card-insight p {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  line-height: 1.65;
}

.reading-card-insight .reading-card-context {
  color: rgba(244, 240, 232, 0.58);
  font-size: 0.84rem;
}

.reading-card-insight small {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.55;
}

.reading-structured {
  display: grid;
  gap: 10px;
}

.reading-structured h3 {
  margin: 2px 0 0;
  font-size: 0.96rem;
}

.reading-structured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reading-structured-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 183, 96, 0.2);
  border-radius: 8px;
  background: rgba(217, 183, 96, 0.06);
}

.reading-structured-card span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
}

.reading-structured-card p {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  line-height: 1.62;
}

.reading-reader-closing {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(217, 183, 96, 0.72);
  border-radius: 6px;
  color: #fff6de;
  background: rgba(217, 183, 96, 0.08);
  line-height: 1.72;
}

.reading-answer p,
.reading-message p {
  margin: 0;
  color: rgba(244, 240, 232, 0.76);
  line-height: 1.85;
  white-space: pre-line;
}

.reading-answer .reading-reader-closing {
  color: #fff6de;
  line-height: 1.72;
}

.reading-followup-guidance {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(100, 182, 165, 0.24);
  border-radius: 8px;
  color: rgba(244, 240, 232, 0.74);
  background: rgba(100, 182, 165, 0.07);
  line-height: 1.65;
}

.reading-result-reward {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.reading-result-reward:empty,
.reading-result-actions:empty {
  display: none;
}

.reading-result-reward article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.48);
}

.reading-result-reward article.first-reading {
  border-color: rgba(217, 183, 96, 0.42);
  background: rgba(217, 183, 96, 0.08);
}

.reading-result-reward span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.reading-result-reward strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.reading-result-reward small {
  color: rgba(244, 240, 232, 0.66);
  font-size: 0.72rem;
  line-height: 1.35;
}

.reading-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-result-actions button {
  flex: 1 1 150px;
  min-height: 40px;
}

.reading-followup-suggestions {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.42);
}

.reading-followup-suggestions > div:first-child {
  display: grid;
  gap: 3px;
}

.reading-followup-suggestions strong {
  color: #fff8e8;
}

.reading-followup-suggestions small {
  color: var(--muted);
  line-height: 1.4;
}

.reading-followup-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-followup-chip-list button {
  min-height: 36px;
  white-space: normal;
}

.reading-followup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.reading-messages {
  display: grid;
  gap: 10px;
}

.reading-message-list,
#reading-message-list {
  display: grid;
  gap: 8px;
}

.reading-message {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-left: 3px solid rgba(100, 182, 165, 0.72);
  background: rgba(100, 182, 165, 0.08);
}

.reading-message strong {
  line-height: 1.35;
}

.reading-card-modal {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 7, 6, 0.78);
  backdrop-filter: blur(14px);
}

.reading-card-modal[hidden] {
  display: none;
}

.reading-card-modal-card {
  position: relative;
  display: grid;
  width: min(100%, 820px);
  max-height: min(92vh, 760px);
  grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
  gap: 20px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(217, 183, 96, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0, rgba(217, 183, 96, 0.18), transparent 38%),
    radial-gradient(circle at 90% 16%, rgba(100, 182, 165, 0.14), transparent 32%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.reading-card-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.reading-card-modal-image {
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 8px;
  background: rgba(16, 20, 18, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.reading-card-modal-image img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.reading-card-modal-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
  padding-right: 42px;
}

.reading-card-modal-copy h2 {
  margin: 0;
  color: #fff8e8;
  font-size: 1.36rem;
  line-height: 1.32;
}

.reading-card-modal-copy p {
  margin: 0;
  color: rgba(244, 240, 232, 0.76);
  line-height: 1.75;
  white-space: pre-line;
}

.reading-card-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-card-modal-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(217, 183, 96, 0.36);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

@keyframes readingShuffle {
  0%,
  100% {
    filter: brightness(0.92);
    margin-top: 0;
  }

  45% {
    filter: brightness(1.14);
    margin-top: -12px;
  }
}

@keyframes readingCardEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) rotateY(24deg) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
  }
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 10, 12, 0.72);
  backdrop-filter: blur(12px);
}

.reward-modal[hidden] {
  display: none;
}

.reward-modal-card {
  width: min(100%, 360px);
  border: 1px solid rgba(217, 183, 96, 0.62);
  border-radius: 8px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 116, 72, 0.2), transparent 42%),
    var(--surface-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.reward-modal-card h2 {
  margin: 8px 0 10px;
  color: #fffaf1;
  font-size: 1.25rem;
  line-height: 1.35;
}

.reward-modal-card p {
  margin: 0 0 18px;
  color: rgba(244, 240, 232, 0.78);
  line-height: 1.65;
}

.reward-modal-card .primary-button {
  width: 100%;
}

.ai-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 10, 12, 0.74);
  backdrop-filter: blur(12px);
}

.ai-consent-modal[hidden] {
  display: none;
}

.ai-consent-card {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(217, 183, 96, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at top right, rgba(100, 182, 165, 0.18), transparent 42%),
    var(--surface-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.ai-consent-card h2 {
  margin: 8px 0 10px;
  color: #fffaf1;
  font-size: 1.25rem;
  line-height: 1.35;
}

.ai-consent-card p:not(.muted) {
  margin: 0;
  color: rgba(244, 240, 232, 0.78);
  line-height: 1.65;
}

.ai-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 12px;
  }

  .daily-date-rail {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 5px;
  }

  .daily-date-item span:last-child {
    width: 34px;
    height: 34px;
  }

  .tarot-focus-panel {
    padding: 14px;
  }

  .tarot-focus-heading,
  .tarot-focus-actions {
    grid-template-columns: 1fr;
  }

  .tarot-focus-heading h2 {
    font-size: 1.2rem;
  }

  .daily-ritual {
    padding: 20px 14px;
  }

  .daily-ritual h2 {
    font-size: 1.24rem;
  }

  .daily-loop-heading,
  .onboarding-heading {
    display: grid;
  }

  .daily-loop-steps,
  .onboarding-task-list,
  .economy-rule-list,
  .economy-resource-grid,
  .npc-choice-list,
  .reading-structured-grid {
    grid-template-columns: 1fr;
  }

  .economy-flow > div {
    grid-template-columns: 1fr;
  }

  .daily-ritual-deck {
    width: min(100%, 390px);
    gap: 6px;
  }

  .ritual-card span {
    inset: 5px;
  }

  .daily-draw-reveal {
    min-height: 440px;
    padding: 24px 14px;
  }

  .daily-reveal-card {
    width: min(58vw, 176px);
  }

  .daily-energy-panel {
    grid-template-columns: minmax(0, 1fr) 128px;
    min-height: 184px;
    padding-inline: 0;
  }

  .daily-score strong {
    font-size: 4.5rem;
  }

  .daily-score span {
    font-size: 1.5rem;
  }

  .daily-moon {
    width: 126px;
  }

  .daily-feature-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: auto;
    gap: 14px;
    padding: 14px;
  }

  .daily-card-progress {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    justify-content: end;
  }

  .daily-card-progress::before {
    width: 34px;
    height: 34px;
  }

  .daily-question-card {
    grid-template-columns: 56px minmax(0, 1fr) 34px;
    padding: 14px;
  }

  .daily-question-orb {
    width: 52px;
    height: 52px;
  }

  .daily-mini-panel,
  .daily-overview-card,
  .daily-section-card {
    padding: 16px;
  }

  .daily-section-card p {
    font-size: 0.95rem;
  }

  .reading-options,
  .reading-followup-form {
    grid-template-columns: 1fr;
  }

  .reading-reader-strip {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 14px;
  }

  .reading-reader-portrait-frame {
    width: min(62vw, 210px);
    margin: 0 auto;
  }

  .reading-reader-strip strong {
    font-size: 1.08rem;
  }

  .reading-reader-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reading-reader-chip {
    min-height: 54px;
  }

  .reading-question-helper-heading {
    grid-template-columns: 1fr;
  }

  .reading-assist-toggle {
    width: 100%;
  }

  .reading-question-template-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reading-question-template {
    border-radius: 8px;
  }

  .reading-spread-advisor-heading {
    grid-template-columns: 1fr;
  }

  .reading-spread-recommendation-list {
    grid-template-columns: 1fr;
  }

  .reading-spread-recommendation {
    min-height: auto;
  }

  .reading-draw-summary-grid {
    grid-template-columns: 1fr;
  }

  .reading-draw-summary-grid strong {
    white-space: normal;
  }

  .reading-result-reward {
    grid-template-columns: 1fr;
  }

  .reading-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reading-reader-recommendation-list {
    grid-template-columns: 1fr;
  }

  .reading-reader-recommendation-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .reading-reader-recommendation-card em {
    grid-column: 2;
    max-width: 100%;
    text-align: left;
  }

  .reader-profile-layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .reader-profile-portrait {
    width: min(64vw, 220px);
    margin: 0 auto;
  }

  .reader-profile-portrait img {
    min-height: 260px;
    aspect-ratio: 4 / 5;
  }

  .reader-profile-meta,
  .reader-card-actions {
    grid-template-columns: 1fr;
  }

  .reading-pick-heading {
    display: grid;
  }

  .reading-pick-heading > span {
    width: fit-content;
  }

  .reading-pick-deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reading-pick-card {
    min-height: 118px;
  }

  .reading-draw-ritual {
    grid-template-columns: 1fr;
    min-height: 248px;
    text-align: center;
  }

  .reading-result-heading {
    display: grid;
  }

  .reading-result-heading > span {
    width: fit-content;
  }

  .reading-card-list,
  .reading-card-list[data-layout="single"],
  .reading-card-list[data-layout="three_line"],
  .reading-card-list[data-layout="cross"],
  .reading-card-list[data-layout="celtic_cross"] {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    justify-content: stretch;
  }

  .reading-card-list .reading-card {
    grid-area: auto !important;
  }

  .reading-card {
    min-height: auto;
  }

  .reading-card:hover,
  .reading-card:focus-within {
    transform: translateY(-4px) scale(1.02);
  }

  .reading-card-insights {
    grid-template-columns: 1fr;
  }

  .reading-card-modal {
    align-items: end;
    padding: 10px;
  }

  .reading-card-modal-card {
    max-height: 94vh;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .reading-card-modal-image {
    width: min(48vw, 176px);
    margin: 0 auto;
  }

  .reading-card-modal-copy {
    padding-right: 0;
  }

  .tabs {
    justify-content: flex-start;
    gap: 6px;
    overflow: visible;
    scrollbar-width: none;
    scroll-snap-type: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs > .tab {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.86rem;
    scroll-snap-align: none;
  }

  .tabs-more {
    flex: 0 0 78px;
  }

  .tabs-more-panel .tab {
    min-width: 0;
    height: 40px;
    flex: none;
    font-size: 0.88rem;
  }

  .tab span {
    display: block;
    margin-right: 0;
    line-height: 1;
  }

  .tabs-more-panel .tab span {
    display: inline-block;
    margin-right: 4px;
  }

  .product-card,
  .achievement-item,
  .workshop-recipe {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-channel-panel {
    grid-template-columns: 1fr;
  }

  .shop-channel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-actions,
  .ai-consent-actions {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    display: grid;
  }

  .ai-consent-modal {
    align-items: end;
    padding: 10px;
  }

  .cottage-layout {
    grid-template-columns: 1fr;
  }

  .cottage-scene,
  .cottage-room {
    min-height: 560px;
  }

  .cottage-room {
    padding: 14px;
  }

  .cottage-slot-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    min-height: auto;
  }

  .slot-wall,
  .slot-window,
  .slot-table,
  .slot-center,
  .slot-door {
    grid-column: auto;
    grid-row: auto;
  }

  .cottage-decor-card,
  .cottage-reader-toggle {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cottage-decor-card .cottage-place-button,
  .cottage-reader-toggle button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .workshop-balances {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-recipe-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-button,
  .reader-button,
  .skin-pack-action,
  .skin-action,
  .workshop-craft-button {
    width: 100%;
  }

  .skin-modal {
    padding: 10px;
    align-items: end;
  }

  .skin-modal-card {
    max-height: 94vh;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .skin-preview {
    width: min(48vw, 176px);
    margin: 0 auto;
  }

  .skin-modal-copy {
    padding-right: 0;
  }

  .skin-option {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .skin-pack-option {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}

@keyframes cardReveal {
  0% {
    opacity: 0.35;
    transform: translateY(10px) rotateY(74deg) scale(0.96);
  }
  58% {
    opacity: 1;
    transform: translateY(0) rotateY(-8deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
  }
}

@keyframes dailyRevealCard {
  0% {
    opacity: 0;
    transform: translateY(22px) rotateY(78deg) scale(0.82);
  }
  62% {
    opacity: 1;
    transform: translateY(-4px) rotateY(-9deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
  }
}
