/* Clare College Poker Society — colours come from the logo. */
:root {
  --red: #a52a27;
  --red-dark: #7f1f1d;
  --gold: #fbe54d;
  --ink: #231f20;
  --paper: #f7f3ea;
  --card: #ffffff;
  --line: #e2dccf;
  --muted: #655e59;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Figtree", "Gill Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; }
a { color: inherit; }
a.inline { color: var(--red); text-underline-offset: 3px; }
a.inline:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 22px; }
.narrow { max-width: 720px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- header ---------- */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--red); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 54px; height: 44px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand i { font-style: normal; font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
nav { display: flex; align-items: center; gap: 4px; }
nav a { text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: 0.95rem; }
nav a:hover { background: rgba(255, 255, 255, 0.1); }
nav a[aria-current="page"] { color: var(--gold); }
nav a.nav-cta { background: var(--red); margin-left: 8px; padding-inline: 18px; }
nav a.nav-cta:hover { background: var(--red-dark); }
nav a.nav-cta[aria-current="page"] { color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; font: inherit; font-size: 0.9rem; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 22px 18px; border-bottom: 3px solid var(--red); }
  nav.open { display: flex; }
  nav a { padding: 12px 8px; }
  nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 13px 26px; border-radius: 6px; background: var(--red); color: #fff; border: 2px solid var(--red); transition: background 0.15s; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #fff; border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='26'%3E%3Cpath d='M-2 24 22 6 46 24' fill='none' stroke='%23fbe54d' stroke-width='4'/%3E%3C/svg%3E"); }
.hero-in { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding-block: 72px 84px; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; font-weight: 600; }
.section .eyebrow { color: var(--red); }
.hero p.lead { font-size: 1.2rem; color: #e9e4da; max-width: 34em; margin-top: 20px; }
.hero-art { justify-self: center; width: min(100%, 400px); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; padding-block: 48px 56px; }
  .hero-art { order: -1; width: min(70%, 280px); }
}
.page-head { background: var(--ink); color: #fff; padding-block: 56px; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='26'%3E%3Cpath d='M-2 24 22 6 46 24' fill='none' stroke='%23fbe54d' stroke-width='4'/%3E%3C/svg%3E"); }
.page-head .wrap { position: relative; }
.page-head p { color: #e9e4da; font-size: 1.15rem; max-width: 40em; margin: 16px 0 0; }

/* ---------- sections ---------- */
.section { padding-block: 72px; }
.section.white { background: var(--card); border-block: 1px solid var(--line); }
.section.red { background: var(--red); color: #fff; }
.section-head { margin-bottom: 36px; max-width: 720px; }
.section-head p { color: var(--muted); margin: 14px 0 0; font-size: 1.08rem; }
.center { text-align: center; margin-inline: auto; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.section.white .panel { background: var(--paper); }
.panel .pip { font-size: 2rem; line-height: 1; color: var(--red); margin-bottom: 14px; display: block; }
.panel .pip.black { color: var(--ink); }
.panel h3 { margin-bottom: 10px; }
.panel p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

/* welcome */
.welcome { border-left: 4px solid var(--red); padding-left: 26px; font-size: 1.12rem; }
.welcome .sign { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 0; }

/* call to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta p { margin: 10px 0 0; color: #f6dedd; }

/* ---------- playing cards ---------- */
.hand { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.pc { width: 46px; height: 64px; border-radius: 6px; background: #fff; border: 1.5px solid var(--ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: var(--ink); box-shadow: 0 2px 0 rgba(35, 31, 32, 0.12); }
.pc b { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.pc i { font-style: normal; font-size: 1.15rem; margin-top: 3px; }
.pc.red { color: var(--red); }
.pc.back { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M-1 7 6 2 13 7' fill='none' stroke='%23fbe54d' stroke-width='1.4'/%3E%3C/svg%3E"); box-shadow: inset 0 0 0 4px #fff; }
.hand .gap { width: 10px; }
.hand.big .pc { width: 62px; height: 86px; border-radius: 8px; }
.hand.big .pc b { font-size: 1.7rem; }
.hand.big .pc i { font-size: 1.5rem; }

/* how a hand works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.section.white .steps li { background: var(--paper); }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0 0 12px; color: var(--muted); }
.steps p:last-child { margin-bottom: 0; }
.table-felt { background: #1f4d3a; border: 6px solid var(--ink); border-radius: 120px; padding: 34px 28px; text-align: center; color: #fff; box-shadow: inset 0 0 0 3px #2c6a50; }
.table-felt .label { font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: #cfe3d9; margin: 0 0 10px; }
.table-felt .hand { justify-content: center; }
.table-felt .label + .hand + .label { margin-top: 24px; }
.table-felt .result { margin: 22px 0 0; font-family: var(--serif); font-size: 1.15rem; color: var(--gold); }

/* actions */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.actions div { border-top: 3px solid var(--red); padding-top: 14px; }
.actions h3 { font-size: 1.15rem; margin-bottom: 6px; }
.actions p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* hand rankings */
.ranks { list-style: none; margin: 0; padding: 0; counter-reset: rank; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.ranks li { counter-increment: rank; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.ranks li:first-child { border-top: 0; }
.ranks li::before { content: counter(rank); font-family: var(--serif); font-size: 1.3rem; color: var(--red); }
.ranks h3 { font-size: 1.12rem; }
.ranks p { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 640px) {
  .ranks li { grid-template-columns: 28px 1fr; }
  .ranks .hand { grid-column: 2; }
  .steps li { grid-template-columns: 1fr; }
  .table-felt { border-radius: 40px; }
}

/* glossary */
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; margin: 0; }
.glossary div { padding: 14px 0; border-top: 1px solid var(--line); }
.glossary dt { font-family: var(--serif); font-size: 1.12rem; }
.glossary dd { margin: 4px 0 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- events ---------- */
.events { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 220px 1fr; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.section.white .event { background: var(--paper); }
.event h3 { margin-bottom: 4px; }
.event p { margin: 0; }
.event .place { color: var(--red); font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.event .date { font-family: var(--serif); font-size: 1.1rem; margin-top: 10px; }
.event .time { color: var(--muted); font-size: 0.95rem; }
.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--ink); color: #fff; }
.tag-teaching { background: var(--gold); color: var(--ink); }
.tag-tournament { background: var(--red); }
.tag-social { background: #1f4d3a; }
@media (max-width: 640px) { .event { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- committee ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px 24px; text-align: center; }
.avatar { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; object-fit: cover; background: var(--red); color: var(--gold); font-family: var(--serif); font-size: 2.6rem; border: 4px solid var(--ink); }
.avatar.alt { background: var(--ink); color: var(--gold); border-color: var(--red); }
.person .role { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 6px; }
.person .subject { color: var(--muted); font-size: 0.95rem; margin: 4px 0 12px; }
.person .bio { font-size: 0.98rem; margin-bottom: 10px; }
.person > :last-child { margin-bottom: 0; }

/* ---------- join ---------- */
.contact { margin: 0; }
.contact div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact dt { font-weight: 700; }
.contact dd { margin: 0; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--serif); font-size: 1.2rem; }
details p { margin: 12px 0 0; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist li::before { content: "♠\FE0E"; position: absolute; left: 4px; color: var(--red); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d8d2c8; font-size: 0.95rem; border-top: 3px solid var(--red); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.5fr; gap: 32px; padding-block: 48px 32px; }
.foot-in > div > a { display: block; text-decoration: none; padding: 3px 0; overflow-wrap: anywhere; }
.foot a:hover { color: var(--gold); }
.foot a.inline { color: var(--gold); }
.foot-name { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin-bottom: 8px; }
.foot-h { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 18px; font-size: 0.85rem; color: #a59e95; }
@media (max-width: 820px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-in { grid-template-columns: 1fr; } }

/* keep the example table in view while reading the six steps */
@media (min-width: 900px) { .sticky { position: sticky; top: 96px; } }

/* committee photos that rotate */
.avatar.rotator { position: relative; overflow: hidden; display: block; background: var(--ink); }
.rotator img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.rotator img.on { opacity: 1; }

/* ---------- leaderboard ---------- */
.small { font-size: 0.9rem; }
.up { color: #1c7a4a; }
.down { color: var(--red); }
.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table.board { width: 100%; border-collapse: collapse; min-width: 560px; }
.board th { text-align: left; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.board td { padding: 15px 18px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board .num { text-align: right; }
.board th:first-child, .board td.rank { text-align: left; width: 54px; }
.board td.rank { font-family: var(--serif); font-size: 1.2rem; color: var(--red); }
.board td.who { font-family: var(--serif); font-size: 1.15rem; }
.board td.total { font-weight: 700; font-size: 1.08rem; }
.board tr.leader td { background: #fdf7d3; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { font-size: 0.88rem; border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; background: var(--card); color: var(--ink); white-space: nowrap; }
.chip b.up, .chip.up b { color: #1c7a4a; }
.chip.down b { color: var(--red); }

/* ---------- admin ---------- */
input[type="text"], input[type="password"], input[type="number"], input[type="date"] { font: inherit; padding: 10px 12px; border: 1.5px solid #bdb5a6; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
input:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
.row-form { display: flex; gap: 10px; flex-wrap: wrap; }
.row-form input { flex: 1 1 200px; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
label > span { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; }
.result-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; }
.admin-list { list-style: none; margin: 12px 0 0; padding: 0; }
.admin-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.admin-list li:first-child { border-top: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--red); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.admin-msg { min-height: 1.6em; font-weight: 600; color: #1c7a4a; }
.admin-msg.bad { color: var(--red); }

/* ---------- committee photo: click to enlarge ---------- */
.avatar-wrap { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; }
.avatar-wrap .avatar { margin: 0; position: relative; z-index: 1; }
.zoom-btn { all: unset; display: block; border-radius: 50%; cursor: zoom-in; position: relative; z-index: 1; }
.zoom-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.zoom-btn:hover .avatar { transform: scale(1.04); }
.avatar { transition: transform 0.15s; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 17, 18, 0.9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { width: min(86vmin, 640px); height: min(86vmin, 640px); object-fit: cover; border-radius: 14px; border: 4px solid #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.lightbox button { position: absolute; top: 18px; right: 18px; font: inherit; font-weight: 600; color: #fff; background: none; border: 1.5px solid rgba(255, 255, 255, 0.6); border-radius: 6px; padding: 8px 16px; cursor: pointer; }

/* ---------- committee photo: sparkles and arrow (sparkle: true in data.js) ---------- */
.avatar-wrap.sparkle::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; background: conic-gradient(#ff2d2d, #ff9a1f, #ffe93b, #3ddc5a, #29b6ff, #7a5cff, #ff4fd8, #ff2d2d); animation: spin 2.5s linear infinite; }
.spark { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; display: grid; place-items: center; font-size: 20px; line-height: 1; pointer-events: none; z-index: 2;
  transform: rotate(var(--a)) translateY(-84px); animation: twinkle 1.4s ease-in-out infinite; animation-delay: var(--d); text-shadow: 0 0 6px currentColor; }
.spark:nth-child(odd) { font-size: 14px; }
.point { position: absolute; left: calc(100% + 30px); top: 50%; width: 62px; height: 40px; margin-top: -20px; z-index: 2; pointer-events: none; animation: nudge 0.9s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; scale: 0.5; } 50% { opacity: 1; scale: 1.25; } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-9px); } }
@media (prefers-reduced-motion: reduce) {
  .avatar-wrap.sparkle::before, .spark, .point { animation: none; }
  .spark { opacity: 1; }
}

/* anything marked hidden stays hidden, whatever its layout */
[hidden] { display: none !important; }
.avatar-wrap.sparkle { margin-bottom: 30px; }

/* "Click Here" label sitting on top of the arrow */
.point { left: calc(100% + 18px); width: 50px; height: auto; margin-top: -37px; display: flex; flex-direction: column; align-items: center; }
.point b { font-size: 12px; line-height: 16px; height: 16px; margin-bottom: 4px; white-space: nowrap; color: #e01b1b; font-weight: 700; }
.point svg { width: 50px; height: 32px; display: block; }

/* ---------- forms (sign-up, admin) ---------- */
select, textarea { font: inherit; padding: 10px 12px; border: 1.5px solid #bdb5a6; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
textarea { resize: vertical; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
.stack-form { display: grid; gap: 14px; margin-top: 18px; }
.stack-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.event .cal { margin-top: 12px; font-size: 0.92rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.event .cal .link-btn { font-size: inherit; }
@media (max-width: 1040px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 22px 18px; border-bottom: 3px solid var(--red); }
  nav.open { display: flex; }
  nav a { padding: 12px 8px; }
  nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- leaderboard: seasons, chart, awards ---------- */
.season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.season-tabs button { font: inherit; font-size: 0.92rem; font-weight: 600; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.season-tabs button:hover { background: #fff; }
.season-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--gold); }
.board td.who a { text-decoration: none; }
.board td.who a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--ink); }
.legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.92rem; }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i, .tip-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.chart-box { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px 4px; }
.chart-box svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-box .grid { stroke: #ebe6dc; stroke-width: 1; }
.chart-box .zero { stroke: #8f8880; stroke-width: 1.2; }
.chart-box .ylab, .chart-box .xlab { font: 12px var(--sans); fill: var(--muted); }
.chart-box .dlab { font: 600 12px var(--sans); fill: var(--ink); }
.chart-box .cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: 12px; min-width: 170px; background: var(--ink); color: #fff; border-radius: 8px; padding: 10px 12px; font-size: 0.86rem; pointer-events: none; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); z-index: 3; }
.tip-h { font-weight: 700; margin: 0 0 2px; }
.tip-note { color: #d8d2c8; margin: 0 0 6px; }
.tip-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.tip-row b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.award { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.award .pip { font-size: 1.6rem; line-height: 1; color: var(--red); display: block; margin-bottom: 10px; }
.award .pip.black { color: var(--ink); }
.award-t { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.award-w { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 4px; }
.award-w a { text-decoration: none; }
.award-w a:hover { color: var(--red); }

/* ---------- player page ---------- */
.player-meta { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.player-meta p { margin: 0; }
.player-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.stat-l { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.stat-v { font-family: var(--serif); font-size: 1.7rem; margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- admin extras ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.jump a { font-size: 0.9rem; font-weight: 600; text-decoration: none; padding: 6px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.jump a:hover { border-color: var(--ink); }
.admin-h { margin: 44px 0 16px; scroll-margin-top: 90px; }
#a-players, #a-sessions { scroll-margin-top: 90px; }
.row-actions { display: flex; gap: 14px; flex: none; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.btn.ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost-dark:hover { background: var(--ink); color: #fff; }
.small-table { min-width: 640px; }
.small-table td, .small-table th { padding: 10px 12px; font-size: 0.92rem; vertical-align: top; }
.small-table td p { margin: 4px 0 0; }
#admin-msg { position: sticky; top: 80px; z-index: 5; }

/* ---------- Learn & Play ---------- */
.quiz-score { font-weight: 700; margin-bottom: 12px; min-height: 1.5em; }
.felt-quiz { background: #1f4d3a; border: 6px solid var(--ink); border-radius: 28px; box-shadow: inset 0 0 0 3px #2c6a50; padding: 28px 22px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: start; text-align: center; color: #fff; }
.felt-quiz .label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #cfe3d9; margin: 0 0 10px; }
.felt-quiz .hand { justify-content: center; }
.qhand { padding: 12px; border-radius: 14px; border: 2px solid transparent; }
.qhand.won { border-color: var(--gold); background: rgba(251, 229, 77, 0.08); }
.qdesc { margin: 10px 0 0; font-family: var(--serif); color: var(--gold); font-size: 1.05rem; }
@media (max-width: 760px) { .felt-quiz { grid-template-columns: 1fr; } .qboard { order: -1; } }
.qbuttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.qresult { margin-top: 22px; }
.qverdict, .odds-verdict { font-weight: 700; font-size: 1.1rem; }
.qverdict.right, .odds-verdict.right { color: #1c7a4a; }
.qverdict.wrong, .odds-verdict.wrong { color: var(--red); }
.qbest { display: flex; flex-wrap: wrap; gap: 24px; margin: 6px 0 22px; }
.qbest .label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.odds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.odds-grid .stat p.small { margin: 6px 0 0; }
.pc.dim { opacity: 0.35; }
input[type="time"] { font: inherit; padding: 10px 12px; border: 1.5px solid #bdb5a6; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.admin-msg:not(:empty) { background: #fff; border: 1px solid var(--line); border-left: 4px solid #1c7a4a; border-radius: 8px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(35, 31, 32, 0.12); }
.admin-msg.bad:not(:empty) { border-left-color: var(--red); }
#signup-msg:not(:empty) { position: static; box-shadow: none; margin-top: 16px; }
@media (max-width: 520px) {
  .felt-quiz { padding: 22px 12px; }
  .felt-quiz .hand.big .pc, .qbest .hand.big .pc { width: 48px; height: 68px; }
  .felt-quiz .hand.big .pc b, .qbest .hand.big .pc b { font-size: 1.3rem; }
  .felt-quiz .hand.big .pc i, .qbest .hand.big .pc i { font-size: 1.15rem; }
  .felt-quiz .hand, .qbest .hand { gap: 5px; flex-wrap: nowrap; }
}
