:root {
  color-scheme: dark;
  --bg: #121012;
  --panel: #1c1719;
  --lift: #241b1e;
  --line: #49343a;
  --text: #faeee5;
  --muted: #cebab6;
  --accent: #ffab7c;
  --rose: #fa644e;
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #ffd4a7; outline-offset: 4px; }
p { margin: 0; line-height: 1.65; }
h1, h2, h3 { margin: 0; }
.wrap { width: min(1176px, calc(100% - 72px)); margin: 0 auto; }
.mast, .mast nav, .proof, .section-head, .wallet-bar, footer, footer nav { display: flex; align-items: center; gap: 16px; }
.mast, .proof, .section-head, .wallet-bar, footer { justify-content: space-between; }
.mast { padding: 22px 0; }
.brand { color: var(--text); font-weight: 820; font-size: 1.48rem; letter-spacing: -.065em; text-decoration: none; }
.mast nav a, footer nav a { color: var(--muted); font-size: .84rem; text-decoration: none; }
.mast nav a:hover, footer nav a:hover { color: var(--text); text-decoration: underline; }
.proof, .network { font-size: .78rem; letter-spacing: .025em; }
.proof { color: var(--muted); background: #211a1b; border: 1px solid var(--line); padding: 12px 17px; border-radius: 9px; }
.proof a { flex: 0 0 auto; }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr minmax(240px, .9fr); align-items: center; min-height: 400px;
  margin-top: 12px; border: 1px solid #67353a; border-radius: 16px;
  background: radial-gradient(ellipse at 78% 49%, #651e2c 0%, #36171f 35%, #21181b 69%, #1b1719 100%);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: repeating-linear-gradient(124deg, transparent 0 17px, #f6b38808 18px, transparent 19px 35px);
  mask-image: linear-gradient(90deg, transparent 20%, black);
}
.hero-copy { padding: 44px clamp(24px, 4.5vw, 64px); }
.hero h1 { margin: 9px 0 17px; font-size: clamp(3rem, 6vw, 6.25rem); line-height: 1.03; letter-spacing: -.075em; }
html[lang=zh-TW] .hero h1 { letter-spacing: -.055em; font-size: clamp(3rem, 6vw, 5.6rem); }
.hero-copy p { color: #ead7cc; max-width: 37ch; }
.hero-copy p + p { margin-top: 6px; }
.hero-copy .lead { font-size: 1.23rem; color: var(--text); font-weight: 670; }
.hero-copy .button { margin-top: 23px; }
.network { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--accent) !important; }
.network span { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.art { display: grid; place-items: center; min-width: 0; overflow: hidden; min-height: 396px; }
.orbit {
  position: relative; width: min(82%, 340px); aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed #f7b8898f; color: #f8a376; box-shadow: inset 0 0 62px #a7282940;
  background: radial-gradient(circle, #ff624b24, transparent 70%);
}
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid #ffcaa428; border-radius: 50%; }
.orbit::before { inset: 15%; }
.orbit::after { inset: -6%; }
.orbit-seat {
  position: absolute; display: block; width: 12.5%; aspect-ratio: 1; border: 1px solid #fac397bb;
  border-radius: 50%; translate: -50% -50%; z-index: 1;
  background: radial-gradient(circle at 38% 26%, #ffc18c, #a44934 46%, #481d25 75%);
  box-shadow: 0 4px 16px #180f14bb, inset 0 0 0 4px #502027;
}
.orbit-seat-1 { left: 50%; top: 0; }
.orbit-seat-2 { left: 93.3%; top: 25%; }
.orbit-seat-3 { left: 93.3%; top: 75%; }
.orbit-seat-4 { left: 50%; top: 100%; }
.orbit-seat-5 { left: 6.7%; top: 75%; }
.orbit-seat-6 { left: 6.7%; top: 25%; }
.packet-art {
  position: absolute; width: 48%; height: 63%; top: 50%; left: 50%;
  transform: translate(-50%, -48%) rotate(-19deg); z-index: 2;
  overflow: hidden; border: 1px solid #ffb17e; border-radius: 10px;
  background: repeating-linear-gradient(126deg, #fcc0830f 0 1px, transparent 1px 8px),
              linear-gradient(145deg, #fc6551, #c32734 52%, #7e1a2b);
  box-shadow: 12px 24px 36px #200d1cbb, -2px 5px 32px #ff795943, inset 0 0 0 5px #7d17294f;
}
.fold { position: absolute; inset: 0 0 auto; height: 49%; clip-path: polygon(0 0, 100% 0, 100% 48%, 50% 100%, 0 48%); background: linear-gradient(160deg, #f89566, #d42e37 80%); border-bottom: 1px solid #c32334; }
.seal { position: absolute; top: 49%; left: 50%; translate: -50% -50%; display: grid; width: 46%; aspect-ratio: 1; place-items: center; background: radial-gradient(circle at 30% 25%, #ffe2ac, #d89055); border: 3px double #8c4732; border-radius: 50%; box-shadow: 0 5px 7px #6d1a2f91; }
.seal img { width: 78%; height: auto; object-fit: contain; }
.wallet-bar, .friend, .rules, .table-card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.wallet-bar { margin-top: 18px; padding: 17px 20px; flex-wrap: wrap; }
.wallet-bar h2 { font-size: 1.1rem; }
#wallet { color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.wallet-details { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 10px; border-top: 1px solid var(--line); width: 100%; color: var(--muted); }
.wallet-details strong { color: var(--text); }
.button {
  cursor: pointer; display: inline-grid; place-items: center; min-height: 41px; padding: 7px 12px; border: 1px solid #7c5553;
  border-radius: 7px; background: #302127; color: var(--text); font: inherit; font-weight: 690; font-size: .87rem;
  line-height: 1.3; text-decoration: none; text-align: center;
}
.button:hover { background: #4b2c33; }
.button.primary { background: #f79569; color: #21161a; border-color: #ffab85; }
.button.primary:hover { background: #ffc5a1; }
.button:disabled { opacity: .56; cursor: default; }
.tables { margin-top: 34px; scroll-margin-top: 15px; }
.section-head { margin: 0 0 14px; }
.section-head h2, .friend h2 { font-size: clamp(1.4rem, 2.4vw, 2.1rem); letter-spacing: -.035em; }
#state { color: var(--muted); font-size: .87rem; }
.table-cards { display: grid; align-items: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.table-card { padding: 17px; min-width: 0; }
.table-card-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.table-card-head p, .quote, .last-empty { color: var(--muted); font-size: .86rem; }
.table-card h3 { font-size: 1.37rem; letter-spacing: -.04em; }
.table-card .phase { color: var(--accent); margin-top: 6px; }
.seats { padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.seats li {
  list-style: none; border-radius: 6px; border: 1px solid #4c393c; color: var(--muted); min-width: 0;
  padding: 6px; font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seats .occupied { color: #ffe6d7; border-color: #9e574c; background: #48272d; cursor: pointer; }
.table-card.ready { border-color: #f79569; box-shadow: 0 0 0 1px #f7956955, 0 10px 32px #f7956922; }
.ready-note { display: grid; gap: 6px; margin-top: 11px; padding: 11px 12px; border: 1px solid #f79569; border-radius: 9px; background: #3a2226; }
.ready-note strong { color: #ffd2b3; font-size: 1rem; }
.ready-note .ready-detail { color: #f1d6c9; font-size: .82rem; line-height: 1.5; }
.ready-note .button { width: 100%; min-height: 46px; font-size: .95rem; }
.ev { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.ev th, .ev td { padding: 7px 8px; border-bottom: 1px solid #3e2d31; text-align: right; color: var(--muted); }
.ev th:first-child, .ev td:first-child { text-align: left; }
.ev thead th { color: var(--text); font-weight: 700; }
.ev-wrap { overflow-x: auto; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 9px 0 13px; }
.table-card .quote { min-height: 2.7em; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 720; }
.last { border-top: 1px solid var(--line); font-size: .85rem; padding: 11px 0 0; }
.last ol { padding-inline-start: 0; list-style: none; }
.last li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; padding: 5px 0; border-bottom: 1px solid #38282d; }
.last li.lucky { color: var(--accent); }
.action-status { min-height: 2.15em; margin-top: 8px; color: var(--accent); overflow-wrap: anywhere; }
.friend { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 22px; padding: 22px; }
.friend p, .rules p { margin-top: 9px; color: var(--muted); font-size: .89rem; }
.friend-action { background: var(--lift); border: 1px solid var(--line); border-radius: 9px; padding: 15px; }
.friend-action span { display: block; color: var(--muted); font-size: .83rem; }
.friend-action strong { font-size: 1.3rem; overflow-wrap: anywhere; }
.friend-action .button { margin-top: 12px; }
.rules { margin-top: 14px; padding: 18px 22px; }
footer { padding: 19px 0 26px; color: var(--muted); font-size: .8rem; flex-wrap: wrap; }
[hidden] { display: none !important; }
@media (max-width: 940px) {
  .table-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-card:last-child { grid-column: 1 / -1; }
  .table-card:last-child .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 28px); }
  .proof { align-items: flex-start; line-height: 1.5; padding: 10px 12px; gap: 8px; }
  .hero { grid-template-columns: 1fr; min-height: 0; background: radial-gradient(ellipse at 75% 70%, #5a2030, #281920 48%, #1b1719); }
  .hero-copy { padding: 25px 18px 0; }
  .hero h1 { margin-bottom: 12px; }
  .hero-copy .button { margin-top: 16px; }
  .art { min-height: 235px; }
  .orbit { width: min(55%, 190px); }
  .wallet-bar { padding: 12px; gap: 9px; }
  .table-cards, .friend { grid-template-columns: minmax(0, 1fr); }
  .table-card:last-child { grid-column: auto; }
  .table-card:last-child .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friend, .rules { padding: 15px; }
}
#ref-link { flex: 1 1 210px; min-width: 0; width: min(100%, 295px); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--bg); font: inherit; font-size: .8rem; }
