@font-face {
  font-family: "Hexagram Han";
  src: url("../fonts/hexagram-serif.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   观象 · 平面版
   ------------------------------------------------------------
   不使用玻璃、模糊、投影、渐变高光、光栅纹理。
   只保留：实色、细线、字级、留白。
   ============================================================ */

:root {
  --bg: #0b0a09;
  --bg-raised: #151311;
  --text: #f2efe9;
  --muted: #96928a;
  --dim: #69665f;
  --gold: #d8b26a;
  --gold-soft: #e4c486;
  --gold-ink: #16130d;
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    "Hexagram Han", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

html[lang^="zh"] .lang-en {
  display: none !important;
}

html[lang="en"] .lang-zh {
  display: none !important;
}

/* ---------- skip ---------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- header ---------- */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.brand-zh {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.brand-en {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.05em;
}

html[lang^="zh"] .brand-en {
  display: none;
}

html[lang="en"] .brand-zh {
  display: none;
}

html[lang="en"] .brand-en {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch button {
  position: relative;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.lang-switch button:hover {
  color: var(--muted);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--text);
}

.lang-switch button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
}

.history-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 11px;
}

.history-btn:hover {
  color: var(--text);
}

.history-count {
  color: var(--gold);
  font-size: 9px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
}

.icon-btn:hover {
  color: var(--text);
}

.icon {
  width: 16px;
  height: 16px;
}

#soundBtn .icon-sound-off {
  display: none;
}

#soundBtn[aria-pressed="false"] .icon-sound-on {
  display: none;
}

#soundBtn[aria-pressed="false"] .icon-sound-off {
  display: block;
}

/* ---------- hero ---------- */

.page {
  position: relative;
  scroll-margin-top: 72px;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px 42px;
}

