* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --ground: #221714;
  --paper: #f5e0bf;
  --muted: #d5b99b;
  --line: #62473b;
  --accent: #ffc28e;
  --ink: #261711;
  --panel: #321f1a;
  --serif: Georgia, "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-family: system-ui, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 70% 20%, #4b2d22, transparent 55%), var(--ground);
  color: var(--paper);
}
a { color: var(--accent); text-underline-offset: .26em; }
a:hover { color: #ffe5c8; }
a:focus-visible, button:focus-visible { outline: 2px solid #fff0cf; outline-offset: 5px; }
button {
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: .64rem .92rem;
  min-height: 44px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #ffe1be; }
button:disabled { opacity: .54; cursor: default; }
button.quiet, .crest button { color: var(--paper); background: transparent; border-color: var(--line); }
button.quiet:hover:not(:disabled), .crest button:hover:not(:disabled) { background: #58362a; }
[hidden] { display: none !important; }
.shell { max-width: 1180px; margin: 0 auto; padding-inline: 32px; }
.masthead { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.brand { font: bold 27px var(--serif); color: var(--paper); text-decoration: none; }
.brand span { color: var(--accent); font-size: 16px; }
nav { display: flex; gap: 24px; font-size: .875rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 470px;
  align-items: center;
  border-block: 1px solid var(--line);
}
.intro { padding: 30px 0; }
.proof { font-size: .84rem; line-height: 1.55; color: var(--muted); }
.proof a { white-space: nowrap; margin-inline-start: .5rem; }
h1 { font: 400 clamp(4.2rem, 9.5vw, 8.6rem)/.85 var(--serif); letter-spacing: -.064em; margin: 24px 0; }
[lang="zh-Hant"] h1 { font-size: clamp(2.85rem, 7.4vw, 6rem); letter-spacing: .03em; line-height: 1.13; }
.intro p { color: var(--muted); font-size: 1.04rem; max-width: 29rem; margin: 0 0 20px; }
.jump { display: inline-flex; gap: .9rem; align-items: center; font-weight: 650; }
.jump span { font-size: 1.4em; }
.feature {
  margin: 0;
  min-height: 450px;
  padding: 18px 0 16px;
  background: repeating-linear-gradient(139deg, transparent 0 23px, #d98c6217 24px 25px),
    radial-gradient(ellipse at 50% 50%, #81523c 0, #49281e 44%, transparent 72%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.feature img {
  display: block;
  width: min(55%, 286px);
  height: auto;
  max-height: 385px;
  object-fit: contain;
  filter: drop-shadow(12px 14px 14px #140f0eb0);
  transform: rotate(4deg);
}
.feature figcaption { margin-top: 22px; font-size: .8rem; color: var(--muted); text-align: center; }
.arena { margin: 28px 0 18px; background: var(--panel); border: 1px solid var(--line); padding: 20px 24px; scroll-margin: 12px; }
.arena-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
h2 { font: 400 clamp(1.4rem, 2.5vw, 2.05rem) var(--serif); margin: 0; }
.status, .empty { color: var(--muted); }
.status { margin: 10px 0 0; min-height: 1.4em; font-size: .875rem; }
.fighter { border-top: 1px solid var(--line); margin-top: 15px; }
.metrics { display: grid; grid-template-columns: .64fr .64fr 1.72fr; margin: 0; }
.metrics div { padding: 10px 12px; min-width: 0; }
.metrics dt { color: var(--muted); font-size: .76rem; }
.metrics dd { margin: 3px 0 0; font-size: 1.18rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.personal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.personal div { padding-inline: 0 6px; }
.leader { border-block: 1px solid var(--line); margin-bottom: 28px; }
.leader .metrics div + div { border-left: 1px solid var(--line); }
.arena-actions, .opponents, .crest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crest span { color: var(--muted); font-size: .8rem; }
.confirm { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 4px; }
.confirm p { font-size: .88rem; color: var(--muted); }
.boards { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 30px; }
.board { border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.empty { font-size: .84rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 10px; font-size: .84rem; }
th, td { padding: .55rem .25rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td:nth-child(3) { color: var(--accent); }
.duel-list { padding: 0; list-style: none; margin: 10px 0 0; }
.duel-list li { border-bottom: 1px solid var(--line); }
.duel-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .4rem;
  text-align: left;
  width: 100%;
  background: transparent;
  color: var(--paper);
  border: 0;
  padding: .52rem .1rem;
  font-size: .84rem;
}
.duel-list button:hover:not(:disabled) { background: #4e3127; }
.duel-list .result { color: var(--accent); font-size: .78rem; }
footer { border-top: 1px solid var(--line); margin: 32px 0 0; padding: 14px 0 24px; color: var(--muted); font-size: .8rem; }
footer p { margin: .3rem 0; }
.address { font-family: monospace; overflow-wrap: anywhere; margin-block: .5rem; }
@media (max-width: 660px) {
  .shell { padding-inline: 16px; }
  .masthead { height: 58px; }
  nav { gap: 14px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .intro { padding: 22px 4px 18px; }
  h1 { margin: 15px 0; }
  h1 br { display: none; }
  .intro p { font-size: .92rem; }
  .feature { min-height: 0; padding: 9px 0 11px; }
  .feature img { width: min(45%, 166px); }
  .feature figcaption { margin-top: 12px; }
  .arena { margin-top: 14px; padding: 13px; }
  .arena-head button { font-size: .84rem; }
  .metrics dd { font-size: .92rem; }
  .boards { grid-template-columns: 1fr; gap: 20px; }
  .opponents button { font-size: .8rem; }
  table { font-size: .76rem; }
}
