@import url("./picker.css");
@import url("./stock-picks.css");
@import url("./account.css");

@font-face {
  font-family: DM Sans;
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
:root {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  --paper: #f8f8f5;
  --surface: #fff;
  --ink: #22251f;
  --muted: #565c50;
  --line: #dcdfd4;
  --accent: #e65331;
  --positive: #187454;
  --negative: #a64131;
  --ink-button: #252821;
  --pine: #34423e;
  --wash: #edf0ec;
  --radius: 12px;
  --focus: #b04627;
  --max: 1240px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 300px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  cursor: pointer;
  color: inherit;
  background: none;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
input,
select {
  accent-color: #944026;
  caret-color: #c64427;
}
::selection {
  background: #f8c4ae;
  color: #27251f;
}
img,
svg {
  display: block;
}
body:has(dialog[open]) {
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 665;
  text-wrap: balance;
}
h1 {
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
strong,
b {
  font-weight: 650;
}
.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.ic.mini {
  width: 16px;
  height: 16px;
}
.ic.tiny {
  width: 13px;
  height: 13px;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 9;
  top: 8px;
  left: 8px;
  padding: 12px;
  background: white;
}
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.top-inner,
.page {
  width: min(calc(100% - 96px), var(--max));
  margin: 0 auto;
}
.top-inner {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: clamp(36px, 5vw, 80px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 760;
}
.brand img {
  width: 34px;
  height: 34px;
}
/* The two main destinations share the desktop header and move within thumb reach on phones. */
.primary-nav:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 3px;
}
.primary-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  touch-action: manipulation;
}
.primary-nav a[aria-current] {
  background: #fae9e1;
  color: #8e361e;
  font-weight: 700;
}
.primary-nav a:active { background: var(--wash); }
.primary-nav a:focus-visible { outline-offset: -2px; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  html:has(.primary-nav:not([hidden])) {
    --nav-clearance: calc(3.7rem + env(safe-area-inset-bottom));
    scroll-padding-bottom: var(--nav-clearance);
  }
  body:has(.primary-nav:not([hidden])) {
    padding-bottom: var(--nav-clearance);
  }
  .primary-nav:not([hidden]) {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    background: var(--surface);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 4px max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .primary-nav a {
    gap: 7px;
    min-height: 46px;
    padding: 3px 0;
    font-size: .9rem;
  }
  .primary-nav .ic { width: 21px; height: 21px; }
}
.play-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(18px, 3vw, 32px);
}
.play-modes { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--wash); }
.play-modes a, .ticks-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: clamp(10px, 1.5vw, 18px);
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.play-modes a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #24251e20; }
.ticks-shortcut { padding-inline: 8px; color: var(--ink); }
.ticks-shortcut[aria-current] { background: var(--wash); }
.page:has(> .picks-page) > .play-switcher { max-width: 1120px; margin-inline: auto; }
.page:has(.stock-pick-detail) > .play-switcher { max-width: none; }
.top-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}
.search-launch {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 8px;
  border-radius: 10px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
}
.search-launch .ic {
  width: 19px;
  height: 19px;
}
.icon-btn,
.profile-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  gap: 5px;
}
.profile-btn {
  padding: 0 2px;
}
.profile-btn .ic {
  color: #62675c;
}
.friend-button i {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border-radius: 12px;
  background: #ac391e;
  color: white;
  font: 700 11px/17px system-ui, sans-serif;
  text-align: center;
}
.logo.coin-mark { background: transparent; }
.coin-mark img { width: 85%; height: 85%; object-fit: contain; border-radius: 50%; }
@media (max-width: 540px) {
  .invitation-row, .social .person-line { flex-wrap: wrap; }
  .invitation-row .inline-actions { margin-left: auto; }
}
.friend-button i[hidden] {
  display: none;
}
.avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #f1daae;
  color: #644215;
  font-weight: 700;
  font-size: 15px;
}
.avatar.sage {
  background: #dfe9d8;
  color: #36563e;
}
.avatar.iris {
  background: #e6def3;
  color: #5c4277;
}
.avatar.sand {
  background: #f2e0c8;
  color: #704922;
}
.avatar.pink {
  background: #f3ddd8;
  color: #784a43;
}
.page {
  padding: 38px 0 32px;
  outline: none !important;
}
.page-head,
.stock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.head-actions,
.actions,
.inline-actions,
.trade-buttons,
.quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.head-actions {
  gap: 17px;
}
.button,
.chip,
.text-button,
.source-button,
.backlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 640;
  line-height: 1.15;
  white-space: nowrap;
}
.button {
  border-radius: 10px;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.14s;
}
.dark {
  background: var(--ink-button);
  color: #fff;
}
.pale {
  background: #fff8e9;
  color: #2c2922;
}
.subtle {
  background: #ffffff;
  border-color: #d4d7cd;
}
.small {
  min-height: 36px;
  font-size: 13px;
  padding: 0 12px;
}
.text-button,
.source-button {
  min-height: 36px;
  padding: 0 3px;
  font-size: 13px;
}
.text-button {
  color: #51564b;
}
.source-button {
  color: #5b6054;
  gap: 7px;
  font-weight: 540;
  display: grid;
  grid-template-columns: auto auto;
  text-align: left;
  row-gap: 2px;
  white-space: normal;
}
.source-button #market-session { grid-column: 1; font-weight: 650; }
.source-button .price-mode { grid-column: 1; font-size: 11px; }
.source-button .ic { grid-column: 2; grid-row: 1 / 3; }
#sync-status:not(:empty) {
  position: fixed;
  bottom: calc(var(--nav-clearance, 0px) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  padding: .65rem 1rem;
  background: #292d24;
  color: white;
  border-radius: 8px;
  font-size: 13px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b97821;
  flex: none;
}
.full {
  width: 100%;
}
.backlink {
  color: #5c6258;
  font-weight: 570;
  min-height: 36px;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.backlink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.muted,
.helper,
.period,
.loading {
  color: var(--muted);
}
.muted {
  line-height: 1.55;
}
.helper {
  font-size: 13px;
  line-height: 1.55;
}
.intro {
  margin-bottom: 17px;
}
.section {
  margin-top: 37px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-bottom: 11px;
}
.section-head h2,
.side-area > h2 {
  font-size: 25px;
}
.section-head .count {
  color: var(--muted);
  margin-left: auto;
}
.grow {
  flex: 1;
  min-width: 0;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.83fr) minmax(270px, 1fr);
  gap: clamp(22px, 2.15vw, 32px);
  align-items: stretch;
}
.balance-panel,
.sheet-card,
.results {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.balance-panel {
  padding: 25px 27px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.balance-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.metric-title {
  font-size: 15px;
  color: #555a4f;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 590;
}
.big-number {
  margin-top: 5px;
  font-weight: 610;
  font-size: clamp(44px, 4.15vw, 61px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.gain-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  min-height: 22px;
  color: var(--muted);
}
.gain {
  font-weight: 690;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.up {
  color: var(--positive);
}
.down {
  color: var(--negative);
}
.period {
  font-size: 13px;
}
.range-control {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 1px;
  padding: 3px;
  border-radius: 9px;
  background: #f0f1ec;
}
.range-control button {
  min-width: 32px;
  min-height: 28px;
  font-size: 11.5px;
  color: #565c51;
  border-radius: 6px;
  font-weight: 610;
}
.range-control .chosen {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #282c201c;
}
.plot {
  height: clamp(156px, 14vw, 199px);
  position: relative;
  margin-top: 18px;
  margin-bottom: 13px;
  touch-action: pan-y;
  outline-offset: 2px !important;
}
.graph {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.axis {
  font:
    10.5px "DM Sans",
    sans-serif;
  fill: #666b60;
  font-variant-numeric: tabular-nums;
}
.graph-tip {
  position: absolute;
  background: #292e25;
  color: white;
  border-radius: 6px;
  padding: 5px 7px;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
  max-width: 100%;
  overflow: hidden;
}
.balance-foot {
  background: #f2f4ec;
  margin: auto -27px 0;
  padding: 16px 26px 18px;
  min-height: 69px;
  border-top: 1px solid #e4e6df;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.balance-foot > div,
.balance-foot > button {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  text-align: left;
}
.balance-foot > div + div,
.balance-foot > button {
  border-left: 1px solid #e2e4db;
  padding-left: 20px;
}
.balance-foot span,
.table-label,
.picker-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 530;
}
.balance-foot span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.balance-foot strong {
  font-size: 19px;
  font-weight: 635;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.table-label {
  border-bottom: 1px solid var(--line);
  min-height: 32px;
}
.holding-grid {
  display: grid;
  grid-template-columns:
    minmax(118px, 1.45fr) minmax(55px, 0.65fr) minmax(66px, 0.8fr)
    minmax(70px, 0.8fr);
  align-items: center;
  column-gap: 8px;
  text-align: left;
}
.holding-grid > :nth-child(3),
.holding-grid > :nth-child(4) {
  justify-self: end;
}
.holding-grid > :nth-child(2) {
  justify-self: center;
}
.holding-row,
.watch-row,
.person-line,
.room-row,
.rank-row,
.pick-row,
.board-history {
  width: 100%;
  border-bottom: 1px solid var(--line);
  min-height: 65px;
  text-align: left;
}
.holding-row:last-child,
.watch-row:last-child {
  border-bottom: 0;
}
.stock-id,
.watch-row,
.person-line,
.room-row,
.rank-row,
.pick-row,
.order-stock,
.result-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.stock-id strong,
.watch-row strong,
.person-line strong,
.pick-row strong,
.room-row strong,
.rank-row strong,
.order-stock strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.018em;
}
.stock-id small,
.num small,
.watch-row small,
.person-line small,
.room-row small,
.pick-row small,
.rank-row small,
.order-stock small,
.person-choice small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 480;
  line-height: 1.35;
}
.stock-id > span:last-child,
.watch-row > .grow,
.pick-row > .grow {
  overflow: hidden;
  min-width: 0;
}
.stock-id strong,
.pick-row strong,
.watch-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.num strong {
  font-size: 15px;
  font-weight: 615;
}
.num small.up {
  color: var(--positive);
}
.num small.down {
  color: var(--negative);
}
.ret {
  font-weight: 600;
}
.logo {
  width: 39px;
  height: 39px;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--logo-bg);
  border-radius: 10px;
  color: var(--logo-ink);
}
.logo > i:not(.ms-mark) {
  width: 22px;
  height: 22px;
  background: var(--logo-ink);
  -webkit-mask: var(--mark) center/contain no-repeat;
  mask: var(--mark) center/contain no-repeat;
}
.logo > i.ms-mark {
  width: 18px;
  height: 18px;
  background: conic-gradient(
    from 270deg,
    #f25022 0 25%,
    #7fba00 0 50%,
    #ffb900 0 75%,
    #00a4ef 0
  );
  clip-path: polygon(
    0 0,
    47% 0,
    47% 47%,
    0 47%,
    0 53%,
    47% 53%,
    47% 100%,
    0 100%,
    0 53%,
    100% 53%,
    100% 100%,
    53% 100%,
    53% 53%,
    53% 0,
    100% 0,
    100% 47%,
    53% 47%,
    53% 53%,
    0 53%
  );
}
.logo b {
  font-size: 13px;
  letter-spacing: -0.035em;
}
.spark {
  width: 75px;
  height: 25px;
}
.watch-row {
  min-height: 60px;
}
.watch-row .logo {
  width: 35px;
  height: 35px;
  border-radius: 9px;
}
.watch-row .logo i {
  width: 19px;
  height: 19px;
}
.bottom-note {
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #666b60;
  font-size: 11.5px;
}
.bottom-note > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stock-heading {
  margin-bottom: 24px;
}
.stock-id.large {
  gap: 15px;
}
.stock-id.large .logo {
  width: 58px;
  height: 58px;
  border-radius: 13px;
}
.stock-id.large .logo i {
  width: 32px;
  height: 32px;
}
.stock-id.large p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}
.stock-id.large p span {
  margin: 0 3px;
}
.stock-panel .plot {
  height: 210px;
}
.stock-source {
  margin: 2px -27px 0;
  border-top: 1px solid var(--line);
  padding: 13px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.stock-source > span {
  color: var(--muted);
  font-size: 12px;
}
.company-brief { line-height: 1.5; overflow-wrap: anywhere; }
.stock-panel .company-brief, #team-stock .company-brief {
  border-top: 1px solid var(--line);
  padding-block: 16px 20px;
}
#team-stock .company-brief { margin-top: 16px; }
.company-brief h3 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.company-brief p { margin: 6px 0 2px; max-width: 66ch; font-size: 14px; }
.brief-item + .brief-item { margin-top: 12px; }
.brief-item small { color: var(--muted); font-size: 12px; }
.brief-item a { text-decoration: underline; text-underline-offset: 3px; padding-block: 4px; }
.draft-company { display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; text-align: start; }
.draft-company > span:last-child { min-width: 0; }
.draft-company:hover strong, .draft-company:focus-visible strong { text-decoration: underline; text-underline-offset: 3px; }
.pick-row > .button { flex: none; }
.roomy {
  padding: 24px;
}
.order-panel {
  align-self: start;
}
.order-panel > .muted,
.side-area > .muted,
.roomy > p {
  font-size: 14px;
  margin: 8px 0 18px;
}
.fact-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
  font-size: 14px;
}
.fact-line > span {
  color: var(--muted);
}
.trade-buttons {
  margin-top: 12px;
}
.trade-buttons > button {
  flex: 1;
}
.about {
  max-width: 72ch;
}
.about > p {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.6;
}
.round-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #edece4;
  color: #4d5845;
  flex-shrink: 0;
}
.room-row {
  padding: 10px 2px;
}
.tag,
.chip {
  padding: 6px 10px;
  border-radius: 7px;
  background: #efefe8;
  font-size: 12px;
  color: #51584d;
  font-weight: 630;
}
.empty {
  padding: 25px 0;
  color: var(--muted);
  line-height: 1.5;
}
.empty h3 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 5px;
}
.empty p {
  font-size: 14px;
  max-width: 60ch;
}
.empty .button {
  margin-top: 14px;
}
.game-facts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.game-facts > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.game-facts .ic {
  width: 17px;
  height: 17px;
}
.turn-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 24px;
}
.turn-panel-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 3vw, 32px);
}
.turn-ident,
.turn-queue,
.turn-queue ol,
.turn-queue li {
  display: flex;
  align-items: center;
}
.turn-ident {
  gap: 16px;
  min-width: 0;
}
.turn-ident > div {
  min-width: 0;
}
.turn-ident .avatar {
  width: 46px;
  height: 46px;
  font-size: 22px;
}
.turn-round,
.turn-time small,
.turn-queue,
.turn-instruction {
  color: var(--muted);
}
.turn-round {
  font-size: 13px;
  font-weight: 600;
}
.turn-ident h2 {
  margin: 3px 0 5px;
  font-size: clamp(26px, 3vw, 40px);
  overflow-wrap: anywhere;
}
.turn-instruction {
  font-size: 14px;
}
.turn-time {
  text-align: right;
  flex: none;
}
.turn-time strong {
  display: block;
  font-size: clamp(34px, 5vw, 58px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
}
.turn-time strong.time-low {
  color: var(--negative);
}
.turn-time small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}
.turn-queue {
  gap: 10px 24px;
  padding: 13px clamp(18px, 3vw, 32px);
  background: var(--wash);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  font-size: 14px;
}
.turn-queue ol,
.draft-history {
  list-style: none;
  padding: 0;
  margin: 0;
}
.turn-queue ol {
  gap: 7px 22px;
  flex-wrap: wrap;
}
.turn-queue li {
  gap: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.queue-index {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.draft-columns {
  align-items: start;
}
.draft-columns .section-head {
  margin-bottom: 14px;
}
.draft-history {
  max-height: 365px;
  overflow: auto;
}
.draft-columns aside .helper {
  line-height: 1.55;
  margin-top: 16px;
}
.draft-columns aside .button {
  margin-top: 12px;
}
@media (max-width: 490px) {
  .turn-panel {
    margin-bottom: 16px;
  }
  .turn-ident .avatar {
    display: none;
  }
  .turn-queue {
    gap: 6px 12px;
  }
  .turn-queue ol {
    gap: 5px 12px;
  }
}
.picker-list {
  max-height: min(370px, 45dvh);
  overflow: auto;
  scrollbar-color: #c2c6b9 transparent;
  overscroll-behavior: contain;
}
.draft-board .picker-list {
  max-height: 440px;
}
.pick-row {
  min-height: 54px;
  padding: 7px 4px;
  gap: 10px;
}
.pick-row .logo {
  width: 33px;
  height: 33px;
}
.pick-row .logo i {
  width: 18px;
  height: 18px;
}
.pick-row > span:not(.logo):not(.grow) {
  font-size: 13px;
}
.pick-row:disabled {
  opacity: 0.55;
}
.draft-board > .helper {
  margin-top: 14px;
}
.turn-position {
  color: var(--muted);
  font-size: 13px;
  padding: 8px clamp(18px, 3vw, 32px) 14px;
}
.draft-recommendation {
  background: #eff3eb;
  border-radius: 12px;
  padding: 14px 16px;
}
.draft-recommendation .section-head { margin-bottom: 8px; }
.draft-recommendation h3 { font-size: 14px; font-weight: 650; }
.recommended-stock, .circle-choice, .finish-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.recommended-stock .grow, .rank-row .grow { min-width: 0; overflow-wrap: anywhere; }
.recommended-stock .button { min-height: 44px; flex-shrink: 0; }
.recommended-stock strong, .circle-choice strong { display: block; }
.recommended-stock small, .circle-choice small {
  display: block;
  color: #555c50;
  font-size: 13px;
  line-height: 1.4;
}
.circle-choice {
  min-height: 52px;
  margin: 2px 0 16px;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 14px;
}
.circle-choice input { width: 19px; height: 19px; accent-color: var(--ink); flex: none; }
.league-note { padding-block: 12px; }
.league-note p, #finish-frame p { line-height: 1.5; margin-block: 6px 14px; }
#finish-frame h3 { font-size: clamp(23px, 4vw, 31px); }
.finish-control { margin-top: 18px; }
.finish-control input { flex: 1; min-width: 0; min-height: 44px; accent-color: var(--ink); }
.board-history {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
}
.board-history span:last-child {
  margin-left: auto;
  color: var(--muted);
}
.rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  min-width: 22px;
}
.results {
  max-width: 760px;
  padding: 25px;
}
.result-heading {
  margin-bottom: 15px;
}
.result-heading .muted {
  font-size: 13px;
  margin-top: 4px;
}
.rank-row {
  min-height: 66px;
}
.results .actions {
  margin: 20px 0 14px;
}
.num small {
  font-variant-numeric: tabular-nums;
}
.social {
  align-items: start;
}
.social aside {
  position: sticky;
  top: 16px;
}
.person-line {
  gap: 10px;
  font-size: 14px;
}
.roster-stock .grow { min-width: 0; overflow-wrap: anywhere; }
.roster-stock > .mini { flex: none; color: var(--muted); }
#team-stock .backlink { min-height: 44px; }
.profile-line .ic {
  color: var(--muted);
}
.person-line .inline-actions {
  gap: 6px;
}
.aside-note {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.aside-note strong {
  font-size: 13px;
}
.aside-note p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}
dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid #d6d8ce;
  border-radius: 18px;
  color: var(--ink);
  background: #fffefb;
  max-height: 85dvh;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 18px 55px #1a201d35;
}
dialog.wide {
  width: min(600px, calc(100% - 32px));
}
dialog::backdrop {
  background: #1e241c58;
  backdrop-filter: blur(3px);
}
.sheet-inner {
  padding: 23px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.sheet-head h2 {
  font-size: 24px;
}
.sheet-head .close {
  background: #f0f1ea;
  border-radius: 50%;
  min-height: 32px;
  min-width: 32px;
}
.sheet-head .close .ic {
  width: 17px;
  height: 17px;
}
.sheet-inner .actions {
  margin-top: 17px;
}
.search-box {
  border: 1px solid #cbd0c3;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}
.search-box:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.search-box input {
  border: 0;
  outline: none !important;
  width: 100%;
  height: 43px;
  font-size: 16px;
  background: transparent;
  color: var(--ink);
}
.picker-hint {
  margin: 15px 0 6px;
}
.field,
fieldset {
  display: block;
  margin: 0 0 16px;
  color: #41463b;
  font-size: 14px;
  font-weight: 650;
}
fieldset {
  border: 0;
  padding: 0;
}
legend {
  padding: 0;
  margin-bottom: 7px;
}
.field input,
.field select {
  display: block;
  margin-top: 6px;
  border: 1px solid #c6cbbf;
  border-radius: 9px;
  background: white;
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}
.field select {
  padding-right: 20px;
}
.choices {
  border-top: 1px solid var(--line);
}
.person-choice,
.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.person-choice {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.person-choice > span:nth-child(2),
.toggle-line > span {
  flex: 1;
}
.person-choice input,
.toggle-line input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.toggle-line {
  margin: 17px 0;
}
.toggle-line small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 3px;
}
.quick {
  margin: -6px 0 16px;
}
.chip {
  min-height: 32px;
  padding: 0 12px;
}
.order-stock {
  margin-bottom: 16px;
}
.form-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbeae4;
  color: #903322;
  font-size: 14px;
  margin: 10px 0;
}
.explain p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 17px;
}
.explain h3 {
  font-size: 16px;
  letter-spacing: -0.013em;
}
.explain h3 .status-dot {
  margin-right: 4px;
}
#toasts {
  position: fixed;
  bottom: calc(var(--nav-clearance, env(safe-area-inset-bottom)) + 12px);
  left: 50%;
  transform: translate(-50%, 8px);
  background: #292e25;
  color: #fff;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.16s,
    opacity 0.16s;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 8;
}
#toasts.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.loading {
  padding: 50px 0;
}
@media (hover: hover) and (pointer: fine) {
  .button.dark:hover {
    background: #444a3c;
  }
  .button.pale:hover {
    background: #f5e8ce;
  }
  .button.subtle:hover,
  .chip:hover,
  .icon-btn:hover,
  .profile-btn:hover,
  .search-launch:hover {
    background: #e9ece2;
  }
  .text-button:hover,
  .source-button:hover,
  .primary-nav a:hover {
    color: #a04226;
  }
  .holding-row:hover,
  .watch-row:hover,
  .profile-line:hover,
  .roster-stock:hover,
  .rank-row:hover,
  .room-row:hover,
  .pick-row:not(:disabled):hover {
    background: #eff1e960;
  }
  .balance-foot button:hover strong {
    color: #99412a;
  }
  .range-control button:hover {
    color: #111;
  }
}
button:not(:disabled):active, .button:active { filter: brightness(.93); }
@media (prefers-reduced-motion: no-preference) {
  button:not(:disabled):active, .button:active { transform: scale(.98); }
  .profile-btn:active { transform: scale(.96); }
}
.holding-row:active,
.watch-row:active,
.rank-row:active,
.pick-row:active {
  transform: none;
}

