:root {
  --bg: #e6dfd2;
  --ink: #1c1712;
  --muted: #6d6256;
  --paper: #f7f3ea;
  --paper-2: #efe7d8;
  --line: rgba(70, 48, 28, 0.16);
  --cinnabar: #8d2f2c;
  --gold: #8a6432;
  --moss: #23463c;
  --wood: #2c6a45;
  --fire: #a33b32;
  --earth: #8a5a2a;
  --metal: #6e675c;
  --water: #1d4e68;
  --shadow: 0 18px 50px rgba(48, 32, 16, 0.08);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 8%, rgba(141, 47, 44, 0.08), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(138, 100, 50, 0.12), transparent 26%),
    var(--bg);
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cinnabar); }

.shell { max-width: 1180px; margin: 0 auto; padding: 28px 20px 72px; overflow-x: clip; }
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}
.brand { display: flex; gap: 14px; align-items: center; }
.seal {
  width: 72px; height: 72px;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  transform: rotate(-8deg);
  background: rgba(141, 47, 44, 0.04);
}
.brand h1 { font-family: var(--serif); font-size: 40px; line-height: 1; margin: 0; font-weight: 700; }
.brand p { margin: 6px 0 0; color: var(--muted); letter-spacing: 0.18em; font-size: 13px; }
.search {
  display: flex; gap: 8px; align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; }
