:root {
  --ground: #1C1033; --panel: #2A1A4A; --raised: #3A2762; --line: #4A3878;
  --text: #FFFFFF; --soft: #D6CDEA; --accent: #C6F432; --ink: #1C1033; --warn: #FFB86B;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--text); font: 18px/1.5 'DM Sans', 'Segoe UI', sans-serif; }
a { color: var(--accent); }
h1, h2, h3, .brand, .panel-title, .pos, .pts { font-family: 'Sora', 'Segoe UI', sans-serif; }
h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 800; }
h2 { font-size: 26px; margin: 48px 0 16px; font-weight: 800; }
h3 { font-size: 19px; margin: 8px 0 0; font-weight: 600; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.top { max-width: 1040px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: 22px; padding: 8px 0; }
.lead { font-size: 21px; color: var(--soft); margin: 0 0 24px; max-width: 60ch; }
.status { color: var(--accent); font-weight: 600; margin: 24px 0 8px; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.panel { background: var(--panel); border-radius: 20px; padding: 24px; margin: 24px 0; }
.panel-title { font-size: 21px; font-weight: 800; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1 1 220px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: end; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field.check { display: flex; gap: 10px; align-items: center; min-height: 48px; }
.field.check label { margin: 0; }
.field.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.hint { color: var(--soft); font-size: 15px; margin: 4px 0 8px; }
.note { color: var(--soft); margin: 0; }
input[type=text], input[type=number], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line);
  background: #150B28; color: var(--text); font: inherit; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--text); border-color: #8D7DB5; }
.btn.big { min-height: 56px; padding: 12px 30px; font-size: 19px; align-self: flex-start; }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: 16px; }
.quick label { display: block; font-weight: 600; margin-bottom: 8px; }
.steps { margin: 16px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; color: var(--soft); }
.steps strong { color: var(--text); }
.flash { list-style: none; margin: 16px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--raised); border: 2px solid var(--accent); }
.people, .feed, .rules, .table { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.people li, .rules li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--raised); }
.people span { color: var(--soft); }
.table li { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px; background: var(--panel); }
.table li.lead-row { background: var(--accent); color: var(--ink); }
.table .pos, .table .pts { font-weight: 800; font-size: 24px; flex: none; min-width: 32px; }
.table .pts { margin-left: auto; text-align: right; }
.table .who { display: flex; flex-direction: column; min-width: 0; }
.table .who > span { font-size: 15px; color: var(--soft); }
.table li.lead-row .who > span { color: var(--ink); }
.feed li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--panel); }
.panel .feed li { background: var(--raised); }
.feed .hint { margin: 0 0 0 6px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--raised); font-weight: 600; font-size: 15px; }
.pill.warn { background: var(--warn); color: var(--ink); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.choice { width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.choice:hover { border-color: var(--accent); }
.foot { color: var(--soft); font-size: 15px; padding-top: 48px; padding-bottom: 40px; }
input[type=password] { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: #150B28; color: var(--text); font: inherit; }
input[disabled] { opacity: .55; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status a { color: var(--accent); }
/* pictures, badges and crests */
.pic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--raised); color: #FFFFFF; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 15px; text-decoration: none; vertical-align: middle; }
.pic img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.pic.xs { width: 24px; height: 24px; font-size: 10px; }
.pic.sm { width: 36px; height: 36px; font-size: 13px; }
.pic.md { width: 52px; height: 52px; font-size: 18px; }
.title { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.title h1 { margin: 0; }
.crest { flex: none; width: 72px; height: 81px; object-fit: contain; }
img.crest { height: 72px; border-radius: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 2px 10px 2px 0; }
.chip.big { gap: 10px; margin: 0; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--panel); font-weight: 600; }
.table .who .squad { display: flex; flex-wrap: wrap; margin-top: 4px; }
.table li.lead-row .pic.badge { outline: 2px solid var(--ink); }
.who-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: 12px; }
.pic-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 240px; }
input[type=file] { width: 100%; min-height: 48px; padding: 10px; border-radius: 10px; border: 2px dashed var(--line); background: #150B28; color: var(--soft); font: inherit; }
.credit { margin-top: 32px; }
.field label.sub { margin-top: 10px; font-weight: 400; color: var(--soft); }
.pic-row .field input + input { margin-top: 8px; }
/* league page: invitation, starting grid, scoring chips */
.invite { max-width: 520px; padding: 28px 24px; }
.invite h1 { font-size: clamp(26px, 6vw, 36px); }
.invite .lead { margin: 0; font-size: 18px; }
.btn.wide { align-self: stretch; }
.pic.lg { width: 84px; height: 84px; font-size: 28px; }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 8px; max-width: 720px; }
.face { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-align: center; line-height: 1.2; }
.startgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: start; max-width: 560px; padding-bottom: 26px; }
.startgrid > :nth-child(even) { margin-top: 26px; }
.slot { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 8px 10px 8px 8px; border-radius: 12px; border: 0; border-top: 3px solid #FFFFFF;
  background: var(--raised); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.15; text-align: left; }
button.slot { cursor: pointer; }
button.slot:hover { border-top-color: var(--accent); background: #46307A; }
.slot .num { flex: none; width: 20px; text-align: right; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 13px; color: var(--soft); }
.more { margin-top: 12px; }
.more summary { display: block; cursor: pointer; text-align: center; padding: 14px; border-radius: 12px; border: 2px solid #8D7DB5; font-weight: 600; max-width: 560px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 14px; }
.rules { max-width: 560px; }
.rules li { align-items: center; }
.pill.plus { background: var(--accent); color: var(--ink); }
.pill.minus { background: var(--warn); color: var(--ink); }
.pill.plus, .pill.minus { flex: none; min-width: 52px; text-align: center; font-family: 'Sora', sans-serif; font-weight: 800; }