@media (min-width: 1450px) {
  .page {
    padding-top: 45px;
  }
  .plot {
    height: 205px;
  }
}
@media (max-width: 1050px) {
  .top-inner,
  .page {
    width: calc(100% - 56px);
  }
  .top-inner {
    gap: 35px;
  }
  .split {
    grid-template-columns: minmax(0, 1.68fr) minmax(225px, 1fr);
    gap: 20px;
  }
  .balance-panel {
    padding: 21px 20px 0;
  }
  .balance-foot {
    margin-left: -20px;
    margin-right: -20px;
    padding: 15px 18px;
  }
  .balance-foot > div + div,
  .balance-foot > button {
    padding-left: 12px;
  }
  .balance-foot span {
    font-size: 11px;
  }
  .balance-foot strong {
    font-size: 17px;
  }
  .range-control button {
    min-width: 28px;
  }
  .stock-source {
    margin-left: -20px;
    margin-right: -20px;
  }
  .holding-grid {
    grid-template-columns:
      minmax(95px, 1.3fr) minmax(38px, 0.45fr) minmax(58px, 0.74fr)
      minmax(62px, 0.78fr);
  }
  .spark {
    width: 55px;
  }
  .top-tools {
    gap: 10px;
  }
}
@media (max-width: 760px) {
  .top-inner,
  .page {
    width: calc(100% - 36px);
  }
  .top-inner {
    gap: 23px;
    min-height: 63px;
  }
  .brand {
    font-size: 21px;
    gap: 7px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .search-launch {
    min-width: 39px;
    min-height: 39px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: none;
  }
  .search-launch > span {
    display: none;
  }
  .top-tools {
    gap: 3px;
  }
  .page {
    padding-top: 25px;
  }
  .page-head {
    margin-bottom: 18px;
  }
  .head-actions {
    gap: 10px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .balance-top {
    gap: 8px;
  }
  .balance-panel .plot {
    height: 175px;
  }
  .section-head {
    margin-bottom: 5px;
  }
  .holding-grid {
    grid-template-columns:
      minmax(125px, 1.3fr) minmax(45px, 0.6fr) minmax(64px, 0.8fr)
      minmax(72px, 0.8fr);
  }
  .social aside {
    position: static;
    grid-row: 1;
  }
  .stock-id.large h1 {
    font-size: 32px;
  }
  .roomy,
  .results {
    padding: 20px;
  }
  .stock-panel .plot {
    height: 200px;
  }
  .stock-source {
    padding: 12px 16px;
  }
}
@media (max-width: 490px) {
  .top-inner,
  .page {
    width: calc(100% - 32px);
  }
  .top-inner {
    gap: 13px;
    flex-wrap: wrap;
    min-height: 0;
    row-gap: 0;
    padding-block: 5px;
  }
  .top-tools {
    order: 1;
  }
  .brand {
    flex: 1;
  }
  .friend-button,
  .profile-btn,
  .search-launch {
    min-width: 36px;
    min-height: 38px;
  }
  .profile-btn .ic {
    display: none;
  }
  .avatar {
    width: 31px;
    height: 31px;
  }
  .page {
    padding-top: 23px;
  }
  .page-head {
    gap: 8px;
    align-items: center;
  }
  .page-head h1 {
    font-size: 33px;
  }
  .head-actions .source-button {
    font-size: 12px;
  }
  .head-actions:has(.source-button) {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 136px;
    gap: 3px;
  }
  .head-actions:has(.source-button) .source-button {
    min-height: 23px;
    order: 2;
  }
  .head-actions:has(.source-button) .button {
    min-height: 37px;
    padding: 0 12px;
    font-size: 12px;
  }
  .button {
    min-height: 42px;
  }
  .balance-panel {
    padding: 17px 15px 0;
  }
  .balance-top {
    flex-wrap: wrap;
    gap: 9px;
  }
  .big-number {
    font-size: 44px;
  }
  .range-control {
    margin-left: auto;
  }
  .range-control button {
    min-width: 25px;
    min-height: 25px;
    font-size: 10px;
  }
  .metric-title {
    font-size: 13px;
  }
  .gain-wrap {
    gap: 5px;
    font-size: 12px;
  }
  .period {
    font-size: 12px;
  }
  .plot,
  .balance-panel .plot {
    height: 148px;
    margin-top: 13px;
    margin-bottom: 12px;
  }
  .balance-foot {
    margin: 0 -15px;
    padding: 12px 12px 14px;
  }
  .balance-foot strong {
    font-size: 15px;
  }
  .balance-foot > div + div,
  .balance-foot > button {
    padding-left: 7px;
  }
  .balance-foot span {
    font-size: 10px;
  }
  .balance-foot .tiny {
    width: 10px;
  }
  .section-head h2 {
    font-size: 23px;
  }
  .holding-grid {
    grid-template-columns: minmax(106px, 1fr) minmax(69px, 0.6fr) minmax(
        74px,
        0.68fr
      );
    gap: 5px;
  }
  .holding-grid > :nth-child(2) {
    display: none;
  }
  .holding-row,
  .watch-row {
    min-height: 58px;
  }
  .logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .logo > i:not(.ms-mark) {
    width: 19px;
    height: 19px;
  }
  .stock-id {
    gap: 8px;
  }
  .stock-id strong,
  .num strong {
    font-size: 14px;
  }
  .table-label {
    font-size: 11px;
  }
  .stock-source {
    margin-left: -15px;
    margin-right: -15px;
  }
  .stock-heading {
    gap: 8px;
  }
  .stock-id.large .logo {
    width: 42px;
    height: 42px;
  }
  .stock-id.large .logo i {
    width: 25px;
    height: 25px;
  }
  .stock-id.large {
    gap: 8px;
    min-width: 0;
  }
  .stock-id.large h1 {
    font-size: 27px;
    overflow-wrap: anywhere;
  }
  .stock-heading .button {
    padding: 0 8px;
    font-size: 12px;
  }
  .social .section-head {
    margin-top: 6px;
  }
  .room-row .tag {
    font-size: 10px;
    padding: 5px;
  }
  .room-row .ic.mini {
    display: none;
  }
  .person-line .inline-actions .button {
    min-height: 32px;
    font-size: 12px;
    padding: 0 8px;
  }
  .sheet-inner {
    padding: 18px;
  }
  .sheet-head h2 {
    font-size: 22px;
  }
  dialog {
    max-height: 88dvh;
  }
  .rank-row,
  .person-line {
    gap: 8px;
  }
  .roomy,
  .results {
    padding: 16px;
  }
  .game-facts {
    gap: 8px;
    font-size: 12px;
  }
  .bottom-note {
    font-size: 11px;
  }
}
@media (max-width: 355px) {
  .top-inner,
  .page {
    width: calc(100% - 22px);
  }
  .balance-top .range-control {
    margin-left: 0;
  }
  .balance-foot {
    padding-left: 8px;
    padding-right: 8px;
  }
  .page-head h1 {
    font-size: 29px;
  }
  .gain-wrap {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    dialog[open] {
      opacity: 0.5;
      transform: translateY(5px);
    }
  }
  dialog[open] {
    transition:
      transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.16s ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 760px) {
  .top-tools .icon-btn,
  .top-tools .search-launch,
  .top-tools .profile-btn,
  .sheet-head .close {
    min-width: 44px;
    min-height: 44px;
  }
  .text-button,
  .chip,
  .stock-source .source-button,
  .balance-foot button,
  .person-line .inline-actions .button {
    min-height: 44px;
  }
  .range-control button {
    min-height: 44px;
    min-width: 44px;
  }
}
@media (max-width: 490px) {
  .brand,
  .search-launch,
  .friend-button,
  .profile-btn {
    min-height: 44px;
  }
  .head-actions:has(.source-button) .button {
    min-height: 44px;
  }
  .page-head:has(.source-button) {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0 6px;
  }
  .page-head:has(.source-button) .head-actions {
    display: contents;
  }
  .page-head:has(.source-button) .source-button {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    min-height: 44px;
    padding: 0;
  }
  .page-head:has(.source-button) .head-actions > .button {
    grid-column: 2;
    grid-row: 1;
  }
  .page-head:has(.source-button) {
    margin-bottom: 8px;
  }
  .balance-top {
    display: contents;
  }
  .balance-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .balance-top > div:first-child {
    grid-row: 1;
  }
  .balance-panel .plot {
    grid-row: 2;
  }
  .balance-top .range-control {
    grid-row: 3;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin: 0 0 12px;
    width: min(100%, 270px);
    justify-self: center;
  }
  .range-control button {
    min-width: 44px;
    min-height: 44px;
    font-size: 12px;
  }
  .balance-foot,
  .stock-source {
    grid-row: 4;
  }
  .plot,
  .balance-panel .plot {
    margin-bottom: 8px;
  }
}

/* Draft session dates */
.draft-dates {
  max-width: 36rem;
  margin: 12px 0 8px;
  padding: 4px 0;
  border-block: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}
.draft-dates > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
}
.draft-dates dt {
  color: var(--muted);
}
.draft-dates dd {
  margin: 0;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.draft-dates time {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 0.6em;
}
.draft-dates time span {
  white-space: nowrap;
}
.draft-timing-note {
  margin: 8px 0 14px;
}

.membership-link[hidden] { display: none; }
.membership-link { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.membership-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 660;
  line-height: 1.3;
}
@media (hover: hover) {
  .membership-link:hover .membership-chip { background: var(--wash); }
}
@media (max-width: 360px) {
  .membership-chip { padding-inline: 7px; gap: 4px; }
  .membership-chip .ic { width: 13px; height: 13px; }
}
.pro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
#custom-length-field[hidden] { display: none; }
.rewind-stock { min-height: 44px; padding: 8px 12px; border: 1px solid #bfc4b8; border-radius: 9px; background: white; color: inherit; font: inherit; }

/* Shared club surfaces, from stock tables to the draft room. */
.button { min-height: 44px; }
.dark { background: var(--ink-button); }
@media (hover: hover) { .button.dark:hover { background: #404639; } }
p.helper, .helper { line-height: 1.5; }
.balance-panel, .turn-panel, .results { box-shadow: 0 2px 5px #21302808; }
.metric-title { font-size: 14px; }
.metric-title span { color: var(--muted); font-weight: 450; }
.big-number { color: var(--pine); }
.room-row .round-icon, .result-heading .round-icon, .person-line .round-icon { color: var(--pine); background: var(--wash); }
.turn-panel-main { border-top: 3px solid var(--pine); }
.turn-time { padding-left: 15px; border-left: 1px solid var(--line); }
.turn-time strong { color: var(--pine); }
.turn-time strong.time-low { color: var(--negative); }
.draft-recommendation { background: var(--wash); }
.sheet-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sheet-head .close { min-width: 44px; min-height: 44px; }
@media (max-width: 520px) {
  .metric-title { font-size: 13px; }
}

.portfolio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  grid-template-areas: "balance watch" "holdings drafts";
  align-items: start;
  gap: clamp(18px, 2.6vw, 38px);
}
.portfolio-layout .balance-panel { grid-area: balance; }
.portfolio-holdings { grid-area: holdings; }
.portfolio-watch { grid-area: watch; }
.portfolio-draft { grid-area: drafts; }
.portfolio-holdings, .portfolio-watch, .portfolio-draft { min-width: 0; border-top: 1px solid #8c9691; padding-top: 15px; }
.portfolio-draft img { display: block; width: 100%; height: auto; aspect-ratio: 3.2; object-fit: cover; margin-bottom: 14px; border-radius: var(--radius); }
.portfolio-draft h2 { font-size: 1.3rem; }
.portfolio-draft p { margin: 9px 0 13px; color: var(--muted); max-width: 35ch; line-height: 1.5; }
.draft-setup-intro {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: clamp(24px,5vw,72px); align-items: center;
  padding: clamp(20px,3.2vw,44px) 0; border-block: 1px solid var(--line);
}
.play-draft-art { width: 100%; height: auto; aspect-ratio: 1.85; object-fit: cover; border-radius: 16px; }
.draft-setup-intro h2 { font-size: clamp(1.8rem,3.3vw,3.1rem); letter-spacing: -.04em; }
.draft-setup-intro p { max-width: 45ch; margin: 8px 0 18px; color: var(--muted); line-height: 1.5; }
.draft-setup-intro dl { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 44px); margin: 0 0 18px; }
.draft-setup-intro dl > div { border-left: 1px solid var(--line); padding-left: clamp(12px,2vw,26px); }
.draft-setup-intro dt, .draft-setup-intro dd small { color: var(--muted); font-size: .88rem; font-weight: 490; letter-spacing: 0; }
.draft-setup-intro dd { font-size: clamp(1.35rem,2.3vw,1.8rem); font-weight: 650; letter-spacing: -.04em; margin: 3px 0 0; }
.draft-setup-intro dd small { display: block; }
.membership-link:active .membership-chip { background: #e4e9e4; }
@media (max-width: 760px) {
  .portfolio-layout { grid-template-columns: minmax(0,1fr); grid-template-areas: "balance" "holdings" "watch" "drafts"; }
  .draft-setup-intro { grid-template-columns: 1fr; gap: 18px; }
  .play-draft-art { aspect-ratio: 3; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  dialog::backdrop { backdrop-filter: none; background: rgb(24 28 30 / 72%); }
}

/* Keep the draft controls within reach when the scoring details need to scroll. */
#sheet[data-key="new-league"] {
  --setup-gutter: clamp(16px, 4vw, 24px);
  --setup-height: min(85dvh, calc(100dvh - 24px));
  max-height: var(--setup-height);
  overflow: hidden;
}
#sheet[data-key="new-league"] .sheet-inner {
  display: flex; flex-direction: column; max-height: calc(var(--setup-height) - 2px); padding: 0;
}
#sheet[data-key="new-league"] .sheet-head {
  flex: none; margin: 0 var(--setup-gutter); padding-block: 12px;
}
#sheet[data-key="new-league"] .sheet-body, #league-form {
  min-height: 0; display: flex; flex-direction: column; margin: 0;
}
#league-form [hidden] { display: none; }
.draft-setup-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--setup-gutter); }
.draft-step { color: var(--muted); margin: 0 0 12px; font-size: .82rem; font-weight: 600; }
.draft-step:focus { outline: none; }
#draft-players, #draft-rules { min-width: 0; margin: 0; }
#draft-players legend { margin-bottom: 10px; color: var(--ink); font-size: 1.12rem; }
.draft-mode { display: flex; padding: 3px; border-radius: 9px; background: #e9eae2; }
.draft-mode label { position: relative; flex: 1; min-width: 0; }
.draft-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.draft-mode span { display: grid; place-items: center; min-height: 44px; padding: 4px; border-radius: 7px; text-align: center; }
.draft-mode input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #14191b30; }
.draft-mode input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
@media (forced-colors: active) { .draft-mode input:checked + span { border: 2px solid Highlight; } }
#draft-players .helper, #draft-rules .helper { font-weight: 400; margin-block: 8px 0; line-height: 1.45; }
#draft-players .choices { margin-top: 8px; }
#draft-friends .text-button { min-height: 44px; }
.draft-opponents-summary { margin: 0 0 14px; font-size: .92rem; color: var(--muted); font-weight: 450; overflow-wrap: anywhere; }
#draft-rules .field { margin-bottom: 14px; }
#draft-rules .draft-name { margin-top: 14px; margin-bottom: 0; }
.draft-name span { font-weight: 450; color: var(--muted); }
.draft-schedule summary { width: fit-content; min-height: 44px; align-content: center; font-weight: 560; cursor: pointer; }
.draft-schedule .draft-dates { margin: 0; }
.draft-setup-footer { flex: none; padding: 12px var(--setup-gutter); border-top: 1px solid var(--line); }
.draft-setup-actions { display: flex; gap: 8px; }
.draft-setup-actions .dark { flex: 1; }
.draft-setup-footer .form-error { margin: 0 0 8px; }
.draft-lobby { max-width: 760px; }
.lobby-status, .leaderboard-guide, .lobby-format p { color: var(--muted); line-height: 1.5; margin: 6px 0 12px; }
.draft-lobby .section-head { margin: 20px 0 4px; }
.lobby-format { margin-top: 20px; }
.draft-lobby .section-head .muted, .leaderboard-guide { font-size: .9rem; }
.turn-position { line-height: 1.5; overflow-wrap: anywhere; }
@media (max-height: 560px) {
  #sheet[data-key="new-league"] { --setup-height: calc(100dvh - 12px); }
  #sheet[data-key="new-league"] .sheet-head, .draft-setup-footer { padding-block: 6px; }
}

.rematch-options { flex-basis: 100%; }
.season-panel { max-width: 760px; }
.season-choice { gap: 16px; margin-block: 12px; }
.season-choice small { display: block; }
.season-panel .draft-schedule { margin-block: 12px; }
.season-panel .text-button { display: block; margin-top: 8px; min-height: 44px; }

.membership-short { display: none; }
@media (max-width: 950px) {
  .top-tools .membership-short { display: inline; }
  .top-tools .membership-label, .top-tools .membership-chip .ic { display: none; }
  .top-tools .membership-chip { padding: 5px 8px; background: var(--wash); }
}
@media (max-width: 380px) {
  .top-tools { gap: 1px; }
  .top-inner:has(.top-tools:not([hidden])) { column-gap: 4px; }
}

.brief-background { margin-top: 10px; }
.brief-background summary { cursor: pointer; color: var(--muted); font-size: 13px; width: fit-content; padding-block: 4px; }

@media (max-width: 600px), (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  :root { --phone-gutter: clamp(14px, 4.6vw, 22px); }
  .topbar { padding-top: env(safe-area-inset-top); }
  .top-inner, .page {
    width: auto;
    margin-left: max(var(--phone-gutter), env(safe-area-inset-left));
    margin-right: max(var(--phone-gutter), env(safe-area-inset-right));
  }
  .top-inner { min-height: 54px; }
  .top-tools .membership-link { min-width: 44px; justify-content: center; }
  .page { padding-block: 1rem 1.5rem; }
  .play-switcher { gap: 4px 8px; margin-bottom: 12px; }
  .play-modes a { padding-inline: clamp(9px, 2.8vw, 14px); }
  .ticks-shortcut { padding-inline: 4px; }
  .balance-foot span { font-size: .75rem; line-height: 1.3; }
  .balance-foot { align-items: stretch; }
  .page-head:has(.source-button) .head-actions > .button { font-size: .875rem; }
  .brief-background summary { min-height: 44px; align-content: center; }
  .draft-setup-intro .button { width: 100%; }
  .returning-drafter .play-draft-art { display: none; }
  .returning-drafter { padding-block: 16px; }
  .returning-drafter dl { margin-bottom: 12px; }
  .pro-actions .button { flex: 1 1 auto; }
  html:has(#sheet[open]) { overflow: hidden; }
  #sheet:not([data-key="pick-review"]) {
    --sheet-edge: max(12px, env(safe-area-inset-top));
    --sheet-room: calc(min(100dvh, var(--sheet-visible-height, 100dvh)) - var(--sheet-edge));
    inset: auto 0 max(0px, calc(100dvh - var(--sheet-visible-height, 100dvh) - var(--sheet-visible-top, 0px)));
    width: min(100%, 38rem); max-width: 100%; max-height: var(--sheet-room);
    margin: 0 auto; border-radius: 20px 20px 0 0; border-bottom: 0;
    background: var(--surface);
  }
  #sheet:not([data-key="pick-review"], [data-key="new-league"]) .sheet-inner { padding: 0; }
  #sheet:not([data-key="pick-review"], [data-key="new-league"]) .sheet-head,
  #sheet:not([data-key="pick-review"], [data-key="new-league"]) .sheet-body {
    padding-inline: max(var(--phone-gutter), env(safe-area-inset-left)) max(var(--phone-gutter), env(safe-area-inset-right));
  }
  #sheet:not([data-key="pick-review"], [data-key="new-league"]) .sheet-head {
    position: sticky; top: 0; z-index: 1; background: var(--surface);
    margin: 0; padding-block: 8px;
  }
  #sheet:not([data-key="pick-review"], [data-key="new-league"]) .sheet-body { padding-block: 16px max(16px, env(safe-area-inset-bottom)); }
  #sheet[data-key="new-league"] { --setup-height: var(--sheet-room); --setup-gutter: max(var(--phone-gutter), env(safe-area-inset-left), env(safe-area-inset-right)); }
  #sheet[data-key="new-league"] .sheet-head { padding-block: 8px; }
  #sheet[data-key="new-league"] .draft-setup-footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #sheet[data-key="search"] { height: var(--sheet-room); }
  #sheet[data-key="search"] .sheet-inner, #sheet[data-key="search"] .sheet-body { display: flex; flex-direction: column; min-height: 0; }
  #sheet[data-key="search"] .sheet-inner { height: 100%; }
  #sheet[data-key="search"] :is(.search-box, .picker-hint) { flex: none; }
  #sheet[data-key="search"] .picker-list { overflow-y: auto; max-height: none; }
  .top-tools button:active, .play-modes a:active { background-color: var(--wash); }
}