.search button, .btn, .ghost {
  border: 0; border-radius: 999px; padding: 8px 14px;
}
.search button, .btn { background: var(--ink); color: #f6f1e7; }
.ghost { background: transparent; border: 1px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.nav button {
  background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; color: var(--muted);
}
.nav button.active { background: var(--paper); color: var(--ink); border-color: var(--line); }

.layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
.layout > * { min-width: 0; }
.card, .sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.card { padding: 16px; }
.sheet { padding: 22px; }
.card h2, .sheet h2, .sheet h3 { font-family: var(--serif); margin: 0 0 10px; }
.muted { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field.span-2 { grid-column: span 2; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px;
}
.checks { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; margin: 8px 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.warn { background: #f8efe4; border-left: 3px solid var(--gold); padding: 8px 10px; margin: 8px 0; font-size: 13px; }

.today-lines, .pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}
.sheet, #chartMount { max-width: 100%; min-width: 0; }
.mini {
  background: var(--paper-2); border-radius: 12px; padding: 10px; text-align: center;
}
.mini b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; }
.pillars { gap: 10px; margin: 14px 0; }
.pillar, .mini { min-width: 0; }
.pillar {
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px 14px; text-align: center; background: #fffdf8;
}
.pillar .role { color: var(--muted); font-size: 12px; letter-spacing: 0.14em; }
.pillar .god { font-size: 13px; min-height: 1.2em; }
.stem, .branch { font-family: var(--serif); font-size: 40px; line-height: 1.15; }
.hidden, .stage, .nayin { font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.wood { color: var(--wood); } .fire { color: var(--fire); } .earth { color: var(--earth); }
.metal { color: var(--metal); } .water { color: var(--water); }

.bars { display: grid; gap: 7px; margin: 8px 0 16px; }
.bar { display: grid; grid-template-columns: 28px 1fr 42px; gap: 8px; align-items: center; font-size: 13px; }
.track { height: 8px; background: rgba(0,0,0,0.06); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 99px; }
.track .wood { background: var(--wood); } .track .fire { background: var(--fire); }
.track .earth { background: var(--earth); } .track .metal { background: var(--metal); }
.track .water { background: var(--water); }

.hex-row, .cast-grid, .pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.hexfig { display: grid; gap: 7px; width: 92px; margin: 8px auto; }
.yao { height: 10px; display: flex; justify-content: space-between; }
.yao.yang { background: var(--ink); }
.yao.yin::before, .yao.yin::after { content: ""; width: 40px; height: 10px; background: var(--ink); }
.yao.moving { outline: 1px dashed var(--cinnabar); outline-offset: 2px; }
.hex-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fffdf8; text-align: center; }
.hex-card h3 { font-family: var(--serif); margin: 4px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tag { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: var(--paper-2); }

.dayun { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; width: 100%; min-width: 0; max-width: 100%; }
.step {
  min-width: 108px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fffdf8; text-align: center;
}
.step.active { border-color: var(--cinnabar); }
.step b { font-family: var(--serif); font-size: 20px; display: block; }

.book-tools, .cast-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.result-item { text-align: left; width: 100%; background: #fffdf8; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.result-item strong { font-family: var(--serif); font-size: 18px; }
.detail { margin-top: 14px; }
.line-list { display: grid; gap: 8px; }
.line-item { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.line-item .yao { width: 72px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
.coin-row { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.coin {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold); background: #f3e2c2; font-family: var(--serif);
}
.footer { margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.reading p { line-height: 1.75; margin: 0 0 8px; }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.error { color: var(--cinnabar); font-size: 14px; }
.form-card { max-width: 360px; }
.form-card .field input,
.form-card .field select,
.form-card textarea,
.pair-form input,
.pair-form select { width: 100%; max-width: 100%; }
.gender-field { border: 0; margin: 0 0 10px; padding: 0; }
.gender-field legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.seg { display: flex; gap: 8px; }
.seg label {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 0; background: #fffdf8;
}
.seg input { margin-right: 6px; }
.lunar-preview {
  margin: 6px 0 0; padding: 8px 10px; border-radius: 10px;
  background: var(--paper-2); color: var(--ink); font-size: 13px; line-height: 1.5;
}
.pair-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { flex-direction: column; align-items: flex-start; gap: 8px; }
.reading, .summary p, .lot-body { max-width: 40em; }
.summary {
  background: #fffdf8; border-radius: 16px; padding: 14px 16px; margin: 12px 0 16px;
  border: 1px solid rgba(141, 47, 44, 0.28);
}
.summary h3 { color: var(--cinnabar); }
.trend { width: 100%; overflow: hidden; margin: 8px 0 16px; }
.trend svg { width: 100%; height: auto; display: block; }
.ask-grid, .pair-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair-form { margin: 12px 0; }
textarea {
  width: 100%; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; resize: vertical;
}
.tube-wrap { display: grid; place-items: center; min-height: 360px; padding-top: 12px; }
.oracle {
  --amp: 1;
  width: 250px; height: 348px; position: relative;
  cursor: grab; touch-action: none;
}
.oracle.holding { cursor: grabbing; }
.oracle-shadow {
  position: absolute; left: 50%; bottom: 8px; width: 150px; height: 22px;
  transform: translateX(-50%); background: rgba(48, 22, 12, 0.22);
  border-radius: 50%; filter: blur(1px);
}
.oracle-cup { position: absolute; inset: 0; transform-origin: 50% 78%; }
#tube.shaking .oracle-cup { animation: cup-shake .12s linear infinite; }
#tube.settle .oracle-cup { animation: cup-settle .6s ease; }
@keyframes cup-shake {
  0% { transform: rotate(calc(-13deg * var(--amp))) translateX(-4px); }
  35% { transform: rotate(calc(11deg * var(--amp))) translateX(3px); }
  70% { transform: rotate(calc(-8deg * var(--amp))) translateX(-2px); }
  100% { transform: rotate(calc(14deg * var(--amp))) translateX(4px); }
}
@keyframes cup-settle {
  0% { transform: rotate(9deg); }
  45% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}
.slip-bed {
  position: absolute; left: 50%; bottom: 196px; width: 168px; height: 120px;
  transform: translateX(-50%); z-index: 1;
}
.slip {
  position: absolute; bottom: 0; left: 50%; width: 8px; height: var(--len);
  margin-left: -4px; border-radius: 2px 2px 0 0; transform-origin: 50% 100%;
  background: linear-gradient(90deg, #b8894e, #f8ecd0 42%, #e4c98a 72%, #a67a42);
  transform: translateX(var(--x)) rotate(var(--r));
}
.slip:nth-child(3n)::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 9px;
  background: #8d2f2c; border-radius: 1px;
}
#tube.shaking .slip {
  animation: slip-jump .12s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes slip-jump {
  0% { transform: translateX(var(--x)) rotate(var(--r)) translateY(0); }
  45% { transform: translateX(calc(var(--x) + 4px)) rotate(calc(var(--r) + 7deg)) translateY(calc(var(--hop) * var(--amp))); }
  100% { transform: translateX(var(--x)) rotate(var(--r)) translateY(2px); }
}
.oracle-shell {
  position: absolute; left: 50%; bottom: 26px; width: 132px; height: 188px;
  transform: translateX(-50%); z-index: 2; border-radius: 24px 24px 40px 40px;
  background:
    linear-gradient(90deg, #5c1016 0%, #9a242c 20%, #d85a48 46%, #8d1c24 74%, #3e0c10 100%);
  box-shadow:
    inset 0 0 0 4px #e8c56e,
    inset 0 18px 0 rgba(232, 197, 110, 0.35),
    inset 12px 0 18px rgba(255, 220, 170, 0.18),
    inset -14px 0 18px rgba(0, 0, 0, 0.28),
    0 16px 18px rgba(40, 10, 8, 0.22);
}
.oracle-shell::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: -12px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #2a0a0c 46%, #7a2024 68%, #e8c56e 71%, #f3dd9a 100%);
}
.tube-mark {
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 8px; color: #7a1820; font-family: var(--serif); font-size: 32px;
  background: linear-gradient(#f8e7b8, #d7b15e);
  box-shadow: inset 0 0 0 2px rgba(122, 24, 32, 0.55), 0 2px 0 rgba(40, 8, 8, 0.2);
}
.drawn-slip {
  position: absolute; z-index: 4; left: 50%; bottom: 208px; width: 28px; height: 112px;
  margin: 0; padding: 10px 0 0; border: 1px solid #a67c3d; border-radius: 3px;
  background: linear-gradient(#8d2f2c, #8d2f2c 12px, #f4e4bc 12px, #fff8e8 48%, #e7d2a4);
  color: var(--cinnabar); font-family: var(--serif); font-size: 18px; line-height: 1;
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.12em;
  transform-origin: 50% 100%; cursor: pointer;
  box-shadow: 3px 8px 12px rgba(40, 16, 8, 0.2);
  transform: translateX(-50%) scaleY(0.12); opacity: 0;
}
.drawn-slip.show { animation: slip-emerge .9s cubic-bezier(.16, .84, .28, 1) forwards; }
.drawn-slip.pulled { animation: slip-pull .42s ease forwards; }
@keyframes slip-emerge {
  0% { transform: translateX(-50%) scaleY(0.15) rotate(-4deg); opacity: 0; }
  25% { opacity: 1; }
  78% { transform: translateX(-50%) scaleY(1) rotate(2deg); opacity: 1; }
  100% { transform: translateX(-50%) scaleY(1) rotate(0deg); opacity: 1; }
}
@keyframes slip-pull {
  from { transform: translateX(-50%) scaleY(1) translateY(0); opacity: 1; }
  to { transform: translateX(-50%) scaleY(1) translateY(-16px); opacity: 1; }
}
.coin-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.toss-pit {
  display: flex; justify-content: center; gap: 22px; min-height: 210px;
  align-items: flex-end; margin: 8px 0 12px; padding: 12px 8px 16px;
  touch-action: none; cursor: grab; perspective: 900px;
  background:
    radial-gradient(ellipse at 50% 88%, rgba(90, 52, 24, 0.16), transparent 58%),
    linear-gradient(#efe4d0, #e7d8bf);
  border-radius: 18px; border: 1px solid rgba(90, 52, 24, 0.12);
}
.cash { width: 96px; height: 132px; position: relative; }
.cash-rotor {
  width: 96px; height: 96px; position: absolute; left: 0; bottom: 14px;
  transform-style: preserve-3d; transform: rotateZ(var(--twist, 0deg));
}
.toss-pit .cash:nth-child(1) { --twist: -11deg; }
.toss-pit .cash:nth-child(2) { --twist: 6deg; }
.toss-pit .cash:nth-child(3) { --twist: 14deg; }
.cash-yang, .cash-yin {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.cash-yin { transform: rotateY(180deg); }
.cash-yang svg, .cash-yin svg { width: 100%; height: 100%; display: block; }
.cash-shadow {
  position: absolute; left: 18px; bottom: 4px; width: 60px; height: 14px;
  background: rgba(40, 22, 10, 0.28); border-radius: 50%;
}
.cash.fly-yang .cash-rotor { animation: spin-yang .92s linear forwards; }
.cash.fly-yin .cash-rotor { animation: spin-yin .92s linear forwards; }
.cash.fly-yang .cash-shadow, .cash.fly-yin .cash-shadow { animation: shadow-toss .92s ease forwards; }
@keyframes spin-yang {
  0% { transform: translateY(0) rotateZ(0deg) rotateY(0deg); }
  36% { transform: translateY(-112px) rotateZ(calc(var(--twist) * 0.35)) rotateY(420deg); }
  68% { transform: translateY(0) rotateZ(var(--twist)) rotateY(780deg); }
  82% { transform: translateY(-14px) rotateZ(var(--twist)) rotateY(960deg); }
  100% { transform: translateY(0) rotateZ(var(--twist)) rotateY(1080deg); }
}
@keyframes spin-yin {
  0% { transform: translateY(0) rotateZ(0deg) rotateY(0deg); }
  36% { transform: translateY(-112px) rotateZ(calc(var(--twist) * 0.35)) rotateY(500deg); }
  68% { transform: translateY(0) rotateZ(var(--twist)) rotateY(900deg); }
  82% { transform: translateY(-14px) rotateZ(var(--twist)) rotateY(1100deg); }
  100% { transform: translateY(0) rotateZ(var(--twist)) rotateY(1260deg); }
}
@keyframes shadow-toss {
  0% { transform: scale(1); opacity: 0.35; }
  36% { transform: scale(0.45); opacity: 0.12; }
  68% { transform: scale(1.08); opacity: 0.4; }
  82% { transform: scale(0.8); opacity: 0.22; }
  100% { transform: scale(1); opacity: 0.32; }
}
.coin-stage { display: grid; gap: 8px; margin-top: 14px; }
.coin-line { display: flex; align-items: center; gap: 8px; }
.mini-cash { width: 36px; height: 36px; display: inline-flex; }
.mini-cash svg { width: 100%; height: 100%; display: block; }
.lot-grade { font-family: var(--serif); font-size: 28px; color: var(--cinnabar); margin: 8px 0; }
.verse { font-family: var(--serif); line-height: 1.9; margin: 0; }
.dual-bars { display: grid; gap: 8px; margin: 10px 0 16px; }
.dual-row { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 8px; align-items: center; font-size: 13px; }
.fit-score { font-family: var(--serif); font-size: 42px; line-height: 1; color: var(--cinnabar); }
@media (prefers-reduced-motion: reduce) {
  #tube.shaking .oracle-cup, #tube.shaking .slip, #tube.settle .oracle-cup,
  .drawn-slip.show, .drawn-slip.pulled, .cash.fly-yang, .cash.fly-yin,
  .cash.fly-yang .cash-rotor, .cash.fly-yin .cash-rotor,
  .cash.fly-yang .cash-shadow, .cash.fly-yin .cash-shadow,
  .deck-pile.shuffling { animation: none; }
  .drawn-slip.show, .drawn-slip.pulled { transform: translateX(-50%) scaleY(1); opacity: 1; }
  .cash.fly-yin .cash-rotor { transform: rotateY(180deg); }
  .cash.fly-yang .cash-rotor { transform: rotateY(0deg); }
}
@media (max-width: 800px) {
  .ask-grid, .pair-setup, .pair-mini { grid-template-columns: 1fr; }
  .read-row { grid-template-columns: 88px 1fr; }
}
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.subnav button { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--muted); }
.subnav button.active { background: var(--ink); color: #f6f1e7; }
.check-line { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.tarot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tarot-thumb { border: 0; background: transparent; padding: 0; text-align: center; }
.tarot-thumb img, .tarot-detail-img, .read-row img { width: 100%; border-radius: 8px; display: block; }
.tarot-detail-img { max-width: 220px; }
.read-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.read-row img.rev-img { transform: rotate(180deg); }
.spread { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 14px 0; }
.slot { width: 132px; text-align: center; }
.slot-label { font-size: 12px; color: var(--muted); min-height: 2.4em; }
.tcard { width: 120px; height: 200px; border: 0; background: transparent; perspective: 800px; padding: 0; }
.tcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s ease; }
.tcard.open .tcard-inner { transform: rotateY(180deg); }
.tcard-back, .tcard-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
.tcard-back {
  background: repeating-linear-gradient(45deg, #3e2418 0 8px, #5a3828 8px 16px);
  color: #f3e2c2; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; border: 2px solid #c9a06a;
}
.tcard-face { transform: rotateY(180deg); background: #fffdf8; border: 1px solid var(--line); }
.tcard-face img { width: 100%; height: 168px; object-fit: cover; display: block; }
.tcard.reversed .tcard-face img { transform: rotate(180deg); }
.tcard-face span { display: block; font-size: 12px; padding: 4px; }
.ritual { margin: 8px 0 16px; }
.deck-pile {
  position: relative; width: 104px; height: 156px; margin: 10px auto 4px;
  border: 0; background: transparent; padding: 0; cursor: grab; touch-action: none;
}
.deck-pile.shuffling { cursor: grabbing; }
.pile-card {
  position: absolute; inset: 16px 10px 8px 10px; border-radius: 10px;
  border: 2px solid #c9a06a; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #3e2418 0 8px, #5a3828 8px 16px);
  color: #f3e2c2; font-family: var(--serif); font-size: 22px;
}
.fan {
  display: flex; align-items: flex-end; overflow-x: auto;
  padding: 18px 8px 12px; margin-top: 6px;
}
.fan-card {
  flex: 0 0 42px; width: 42px; height: 72px; margin-left: -24px; border-radius: 6px;
  border: 1px solid #c9a06a; padding: 0; position: relative;
  background: repeating-linear-gradient(45deg, #3e2418 0 6px, #5a3828 6px 12px);
  color: #f3e2c2; font-family: var(--serif); font-size: 12px;
}
.fan-card:first-child { margin-left: 0; }
.fan-card:hover, .fan-card:focus { transform: translateY(-12px); z-index: 3; }
.fan-card.taken { visibility: hidden; }
.placeholder {
  width: 120px; height: 200px; margin: 0 auto; border-radius: 10px;
  border: 1px dashed rgba(70, 48, 28, 0.35); display: grid; place-items: center;
  color: var(--muted); font-size: 13px; background: rgba(255, 253, 248, 0.45);
}
#reshuffle { display: block; margin: 8px auto 0; }
#reshuffle[hidden] { display: none; }
.spread.celtic {
  display: grid;
  grid-template-columns: 140px 292px 140px 140px;
  gap: 18px 16px;
  justify-content: center;
  align-items: center;
}
.spread.celtic .cross-pair {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-end;
}
.spread.celtic .c3 { grid-column: 2; grid-row: 3; justify-self: center; }
.spread.celtic .c4 { grid-column: 1; grid-row: 2; }
.spread.celtic .c5 { grid-column: 2; grid-row: 1; justify-self: center; }
.spread.celtic .c6 { grid-column: 3; grid-row: 2; }
.spread.celtic .c7 { grid-column: 4; grid-row: 1; }
.spread.celtic .c8 { grid-column: 4; grid-row: 2; }
.spread.celtic .c9 { grid-column: 4; grid-row: 3; }
.spread.celtic .c10 { grid-column: 4; grid-row: 4; }
@media (max-width: 800px) {
  .spread.celtic, .spread.celtic .cross-pair { display: flex; flex-wrap: wrap; justify-content: center; }
}
#tarotSpreads button.active { background: var(--ink); color: #f6f1e7; }

@media (min-width: 1100px) {
  .today-lines, .pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .top, .layout, .split, .line-item { grid-template-columns: 1fr; }
  .brand h1 { font-size: 32px; }
  .shell { padding: 16px 12px 48px; }
}
@media print {
  .top, .nav, .actions, .footer, .no-print { display: none !important; }
  body { background: white; }
  .sheet, .card { box-shadow: none; }
}
