/* ============================================================
   掷卦 · 周易六十四卦
   墨底金石风格
   ============================================================ */

:root {
  --ink-900: #06090d;
  --ink-800: #0b1118;
  --ink-700: #101821;
  --ink-600: #16202b;
  --line: rgba(201, 168, 106, 0.16);
  --line-soft: rgba(201, 168, 106, 0.08);
  --gold: #c9a86a;
  --gold-bright: #efd9a8;
  --gold-dim: #8a7444;
  --paper: #e9e1ce;
  --muted: #8a95a3;
  --cinnabar: #a8392b;
  --cinnabar-bright: #cf5a44;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Source Han Serif SC", "Times New Roman", serif;
  --kai: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "Noto Serif SC", serif;
  --radius: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--serif);
  color: var(--paper);
  background:
    radial-gradient(1100px 620px at 50% -12%, #1a2836 0%, rgba(26, 40, 54, 0) 62%),
    radial-gradient(760px 520px at 108% 102%, #1d1710 0%, rgba(29, 23, 16, 0) 58%),
    radial-gradient(680px 480px at -10% 40%, #131c26 0%, rgba(19, 28, 38, 0) 60%),
    var(--ink-900);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸纹颗粒 */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 背景漂浮卦符 */
.bg-symbols {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-symbols span {
  position: absolute;
  font-size: 3.2rem;
  line-height: 1;
  color: rgba(201, 168, 106, 0.055);
  font-family: "Segoe UI Symbol", "Apple Symbols", var(--serif);
  animation: drift linear infinite;
  will-change: transform, opacity;
}

@keyframes drift {
  0%   { transform: translate3d(0, 12px, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translate3d(0, -90px, 0) rotate(6deg); opacity: 0; }
}

/* ============================================================
   布局
   ============================================================ */

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, 100% - 40px);
  margin: 0 auto;
  padding: 34px 0 60px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.seal-mini {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-family: var(--kai);
  font-size: 1.65rem;
  color: #f3e7cf;
  background: linear-gradient(150deg, #b8402f, #8f2a20);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(168, 57, 43, 0.35), inset 0 0 0 1px rgba(255, 230, 200, 0.25);
  transform: rotate(-2deg);
}

.brand-text h1 {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #f7ebcb 5%, #c9a86a 58%, #8a6f3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(201, 168, 106, 0.16));
}

.brand-text p {
  margin: 6px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(201, 168, 106, 0.04);
  color: var(--gold);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.icon-btn:hover { background: rgba(201, 168, 106, 0.12); border-color: var(--gold-dim); }
.icon-btn .icon-off { display: none; }
.icon-btn[aria-pressed="false"] { color: var(--muted); }
.icon-btn[aria-pressed="false"] .icon-on { display: none; }
.icon-btn[aria-pressed="false"] .icon-off { display: inline; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

/* ============================================================
   面板
   ============================================================ */

.panel {
  position: relative;
  padding: 20px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(32, 44, 58, 0.55) 0%, rgba(11, 17, 24, 0.72) 46%, rgba(9, 13, 19, 0.85) 100%);
  box-shadow:
    0 24px 60px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 240, 210, 0.05);
  overflow: hidden;
}

.panel::before {
  /* 面板四角描边 */
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 168, 106, 0.06);
  pointer-events: none;
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--gold);
}

.panel-sub {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   卦象
   ============================================================ */

.hex-view {
  display: flex;
  justify-content: center;
  padding: 26px 0 20px;
}

.hexagram {
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  width: min(100%, 390px);
}

.yao-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 20px;
}

.yao-shape {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 11%;
}

.bar {
  height: 100%;
  flex: 1;
  border-radius: 2px;
  background:
    linear-gradient(180deg, #f2dfae 0%, #cbaa6c 42%, #9b7f47 100%);
  box-shadow:
    0 0 12px rgba(201, 168, 106, 0.22),
    inset 0 1px 0 rgba(255, 250, 235, 0.55);
}

.yao-row.is-moving .bar {
  background: linear-gradient(180deg, #ffe3ad 0%, #e0b160 45%, #b3402c 100%);
  box-shadow:
    0 0 16px rgba(224, 177, 96, 0.45),
    0 0 26px rgba(179, 64, 44, 0.28),
    inset 0 1px 0 rgba(255, 250, 235, 0.7);
}

.slot {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, rgba(201, 168, 106, 0.28) 0 5px, transparent 5px 12px);
  opacity: 0.55;
}

.yao-name {
  flex: 0 0 auto;
  min-width: 3.1em;
  text-align: right;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  white-space: nowrap;
  transition: color 0.3s;
}

.yao-row.is-filled .yao-name { color: var(--gold); }
.yao-row.is-moving .yao-name { color: var(--cinnabar-bright); }

.moving-mark {
  flex: 0 0 1.1em;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--cinnabar-bright);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.yao-row.is-moving .moving-mark { opacity: 1; transform: scale(1); }

.yao-row.drawing .bar {
  animation: inkIn 0.62s cubic-bezier(0.18, 0.85, 0.2, 1) both;
}
.yao-row.drawing .yao-name,
.yao-row.drawing .moving-mark {
  animation: fadeUp 0.5s 0.22s ease both;
}
.yao-row.drawing .bar.yin-l { transform-origin: right center; }
.yao-row.drawing .bar.yin-r { transform-origin: left center; }
.yao-row.drawing .bar.yang { transform-origin: center; }

@keyframes inkIn {
  from { transform: scaleX(0); opacity: 0.2; filter: blur(3px); }
  to   { transform: scaleX(1); opacity: 1; filter: blur(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hexagram.is-complete .bar {
  animation: glowPulse 2.8s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(201, 168, 106, 0.2), inset 0 1px 0 rgba(255, 250, 235, 0.55); }
  50%      { box-shadow: 0 0 22px rgba(201, 168, 106, 0.42), inset 0 1px 0 rgba(255, 250, 235, 0.7); }
}

.board-hint {
  margin: 0 auto;
  padding: 0 10px;
  max-width: 30em;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  line-height: 1.9;
  color: var(--muted);
}

/* ============================================================
   骰盘
   ============================================================ */

.dice-tray {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 4vw, 34px);
  padding: 40px 0 30px;
  perspective: 950px;
  min-height: 150px;
}

.die-wrap {
  transform-style: preserve-3d;
  transform: rotateX(-11deg) rotateY(9deg);
}

.die {
  --die: clamp(54px, 9vw, 74px);
  --half: calc(var(--die) / 2);
  position: relative;
  width: var(--die);
  height: var(--die);
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 1.05s cubic-bezier(0.22, 0.92, 0.24, 1);
  will-change: transform;
}

.die.tossing {
  animation: hop 1.05s cubic-bezier(0.3, 0.1, 0.3, 1);
}

@keyframes hop {
  0%   { translate: 0 0; }
  32%  { translate: 0 -32px; }
  62%  { translate: 0 4px; }
  78%  { translate: 0 -9px; }
  100% { translate: 0 0; }
}

.face {
  position: absolute;
  inset: 0;
  padding: 11%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6%;
  border-radius: 13%;
  background:
    radial-gradient(circle at 28% 22%, #fbf5e6 0%, #ece1c8 40%, #d3c3a2 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 -6px 12px rgba(120, 96, 60, 0.22);
  backface-visibility: hidden;
}

.cell { display: grid; place-items: center; }

.pip {
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #5b4630 0%, #2a1e13 55%, #140d08 100%);
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.18), 0 1px 1px rgba(0, 0, 0, 0.35);
}
.pip.is-red {
  background: radial-gradient(circle at 34% 28%, #d4553c 0%, #9c2f20 60%, #6d1c12 100%);
}

.f-front  { transform: translateZ(var(--half)); }
.f-back   { transform: rotateY(180deg) translateZ(var(--half)); }
.f-right  { transform: rotateY(90deg) translateZ(var(--half)); }
.f-left   { transform: rotateY(-90deg) translateZ(var(--half)); }
.f-top    { transform: rotateX(90deg) translateZ(var(--half)); }
.f-bottom { transform: rotateX(-90deg) translateZ(var(--half)); }

.toss-readout {
  text-align: center;
  min-height: 58px;
  padding: 2px 0 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.readout-main {
  font-family: var(--kai);
  font-size: 1.06rem;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  transition: color 0.3s;
}

.readout-main.pop { animation: readoutPop 0.45s ease; }
@keyframes readoutPop {
  0%   { opacity: 0; transform: translateY(6px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.readout-sub {
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.altar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.btn-primary {
  position: relative;
  padding: 15px 20px;
  font-family: var(--kai);
  font-size: 1.02rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #1a1208;
  background: linear-gradient(170deg, #f0d9a4 0%, #cfae70 45%, #a98a4c 100%);
  border: 1px solid rgba(255, 240, 200, 0.5);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(201, 168, 106, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -14px rgba(201, 168, 106, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  filter: brightness(1.05);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { cursor: default; filter: saturate(0.5) brightness(0.78); }

.btn-ghost {
  padding: 11px 18px;
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-dim); background: rgba(201, 168, 106, 0.05); }

.rule {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.rule summary {
  cursor: pointer;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  list-style: none;
  outline: none;
}
.rule summary::-webkit-details-marker { display: none; }
.rule summary::before { content: "＋ "; color: var(--gold-dim); }
.rule[open] summary::before { content: "－ "; }
.rule ul { margin: 12px 0 0; padding-left: 1.1em; line-height: 1.9; }
.rule li::marker { color: var(--gold-dim); }

/* ============================================================
   占断结果
   ============================================================ */

.reading {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(38, 50, 64, 0.6) 0%, rgba(12, 18, 25, 0.9) 55%, rgba(9, 13, 18, 0.95) 100%);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 240, 210, 0.06);
  padding: 26px 28px 24px;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: hidden;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reading-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.seal-glyph {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  line-height: 1;
  color: #f1e4c8;
  font-family: "Segoe UI Symbol", "Apple Symbols", var(--serif);
  background: linear-gradient(150deg, #b8402f, #8b2a1e);
  border-radius: 5px;
  box-shadow: 0 8px 26px -8px rgba(168, 57, 43, 0.7), inset 0 0 0 1px rgba(255, 226, 190, 0.28);
}

.reading-id { flex: 1 1 240px; min-width: 0; }

.reading-name {
  font-family: var(--kai);
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  letter-spacing: 0.16em;
  background: linear-gradient(180deg, #f8ecd0, #c9a86a 62%, #8d7340);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reading-meta {
  margin-top: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.reading-tag {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 8px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  border: 1px dashed rgba(201, 168, 106, 0.3);
  border-radius: 2px;
  background: rgba(201, 168, 106, 0.05);
  line-height: 1.6;
}

.reading-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 30px;
  padding-top: 22px;
}

.reading-body.is-two-col {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.read-col h3 {
  margin: 0 0 10px;
  font-family: var(--kai);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
}
.read-col h3 + * { margin-top: 0; }
.read-col > * + h3 { margin-top: 20px; }

.gua-text {
  margin: 0;
  font-family: var(--kai);
  font-size: 0.98rem;
  line-height: 1.95;
  color: #ded4bd;
  letter-spacing: 0.03em;
}

.plain {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.95;
  color: #a9b2bd;
}

.take {
  margin: 8px 0 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.9;
  color: #b6ab93;
}

.take-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  font-family: var(--kai);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 106, 0.28);
  border-radius: 2px;
  white-space: nowrap;
}

.line-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.line-list li {
  display: grid;
  grid-template-columns: 3.5em 1fr;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 2px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #98a2ad;
  transition: background 0.3s, color 0.3s;
}

.line-list li .lname {
  font-family: var(--kai);
  color: var(--gold-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.line-list li.is-moving {
  color: #e4d8bf;
  background: rgba(168, 57, 43, 0.12);
  box-shadow: inset 2px 0 0 rgba(207, 90, 68, 0.75);
}
.line-list li.is-moving .lname { color: var(--cinnabar-bright); }

.line-list li.is-focus {
  background: rgba(201, 168, 106, 0.12);
  box-shadow: inset 2px 0 0 var(--gold);
  color: #f0e6d0;
}
.line-list li.is-focus .lname { color: var(--gold-bright); }

.line-list li .mark { font-size: 0.7rem; color: var(--cinnabar-bright); }

.changed-card {
  padding: 16px 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);
}

.changed-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.changed-glyph {
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
  font-family: "Segoe UI Symbol", "Apple Symbols", var(--serif);
}

.changed-name {
  font-family: var(--kai);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.changed-sub {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}

.reading-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #6f7987;
  line-height: 1.9;
}

/* ============================================================
   历史
   ============================================================ */

.history-section {
  margin-top: 30px;
  padding-top: 6px;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.history-empty {
  grid-column: 1 / -1;
  padding: 22px 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #6b7583;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.012);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.history-item:hover {
  border-color: var(--gold-dim);
  background: rgba(201, 168, 106, 0.06);
  transform: translateY(-1px);
}

.history-glyph {
  flex: 0 0 auto;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold);
  font-family: "Segoe UI Symbol", "Apple Symbols", var(--serif);
}

.history-text { display: block; min-width: 0; }

.history-name {
  display: block;
  font-family: var(--kai);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  color: #ddd2ba;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ============================================================
   页脚 / 提示
   ============================================================ */

.site-footer {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  line-height: 2;
  color: #6f7987;
}
.site-footer .dim { color: #4e5764; font-size: 0.72rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  padding: 10px 20px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  background: rgba(14, 20, 28, 0.95);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .altar-panel { order: -1; }
  .reading-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .read-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .app { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .panel { padding: 16px 16px 20px; }
  .hexagram { gap: 12px; width: min(100%, 320px); }
  .yao-row { height: 17px; }
  .dice-tray { padding: 26px 0 22px; min-height: 118px; }
  .reading { padding: 20px 18px 18px; }
  .reading-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .read-col:last-child { grid-column: auto; }
  .reading-tag { width: 100%; }
  .seal-glyph { width: 56px; height: 56px; font-size: 2.1rem; }
  .history-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
