/* Szombati Szárnyalók: sky-blue band with a flying-shuttlecock pattern, sunny yellow and coral accents. */
:root {
  --bg: #f1f6ff;
  --dot: #d6e4fb;
  --surface: #ffffff;
  --ink: #13233f;
  --muted: #586a87;
  --line: #d8e3f3;
  --court: #1f6fe5;          /* primary sky blue */
  --court-deep: #1550b0;
  --court-ink: #ffffff;
  --shuttle: #ffc93c;        /* sunny yellow */
  --coral: #ff6b4a;          /* main call-to-action */
  --coral-ink: #ffffff;
  --wait: #8a5a00;
  --wait-bg: #fff3cf;
  --danger: #c62828;
  --ok: #157a4a;
  --ok-bg: #dff5e9;
  --display: "Fredoka", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1526;
    --dot: #18233b;
    --surface: #15203a;
    --ink: #e8eefb;
    --muted: #97a7c4;
    --line: #26355a;
    --court: #3d86f5;
    --court-deep: #1d4fa3;
    --court-ink: #ffffff;
    --coral: #ff7d60;
    --wait: #ffd36b;
    --wait-bg: #33290f;
    --danger: #ff8a80;
    --ok: #5fd39a;
    --ok-bg: #143326;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); padding-bottom: env(safe-area-inset-bottom, 0px);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px); background-size: 22px 22px;
}
[hidden] { display: none !important; }
.wrap { max-width: 600px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap.wide { max-width: 980px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--shuttle); outline-offset: 2px; }
a { color: var(--court); }

/* Header band */
.court {
  background-color: var(--court); background-image: url("pattern.svg"); background-size: 160px 160px;
  color: var(--court-ink); padding-top: env(safe-area-inset-top, 0px); position: relative; overflow: hidden;
  border-bottom: 5px solid var(--shuttle);
}
.court::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--court-deep); opacity: .45; pointer-events: none; }
.court .wrap { padding-block: 16px 8px; position: relative; z-index: 1; display: grid; gap: 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow { font: 700 13px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.lang { display: inline-flex; border: 1.5px solid rgba(255,255,255,.6); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; border: 0; padding: 4px 11px; font-weight: 700; font-size: 13px; color: var(--court-ink); }
.lang button[aria-pressed="true"] { background: var(--court-ink); color: var(--court); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: clamp(52px, 14vw, 68px); height: auto; flex: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.brand small { display: block; font: 600 15px/1.2 var(--body); opacity: .9; margin-top: 4px; }
h1 { font: 700 clamp(30px, 8.5vw, 46px)/1 var(--display); margin: 0; letter-spacing: .005em; text-wrap: balance; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 600; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding-top: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: transparent; border: 0; color: var(--court-ink); opacity: .85; padding: 7px 14px; font-weight: 700; border-radius: 999px; margin-bottom: 8px; }
.tabs button[aria-selected="true"] { opacity: 1; background: var(--shuttle); color: #13233f; }

/* Generic pieces */
h2 { font: 800 14px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--court); margin: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
h3 { font: 600 24px/1.15 var(--display); margin: 0; }
.section { padding: 18px 0 4px; border-top: 2px solid var(--line); margin-top: 16px; display: grid; gap: 10px; }
.section.first { border-top: 0; margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.msg { min-height: 22px; font-size: 14px; color: var(--muted); }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--court); font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
label.field { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); min-width: 0; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--court); outline: none; }
textarea { min-height: 90px; resize: vertical; }
.btn-main { border: 0; border-radius: 999px; padding: 13px 26px; background: var(--coral); color: var(--coral-ink); font: 600 20px/1 var(--display); white-space: nowrap; box-shadow: 0 4px 0 color-mix(in srgb, var(--coral) 60%, #000); transition: transform .1s ease, box-shadow .1s ease; }
.btn-main:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--coral) 60%, #000); }
.btn-main:disabled { opacity: .55; cursor: default; }
.btn-ghost { border: 2px solid var(--court); color: var(--court); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.btn-small { border: 1.5px solid var(--line); background: transparent; border-radius: 8px; padding: 4px 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-small.armed, .btn-small.danger { border-color: var(--danger); color: var(--danger); }
.btn-small.go { border-color: var(--court); color: var(--court); }
.btn-wa { border: 0; background: #1f9d55; color: #fff; border-radius: 8px; padding: 5px 10px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-block; }
.tag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.you { background: var(--ok-bg); color: var(--ok); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.bad { color: var(--danger); }
.pill { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--wait-bg); color: var(--wait); }
.pill.open { background: var(--ok-bg); color: var(--ok); }

/* Numbered lists of players */
ol.slots { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
ol.slots li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); min-height: 46px; }
ol.slots li:first-child { border-top: 0; }
ol.slots .n { font: 600 18px/1 var(--display); color: var(--court); font-variant-numeric: tabular-nums; }
ol.slots .who { min-width: 0; overflow-wrap: anywhere; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
ol.slots li.mine { background: color-mix(in srgb, var(--court) 8%, transparent); }
ol.slots li.empty .who { color: var(--muted); font-weight: 400; }
ol.slots.wait .n { color: var(--wait); }
.act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { border-top: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.neg { color: var(--danger); }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--court); border-radius: 16px; padding: 10px 12px; }
.tile:nth-child(2) { border-top-color: var(--ok); }
.tile:nth-child(3) { border-top-color: var(--coral); }
.tile:nth-child(4) { border-top-color: var(--shuttle); }
.tile b { display: block; font: 600 24px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }

.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; text-transform: none; letter-spacing: 0; }
.seg button { border: 0; background: var(--surface); padding: 6px 14px; font-weight: 700; font-size: 14px; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--court); color: var(--court-ink); }

footer.foot { padding: 28px 0 36px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
