/* ===== 六爻占卜 · 界面样式 ===== */
:root {
  --paper: #fbf7ee;
  --paper-2: #f4eddd;
  --paper-3: #efe6d2;
  --ink: #26221c;
  --ink-2: #4b4438;
  --ink-3: #6a6152;
  --line: #e2d7c0;
  --line-2: #d3c5a9;
  --cinnabar: #a8342a;
  --cinnabar-2: #c25a4b;
  --cinnabar-soft: rgba(168, 52, 42, .08);
  --jade: #46685c;
  --gold: #a98a55;
  --shadow: 0 1px 2px rgba(74, 58, 36, .06), 0 8px 24px -12px rgba(74, 58, 36, .22);
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", var(--serif);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 28px 16px 64px;
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .85), transparent 42%),
    radial-gradient(circle at 85% 2%, rgba(255, 250, 238, .7), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(214, 199, 172, .35), transparent 60%),
    #ece3d2;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* 纸纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, .022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 100, 70, .018) 0 1px, transparent 1px 4px);
  z-index: 0;
}

.paper {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 44px 48px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 60%, var(--paper-2) 100%);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  box-shadow: var(--shadow);
}

.paper::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(168, 52, 42, .16);
  border-radius: 1px;
  pointer-events: none;
}

/* ===== 报头 ===== */
.masthead {
  position: relative;
  text-align: center;
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.masthead h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--ink);
}

.masthead .sub {
  margin: 10px 0 0;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--ink-3);
}

.seal {
  position: absolute;
  top: 2px;
  right: 6px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--kai);
  font-size: 22px;
  color: #fff6ee;
  background: var(--cinnabar);
  border-radius: 3px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22);
  transform: rotate(-3deg);
  opacity: .92;
}

/* ===== 步骤导航 ===== */
.steps {
  display: flex;
  gap: 4px;
  margin: 0 0 26px;
  padding: 5px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.steps::-webkit-scrollbar { display: none; }

.steps button {
  flex: 1 0 auto;
  min-width: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .22s, color .22s, box-shadow .22s;
}
.steps button i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .6;
}
.steps button:hover { color: var(--cinnabar); }
.steps button.active {
  color: #fff8f0;
  background: var(--cinnabar);
  box-shadow: 0 2px 10px -4px rgba(168, 52, 42, .8);
}
.steps button.active i { opacity: .85; }
.steps button:disabled { cursor: not-allowed; opacity: .42; }

