* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #14110f; color: #f3ead9;
  font-family: Georgia, "Times New Roman", serif; user-select: none; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }

.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; padding: 14px 16px; pointer-events: none;
  background: linear-gradient(#14110fcc, transparent); }
.score { display: flex; align-items: center; gap: 8px; font-size: 18px; opacity: .55; transition: opacity .2s; }
.score.active { opacity: 1; }
.score em { font-style: normal; font-size: 26px; min-width: 24px; text-align: center; color: #e8c170; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #e8c170; }
.dot.white { background: #d23a2e; }
.dot.black { background: #2f62d0; }
.turn { font-size: 16px; text-align: center; color: #cdbf9f; flex: 1; }

.banner { position: fixed; left: 0; right: 0; top: 9%; text-align: center; pointer-events: none;
  font-size: clamp(34px, 8vw, 84px); font-weight: bold; letter-spacing: .04em; color: #e8c170;
  text-shadow: 0 4px 24px #000, 0 0 40px #e8a13a88; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
.banner small { display: block; font-size: .3em; font-weight: normal; color: #f3ead9; letter-spacing: .1em; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.actions { position: fixed; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
button { font: inherit; cursor: pointer; border: 2px solid #e8c170; background: #e8c170; color: #231b12;
  padding: 10px 22px; border-radius: 8px; font-size: 17px; transition: transform .12s, filter .12s; }
button:hover { transform: translateY(-2px); filter: brightness(1.1); }
button.ghost { background: #14110fcc; color: #e8c170; }

.menu { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 40%, #14110f66, #14110fe6); }
.card { width: min(440px, 100%); padding: 28px; border-radius: 14px; background: #1e1913f2;
  border: 1px solid #e8c17055; box-shadow: 0 20px 60px #000a; }
h1 { font-size: 28px; color: #e8c170; text-align: center; }
.sub { text-align: center; color: #cdbf9f; margin: 6px 0 18px; font-size: 15px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: #a99a78; margin: 16px 0 8px; font-weight: normal; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; background: transparent; color: #f3ead9; border-color: #e8c17055; padding: 10px 6px; font-size: 15px; }
.seg button.on { background: #e8c170; color: #231b12; border-color: #e8c170; }
.play { width: 100%; margin-top: 24px; padding: 14px; font-size: 20px; font-weight: bold; }
.hint { margin-top: 14px; text-align: center; font-size: 13px; color: #8c7f63; }

@media (max-width: 480px) {
  .hud { gap: 6px; padding: 12px 8px; }
  .score { gap: 5px; font-size: 15px; }
  .score em { font-size: 21px; min-width: 14px; }
  .dot { width: 14px; height: 14px; }
  .turn { min-width: 0; font-size: 13px; }
}
