/* ===================== Draft Day (player + admin) ===================== */
:root{
  --cat-game: #2f6fb5;
  --cat-soft: #c2417a;
  --cat-life: #2e7d4f;
  --cat-achievement: #b07a12;
}

.cat-game{ --cat: var(--cat-game); }
.cat-soft{ --cat: var(--cat-soft); }
.cat-life{ --cat: var(--cat-life); }
.cat-achievement{ --cat: var(--cat-achievement); }

/* shared form controls the base sheet doesn't cover */
.admin-body select, .admin-body input[type="number"], .admin-body textarea,
.draft-page select, .field select, .field input[type="number"]{
  border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text);
  border-radius: 10px; padding: 10px 11px; font-size: 0.92rem; font-family: inherit; max-width: 100%;
}
.field select, .field input[type="number"]{ width: 100%; }
.admin-body textarea{ width: 100%; resize: vertical; }

/* ===================== player page ===================== */
.draft-page{ min-height: 100%; background: var(--paper-bg); color: var(--paper-text); }
.draft-top{
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 40px) 14px; border-bottom: 1px solid var(--paper-line);
  background: var(--paper-surface); position: sticky; top: 0; z-index: 5;
}
.draft-top .setup-eyebrow{ margin: 0 0 4px; }
.draft-title{ font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.35rem; margin: 0; }
.wallet{ display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; text-align: right; }
.wallet-team{ grid-column: 1 / -1; font-weight: 600; font-size: 0.85rem; color: var(--paper-text-muted); }
.wallet-budget{ font-size: 1.6rem; font-weight: 500; color: var(--paper-accent); }
.wallet-sub{ font-size: 0.75rem; color: var(--paper-text-muted); }

.draft-body{ max-width: 1100px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 60px; display: flex; flex-direction: column; gap: 16px; }
.phase-note{ margin: 0; font-size: 0.88rem; color: var(--paper-text-muted); }

