:root {
  --gold: #ebac4f;
  --gold-dark: #d9952e;
  --felt-gray: #c8c8c8;
  --panel: #f0f0f0;
  --panel-border: #b9b9b9;
  --ink: #1a1a1a;
  --muted: #737373;
  --green: #3d875b;
  --green-dark: #2f6a47;
  --red: #e60d43;
  --blue: #5597d1;
  --white: #ffffff;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--felt-gray);
}

.felt {
  position: fixed;
  inset: 0;
  background:
    url("/assets/tex_felt.png") center / 512px repeat,
    var(--felt-gray);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.chip {
  position: fixed;
  width: 72px;
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 1;
}

.chip-1 { top: 12%; right: 6%; transform: rotate(18deg); }
.chip-2 { bottom: 18%; left: 4%; transform: rotate(-12deg); width: 64px; }
.chip-3 { top: 38%; left: 7%; transform: rotate(8deg); width: 56px; }
.chip-4 { bottom: 8%; right: 12%; transform: rotate(-20deg); width: 60px; }

.topbar {
  position: relative;
  z-index: 2;
  background: var(--gold);
  border-bottom: 3px solid var(--gold-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.topbar-icon {
  width: 32px;
  height: 32px;
}

.topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.15);
  flex: 1;
}

.lobby-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.status-lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.status-lamp.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-lamp.offline { background: var(--red); }

.board {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.hero-panel {
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  background:
    url("/assets/cardpattern.png") center / 120px repeat,
    var(--panel);
}

.logo {
  max-width: min(340px, 88vw);
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.35rem;
  display: inline-block;
}

.download-lead {
  margin: 0 0 1rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.download-cards {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 540px) {
  .download-cards { grid-template-columns: 1fr 1fr; }
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 5px;
  border: 2px solid var(--panel-border);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, border-color 0.12s;
}

.download-card:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.download-card.is-primary {
  border-color: var(--green);
  background: linear-gradient(180deg, #fff 0%, #f4faf6 100%);
}

.download-card.is-primary .download-file {
  color: var(--green-dark);
}

.download-os {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
}

.download-file {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
}

.download-note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.manual-dl {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.manual-dl summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.manual-dl p { margin: 0.5rem 0; }

.btn-ghost {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.game-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.93rem;
  line-height: 1.45;
}

.game-steps li:last-child { border-bottom: none; }

.step-n {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 4px;
  background: var(--gold);
  color: var(--white);
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 var(--gold-dark);
}

.fine-print {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 520px) {
  .chip { opacity: 0.45; }
  .chip-1, .chip-3 { display: none; }
}
