:root {
  color-scheme: dark;
  --field: #1660b1;
  --panel: #122d5a;
  --edge: #071530;
  --line: #679bd4;
  --amber: #ffe06b;
  --paper: #f3f8ff;
  --muted: #ccdef5;
  font-family: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle, #c4edff4d 1px, transparent 1.8px) 0 0 / 8px 8px,
    repeating-linear-gradient(125deg, #a2dcff26 0 30px, transparent 30px 103px),
    linear-gradient(135deg, #133b80, #2986d7 44%, #153e88 100%) fixed, var(--field);
  color: var(--paper);
  line-height: 1.55;
}

.ff-shell { width: min(850px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 55px; }
.ff-owner { width: min(1190px, calc(100% - 28px)); }
.ff-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ff-nav > * { padding: 4px 10px; background: var(--edge); border: 1px solid var(--line); border-radius: 5px; }
.ff-nav span, .ff-kicker { color: var(--amber); font-size: .78rem; font-weight: bold; letter-spacing: .12em; text-transform: uppercase; }
a { color: var(--paper); text-underline-offset: .23em; }
.ff-scoreboard, .ff-panel {
  border: 4px solid var(--edge);
  border-radius: 16px;
  background: linear-gradient(150deg, #234e88, var(--panel) 64%);
  box-shadow: inset 0 0 0 2px var(--line), 0 5px 0 #092246;
}
.ff-scoreboard { overflow: hidden; padding: clamp(20px, 5vw, 38px); }
.ff-scoreboard h1, .ff-panel h2 {
  font-family: Impact, "Arial Black", system-ui, sans-serif;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.ff-scoreboard h1 {
  margin: 12px 0 20px;
  color: var(--amber);
  font-size: clamp(2.45rem, 8.5vw, 5rem);
  font-weight: 900;
  line-height: .98;
  text-shadow: 0 2px #855016, 4px 5px var(--edge);
}
.ff-scoreboard p { max-width: 55ch; }
.ff-indicator { display: inline-block; width: .65em; height: .65em; margin-right: .4em; background: #ff7160; box-shadow: 2px 2px 0 #752818; }
.ff-field {
  display: flex;
  justify-content: space-around;
  margin: 26px calc(-1 * clamp(20px, 5vw, 38px)) calc(-1 * clamp(20px, 5vw, 38px));
  padding: 10px 0;
  border-block: 2px solid var(--line);
  background: repeating-linear-gradient(90deg, #9ce6ff57 0 1px, transparent 1px calc(100% / 7)), #205489;
  color: #d8f2ff;
  font-size: .8rem;
  font-weight: bold;
}
.ff-panel { margin-top: 24px; padding: clamp(17px, 4vw, 30px); min-width: 0; }
.ff-panel h2 { margin: 0 0 18px; text-transform: uppercase; line-height: 1.15; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.ff-kicker { margin: 0 0 9px; }
.ff-fields, .ff-queue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ff-queue-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
label { display: block; margin: 16px 0 5px; font-weight: bold; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; border: 2px solid var(--line); border-radius: 6px; background: #081b3b; color: var(--paper); padding: 10px; }
textarea { resize: vertical; }
button { padding: 10px 15px; border: 2px solid var(--edge); border-radius: 7px; color: #101c36; background: var(--amber); box-shadow: inset 0 2px #fff8, 0 3px var(--edge); font-weight: bold; text-transform: uppercase; cursor: pointer; }
button:hover:not(:disabled) { background: #fff0a0; }
button:disabled { opacity: .6; cursor: wait; }
.ff-secondary { color: var(--paper); background: #214d87; border-color: var(--line); box-shadow: 0 2px var(--edge); }
.ff-secondary:hover:not(:disabled) { background: #2e61a1; }
:focus-visible { outline: 3px dashed var(--amber); outline-offset: 4px; }
.ff-hint { color: var(--muted); font-size: .86rem; }
.ff-status { color: var(--amber); background: var(--edge); padding: 8px 12px; border-radius: 6px; overflow-wrap: anywhere; }
.ff-status:empty { display: none; }
.ff-digits { display: inline-block; background: var(--amber); border: 3px solid var(--edge); border-radius: 7px; color: var(--edge); padding: 2px 14px; font-size: 2rem; font-variant-numeric: tabular-nums; }
.ff-entry-meta { color: var(--muted); font-size: .88rem; }
.ff-entry-details { white-space: pre-wrap; overflow-wrap: anywhere; }
.ff-mode-panel, .ff-modes { margin: 20px 0 0; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.ff-mode-panel legend, .ff-modes legend { color: var(--amber); padding: 0 6px; font-weight: bold; text-transform: uppercase; }
.ff-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ff-mode-grid label { position: relative; margin: 0; cursor: pointer; }
.ff-mode-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ff-mode-grid span { display: grid; min-height: 42px; place-items: center; text-align: center; padding: 5px; background: #235184; border: 2px solid var(--edge); border-radius: 6px; }
.ff-mode-grid input:checked + span { background: var(--amber); color: var(--edge); }
.ff-mode-grid input:focus-visible + span { outline: 3px dashed var(--amber); outline-offset: 2px; }
.ff-side { min-width: 0; padding: 9px; background: #0d2346; border: 2px solid #3e73aa; border-radius: 8px; }
.ff-side label, .ff-counts label, .ff-roster-slots label { margin-top: 4px; }
.ff-side-title { display: inline-block; margin: 0 0 5px; padding: 2px 8px; border: 2px solid var(--edge); border-radius: 4px; background: #9bdeff; color: var(--edge); font-size: .94rem; text-transform: uppercase; }
[data-picker="give"], [data-side="give"] { border-color: #e98a99; }
[data-picker="give"] .ff-side-title, [data-side="give"] .ff-side-title { background: #ff9ba6; }
[data-picker="receive"], [data-side="receive"] { border-color: #73d9a1; }
[data-picker="receive"] .ff-side-title, [data-side="receive"] .ff-side-title { background: #91efae; }
.ff-roster-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 7px; margin-bottom: 10px; }
.ff-roster-slots label { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: #183963; }
.ff-roster-slots input { text-align: center; padding: 5px; }
.ff-entry-sections { display: grid; gap: 8px; }
.ff-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.ff-badges span, .ff-position { color: var(--edge); background: var(--amber); border: 2px solid var(--edge); border-radius: 5px; padding: 2px 6px; font-size: .8rem; font-weight: bold; }
.ff-pick-list, .ff-selected, .ff-player-cards { list-style: none; padding: 0; margin: 10px 0; }
.ff-pick-list { max-height: 19rem; overflow: auto; }
.ff-pick-list li + li { margin-top: 6px; }
.ff-pick-list button { width: 100%; text-align: left; font-weight: normal; text-transform: none; }
.ff-selected { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-selected li { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: #1c4878; overflow-wrap: anywhere; }
.ff-selected button { flex: none; padding: 1px 8px; box-shadow: none; }
.ff-player-cards { display: grid; gap: 6px; }
.ff-player-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px;
  border: 2px solid var(--edge); border-radius: 8px; box-shadow: inset 0 0 0 1px #88ceff82;
  background-color: #214d87;
  background-image: repeating-linear-gradient(135deg, #ffffff0a 0 4px, transparent 4px 9px),
    linear-gradient(110deg, #1b3e70, color-mix(in srgb, var(--team-color, #2a6da3) 58%, #274d7d));
  overflow-wrap: anywhere;
}
.ff-player-card strong { color: var(--amber); text-transform: uppercase; }
.ff-position { background: #9bdeff; }
.ff-position[data-position="QB"] { background: #ff9ba6; }
.ff-position[data-position="RB"] { background: #91efae; }
.ff-position[data-position="WR"] { background: var(--amber); }
.ff-player-card small { display: block; color: var(--muted); }
.ff-matchup {
  display: inline-block; margin-top: 4px; padding: 1px 7px; border: 1px solid #88bde4; border-radius: 5px;
  color: #e5f5ff; background: #0a2041; font-size: .76rem; font-weight: bold;
}
.ff-matchup[data-location="bye"] { color: var(--amber); border-color: #bd9e56; }
.ff-schedule-credit { margin: 14px 0 0; padding: 5px 9px; background: var(--edge); border-radius: 5px; }
.ff-jersey-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #c9e9ff; background: #0b1b39; }
.ff-jersey {
  display: grid; place-items: center; width: 32px; height: 31px; padding-top: 3px;
  clip-path: polygon(24% 0, 39% 0, 50% 15%, 61% 0, 76% 0, 100% 22%, 87% 51%, 75% 42%, 75% 100%, 25% 100%, 25% 42%, 13% 51%, 0 22%);
  color: #fff; font-size: .65rem; font-weight: bold; text-shadow: 0 1px 2px #000, 0 0 2px #000;
  background: linear-gradient(115deg, transparent 17%, var(--jersey-trim) 18% 24%, transparent 25% 75%, var(--jersey-trim) 76% 82%, transparent 83%), var(--jersey-main);
}
#ff-reconnect { margin: 5px; }
#ff-line { max-height: 22rem; overflow: auto; padding-left: 2.1em; }
#ff-line li { padding: 6px 0; overflow-wrap: anywhere; }
.ff-history summary { cursor: pointer; font-weight: bold; }
.ff-history article + article { border-top: 1px dashed var(--line); }
.ff-review-banner { background: radial-gradient(circle at 90% 0, #2869b4, transparent 53%), linear-gradient(140deg, #182f60, #0b1e40); }
.ff-review-masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.ff-review-masthead h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); margin-bottom: 0; }
.ff-review-meter { display: flex; gap: 8px; }
.ff-review-meter > div { display: grid; justify-items: center; gap: 4px; padding: 7px 10px; border: 1px solid #6199d0; border-radius: 8px; background: #0a1b37; }
.ff-review-meter span { color: var(--muted); font-size: .74rem; text-transform: uppercase; }
.ff-review-meter > div:last-child .ff-digits { background: #a2dfff; }
.ff-owner .ff-queue-grid { grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); align-items: start; }
.ff-review-stage article > h3 { margin: 0; color: var(--amber); font-size: clamp(1.18rem, 3vw, 1.65rem); }
.ff-review-stage article > .ff-entry-meta { margin: 4px 0 14px; }
.ff-review-stage .ff-player-card:has(input:checked) { box-shadow: inset 0 0 0 2px #91efae; }
.ff-start-pick { grid-column: 1 / -1; margin: 0; padding: 0; }
.ff-start-pick, .ff-verdict-choice { position: relative; cursor: pointer; }
.ff-start-pick input, .ff-verdict-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ff-start-pick span, .ff-verdict-choice span { display: block; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; text-align: center; background: #183f70; }
.ff-start-pick input:focus-visible + span, .ff-start-pick input:checked:focus-visible ~ span:last-child,
.ff-verdict-choice input:focus-visible + span { outline: 2px dashed var(--amber); outline-offset: 2px; }
.ff-start-pick span:last-child, .ff-start-pick input:checked + span { display: none; }
.ff-start-pick input:checked ~ span:last-child { display: block; color: var(--edge); background: #91efae; }
.ff-viewer-note, .ff-empty-queue { padding: 11px; border-left: 3px solid #86ccff; background: #0d2448; }
.ff-verdict-controls { min-width: 0; margin: 17px 0 0; padding: 11px; border: 2px solid #487bad; border-radius: 10px; background: #0c2449; }
.ff-verdict-controls legend { padding: 0 6px; color: var(--amber); font-weight: bold; text-transform: uppercase; }
.ff-verdict-controls p { margin: 0 0 8px; }
.ff-verdict-controls > button, .ff-verdict-actions { margin-top: 10px; }
.ff-rating-scale, .ff-trade-choices, .ff-verdict-actions { display: grid; gap: 6px; }
.ff-rating-scale { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.ff-trade-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ff-verdict-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ff-verdict-choice { margin: 0; }
.ff-verdict-choice input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--edge); }
.ff-accept, .ff-accept:hover:not(:disabled) { background: #91efae; }
.ff-reject, .ff-reject:hover:not(:disabled) { background: #ff9ba6; }
.ff-review-skip { margin-top: 12px; padding: 6px 10px; font-size: .8rem; text-transform: none; }
.ff-owner #ff-line { display: grid; gap: 6px; margin: 0 0 12px; padding-left: 2em; }
.ff-owner #ff-line li { padding: 5px 8px; border: 1px solid #4677ad; border-radius: 5px; background: #173a65; }
.ff-owner #ff-line li:first-child { border-color: var(--amber); }
.ff-owner #ff-line small { display: block; color: var(--muted); }
.ff-verdict-dialog {
  width: min(480px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto;
  padding: clamp(16px, 4vw, 28px); border: 4px solid #7cc6ff; border-radius: 14px;
  color: var(--paper); background: #102d56; box-shadow: 0 8px 0 var(--edge);
}
.ff-verdict-dialog::backdrop { background: #050f24d9; }
.ff-verdict-dialog h2 { margin: 0; color: var(--amber); font: 900 2rem Impact, "Arial Black", sans-serif; text-transform: uppercase; }
.ff-verdict-dialog form { margin-top: 16px; }
.ff-verdict { display: grid; gap: 4px; margin: 10px 0; padding: 9px; border: 1px solid #679bd4; border-radius: 7px; background: #0b2044; overflow-wrap: anywhere; }
.ff-verdict-call { color: var(--amber); font-size: clamp(1.1rem, 4vw, 1.75rem); text-transform: uppercase; }
.ff-verdict[data-result="accept"] .ff-verdict-call, .ff-verdict-row[data-call="start"] strong { color: #91efae; }
.ff-verdict[data-result="reject"] .ff-verdict-call, .ff-verdict-row[data-call="sit"] strong { color: #ff9ba6; }
.ff-verdict-row { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); gap: 5px; }
@media (max-width: 780px) {
  .ff-owner .ff-queue-grid { grid-template-columns: 1fr; }
  .ff-rating-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ff-fields, .ff-queue-grid { grid-template-columns: 1fr; gap: 8px; }
  .ff-counts { grid-template-columns: 1fr 1fr; }
  .ff-nav { font-size: .88rem; }
}