.draft-tabs{ display: flex; gap: 4px; background: var(--paper-surface-2); border-radius: 12px; padding: 4px; align-self: flex-start; flex-wrap: wrap; }
.draft-tabs button{
  background: transparent; border: none; border-radius: 9px; padding: 8px 14px; cursor: pointer;
  font-size: 0.85rem; color: var(--paper-text-muted); font-weight: 600;
}
.draft-tabs button.active{ background: var(--paper-surface); color: var(--paper-text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* athlete cards */
.athlete-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.athlete-card{
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: var(--paper-surface); border: 1px solid var(--paper-line); border-radius: 14px;
  padding: 14px; cursor: pointer; color: inherit; font: inherit; transition: transform .12s, box-shadow .12s;
}
.athlete-card:hover{ transform: translateY(-2px); box-shadow: 0 6px 18px rgba(32,28,21,0.08); }
.athlete-card.status-block{ border-color: color-mix(in srgb, var(--paper-accent) 45%, transparent); }
.athlete-card.leading{ border: 2px solid #2e7d4f; padding: 13px; }
.athlete-card.status-drafted, .athlete-card.status-benched, .athlete-card.unavailable{ opacity: 0.62; }
.athlete-emoji{ font-size: 1.9rem; line-height: 1; }
.athlete-emoji.big{ font-size: 3rem; }
.athlete-name{ font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.athlete-tagline{ font-size: 0.78rem; color: var(--paper-text-muted); line-height: 1.35; font-style: italic; margin: 0; }
.athlete-dots{ display: flex; gap: 4px; margin-top: 2px; }
.dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--cat); display: inline-block; }
.athlete-foot{ display: flex; justify-content: space-between; align-items: center; gap: 6px; width: 100%; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.athlete-price{ font-size: 1.05rem; font-weight: 500; color: var(--paper-accent); }
.athlete-price::before{ content: "🪙 "; font-size: 0.85rem; }
.bid-status{ font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--paper-surface-2); color: var(--paper-text-muted); }
.bid-status.mine{ background: #e2f2e8; color: #2e7d4f; }
.bid-status.other{ background: #fbeedd; color: #9a5f12; }
.bid-status.sold{ background: var(--paper-surface-2); color: var(--paper-text); }

/* personal drama an athlete picked up from scenario cards */
.condition-emojis{ cursor: help; margin-left: 4px; font-size: 0.85rem; letter-spacing: 1px; }

/* stats: compact on cards, bars in the athlete sheet */
.stat-line{ display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; margin-top: 2px; }
.stat-mini{ font-family: "IBM Plex Mono", monospace; white-space: nowrap; }
.stat-mini.down{ color: #b3432f; font-weight: 600; }
.stat-mini.up{ color: #2e7d4f; font-weight: 600; }
.stat-block{ display: flex; flex-direction: column; gap: 6px; background: var(--paper-surface-2); border-radius: 12px; padding: 12px 14px; }
.stat-row{ display: grid; grid-template-columns: 110px 1fr 56px auto; align-items: center; gap: 10px; font-size: 0.86rem; }
.stat-bar{ height: 8px; background: var(--paper-line); border-radius: 999px; overflow: hidden; }
.stat-bar i{ display: block; height: 100%; background: var(--paper-accent); border-radius: 999px; }
.stat-value{ text-align: right; white-space: nowrap; }
.stat-delta{ font-size: 0.72rem; font-weight: 700; margin-left: 4px; }
.stat-delta.down{ color: #b3432f; }
.stat-delta.up{ color: #2e7d4f; }
.stat-total{ margin: 4px 0 0; font-size: 0.85rem; color: var(--paper-text-muted); }
.condition-history h5{ margin: 0 0 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: #9a5f12; }
.condition-history ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.condition-history li{ display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; line-height: 1.35;
  background: #fff4dc; border: 1px dashed #c17f22; border-radius: 10px; padding: 7px 10px; color: #3b2a10; }
.condition-history small{ color: #7a4a0c; }
.condition-emoji{ font-size: 1.2rem; line-height: 1.1; }

.skill-chip{ font-size: 0.75rem; border-left: 3px solid var(--cat); padding: 2px 6px; background: var(--paper-surface-2); border-radius: 4px; }

/* scenario card — the "you landed on Chance" moment */
.scenario-card{
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(135deg, #fff4dc, #ffe2b8); border: 2px dashed #c17f22;
  border-radius: 16px; padding: 18px 20px; color: #3b2a10;
}
@media (prefers-reduced-motion: no-preference){
  .scenario-card:not(.hidden){ animation: card-flip .45s ease-out; }
}
@keyframes card-flip{ from{ transform: rotateX(70deg) scale(.95); opacity: 0; } to{ transform: none; opacity: 1; } }
.scenario-emoji{ font-size: 2.6rem; line-height: 1; }
.scenario-text h3{ font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; margin: 0 0 6px; }
.scenario-text p{ margin: 0 0 6px; font-size: 0.92rem; line-height: 1.45; }
.scenario-eyebrow{ font-family: "IBM Plex Mono", monospace; font-size: 0.68rem !important; letter-spacing: 0.12em; text-transform: uppercase; opacity: .7; }
.scenario-outcome{ font-weight: 700; }
.scenario-close{ position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: inherit; opacity: .6; }

.rule-board{ background: var(--paper-surface); border: 1px solid var(--paper-line); border-left: 4px solid #7a4fc2; border-radius: 12px; padding: 12px 16px; }
.rule-board h4{ margin: 0 0 6px; font-size: 0.85rem; }
.rule-board ul{ margin: 0; padding-left: 18px; font-size: 0.88rem; line-height: 1.55; }

/* teams */
.team-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.team-row{ background: var(--paper-surface); border: 1px solid var(--paper-line); border-radius: 12px; padding: 12px 14px; }
.team-row.mine{ border: 2px solid var(--paper-accent); padding: 11px 13px; }
.team-head{ display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.team-head .mono{ font-size: 0.82rem; color: var(--paper-text-muted); }
.team-roster{ display: flex; flex-wrap: wrap; gap: 6px; }
.roster-chip{ font: inherit; font-size: 0.8rem; background: var(--paper-surface-2); border: 1px solid transparent; border-radius: 999px;
  padding: 3px 10px; color: inherit; cursor: pointer; }
.roster-chip:hover{ border-color: var(--paper-accent); }
.roster-total{ font-size: 0.72rem; color: var(--paper-text-muted); margin-left: 2px; }
.team-rank{ display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-surface-2);
  font-size: 0.75rem; margin-right: 4px; }
.team-empty{ font-size: 0.8rem; color: var(--paper-text-muted); }

.ticker h4{ margin: 0 0 6px; font-size: 0.78rem; color: var(--paper-text-muted); text-transform: uppercase; letter-spacing: .1em; font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.ticker ul, .admin-log{ list-style: none; margin: 0; padding: 0; font-size: 0.84rem; line-height: 1.5; }
.ticker li, .admin-log li{ padding: 4px 0; border-bottom: 1px solid var(--paper-line); }
.ticker li:first-child{ font-weight: 600; }
.admin-log{ max-height: 340px; overflow-y: auto; }

/* bid sheet */
.draft-modal{ position: fixed; inset: 0; background: rgba(23,20,15,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
@media (min-width: 640px){ .draft-modal{ align-items: center; } }
.draft-modal-card{
  position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
  background: var(--paper-surface); color: var(--paper-text); border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-close{ position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--paper-text-muted); }
.modal-head{ display: flex; gap: 14px; align-items: center; padding-right: 24px; }
.modal-head h2{ font-family: "Fraunces", Georgia, serif; margin: 0 0 4px; font-size: 1.4rem; }
.skill-groups{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px){ .skill-groups{ grid-template-columns: 1fr; } }
.skill-group h5{ margin: 0 0 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cat); }
.skill-group ul{ margin: 0; padding-left: 16px; font-size: 0.86rem; line-height: 1.45; }
.modal-current{ margin: 4px 0 0; font-size: 0.92rem; }
.bid-row{ display: flex; gap: 8px; }
.bid-step{ width: 48px; border: 1px solid var(--paper-line); background: var(--paper-surface-2); border-radius: 10px; font-size: 1.3rem; cursor: pointer; color: var(--paper-text); }
.bid-input{ flex: 1; min-width: 0; text-align: center; font-size: 1.3rem; border: 1px solid var(--paper-line); border-radius: 10px; padding: 10px; background: var(--paper-bg); color: var(--paper-text); }
.bid-hint{ margin: 0; font-size: 0.78rem; color: var(--paper-text-muted); text-align: center; }
.bid-msg{ margin: 0; font-size: 0.86rem; padding: 8px 10px; border-radius: 8px; }
.bid-msg.ok{ background: #e2f2e8; color: #2e7d4f; }
.bid-msg.no{ background: #fbeae7; color: #7a2e20; }
.bid-closed{ margin: 0; font-size: 0.88rem; color: var(--paper-text-muted); background: var(--paper-surface-2); padding: 10px 12px; border-radius: 10px; }

/* ===================== admin page ===================== */
.admin-tabs{ align-self: center; }
.admin-body{ max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 60px; display: flex; flex-direction: column; gap: 16px; }
.admin-panel{ background: var(--paper-surface); border: 1px solid var(--paper-line); border-radius: 14px; padding: 18px 20px; }
.admin-panel h2{ font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; margin: 0 0 14px; }
.admin-panel h2 small{ font-family: "Libre Franklin", sans-serif; font-size: 0.8rem; color: var(--paper-text-muted); font-weight: 500; }
.admin-panel h3{ font-size: 0.95rem; margin: 0 0 12px; }
.admin-form-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.admin-form-grid.tight{ grid-template-columns: 1fr 1fr; }
.admin-hint{ font-size: 0.8rem; color: var(--paper-text-muted); line-height: 1.5; margin: 8px 0 12px; }
.check-row{ display: flex; gap: 8px; align-items: center; font-size: 0.88rem; margin: 6px 0 10px; cursor: pointer; }
.link-btn{ background: none; border: none; padding: 4px 0; cursor: pointer; color: var(--paper-accent); font-size: 0.82rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger{ color: var(--paper-text-muted); }
.link-btn.danger:hover{ color: #b3432f; }

.existing-games{ margin-top: 22px; }
.game-pick-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.game-pick{
  width: 100%; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; text-align: left;
  background: var(--paper-bg); border: 1px solid var(--paper-line); border-radius: 10px; padding: 10px 14px; cursor: pointer; color: inherit; font: inherit;
}
.game-pick:hover{ border-color: var(--paper-accent); }
.game-pick span{ font-size: 0.82rem; color: var(--paper-text-muted); }

.control-head{ display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.control-head h2{ margin-bottom: 6px; }
.control-head .setup-eyebrow{ margin-bottom: 4px; }
.join-line{ margin: 0; font-size: 0.9rem; color: var(--paper-text-muted); }
.join-box{ display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.join-qr{ width: 132px; height: 132px; padding: 0; border: 1px solid var(--paper-line); border-radius: 10px; background: #fff; cursor: zoom-in; flex-shrink: 0; }
.join-qr svg{ width: 100%; height: 100%; display: block; }
.join-box-text{ display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.join-url{ font-size: 0.85rem; color: var(--paper-accent); word-break: break-all; }
.join-box-actions{ display: flex; gap: 8px; flex-wrap: wrap; }
.join-game{ margin: 0 0 14px; font-size: 0.95rem; }

.qr-overlay{ position: fixed; inset: 0; z-index: 60; background: rgba(23,20,15,0.75); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.qr-overlay-card{ background: var(--paper-surface); color: var(--paper-text); border-radius: 20px; padding: 28px; text-align: center; max-width: 100%; }
.qr-overlay-card h2{ font-family: "Fraunces", Georgia, serif; margin: 0 0 14px; font-size: 1.8rem; }
.qr-overlay-code{ width: min(70vh, 80vw); height: min(70vh, 80vw); margin: 0 auto; background: #fff; border-radius: 12px; }
.qr-overlay-code svg{ width: 100%; height: 100%; display: block; }
.qr-overlay-url{ margin: 14px 0 0; font-size: 1.1rem; word-break: break-all; }

.control-actions{ display: flex; gap: 8px; flex-wrap: wrap; }
.control-head .setup-error{ flex-basis: 100%; }
.control-grid{ display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px){ .control-grid{ grid-template-columns: 1fr; } }
.control-main, .control-side{ display: flex; flex-direction: column; gap: 16px; }
.team-tools{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.team-tools button{ border: 1px solid var(--paper-line); background: var(--paper-bg); border-radius: 8px; padding: 4px 9px; font-size: 0.78rem; cursor: pointer; color: var(--paper-text); }
.team-tools button.danger{ margin-left: auto; color: #b3432f; }

/* library editor */
.library-bar{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; position: sticky; top: 0; background: var(--paper-bg); padding: 8px 0; z-index: 3; }
.library-bar .admin-hint{ flex: 1 1 300px; }
.panel-head{ display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h2{ margin: 0; }
.lib-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
@media (max-width: 420px){ .lib-list{ grid-template-columns: 1fr; } }
.lib-card{ border: 1px solid var(--paper-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper-bg); }
.lib-card input:not([type="checkbox"]){
  border: 1px solid var(--paper-line); background: var(--paper-surface); color: var(--paper-text);
  border-radius: 8px; padding: 8px 9px; font-size: 0.88rem; font-family: inherit; min-width: 0;
}
.lib-card textarea, .lib-card select{ background: var(--paper-surface); font-size: 0.86rem; padding: 8px 9px; border-radius: 8px; }
.lib-row{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lib-row .grow{ flex: 1 1 140px; }
.emoji-input{ width: 52px; text-align: center; font-size: 1.2rem !important; }
.price-field{ display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--paper-text-muted); font-weight: 600; }
.price-field input{ width: 90px; }
.tagline-input{ font-style: italic; }
.skill-edit-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.skill-edit-list li{ display: flex; gap: 6px; align-items: center; }
.skill-edit-list li input{ flex: 1; }
.cat-select{ border-left: 4px solid var(--cat) !important; width: 112px; flex-shrink: 0; }
.lib-card .link-btn{ align-self: flex-start; }
.lib-row .link-btn{ align-self: center; }

/* start-a-draft field explanations */
.field-hint{ display: block; margin-top: 5px; font-size: 0.75rem; line-height: 1.4; color: var(--paper-text-muted); }

/* athletes per round, under the round buttons */
.per-round{ flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.per-round label{ font-weight: 600; }
.per-round input{ width: 76px; border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text);
  border-radius: 10px; padding: 8px 10px; font-size: 0.92rem; }

/* the scenario deck */
.deck-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.deck-card{
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, #fff8ea, #ffedd2); border: 1px dashed #c17f22; border-radius: 12px; padding: 10px 12px;
  color: #3b2a10; font: inherit; transition: transform .12s, box-shadow .12s;
}
.deck-card:hover{ transform: translateY(-2px); box-shadow: 0 6px 16px rgba(32,28,21,0.1); }
.deck-emoji{ font-size: 1.4rem; line-height: 1; }
.deck-title{ font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.deck-target{ font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9a5f12; }
.deck-effect{ font-size: 0.76rem; line-height: 1.35; }

/* the admin's athlete / card dialog */
.dialog-card{ padding: 14px 16px; }
.dialog-play{ display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--paper-line); padding-top: 12px; }
.dialog-play label{ font-size: 0.85rem; font-weight: 600; }
.dialog-play select{ width: 100%; border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text);
  border-radius: 10px; padding: 10px 11px; font-size: 0.9rem; font-family: inherit; }
.dialog-play .field-row select{ flex: 1; min-width: 0; }

/* library editor: stats and card effects */
.stat-edit{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 420px){ .stat-edit{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-edit label{ display: flex; flex-direction: column; gap: 3px; font-size: 0.72rem; font-weight: 600; color: var(--paper-text-muted); }
.stat-edit input{ width: 100%; }
.card-section{ margin: 4px 0 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--paper-text-muted); }
.card-summary{ margin: 0; font-size: 0.8rem; line-height: 1.45; background: #fff4dc; color: #3b2a10; border-radius: 8px; padding: 7px 10px; }
.card-summary.warn{ background: #fbeae7; color: #7a2e20; }

/* deck: copies left, spent cards */
.deck-card{ position: relative; }
.deck-copies{ position: absolute; top: 8px; right: 10px; font-size: 0.75rem; font-weight: 600; color: #9a5f12; }
.deck-card.spent{ opacity: 0.5; }

/* deleting games */
.game-pick-row{ display: flex; gap: 10px; align-items: center; }
.game-pick-row .game-pick{ flex: 1; min-width: 0; }
.danger-btn{ color: #b3432f !important; }

/* admin: −/+ on an athlete's stats */
.stat-steps{ display: flex; gap: 4px; }
.stat-steps button{ width: 28px; height: 26px; border: 1px solid var(--paper-line); background: var(--paper-surface); color: var(--paper-text);
  border-radius: 7px; cursor: pointer; font-size: 1rem; line-height: 1; }
.stat-steps button:disabled{ opacity: .35; cursor: default; }

/* ===================== groups, people and purchases ===================== */
.wallet-me{ grid-column: 1 / -1; font-size: 0.78rem; color: var(--paper-text-muted); }
.picker-note{ font-size: 0.85rem; color: var(--paper-text-muted); line-height: 1.45; margin: 0 0 14px; }
.group-banner{ background: var(--paper-surface); border: 1px solid var(--paper-line); border-left: 4px solid var(--paper-accent);
  border-radius: 12px; padding: 12px 16px; font-size: 0.88rem; }
.group-banner h4{ margin: 0 0 10px; font-size: 0.95rem; }
.group-banner p{ margin: 0; line-height: 1.45; }
.group-banner .field{ max-width: 420px; }

.team-people{ display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.person-chip{ font-size: 0.78rem; background: var(--paper-surface-2); border-radius: 999px; padding: 2px 10px; }
.person-chip small{ color: var(--paper-text-muted); }
.person-chip.unclaimed{ opacity: 0.55; font-style: italic; }

.person-list{ list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.person-row{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.86rem; padding: 5px 0; border-bottom: 1px solid var(--paper-line); }
.person-row.me{ font-weight: 600; }
.person-row .person-name{ flex: 1 1 120px; min-width: 0; text-align: left; }
.person-row .person-role{ color: var(--paper-text-muted); font-size: 0.8rem; }
.person-row select{ font-size: 0.8rem; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text); }
.person-unclaimed{ font-size: 0.72rem; color: var(--paper-text-muted); font-style: italic; }
.link-btn.plain{ color: var(--paper-text); text-decoration: none; font-size: 0.86rem; }
.link-btn.plain:hover{ text-decoration: underline; }
.group-rename{ margin-top: 12px; }
.group-rename label{ display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; }
.group-rename input{ border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text); border-radius: 10px; padding: 8px 10px; min-width: 0; }

.groups-bar{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; }
.groups-bar input{ min-width: 0; }
.waiting-box{ border: 1px dashed var(--paper-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.waiting-box h4{ margin: 0 0 6px; font-size: 0.85rem; }
.team-admin{ margin-top: 6px; }
.team-warning{ margin: 0 0 6px; font-size: 0.8rem; color: #9a5f12; }
.add-person{ flex-wrap: wrap; margin-top: 4px; }
.add-person input{ flex: 1 1 160px; min-width: 0; border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text); border-radius: 10px; padding: 8px 10px; font-size: 0.85rem; }
.add-person select{ font-size: 0.82rem; }

.ledger{ list-style: none; margin: 0; padding: 0; font-size: 0.84rem; line-height: 1.45; }
.ledger li{ display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--paper-line); }
.ledger li.voided span, .ledger li.voided{ text-decoration: line-through; color: var(--paper-text-muted); }
.ledger li small{ text-decoration: none; white-space: nowrap; }
.admin-ledger{ max-height: 320px; overflow-y: auto; }

.trade-row{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.86rem; }
.dialog-play .trade-row select{ width: auto; flex: 1 1 140px; }
.trade-row input{ width: 90px; border: 1px solid var(--paper-line); background: var(--paper-bg); color: var(--paper-text); border-radius: 10px; padding: 8px 10px; }

/* ===================== round timer ===================== */
.round-timer{
  align-self: center; font-size: 1.15rem; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: var(--paper-surface-2); color: var(--paper-text); white-space: nowrap;
}
.round-timer.big{ font-size: 1.7rem; padding: 6px 16px; }
.round-timer.urgent{ background: #fbeae7; color: #7a2e20; }
@media (prefers-reduced-motion: no-preference){
  .round-timer.urgent{ animation: timer-pulse 1s ease-in-out infinite; }
}
@keyframes timer-pulse{ 50%{ opacity: .55; } }

/* ===================== age, hidden talents ===================== */
.athlete-age{ font-size: 0.74rem; font-weight: 600; color: var(--paper-text-muted); }
.modal-head .athlete-age{ margin-right: 6px; }
.talent-badge{ font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.talent-badge.out{ background: #fff4dc; color: #7a4a0c; border: 1px solid #c17f22; }
.talent-badge.secret{ background: #ece6f8; color: #4a2f86; border: 1px dashed #7a4fc2; }
.roster-chip.star{ border-color: #c17f22; }
.talent-hint{ font-size: 0.84rem; color: var(--paper-text-muted); }
.talent-hint summary{ cursor: pointer; font-weight: 600; color: var(--paper-accent); }
.talent-hint p{ margin: 6px 0 0; line-height: 1.5; }
.match-line{ margin: 0; font-size: 0.86rem; font-weight: 600; }

/* ===================== radar chart: the six on-pitch attributes ===================== */
.radar-block{ background: var(--paper-surface-2); border-radius: 12px; padding: 12px 14px 8px; }
.radar-block h5, .stat-block h5{
  margin: 0 0 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--paper-text-muted);
  display: flex; justify-content: space-between; gap: 8px;
}
.radar{ display: block; width: 100%; max-width: 340px; margin: 0 auto; overflow: visible; }
.radar-ring{ fill: none; stroke: var(--paper-line); stroke-width: 1; }
.radar-shape{ fill: color-mix(in srgb, var(--paper-accent) 22%, transparent); stroke: var(--paper-accent); stroke-width: 2; stroke-linejoin: round; }
.radar-base{ fill: none; stroke: var(--paper-text-muted); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
.radar-dot{ fill: var(--paper-accent); stroke: var(--paper-surface-2); stroke-width: 2; }
.radar text{ font-size: 11px; fill: var(--paper-text-muted); font-family: inherit; }
.radar .radar-value{ fill: var(--paper-text); font-weight: 700; font-family: "IBM Plex Mono", monospace; }
.radar text.signature{ fill: var(--paper-text); font-weight: 700; }
.radar tspan.up{ fill: #2e7d4f; font-weight: 700; }
.radar tspan.down{ fill: #b3432f; font-weight: 700; }
.radar-legend{ margin: 2px 0 0; font-size: 0.72rem; color: var(--paper-text-muted); text-align: center; }
.radar-legend i{ display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 4px 0 8px; border-top: 2px solid var(--paper-accent); }
.radar-legend i.dashed{ border-top: 2px dashed var(--paper-text-muted); }

/* ===================== mock matches ===================== */
.match-day h4{ margin: 0 0 8px; font-size: 0.78rem; color: var(--paper-text-muted); text-transform: uppercase; letter-spacing: .1em;
  font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.match-day + .match-day{ margin-top: 18px; }
.match-list{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.match-row{ background: var(--paper-surface); border: 1px solid var(--paper-line); border-radius: 12px; padding: 10px 14px; }
.match-row.mine{ border: 2px solid var(--paper-accent); padding: 9px 13px; }
.match-score{ display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 4px; }
.match-score b{ font-size: 1.25rem; font-weight: 500; white-space: nowrap; }
.match-team{ font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }
.match-team.home{ text-align: right; }
.match-goals{ margin: 2px 0 0; font-size: 0.78rem; line-height: 1.4; color: var(--paper-text-muted); }
.match-goals b{ color: var(--paper-text); }

/* library editor: age and the six attributes */
.age-input{ width: 64px !important; }
.attribute-edit{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.signature-pick{ flex-direction: row !important; align-items: center; gap: 4px !important; font-weight: 500 !important; cursor: pointer; }
