@import url("/screen.css");
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Noto Sans TC",
    "PingFang TC",
    sans-serif;
  color: #f7f4ed;
  background: radial-gradient(ellipse at 15% 0%, #412b33 0%, #211d22 65%);
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 700;
  background: #b83d50;
  color: #fff4ed;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}
button:active,
.button:active {
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.secondary,
.button.secondary {
  background: #50313c;
  color: #fff4ed;
}
button.danger {
  background: #492a2b;
  color: #ffb6b6;
}
input,
select {
  border: 1px solid #80636c;
  border-radius: 10px;
  background: #231e24;
  color: #fff;
  padding: 13px;
  width: 100%;
  min-height: 48px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #f4cfd2;
}
a {
  color: #ffe6bd;
}
.muted {
  color: #f6d1d6;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffddb3;
}
.brand {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.13em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  transform: rotate(-12deg);
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 20px;
}
.horse-badge {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--horse);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.error {
  color: #ffaaa8;
  min-height: 1.5em;
  font-size: 14px;
}
.status {
  font-size: 12px;
  color: #f4d5d6;
  display: flex;
  gap: 7px;
  align-items: center;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  background: #a8e274;
  border-radius: 50%;
}
.status.offline:before {
  background: #ff9b45;
}
.hidden,
[hidden] {
  display: none !important;
}
.card {
  background: #30262d;
  border: 1px solid #624b55;
  border-radius: 18px;
  padding: 24px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 18px;
}
.number {
  font-variant-numeric: tabular-nums;
}
.page-shell {
  max-width: 1180px;
  margin: auto;
  padding: 28px 32px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 42px;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
}
p {
  line-height: 1.65;
}
.pill {
  border: 1px solid #715560;
  border-radius: 100px;
  padding: 7px 12px;
  font-size: 12px;
}
.preview-nav {
  max-width: 1440px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
}
.preview-intro {
  max-width: 1440px;
  padding: 18px 36px 28px;
  margin: auto;
}
.preview-intro h1 {
  font-size: 48px;
  margin-bottom: 12px;
}
.preview-grid {
  max-width: 1440px;
  margin: auto;
  padding: 0 36px 36px;
  display: grid;
  gap: 28px;
}
.preview-card {
  overflow: hidden;
  border: 1px solid #624b55;
  border-radius: 16px;
  background: #30262d;
}
.preview-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.preview-card h2 {
  margin: 0;
  font-size: 19px;
}
.preview-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #231e24;
}
.preview-card small {
  color: #efc1c8;
}
.mobile-shell {
  width: 100%;
  max-width: 480px;
  margin: auto;
  min-height: 100dvh;
  padding: 24px 24px 34px;
}
.mobile-shell h1 {
  font-size: 36px;
  margin: 34px 0 12px;
}
.horse-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.horse-option {
  position: relative;
  min-height: 130px;
  background: #32272e;
  border: 2px solid #624b55;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.horse-option.selected {
  border-color: var(--horse);
  background: color-mix(in srgb, var(--horse) 15%, #231e24);
}
.mini-horse {
  width: 86px;
  height: 70px;
  background-image: url("/assets/horses.png");
  background-size: 400% 200%;
  background-position: 0 0;
}
.horse-option .horse-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 25px;
  height: 25px;
  font-size: 13px;
}
.tap-button {
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  background: var(--horse, #ffe6bd);
  color: #43101b;
  box-shadow:
    0 0 0 12px #49303b,
    0 0 0 13px #815366;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  font-size: 40px;
}
.tap-button small {
  font-size: 14px;
  letter-spacing: 0.15em;
}
.tap-button:active {
  transform: scale(0.94);
  filter: brightness(1.12);
}
.player-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
}
.player-stats strong {
  font-size: 36px;
  display: block;
}
.host-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
}
.room-list {
  display: grid;
  gap: 10px;
}
.room-card {
  text-align: left;
  justify-content: space-between;
  background: #49303b;
  color: #fff;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.team-card {
  background: #272229;
  border: 1px solid #624b55;
  border-radius: 14px;
  padding: 16px;
}
.team-card strong {
  display: block;
  font-size: 25px;
  margin: 14px 0 4px;
}
.leader-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.leader-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #624b55;
}
.leader-list li strong {
  margin-left: auto;
}
.link-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.host-qr {
  background: white;
  padding: 12px;
  border-radius: 14px;
  width: 180px;
}
.host-clock {
  font-size: 70px;
  font-weight: 900;
  letter-spacing: -0.06em;
}
.host-result {
  margin-top: 24px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 24px;
  border-radius: 14px;
  background: #ffe6bd;
  color: #43101b;
  z-index: 50;
}
@media (max-width: 760px) {
  .page-shell {
    padding: 20px;
  }
  .host-layout {
    grid-template-columns: 1fr;
  }
  .preview-nav,
  .preview-intro {
    padding: 22px;
  }
  .preview-intro h1 {
    font-size: 34px;
  }
  .preview-grid {
    padding: 0 14px 20px;
  }
  .preview-card header {
    padding: 14px;
  }
  .preview-card small {
    display: none;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.test-mode {
  background: #ffdc5e;
  color: #201800;
  padding: 8px 18px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 12px;
}
.screen-test-mode {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 50;
  margin: 0;
}
.screen:has(.screen-test-mode:not([hidden])) .board-footer {
  padding-right: 130px;
}