.hero h1 {
  max-width: 12em;
  color: var(--text);
  font-size: clamp(56px, 6.8vw, 96px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

html[lang="en"] .hero h1 {
  font-size: clamp(44px, 5vw, 72px);
  letter-spacing: -0.045em;
}

.hero-lede {
  max-width: 34em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* ---------- workspace ---------- */

.workspace {
  --left: 480px;
  position: relative;
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 56px;
  border-top: 1px solid var(--line);
}

.workspace::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(24px + var(--left));
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.workspace.is-reading {
  padding-top: 0;
}

/* ---------- control ---------- */

.control {
  grid-column: 1;
  padding: 40px 48px 40px 0;
}

.control h2 {
  color: var(--text);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.control-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.ask {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
}

.field label {
  display: block;
  margin-bottom: 9px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.field input:focus {
  border-bottom-color: var(--gold);
}

.btn-cast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.btn-cast:hover {
  background: var(--gold-soft);
}

.btn-cast:disabled {
  cursor: progress;
  background: var(--dim);
  color: var(--bg);
}

.btn-cast__label {
  display: block;
}

.link-btn {
  display: inline-block;
  margin-top: 26px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.link-btn:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- stage ---------- */

.stage {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 40px 0 40px 48px;
}

.workspace.is-reading .stage {
  position: sticky;
  top: 66px;
  align-self: start;
}

.stage-visual {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 400px;
}

.hexagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(58%, 420px);
}

.hex-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
}

.hex-rule {
  position: relative;
  display: block;
  width: 100%;
  height: 8px;
}

.hex-rule i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--gold);
}

.hex-rule i:first-child {
  left: 0;
  width: 100%;
}

.hex-rule i:last-child {
  right: 0;
  display: none;
  width: 100%;
}

.hex-row.is-yin .hex-rule i:first-child {
  width: 41%;
}

.hex-row.is-yin .hex-rule i:last-child {
  display: block;
  width: 41%;
}

.hex-row.is-moving::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: translateY(-50%);
}

.hex-row.is-empty .hex-rule i {
  display: none;
}

.hex-row.is-empty .hex-rule::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.hex-row.is-filled .hex-rule i {
  animation: line-in 0.18s linear both;
}

@keyframes line-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stage-foot {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-top: 24px;
}

.stage-status {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.skip-btn {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.skip-btn:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.stage-again {
  margin-left: auto;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--gold);
  background: none;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.04em;
}

@media (min-width: 901px) {
  .stage-again {
    display: none;
  }
}

/* ---------- reading ---------- */

.reading {
  grid-column: 1;
  padding: 40px 48px 40px 0;
}

.reading-meta {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.reading-date {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.reading-question {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.reading-label-inline {
  margin-right: 7px;
  color: var(--dim);
  font-size: 10px;
}

.is-empty {
  color: var(--dim);
}

.reading-head {
  margin-top: 28px;
}

.reading-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text);
  font-size: clamp(44px, 4.2vw, 60px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.reading-title:focus {
  outline: none;
}

.reading-title:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

.reading-pinyin {
  color: var(--gold);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.reading-en {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.reading-index {
  margin-top: 4px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.trigrams {
  margin-top: 7px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.7;
}

.reading-block {
  margin-top: 30px;
}

.reading-label,
.reading-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.reading-label i,
.reading-block h3 i {
  width: 12px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.judgment {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

html[lang="en"] .judgment {
  font-size: 16px;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ledger th {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: left;
}

.ledger td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  vertical-align: top;
}

.ledger th:first-child,
.ledger td:first-child {
  width: 40%;
  color: var(--text);
}

.ledger th:nth-child(2),
.ledger td:nth-child(2) {
  width: 22%;
}

.ledger th:last-child,
.ledger td:last-child {
  width: 38%;
  text-align: right;
}

.still-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.reading-hint {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--gold);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.changed-block {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.changed-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.changed-name {
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
}

.changed-pinyin {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.changed-en {
  color: var(--muted);
  font-size: 11px;
}

.changed-judgment {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.reading-actions {
  margin-top: 32px;
}

.reading-actions .btn-cast {
  width: 100%;
}

.reading-actions .text-btn {
  display: block;
  margin: 16px auto 0;
  text-align: center;
}

/* ---------- text buttons ---------- */

.text-btn {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.text-btn:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.text-btn--quiet {
  color: var(--dim);
  border-bottom-color: transparent;
}

.text-btn--danger {
  color: #e2a08d;
  border-bottom-color: #e2a08d;
}

/* ---------- dialog ---------- */

.history-dialog {
  width: min(92vw, 620px);
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg-raised);
  color: var(--text);
}

.history-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-panel {
  overflow: hidden;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--text);
  border-color: var(--muted);
}

.history-list {
  max-height: min(56vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  text-align: left;
}

.history-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.history-date {
  color: var(--dim);
  font-size: 10px;
}

.history-q {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-hex {
  color: var(--gold);
  font-size: 10px;
  white-space: nowrap;
}

.history-empty {
  padding: 36px 22px;
  text-align: center;
}

.history-empty strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.history-empty span {
  color: var(--dim);
  font-size: 11px;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
}

.dialog-foot .text-btn {
  font-size: 10px;
}

/* ---------- howto ---------- */

.howto {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.howto-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
}

.howto-panel summary::-webkit-details-marker {
  display: none;
}

.howto-panel summary::after {
  content: "+";
  color: var(--dim);
  font-size: 15px;
  font-weight: 300;
  line-height: 1;
}

.howto-panel[open] summary::after {
  content: "−";
}

.howto-body {
  max-width: 760px;
  padding: 0 0 22px;
}

.howto-body p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.howto-body p:last-child {
  margin-bottom: 0;
}

/* ---------- footer ---------- */

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--line-soft);
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 20px;
  color: var(--dim);
  font-size: 10px;
}

/* ---------- toast / noscript ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 80;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.15s linear, transform 0.15s linear;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-fallback {
  position: fixed;
  top: -1000px;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 90;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 12px;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .workspace {
    --left: 440px;
  }

  .control,
  .reading {
    padding-right: 40px;
  }

  .stage {
    padding-left: 40px;
  }

  .hexagram {
    width: min(62%, 380px);
  }
}

@media (max-width: 900px) {
  .workspace.is-reading .reading-actions #againBtn {
    display: none;
  }

  .site-header {
    height: 58px;
    padding: 0 20px;
  }

  .hero {
    padding: 52px 20px 30px;
  }

  .hero h1 {
    font-size: clamp(48px, 10vw, 64px);
  }

  html[lang="en"] .hero h1 {
    font-size: clamp(38px, 8.4vw, 52px);
  }

  .hero-lede {
    margin-top: 14px;
    font-size: 13px;
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0 20px 40px;
  }

  .workspace::before {
    display: none;
  }

  .control,
  .reading,
  .stage {
    grid-column: 1;
    padding: 32px 0;
  }

  .control {
    grid-row: 2;
    border-bottom: 1px solid var(--line);
  }

  .stage {
    grid-row: 1;
    min-height: 420px;
    border-bottom: 1px solid var(--line);
  }

  .workspace:not(.is-casting):not(.is-reading) .control {
    grid-row: 1;
  }

  .workspace.is-reading .stage {
    position: static;
    grid-row: 1;
    min-height: 420px;
  }

  .workspace:not(.is-casting):not(.is-reading) .stage {
    display: none;
  }

  .workspace.is-reading .reading {
    grid-row: 2;
  }

  .stage-visual {
    min-height: 320px;
  }

  .hexagram {
    width: min(66%, 320px);
    gap: 10px;
  }

  .hex-row {
    height: 26px;
  }

  .reading-title {
    font-size: 44px;
  }

  .howto {
    padding: 0 20px;
  }

  .site-footer {
    padding: 16px 20px 32px;
  }
}

@media (max-width: 640px) {
  .header-actions {
    gap: 16px;
  }

  .lang-switch {
    gap: 10px;
  }

  .lang-switch button,
  .history-btn {
    font-size: 10px;
  }

  .hero {
    padding: 40px 16px 24px;
  }

  .hero h1 {
    font-size: clamp(44px, 11.4vw, 56px);
  }

  html[lang="en"] .hero h1 {
    font-size: clamp(36px, 9.4vw, 46px);
  }

  .hero-lede {
    font-size: 12px;
  }

  .workspace {
    padding: 0 16px 32px;
  }

  .control,
  .reading,
  .stage {
    padding: 28px 0;
  }

  .control h2 {
    font-size: 26px;
  }

  .ask {
    margin-top: 26px;
  }

  .field input {
    height: 46px;
  }

  .btn-cast {
    min-height: 50px;
    font-size: 13px;
  }

  .stage {
    min-height: 380px;
  }

  .workspace.is-reading .stage {
    min-height: 380px;
  }

  .stage-visual {
    min-height: 280px;
  }

  .hexagram {
    width: min(78%, 260px);
    gap: 8px;
  }

  .hex-row {
    height: 24px;
  }

  .hex-row.is-moving::after {
    right: -12px;
  }

  .reading-title {
    font-size: 40px;
  }

  .reading-en {
    font-size: 14px;
  }

  .judgment {
    font-size: 15px;
  }

  .reading-hint {
    font-size: 12px;
  }

  .changed-name {
    font-size: 24px;
  }

  .history-dialog {
    width: min(92vw, 420px);
  }

  .dialog-head {
    padding: 16px 18px 13px;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date hex"
      "q q";
    gap: 3px 12px;
    padding: 12px 18px;
  }

  .history-date {
    grid-area: date;
  }

  .history-q {
    grid-area: q;
    white-space: normal;
  }

  .history-hex {
    grid-area: hex;
  }

  .dialog-foot {
    padding: 12px 18px;
  }

  .site-footer p {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 380px) {
  .site-header {
    gap: 12px;
    padding: 0 12px;
  }

  .header-actions {
    gap: 10px;
  }

  .lang-switch {
    gap: 7px;
  }

  .lang-switch button,
  .history-btn {
    font-size: 9px;
  }

  .hero {
    padding: 32px 12px 20px;
  }

  .hero h1 {
    font-size: clamp(40px, 12.4vw, 50px);
  }

  html[lang="en"] .hero h1 {
    font-size: clamp(32px, 9.6vw, 42px);
  }

  .workspace {
    padding: 0 12px 28px;
  }

  .control,
  .reading,
  .stage {
    padding: 24px 0;
  }

  .control h2 {
    font-size: 24px;
  }

  .stage {
    min-height: 340px;
  }

  .workspace.is-reading .stage {
    min-height: 340px;
  }

  .stage-visual {
    min-height: 250px;
  }

  .hexagram {
    width: min(82%, 230px);
  }

  .reading-title {
    font-size: 36px;
  }

  .judgment {
    font-size: 14px;
  }

  .dialog-head,
  .history-row,
  .dialog-foot {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .btn-cast {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }

  .hex-rule i,
  .hex-row.is-moving::after {
    background: CanvasText;
  }

  .hex-row.is-empty .hex-rule::before {
    background: GrayText;
  }

  .reading-hint {
    border-left-color: CanvasText;
  }
}