/* ===== 面板 ===== */
.panel { animation: rise .38s cubic-bezier(.2, .7, .3, 1); }
.panel[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--ink);
}
.section-title::before {
  content: "";
  width: 3px;
  height: 17px;
  background: var(--cinnabar);
  border-radius: 2px;
}
.section-title .t { white-space: nowrap; }
.section-title small {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.hint {
  margin: 0 0 14px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
  background: var(--cinnabar-soft);
  border-left: 2px solid var(--cinnabar-2);
  border-radius: 0 3px 3px 0;
}
.hint b { color: var(--cinnabar); font-weight: 600; }

/* ===== 表单 ===== */
.field { margin-bottom: 20px; }
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.field > label .req { color: var(--cinnabar); }

textarea, input[type="datetime-local"], select {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.8; }
textarea:focus, input:focus, select:focus {
  border-color: var(--cinnabar-2);
  box-shadow: 0 0 0 3px rgba(168, 52, 42, .1);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
  cursor: pointer;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; min-width: 0; }

.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: .08em;
  color: var(--ink-2);
  background: #fffdf8;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--cinnabar-2); color: var(--cinnabar); }
.chip:focus { outline: none; }
.chip:focus-visible { outline: 2px solid var(--cinnabar-2); outline-offset: 2px; }
.chip-label {
  flex: 0 0 100%;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.chip.sample { font-size: 12.5px; padding: 6px 13px; }
.chip.on {
  color: #fff8f0;
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .16em;
  color: #fff8f0;
  background: linear-gradient(180deg, var(--cinnabar-2), var(--cinnabar));
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 2px 10px -5px rgba(120, 30, 20, .9);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.3); }
.btn.ghost {
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn.ghost:hover { color: var(--cinnabar); border-color: var(--cinnabar-2); }
.btn.sm { padding: 7px 16px; font-size: 13px; letter-spacing: .1em; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.actions .spacer { flex: 1 1 auto; }

/* ===== 铜钱 ===== */
.coin-stage {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 34px 0 26px;
  perspective: 800px;
}

.coin {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 26%, #d8bd86, #b99a5e 45%, #9a7c45 78%, #8a6d3b 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22), 0 8px 18px -8px rgba(60, 44, 20, .75);
  transform-style: preserve-3d;
  transition: transform .1s;
}
.coin::before { /* 方孔 */
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--paper);
  border: 2px solid #7d6234;
  border-radius: 2px;
  box-shadow: inset 0 0 6px rgba(60, 44, 20, .45);
}
.coin::after { /* 外缘 */
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(90, 68, 34, .38);
  border-radius: 50%;
  pointer-events: none;
}
.coin i {
  position: absolute;
  font-style: normal;
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1;
  color: #4c3a1c;
  opacity: .9;
  transition: opacity .22s;
}
.coin i.c1 { top: 7px; left: 50%; transform: translateX(-50%); }
.coin i.c2 { right: 8px; top: 50%; transform: translateY(-50%); }
.coin i.c3 { bottom: 7px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.coin i.c4 { left: 8px; top: 50%; transform: translateY(-50%); }
.coin b {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 10px;
  margin-left: -10px;
  opacity: 0;
  transition: opacity .22s;
  border: 2.5px solid rgba(70, 52, 24, .8);
}
.coin b.m1 { top: 13px; border-radius: 0 0 20px 20px; border-top: 0; }
.coin b.m2 { bottom: 13px; border-radius: 20px 20px 0 0; border-bottom: 0; }
.coin.back i { opacity: 0; }
.coin.back b { opacity: 1; }
.coin.back i { letter-spacing: 0; }

.coin.spin { animation: spin .62s cubic-bezier(.35, .1, .25, 1); }
@keyframes spin {
  0% { transform: rotateY(0) scale(1); }
  40% { transform: rotateY(540deg) scale(1.06); }
  70% { transform: rotateY(900deg) scale(.97); }
  100% { transform: rotateY(1080deg) scale(1); }
}

.toss-caption {
  text-align: center;
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--ink-2);
  min-height: 26px;
}
.toss-caption b { color: var(--cinnabar); }
.toss-caption .big {
  font-family: var(--kai);
  font-size: 19px;
  color: var(--cinnabar);
  margin-left: 6px;
}

/* 已起之爻 */
.stack {
  margin: 26px auto 4px;
  max-width: 380px;
  display: flex;
  flex-direction: column-reverse;
  gap: 7px;
}
.stack .empty {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .1em;
  padding: 18px 0;
}
.stack-row {
  display: grid;
  grid-template-columns: 30px 148px 1fr;
  align-items: center;
  gap: 14px;
  padding: 5px 10px;
  border-bottom: 1px dashed var(--line);
  animation: rise .3s ease both;
}
.stack-row .idx { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.stack-row .cap { font-size: 12.5px; color: var(--ink-2); letter-spacing: .06em; text-align: left; }
.stack-row .cap em { font-style: normal; color: var(--cinnabar); }

.bar { display: flex; align-items: center; height: 12px; width: 100%; }
.bar .seg { height: 9px; background: var(--ink); border-radius: 1px; }
.bar .seg.half { flex: 0 0 43%; }
.bar .seg.gap { flex: 0 0 14%; background: transparent; }
.bar.yang .seg { flex: 1 1 100%; }

/* 手动起卦 */
.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.manual-grid label {
  display: block;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

/* ===== 卦盘 ===== */
.chart {
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: #fffdf7;
  overflow: hidden;
  margin-bottom: 22px;
}

.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding: 14px 20px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink-2);
}
.chart-meta b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.chart-meta .gz { font-size: 14.5px; letter-spacing: .1em; color: var(--cinnabar); }

.chart.static .chart-heads,
.chart.static .yao-row {
  grid-template-columns: 3.4em 5.6em minmax(0, 24em) !important;
  justify-content: center;
}
.chart.static .move,
.chart.static .bian { display: none; }

.chart-heads {
  display: grid;
  grid-template-columns: 3.4em 5.6em minmax(0, 1fr) 1.9em minmax(0, 1fr);
  align-items: end;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.chart-heads .h {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.chart-heads .gua-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink);
}
.chart-heads .gua-name small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.7;
}
.chart-heads .gua-name .tri { letter-spacing: .12em; }

.chart-body { padding: 6px 18px 12px; }

.yao-row {
  display: grid;
  grid-template-columns: 3.4em 5.6em minmax(0, 1fr) 1.9em minmax(0, 1fr);
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  transition: background .2s;
}
.yao-row:last-child { border-bottom: 0; }
.yao-row:hover { background: rgba(168, 52, 42, .035); }
.yao-row.moving { background: rgba(168, 52, 42, .05); }

.yao-row .lshen {
  text-align: center;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.yao-row .lshen.hot { color: var(--cinnabar); }

.yao-row .bars { display: flex; justify-content: center; }
.yao-row .bars .bar { width: 74px; }

.yao-row .main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14.5px;
  letter-spacing: .04em;
}
.yao-row .main .lq { color: var(--ink); min-width: 2.7em; display: inline-block; }
.yao-row .main .lq.qin { color: #5a4a2f; }
.yao-row .main .gz { font-size: 15px; letter-spacing: .06em; min-width: 3.1em; display: inline-block; }
.yao-row .main .wx {
  font-size: 11.5px;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 0 4px;
  line-height: 1.5;
}

.badge {
  font-size: 11px;
  line-height: 1.6;
  padding: 0 5px;
  border-radius: 2px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge.shi { color: #fff8f0; background: var(--cinnabar); }
.badge.ying { color: var(--cinnabar); border: 1px solid var(--cinnabar-2); }
.badge.kong { color: #6b6b8a; border: 1px solid #b9b9cd; }
.badge.po { color: #8a5a20; border: 1px solid #d3b183; }
.badge.dong { color: #fff8f0; background: #7a6a4f; }
.badge.an { color: var(--jade); border: 1px solid #a8bfb5; }
.badge.lin { color: #7a6a4f; border: 1px dotted #c8b795; }

.yao-row .move {
  text-align: center;
  font-family: var(--kai);
  font-size: 16px;
  color: var(--cinnabar);
}
.yao-row .move.no { color: var(--line-2); font-size: 13px; }

.yao-row .bian {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-2);
}
.yao-row .bian .dim { color: #7f7565; }
.yao-row .bian .flag { font-size: 11.5px; color: var(--cinnabar); }

.fushen {
  grid-column: 1 / -1;
  padding: 2px 0 0 5.6em;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.fushen b { color: #6b6b8a; font-weight: 400; }

.audit {
  margin: -10px 0 20px;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .03em;
  color: var(--ink-3);
}

/* 信息卡 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.card {
  padding: 13px 16px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.card h3 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.card p { margin: 0; font-size: 14px; letter-spacing: .04em; }
.card p + p { margin-top: 4px; }
.card .kv { color: var(--ink-3); font-size: 12.5px; }
.card .v { color: var(--ink); }

/* 说明 */
details.note {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf7;
  padding: 0 16px;
}
details.note summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 13.5px;
  letter-spacing: .1em;
  color: var(--ink-2);
  list-style: none;
}
details.note summary::-webkit-details-marker { display: none; }
details.note summary::before { content: "◇ "; color: var(--cinnabar-2); }
details.note[open] summary::before { content: "◆ "; }
details.note .body {
  padding: 0 0 16px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-2);
}
details.note .body dt { color: var(--cinnabar); font-weight: 600; margin-top: 10px; }
details.note .body dd { margin: 2px 0 0; }

/* 提示词 */
.prompt-box {
  position: relative;
  margin-top: 8px;
}
.prompt-box textarea {
  min-height: 340px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.75;
  background: #fffdf8;
  letter-spacing: 0;
}
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  padding: 10px 22px;
  font-size: 13.5px;
  letter-spacing: .1em;
  color: #fff8f0;
  background: rgba(38, 34, 28, .92);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 50;
}
.copy-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 页脚 */
.foot {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-3);
}

/* 响应式 */
@media (max-width: 760px) {
  body { padding: 14px 8px 40px; }
  .paper { padding: 26px 18px 32px; }
  .paper::after { inset: 5px; }
  .masthead h1 { font-size: 24px; letter-spacing: .24em; }
  .seal { width: 34px; height: 34px; font-size: 17px; top: 0; }
  .steps button { min-width: 84px; font-size: 13px; padding: 8px 10px; }
  .steps button i { display: none; }
  .coin { width: 72px; height: 72px; }
  .coin-stage { gap: 22px; padding: 24px 0 18px; }
  .chart-heads, .yao-row { grid-template-columns: 2.6em 3.4em minmax(0, 1fr) 1.6em minmax(0, .9fr); padding-left: 4px; padding-right: 4px; }
  .chart-meta, .chart-body { padding-left: 12px; padding-right: 12px; }
  .chart-heads { padding-left: 12px; padding-right: 12px; }
  .yao-row .bars .bar { width: 44px; }
  .yao-row .main { font-size: 13px; gap: 5px; }
  .yao-row .main .gz { font-size: 13.5px; }
  .yao-row .bian { font-size: 12.5px; gap: 4px; }
  .fushen { padding-left: 3em; }
}

@media (max-width: 620px) {
  .chart-heads {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 4px 18px;
    padding: 14px 12px 8px;
  }
  .chart-heads .h { display: none; }
  .chart-heads .gua-name { font-size: 15.5px; }
  .chart-heads .gua-name small { font-size: 11px; }
  .chart-heads { gap: 6px 10px; }
  .chart-heads .gua-name { flex: 1 1 44%; }
  .chart-heads .gua-name + .gua-name::before {
    content: "→ ";
    font-size: 12px;
    color: var(--cinnabar-2);
    letter-spacing: 0;
  }
  .chart-heads .gua-name .updown { display: none; }
  .chart-heads .gua-name small {
    margin-top: 2px;
    font-size: 10.5px;
    letter-spacing: .02em;
    line-height: 1.55;
  }
  .yao-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 10px 2px;
  }
  .yao-row .lshen { flex: 0 0 2.6em; text-align: left; }
  .yao-row .bars { flex: 0 0 56px; }
  .yao-row .bars .bar { width: 56px; }
  .yao-row:not(.moving) .bian { display: none; }
  .yao-row .main { flex: 1 1 auto; justify-content: flex-start; gap: 6px; }
  .yao-row .main .lq { min-width: auto; }
  .yao-row .main .gz { min-width: auto; }
  .yao-row .move { flex: 0 0 1.4em; }
  .yao-row .bian { flex: 1 1 100%; justify-content: flex-start; padding-left: 3.4em; font-size: 12.5px; }
  .yao-row .bian::before { content: "变"; font-size: 10px; color: var(--ink-3); margin-right: 2px; }
  .fushen { padding-left: 3.4em; }
  .chart-meta { gap: 4px 14px; font-size: 12px; }
  .chart-meta .gz { font-size: 13px; }
  .steps { gap: 2px; padding: 4px; }
  .steps button { min-width: 0; flex: 1 1 0; padding: 8px 2px; font-size: 12.5px; letter-spacing: .04em; }
  .coin { width: 66px; height: 66px; }
  .coin i { font-size: 10px; }
  .coin i.c1 { top: 4px; } .coin i.c3 { bottom: 4px; }
  .coin i.c2 { right: 5px; } .coin i.c4 { left: 5px; }
  .coin b { width: 15px; height: 7px; margin-left: -7.5px; }
  .coin b.m1 { top: 10px; } .coin b.m2 { bottom: 10px; }
  .coin-stage { gap: 16px; }
  .actions { gap: 8px; }
  .actions .btn { padding: 10px 18px; font-size: 14px; }
  .card { padding: 11px 13px; }
  textarea, input[type="datetime-local"], select { font-size: 16px; }
}

@media (max-width: 360px) {
  .stack-row { grid-template-columns: 26px 1fr; row-gap: 2px; }
  .stack-row .bar { width: 100%; }
  .stack-row .cap { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .coin.spin { animation: none; }
}

@media print {
  .prompt-box textarea { height: auto; min-height: 0; }
  body { background: #fff; padding: 0; }
  .paper { box-shadow: none; border: 0; }
  .steps, .actions, .copy-toast { display: none !important; }
}