:root {
  --blue: #1236f2;
  --blue-deep: #0b1f86;
  --ink: #142033;
  --card: #f7f9ff;
  --line: rgba(18, 54, 242, 0.18);
  --ok: #1f8f4e;
  --warn: #c45500;
  --felt: #1636b8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #f4f7ff;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(190, 205, 255, 0.35), transparent 50%),
    linear-gradient(180deg, var(--blue), var(--blue-deep));
}
button, input { font: inherit; }
#app { max-width: 1100px; margin: 0 auto; padding: 16px 14px 28px; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
h1 { font-size: 28px; margin: 0; letter-spacing: -0.03em; }
.muted { color: #d5e2ff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
button.primary, button.ghost, button.danger {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
}
button.primary { background: #fff; color: var(--blue-deep); font-weight: 800; }
button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
button.danger { background: #ffd7e4; color: #7a1238; font-weight: 700; }
button:disabled { opacity: 0.45; cursor: default; }
.panel {
  background: rgba(8, 20, 90, 0.35);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  padding: 16px;
}
.felt {
  margin-top: 12px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.08), transparent 55%),
    linear-gradient(180deg, #1d46e0, var(--felt));
  border-radius: 180px;
  min-height: 280px;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.08);
}
.pot { font-weight: 800; font-size: 18px; }
.board, .holes, .opp-cards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.opponents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.player {
  background: rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 8px;
  min-height: 74px;
}
.player.turn { outline: 2px solid #fff; }
.player.me { background: rgba(255,255,255,.16); }
.player .name { font-weight: 800; }
.player .meta { font-size: 13px; color: #d7e4ff; }
.badge { display: inline-block; margin-right: 4px; padding: 1px 6px; border-radius: 999px; background: #fff; color: var(--blue-deep); font-size: 11px; font-weight: 800; }
.pcard {
  width: 96px;
  height: 142px;
  border-radius: 18px;
  background-color: #fbfcff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 280' fill='none'><path d='M118 18c28 22 62 18 86-6' stroke='%23d5e4ff' stroke-width='10' stroke-linecap='round'/><path d='M146 40c22 16 46 14 62-2' stroke='%23e8f0ff' stroke-width='8' stroke-linecap='round'/><path d='M-8 228c34 26 62 30 86 12' stroke='%23d5e4ff' stroke-width='10' stroke-linecap='round'/><path d='M-2 252c28 16 52 16 70 4' stroke='%23e8f0ff' stroke-width='8' stroke-linecap='round'/></svg>");
  background-size: cover;
  color: #0047ff;
  position: relative;
  border: 1px solid rgba(190, 210, 255, 0.9);
  box-shadow: 0 10px 22px rgba(16, 42, 120, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 7px;
  overflow: hidden;
}
.pcard .pip { width: 18px; height: 20px; object-fit: contain; }
.pcard .hero { width: 52px; height: 58px; object-fit: contain; }
.pcard .title {
  margin-top: -2px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0047ff;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
}
.pcard.long .title { font-size: 11px; letter-spacing: -0.05em; }
.pcard.back {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.2), transparent 42%),
    linear-gradient(160deg, #2450ff, #0b1f86);
  color: #fff;
}
.pcard.back::after {
  content: "UG";
  font-weight: 800;
  letter-spacing: 0.08em;
}
.pcard.slot { background: transparent; box-shadow: none; border: 1px dashed rgba(255,255,255,.35); }
.actions { margin-top: 14px; }
.slider {
  margin-top: 10px;
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  padding: 12px;
}
.slider input[type="range"] { width: 100%; }
.toast {
  margin-top: 10px;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
}
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(6, 16, 60, .55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet .card {
  background: #f7f9ff;
  color: var(--ink);
  width: min(640px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  padding: 16px;
}
.combo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0;
}
.combo strong { font-size: 16px; }
.combo .hand {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
}
.combo .pcard { width: 88px; height: 128px; flex: 0 0 auto; }
.combo .pcard .pip { width: 16px; height: 18px; }
.combo .pcard .hero { width: 44px; height: 50px; }
.combo .pcard .title,
.combo .pcard.long .title { font-size: 11px; }
.result {
  margin-top: 12px;
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 12px;
}
.warn { color: #ffe1a8; }
@media (max-width: 720px) {
  .felt { border-radius: 28px; min-height: 220px; }
  .pcard { width: 74px; height: 112px; border-radius: 14px; padding: 6px 4px 5px; }
  .pcard .pip { width: 14px; height: 16px; }
  .pcard .hero { width: 38px; height: 42px; }
  .pcard .title { font-size: 10px; }
  .pcard.long .title { font-size: 8px; }
  h1 { font-size: 24px; }
}
