/* Parcheesi — Tronsoft Games — css/game.css
 * Vintage board-game parlor look: lacquer red, ivory, brass. */

:root {
  --lacquer: #7c2a1e;
  --lacquer-deep: #571c13;
  --ivory: #f4ecd9;
  --parchment: #fbf6e9;
  --brass: #c9a23f;
  --ink: #3a2a1c;
  --green: #1c9e6d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at 50% 20%, #6d4f35 0%, #3f2c1c 65%, #2c1e12 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100%;
}

.masthead {
  text-align: center;
  padding: 18px 12px 8px;
  color: var(--ivory);
}
.masthead h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 2px 0 var(--lacquer-deep), 0 4px 12px rgba(0,0,0,0.5);
}
.masthead .rule {
  width: min(420px, 70%);
  margin: 8px auto 4px;
  border: 0;
  border-top: 2px solid var(--brass);
}
.masthead p {
  margin: 2px 0 0;
  font-style: italic;
  letter-spacing: 0.08em;
  color: #e6d6ae;
  font-size: 0.95rem;
}

.table {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 14px 30px;
  max-width: 1280px;
  margin: 0 auto;
}

.board-holder {
  flex: 1 1 520px;
  max-width: 820px;
  min-width: 300px;
}
#board {
  display: block;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.55), inset 0 0 0 2px var(--brass);
  cursor: pointer;
}

.panel {
  flex: 0 1 330px;
  min-width: 280px;
  background: linear-gradient(180deg, var(--ivory), #e9dfc6);
  border: 2px solid var(--brass);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  padding: 14px 16px 18px;
}
.panel h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 6px;
}

#status {
  min-height: 2.6em;
  font-size: 1rem;
  line-height: 1.3;
  margin: 6px 0 10px;
}

.dice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.die {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--parchment);
  border: 2px solid var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.12), 0 3px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: bold;
}
.die.double { border-color: var(--lacquer); color: var(--lacquer); }

button {
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 2px solid var(--lacquer-deep);
  background: linear-gradient(180deg, #a03a2a, var(--lacquer));
  color: var(--ivory);
  padding: 8px 14px;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 var(--lacquer-deep);
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--lacquer-deep); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

#chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; margin-bottom: 10px; }
.chip {
  background: var(--parchment);
  color: var(--ink);
  border: 2px solid var(--ink);
  min-width: 44px;
  font-weight: bold;
  box-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.chip.bonus { border-color: var(--brass); color: #8a6510; }
.chip.pair { border-style: dashed; }
.chip.sel { background: var(--green); color: #fff; border-color: #0e6b47; }

.setup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 0.95rem;
}
select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 5px 8px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background: var(--parchment);
  color: var(--ink);
}

#log {
  background: var(--parchment);
  border: 1px solid var(--brass);
  border-radius: 8px;
  height: 180px;
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}
#log div + div { border-top: 1px dotted #d8c9a4; padding-top: 3px; margin-top: 3px; }

.footer-links {
  text-align: center;
  padding: 0 12px 26px;
  color: #d8c9a4;
  font-size: 0.9rem;
}
.footer-links a { color: var(--brass); }

@media (max-width: 720px) {
  .table { padding: 8px 8px 20px; }
  .panel { flex-basis: 100%; }
  #log { height: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
