@charset "UTF-8";
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --font: "Archivo", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --perf-hot: oklch(0.74 0.15 152);
  --perf-good: oklch(0.80 0.15 135);
  --perf-mid: oklch(0.80 0.10 95);
  --perf-low: oklch(0.72 0.10 48);
  --error: oklch(0.60 0.20 25);
  --error-soft: oklch(0.62 0.20 25 / 0.13);
  --success: oklch(0.66 0.15 152);
  --success-soft: oklch(0.70 0.15 152 / 0.14);
}

.theme-dark {
  --bg: oklch(0.17 0.008 160);
  --card: oklch(0.205 0.008 160);
  --card2: oklch(0.24 0.009 160);
  --ink: oklch(0.96 0.004 160);
  --muted: oklch(0.62 0.008 160);
  --line: oklch(1 0 0 / 0.07);
  --brand: oklch(0.76 0.16 152);
  --brand-ink: oklch(0.17 0.03 160);
  --navbg: oklch(0.22 0.008 160);
}

.theme-light {
  --bg: oklch(0.985 0.003 160);
  --card: oklch(1 0 0);
  --card2: oklch(0.975 0.004 160);
  --ink: oklch(0.19 0.012 160);
  --muted: oklch(0.45 0.008 160);
  --line: oklch(0.19 0.012 160 / 0.09);
  --brand: oklch(0.60 0.15 152);
  --brand-ink: oklch(1 0 0);
  --navbg: oklch(1 0 0);
}

*, *::before, *::after {
  box-sizing: border-box;
}

.scr-body {
  padding: 0 22px;
}

.b-rule {
  height: 1px;
  margin: 16px 0 8px;
  background: var(--line);
  border: none;
}

.mono {
  font-family: var(--font-mono);
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-label .value {
  color: var(--ink);
}

.meta-dot {
  flex-shrink: 0;
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
}

/*
 *	GENERAL
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overscroll-behavior-y: none;
}

body {
  overflow-x: hidden;
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.modalvisible {
  overflow-y: hidden;
}

button, input, textarea, select {
  color: inherit;
  font-family: inherit;
}

main {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100svh;
  padding: 0 26px;
}
main section {
  flex: 1;
  padding-bottom: calc(114px + env(safe-area-inset-bottom, 0px));
}

h1, h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.03em;
}

h1 {
  font-size: 30px;
  font-weight: 800;
}

h3 {
  font-size: 24px;
}

p {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 300;
}

.sub {
  color: var(--muted);
  font-weight: 500;
}

b {
  font-weight: 700;
}

ul {
  margin: 0;
  padding: 0;
  padding-left: 14px;
  font-size: 14px;
  list-style: none;
}
ul li {
  position: relative;
}
ul li:before {
  content: "-";
  position: absolute;
  top: 50%;
  left: -14px;
  transform: translateY(-50%);
}

a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
}

svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #343738;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 16px;
  padding: 0.5em;
  background: #2d3139;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #fff;
  white-space: pre-wrap; /* säilyttää rivinvaihdot, mutta sallii rivityksen */
  word-wrap: break-word; /* katkaisee pitkät sanat */
  /* Value type colors */
  /* [id], [name] */
  /* "text" or => text */
  /* 123 */
  /* true / false */
  /* null or empty */
  /* stdClass Object */
  /* ( ) => */
}
pre .key {
  color: #9bc08b;
}
pre .string {
  color: #fff;
}
pre .number {
  color: #e0a955;
}
pre .boolean {
  color: #e0a955;
}
pre .null {
  color: #e0a955;
}
pre .object {
  color: #6d89c3;
  font-weight: bold;
}
pre .symbol {
  color: #fff;
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: color-mix(in oklch, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--brand) 30%, transparent);
  border-radius: 14px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
}
.alert b {
  color: var(--brand);
}
.alert .errmsg + .errmsg {
  margin-top: 8px;
}
.alert--error {
  background: var(--error-soft);
  border-color: color-mix(in oklch, var(--error) 30%, transparent);
}
.alert--success {
  background: var(--success-soft);
  border-color: color-mix(in oklch, var(--success) 35%, transparent);
  color: var(--success);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 56px;
  margin-top: 2px;
  padding: 0 12px;
  background: var(--brand);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}
.btn svg {
  width: 19px;
  height: 19px;
  stroke: #fff;
}
.btn:disabled {
  background: color-mix(in oklch, var(--brand) 14%, var(--card2));
  color: #999;
  cursor: not-allowed;
}
.btn.sm {
  width: initial;
  min-width: 56px;
}
.btn.secondary, .btn.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.secondary svg, .btn.outline svg {
  width: 19px;
  height: 19px;
  stroke: var(--muted);
}
.btn.cancel {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.btn.red {
  background: var(--error-soft);
}
.btn.red.outline {
  background: transparent;
  border: 1px solid var(--error-soft);
  color: var(--error);
}
.btn.red.outline svg {
  stroke: var(--error);
}
.btn.active {
  background: color-mix(in oklch, var(--brand) 9%, transparent);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
}
.btn-group .btn {
  min-width: initial;
  padding: 0 28px;
}

.disclaimer {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
}
.disclaimer em {
  color: var(--ink);
  font-weight: 700;
  font-style: normal;
}

.errmsg {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--error-soft);
  border-radius: 12px;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}
.errmsg svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--error);
  stroke-width: 2px;
  stroke-linecap: round;
}

.pf-card {
  position: relative;
  margin-top: 6px;
  padding: 18px;
  background: color-mix(in oklch, var(--card) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.pf-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 50px;
  margin-top: 24px;
  background: var(--brand);
  border: none;
  border-radius: 13px;
  color: var(--brand-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.pf-remove {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--perf-low);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.iconbubble {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: color-mix(in oklch, var(--brand) 14%, var(--card2));
  border-radius: 18px;
  color: var(--brand);
}
.iconbubble svg {
  width: 28px;
  height: 28px;
  stroke: var(--brand);
}
.iconbubble.success {
  background: var(--success-soft);
  color: var(--success);
}
.iconbubble.empty {
  background: var(--card2);
  color: var(--muted);
}

.input-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: text;
  transition: border-color 0.15s ease;
}
.input-field:focus-within {
  border-color: color-mix(in oklch, var(--brand) 55%, transparent);
}
.input-field.is-error {
  border-color: var(--error);
}
.input-field label {
  position: relative;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.input-field label .req {
  padding: 1px 6px;
  border: 1px solid color-mix(in oklch, var(--brand) 40%, transparent);
  border-radius: 5px;
  color: var(--brand);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
}
.input-field input {
  width: 100%;
  padding: 6px 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.input-field input::placeholder {
  color: var(--muted);
  font-weight: 500;
}
.input-field input[type=date],
.input-field input[type=time] {
  text-align: left;
}
.input-field input[type=date]::-webkit-date-and-time-value,
.input-field input[type=time]::-webkit-date-and-time-value {
  text-align: left;
}
.input-field .icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.input-field .icon:hover {
  color: var(--ink);
}
.input-field .icon svg {
  width: 20px;
  height: 20px;
}

.input-group {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.input-group .input-field {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

body.theme-dark input[type=date]::-webkit-calendar-picker-indicator,
body.theme-dark input[type=time]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.menu-overlay {
  overflow: hidden;
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.menu-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.menu-topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 56px 22px 4px;
}

.menu-title {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.menu-close svg {
  width: 16px;
  height: 16px;
}

.menu-body {
  overflow-y: auto;
  flex: 1;
  padding: 4px 22px calc(24px + env(safe-area-inset-bottom, 0px));
}

.vk-coach {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 0;
  padding: 20px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.vk-coach:active {
  background: color-mix(in oklch, var(--brand) 6%, var(--card));
}

.vk-avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--brand);
  border-radius: 16px;
  color: var(--brand-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.vk-cinfo {
  flex: 1;
  min-width: 0;
}

.vk-cname {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.vk-crole {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vk-cedit {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.vk-cedit svg {
  width: 15px;
  height: 15px;
}

.vk-grplbl {
  display: block;
  margin: 30px 4px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.vk-group {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.vk-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 20px 16px;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid var(--line);
  border-left: none;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.vk-item:last-child {
  border-bottom: none;
}

.vk-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: color-mix(in oklch, var(--brand) 14%, var(--card2));
  border-radius: 11px;
  color: var(--brand);
}
.vk-icon svg {
  width: 18px;
  height: 18px;
}
.vk-icon.neutral {
  background: var(--card2);
  color: var(--muted);
}
.vk-icon.red {
  background: color-mix(in oklch, var(--perf-low) 14%, var(--card2));
  color: var(--perf-low);
}

.vk-ilabel {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.vk-ilabel .t {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.vk-ilabel .s {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.vk-chev {
  color: var(--muted);
}
.vk-chev svg {
  width: 14px;
  height: 14px;
}

.vk-seg {
  display: flex;
  flex: none;
  gap: 3px;
  padding: 3px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.vk-segbtn {
  padding: 7px 13px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.vk-segbtn.on {
  background: var(--brand);
  color: var(--brand-ink);
}

.vk-version {
  padding: 20px 0 8px;
  opacity: 0.6;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

#pagenav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateZ(0);
}
#pagenav #navbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 66px;
  margin: 0 18px 18px;
  background: var(--navbg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
#pagenav #navbar .navlink {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  background: none;
  opacity: 0.75;
  border: none;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
#pagenav #navbar .navlink svg {
  width: 23px;
  height: 23px;
  stroke: var(--muted);
}
#pagenav #navbar .navlink.active {
  opacity: 1;
}
#pagenav #navbar .navlink.active svg {
  stroke: var(--brand);
}

.optionslist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
}
.optionslist .option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.optionslist .option:active {
  background: color-mix(in oklch, var(--brand) 8%, var(--card));
  border-color: color-mix(in oklch, var(--brand) 45%, transparent);
}
.optionslist .option .crest {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.optionslist .option .info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.optionslist .option .info .name {
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.optionslist .option .info .sub {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.optionslist .option .info .sub .dot {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
}
.optionslist .option .chevron {
  flex: none;
  color: var(--muted);
}

header#page-header {
  display: flex;
  align-items: center;
  column-gap: 12px;
  min-height: 94px;
  padding: 18px 0;
}
header#page-header.center {
  justify-content: space-between;
}
header#page-header .actions {
  display: flex;
  justify-self: flex-end;
  column-gap: 8px;
  margin-left: auto;
}
header#page-header .pagetitle {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
header#page-header .pagetitle.small {
  font-size: 14px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
header#page-header .btn.back {
  border: 1px solid var(--line);
  color: var(--ink);
}
header#page-header .btn.back svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
}
header#page-header .btn.back:hover {
  background: var(--card);
}
header#page-header .spacer {
  width: 40px;
}

.input-field .bto-input {
  display: contents;
}

.selectpicker-container {
  width: 100%;
}
.selectpicker-container .selectpicker-toggle button {
  position: relative;
  width: 100%;
  padding: 6px 24px 6px 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.selectpicker-container .selectpicker-toggle button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}

.selectpicker-options {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}

.selectpicker-menu {
  overflow-y: auto;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 201;
  max-height: 80dvh;
  background: var(--card);
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-bottom: none;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.selectpicker-menu ul {
  margin: 0;
  padding: 8px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  list-style: none;
}
.selectpicker-menu ul li {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.selectpicker-menu ul li:before {
  content: "";
}
.selectpicker-menu ul li:first-child {
  border-top: none;
}
.selectpicker-menu ul li.selected {
  color: var(--brand);
}
.selectpicker-menu ul li.selected::after {
  content: "✓";
  margin-left: auto;
  font-weight: 700;
}
.selectpicker-menu ul li[hidden] {
  display: none;
}
.selectpicker-menu ul li.selectpicker-title {
  min-height: 0;
  padding: 14px 6px 4px;
  border-top: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: default;
}
.selectpicker-menu ul li.groupitem {
  padding-left: 18px;
}

.selectpicker-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 0 10px;
  background: var(--card);
}
.selectpicker-search label {
  display: none;
}
.selectpicker-search input {
  width: 100%;
  padding: 12px 14px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  font-size: 15px;
}
.selectpicker-search input::placeholder {
  color: var(--muted);
}

.popsheet-bg {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}
.popsheet-bg[hidden] {
  display: none;
}

.popsheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 201;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--card);
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-bottom: none;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.popsheet[hidden] {
  display: none;
}
.popsheet .popsheet-handle {
  width: 42px;
  height: 5px;
  margin: 2px auto 12px;
  background: var(--line);
  border-radius: 3px;
}
.popsheet .popsheet-title {
  padding: 0 4px 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.popsheet .popsheet-opt {
  display: flex;
  align-items: center;
  width: 100%;
  height: 54px;
  padding: 0 6px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.popsheet .popsheet-opt.on {
  color: var(--brand);
}
.popsheet .popsheet-opt.on::after {
  content: "✓";
  margin-left: auto;
  font-weight: 700;
}

#sw-notice {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--card2);
  border: 1px solid var(--brand);
  border-radius: 14px;
}
#sw-notice .sw-notice-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
#sw-notice .sw-notice-text strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
#sw-notice .sw-notice-text span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
#sw-notice .sw-notice-close {
  flex: none;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 9px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.sync-status[hidden] {
  display: none;
}
.sync-status .sync-dot {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
}
.sync-status.busy {
  color: var(--ink);
}
.sync-status.busy .sync-dot {
  background: var(--perf-mid);
  animation: syncpulse 1.2s ease-in-out infinite;
}
.sync-status.off .sync-dot {
  background: var(--perf-low);
}
.sync-status.err {
  background: var(--error-soft);
  border-color: color-mix(in oklch, var(--error) 40%, transparent);
  color: var(--error);
}
.sync-status.err .sync-dot {
  background: var(--error);
}

@keyframes syncpulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
section#analytics .filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
section#analytics .filter svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
section#analytics .filt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
section#analytics .filt-lbl {
  margin-bottom: 1px;
  padding-left: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
section#analytics .chips {
  overflow-x: auto;
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
section#analytics .chips::-webkit-scrollbar {
  display: none;
}
section#analytics .chip {
  display: flex;
  flex: none;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
section#analytics .chip.on {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}
section#analytics .chip.upcoming {
  opacity: 0.45;
}
section#analytics .balls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
}
section#analytics .ball {
  width: 11px;
  height: 11px;
  background: var(--bc);
  border-radius: 50%;
}
section#analytics .ball.empty {
  background: transparent;
  border: 1.4px solid var(--line);
}
section#analytics .lvl {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
}
section#analytics .team {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 32px;
}
section#analytics .kacard {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 108px;
  padding: 14px 12px;
  background: color-mix(in oklch, var(--kc) 9%, transparent);
  border: 1px solid color-mix(in oklch, var(--kc) 45%, transparent);
  border-radius: 16px;
}
section#analytics .kacard .v {
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
section#analytics .kacard .k {
  opacity: 0.85;
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
section#analytics .teamcol {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
section#analytics .trow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
section#analytics .trow .l {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
section#analytics .trow .v {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
}
section#analytics .trow .v .dim {
  color: var(--muted);
  font-weight: 500;
}
section#analytics .rec {
  display: flex;
  gap: 6px;
}
section#analytics .pill {
  padding: 3px 9px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
section#analytics .pill.w {
  background: color-mix(in oklch, var(--perf-hot) 16%, transparent);
  color: var(--perf-hot);
}
section#analytics .pill.d {
  background: var(--line);
  color: var(--muted);
}
section#analytics .pill.l {
  background: color-mix(in oklch, var(--perf-low) 16%, transparent);
  color: var(--perf-low);
}
section#analytics .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: -4px 0 16px;
}
section#analytics .leg {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
section#analytics .legdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
section#analytics .rank {
  display: flex;
  flex-direction: column;
}
section#analytics .row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 2px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
section#analytics .row:last-child {
  border-bottom: 1px solid var(--line);
}
section#analytics .spacer {
  flex: 1;
}
section#analytics .pos {
  flex: none;
  width: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
section#analytics .row.lead .pos {
  color: var(--brand);
}
section#analytics .id {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  width: 118px;
  min-width: 0;
}
section#analytics .no {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
section#analytics .row.lead .no {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}
section#analytics .nmcol {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
section#analytics .nm {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#analytics .nmcol .lvl {
  align-self: flex-start;
}
section#analytics .ka {
  flex: none;
  width: 34px;
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
section#analytics .boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
section#analytics .board {
  padding: 14px 14px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
section#analytics .board.wide {
  grid-column: 1/-1;
}
section#analytics .board .bh {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
section#analytics .brow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
section#analytics .brow:first-of-type {
  border-top: none;
}
section#analytics .brank {
  flex: none;
  width: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
section#analytics .brow.top .brank {
  color: var(--brand);
}
section#analytics .bname {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#analytics .bval {
  flex: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}
section#analytics .brow.top .bval {
  color: var(--brand);
}

section#info-page .info-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}
section#info-page .info-section:last-of-type {
  border-bottom: none;
}
section#info-page .info-toc {
  margin: 4px 0;
  padding: 16px 18px;
  background: var(--card2);
  border-radius: 12px;
}
section#info-page .info-toc .info-toc-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
section#info-page .info-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
section#info-page .info-toc li {
  margin-bottom: 6px;
}
section#info-page .info-toc li:last-child {
  margin-bottom: 0;
}
section#info-page .info-toc li::before {
  content: none;
}
section#info-page .info-toc a {
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
}
section#info-page .info-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
section#info-page .info-ico {
  flex: none;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  color: var(--ink);
}
section#info-page .info-h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
section#info-page .info-p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
section#info-page .info-p strong {
  color: var(--ink);
  font-weight: 600;
}
section#info-page .info-p em {
  color: var(--ink);
  font-style: normal;
}
section#info-page .info-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
section#info-page .info-list li {
  margin-bottom: 4px;
}
section#info-page .info-list li:last-child {
  margin-bottom: 0;
}
section#info-page .info-list strong {
  color: var(--ink);
  font-weight: 600;
}
section#info-page .info-list.ordered {
  list-style-type: decimal;
}
section#info-page .info-list.icons {
  padding-left: 0;
  list-style: none;
}
section#info-page .info-list.icons li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
section#info-page .info-list.icons li::before {
  content: none;
}
section#info-page .info-list.icons .info-ico {
  margin-top: 2px;
}
section#info-page .info-link {
  color: var(--brand);
  text-decoration: none;
}
section#info-page .info-footer {
  padding: 24px 0 8px;
  opacity: 0.6;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
}

section#calendar .calendar .cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 18px;
}
section#calendar .calendar .cal-head .cal-month-label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
section#calendar .calendar .cal-head .cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
}
section#calendar .calendar .cal-head .cal-nav svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink);
}
section#calendar .calendar .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px 0 4px;
}
section#calendar .calendar .cal-weekday {
  padding: 6px 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
section#calendar .calendar .cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 46px;
  cursor: default;
}
section#calendar .calendar .cal-cell:not(.muted) {
  cursor: pointer;
}
section#calendar .calendar .cal-cell.muted .cal-day-num {
  opacity: 0.38;
  color: var(--muted);
}
section#calendar .calendar .cal-cell.today .cal-day-num {
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
}
section#calendar .calendar .cal-cell.today.kesken .cal-day-num {
  background: var(--brand);
  color: var(--brand-ink);
}
section#calendar .calendar .cal-cell.active:not(.today) .cal-day-num {
  background: color-mix(in oklch, var(--brand) 18%, var(--card));
  color: var(--brand);
}
section#calendar .calendar .cal-day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
section#calendar .calendar .cal-dot {
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
section#calendar .calendar .cal-dot.valmis {
  background: var(--muted);
}
section#calendar .calendar .cal-dot.kesken {
  background: var(--brand);
}
section#calendar .calendar .cal-dot.tuleva {
  width: 6px;
  height: 6px;
  background: transparent;
  border: 1.4px solid var(--muted);
}
section#calendar .calendar .cal-cell.today .cal-dot {
  display: none;
}
section#calendar #games #header {
  padding: 24px 0 18px;
}
section#calendar #games #game-list {
  display: flex;
  flex-direction: column;
}
section#calendar #games .event {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  padding: 23px 4px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
section#calendar #games .event:last-child {
  border-bottom: 1px solid var(--line);
}
section#calendar #games .event.kesken::before, section#calendar #games .event.tuleva::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: -4px;
  width: 3px;
  border-radius: 3px;
}
section#calendar #games .event.kesken::before {
  background: var(--brand);
}
section#calendar #games .event.tuleva::before {
  background: var(--muted);
  opacity: 0.5;
}
section#calendar #games .event .event-date {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
}
section#calendar #games .event .event-date .event-day-num {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
section#calendar #games .event .event-date .event-day-week {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
section#calendar #games .event .event-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
section#calendar #games .event .event-opponent {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
section#calendar #games .event .event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
section#calendar #games .event .event-tag {
  align-self: flex-start;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
section#calendar #games .event .event-tag.kesken {
  background: var(--brand);
  color: var(--brand-ink);
}
section#calendar #games .event .event-tag.tuleva {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
section#calendar #games .event .event-right {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}
section#calendar #games .event .event-score {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
section#calendar #games .event .event-score i {
  padding: 0 1px;
  color: var(--muted);
  font-style: normal;
}
.event.kesken section#calendar #games .event .event-score {
  color: var(--brand);
}
section#calendar #games .event .event-score.empty {
  color: var(--muted);
  font-size: 18px;
}
section#calendar #games .event .event-ka {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: color-mix(in oklch, var(--kc) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--kc) 50%, transparent);
  border-radius: 6px;
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
section#calendar #games .event .event-ka .kl {
  opacity: 0.85;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
section#calendar #games .event .event-chevron {
  display: flex;
  flex: none;
  align-items: center;
  align-self: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
section#calendar #games .event .event-chevron svg {
  width: 16px;
  height: 16px;
}
section#calendar #games .event.valmis .event-chevron {
  border: 1px solid var(--line);
  color: var(--muted);
}
section#calendar #games .event.kesken .event-chevron {
  background: var(--brand);
  border: none;
  color: var(--brand-ink);
}
section#calendar #games .event.tuleva .event-chevron {
  border: 1px solid var(--line);
  color: var(--ink);
}

section#game .head {
  padding: 16px 0;
}
section#game .head h1 {
  margin-bottom: 10px;
}
section#game .head .metaline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
section#game .head .livedot {
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: #ff3b3b;
  border-radius: 50%;
  animation: livedot 1.4s ease-in-out infinite;
}
@keyframes livedot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
section#game .scoreboard {
  border-bottom: 1px solid var(--line);
}
section#game .scoreboard .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
section#game .scoreboard .team {
  font-weight: 600;
}
section#game .scoreboard .score {
  padding: 0;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
section#game #goals {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}
section#game #goals .goal {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 2px;
  border-top: 1px solid var(--line);
}
section#game #goals .goalno {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: color-mix(in oklch, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in oklch, var(--brand) 35%, transparent);
  border-radius: 9px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
section#game #goals .goalmain {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
section#game #goals .scorer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
section#game #goals .assist {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
section#game #goals .assist b {
  color: var(--ink);
  font-weight: 600;
}
section#game #goals .goal.opp .goalno {
  background: color-mix(in oklch, var(--perf-low) 14%, transparent);
  border-color: color-mix(in oklch, var(--perf-low) 35%, transparent);
  color: var(--perf-low);
}

section#add-game .title {
  margin: 32px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
section#add-game .results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  padding: 12px 0;
  background: transparent;
  border: none;
}
section#add-game .results .btn {
  justify-content: flex-start;
}
section#add-game .results.on {
  background: var(--brand);
  border-color: transparent;
}
section#add-game .results.on .rn {
  color: var(--brand-ink);
}
section#add-game .results.on .rc {
  color: color-mix(in oklch, var(--brand-ink) 75%, transparent);
}
section#add-game #matchlevel {
  gap: 5px;
}
section#add-game #matchlevel .btn {
  width: calc(20% - 6px);
  aspect-ratio: 1;
  border-radius: 14px;
}
section#add-game #lvlhint {
  padding: 4px 0;
  color: var(--muted);
}
section#add-game #playergrid {
  flex-direction: initial;
  flex-wrap: wrap;
  padding-top: 0;
  padding-bottom: 32px;
}
section#add-game #playergrid .option {
  width: calc(50% - 14px);
  padding: 14px 12px;
}
section#add-game #playergrid .option .crest {
  width: 36px;
  height: 36px;
}
section#add-game #playergrid .option .info {
  align-items: flex-start;
}
section#add-game #playergrid .option .info .name {
  font-size: 14px;
}
section#add-game #playergrid .option .info .sub {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
}
section#add-game #playergrid .option.active {
  background: color-mix(in oklch, var(--brand) 9%, transparent);
  border-color: var(--brand);
  color: var(--brand);
}
section#add-game .switchrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
section#add-game .switchlab .t {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
section#add-game .switchlab .s {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
section#add-game .switch {
  flex: none;
  cursor: pointer;
}
section#add-game .switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
section#add-game .switch .track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  background: var(--line);
  border-radius: 14px;
  transition: background 0.15s;
}
section#add-game .switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  transition: left 0.15s;
}
section#add-game .switch input:checked + .track {
  background: var(--brand);
}
section#add-game .switch input:checked + .track .knob {
  left: 23px;
}

section#game-rate #matchlevel {
  gap: 5px;
}
section#game-rate #matchlevel .btn {
  width: calc(20% - 6px);
  aspect-ratio: 1;
  border-radius: 14px;
}
section#game-rate #done {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
section#game-rate #done svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  stroke: var(--brand);
}
section#game-rate .roster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  margin: 24px 0 8px;
}
section#game-rate .roster .player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 52px;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--font-mono);
  text-align: center;
  cursor: pointer;
}
section#game-rate .roster .player.on .avatar {
  border-width: 2.5px;
  border-color: var(--brand);
}
section#game-rate .roster .player.pending .avatar {
  border-style: dashed;
  color: var(--muted);
}
section#game-rate .roster .player.skipped .avatar {
  opacity: 0.45;
}
section#game-rate .roster .player.skipped .name {
  text-decoration: line-through;
}
section#game-rate .roster .avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--card2);
  border: 1.5px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
section#game-rate .roster .name {
  overflow: hidden;
  width: 100%;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#game-rate .roster .badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--card);
  border-radius: 50%;
}
section#game-rate .roster .badge.ok {
  background: var(--brand);
  color: var(--brand-ink);
}
section#game-rate .roster .badge.skip {
  background: var(--perf-low);
  color: #fff;
}
section#game-rate #statistics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
section#game-rate #statistics .field {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
}
section#game-rate #statistics .field .title {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
section#game-rate #statistics .field .value {
  margin-top: 5px;
}
section#game-rate .cat2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
section#game-rate .cat2 .cl {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
section#game-rate .seg3 {
  display: flex;
  gap: 7px;
}
section#game-rate .seg3 .s {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
section#game-rate .seg3 .s.f {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}
section#game-rate .karow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
section#game-rate .kabig {
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
section#game-rate .kawrap {
  display: flex;
  flex-direction: column;
}
section#game-rate .kalbl {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
section#game-rate .katag {
  margin-top: 2px;
  color: var(--kc);
  font-size: 14px;
  font-weight: 600;
}
section#game-rate .arc {
  margin-left: auto;
}
section#game-rate .skiprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding: 18px 0;
}
section#game-rate .skiplab .t {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
section#game-rate .skiplab .s {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
section#game-rate .toggle {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  background: var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
section#game-rate .toggle .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  transition: left 0.15s;
}
section#game-rate .toggle.on {
  background: var(--perf-low);
}
section#game-rate .toggle.on .knob {
  left: 23px;
}
section#game-rate .note {
  width: 100%;
  min-height: 64px;
  margin-top: 18px;
  padding: 15px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 13.5px;
  resize: vertical;
  box-sizing: border-box;
}
section#game-rate .note::placeholder {
  color: var(--muted);
}
section#game-rate .finishwrap {
  margin-top: 28px;
  padding-bottom: 32px;
}

section#game-live .actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-bottom: 32px;
}
section#game-live .actions .btn {
  width: calc(50% - 5px);
  min-width: initial;
}
section#game-live #btn-finish .ar {
  color: var(--brand);
  font-size: 15px;
  line-height: 0;
}
section#game-live .live-wrap {
  position: relative;
}
section#game-live .livedot {
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: #ff3b3b;
  border-radius: 50%;
  animation: livedot 1.4s ease-in-out infinite;
}
@keyframes livedot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
section#game-live .sheetbg {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}
section#game-live .sheet {
  overflow: hidden;
  position: fixed;
  top: 80px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  background: var(--card);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-bottom: none;
  color: var(--ink);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}
section#game-live .sheet .sheet-handle {
  flex-shrink: 0;
  width: 42px;
  height: 5px;
  margin: 12px auto 4px;
  background: var(--line);
  border-radius: 3px;
}
section#game-live .sheet .sheet-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 6px 22px 4px;
}
section#game-live .sheet .sheet-title {
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
section#game-live .sheet .sheet-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}
section#game-live .sheet .sheet-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 8px 22px 32px;
}
section#game-live .step {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 20px 0 14px;
}
section#game-live .step .n {
  padding: 2px 6px;
  border: 1px solid color-mix(in oklch, var(--brand) 40%, transparent);
  border-radius: 6px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
section#game-live .step .t {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
section#game-live .step .opt {
  opacity: 0.7;
}
section#game-live .pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
section#game-live .pcard {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
section#game-live .pcard:disabled {
  opacity: 0.35;
  pointer-events: none;
}
section#game-live .pcard.on {
  background: color-mix(in oklch, var(--brand) 10%, transparent);
  border-width: 2px;
  border-color: var(--brand);
}
section#game-live .pcard .pnum {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
section#game-live .pcard.on .pnum {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}
section#game-live .pcard .pinfo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
section#game-live .pcard .pnm {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#game-live .goaledit,
section#game-live .goaldel {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
section#game-live .goaldel {
  border-color: color-mix(in oklch, var(--perf-low) 40%, transparent);
  color: var(--perf-low);
}
section#game-live .goal.opp .goalno {
  background: color-mix(in oklch, var(--perf-low) 14%, transparent);
  border-color: color-mix(in oklch, var(--perf-low) 35%, transparent);
  color: var(--perf-low);
}

section#game-finished #statistics {
  padding-bottom: 62px;
}
section#game-finished #statistics #header .column {
  font-size: 13px;
}
section#game-finished #statistics.no-ka .row {
  grid-template-columns: 1fr 50px 50px;
}
section#game-finished #statistics .row {
  display: grid;
  grid-template-columns: 1fr 50px 50px 50px;
  align-items: center;
  margin-top: 8px;
  padding: 24px 4px 14px;
  border-top: 1px solid var(--line);
}
section#game-finished #statistics .row .column {
  color: var(--muted);
  font-family: var(--font-mono);
  text-align: center;
}
section#game-finished #statistics .row .column:first-child {
  text-align: left;
}
section#game-finished #statistics .row .column b {
  color: var(--ink);
}
section#game-finished #statistics #list {
  display: flex;
  flex-direction: column;
}
section#game-finished #statistics .player {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
section#game-finished #statistics .number {
  width: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
section#game-finished #statistics .name {
  color: var(--ink);
  font-weight: 600;
}
section#game-finished .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
section#game-finished .actions > .btn {
  flex: 1 1 100%;
}
section#game-finished .actions #btn-share,
section#game-finished .actions #btn-export {
  flex: 1 1 0;
}
section#game-finished .actions #btn-share svg,
section#game-finished .actions #btn-export svg {
  width: 18px;
  height: 18px;
}
section#game-finished .actions #btn-share.ok {
  color: var(--perf-good);
  border-color: var(--perf-good);
}

section#player-profile #header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 0 12px;
}
section#player-profile #header #jersey {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--brand);
  border-radius: 15px;
  color: var(--brand-ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
section#player-profile #header #player {
  flex: 1;
  min-width: 0;
}
section#player-profile #header #name {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}
section#player-profile #header #player-meta {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#player-profile #header #avg {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  padding: 6px 13px;
  background: color-mix(in oklch, var(--kc) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--kc) 45%, transparent);
  border-radius: 13px;
  color: var(--kc);
}
section#player-profile #header #avg .kv {
  font-size: 23px;
  font-weight: 700;
}
section#player-profile #header #avg .kl {
  margin-top: 3px;
  opacity: 0.8;
  font-size: 8px;
}
section#player-profile #statistics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
section#player-profile #statistics .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
section#player-profile #statistics .stat .value {
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
}
section#player-profile #statistics .stat .title {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
section#player-profile .spark {
  padding: 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
section#player-profile .spark-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
section#player-profile .spark-top .now {
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
section#player-profile .spark-top .lab {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
section#player-profile .spark-svg {
  overflow: visible;
  display: block;
  width: 100%;
  height: 58px;
}
section#player-profile .spark-x {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}
section#player-profile .category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
section#player-profile .category .name {
  flex: none;
  width: 152px;
  color: var(--ink);
  font-weight: 500;
}
section#player-profile .category .value {
  flex: none;
  width: 30px;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}
section#player-profile .bar {
  overflow: hidden;
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
}
section#player-profile .bar .f {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
}
section#player-profile .log {
  display: flex;
  flex-direction: column;
}
section#player-profile .game {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 2px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
section#player-profile .game:last-child {
  border-bottom: 1px solid var(--line);
}
section#player-profile .gdate {
  flex: none;
  width: 42px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
section#player-profile .gthem {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
section#player-profile .ga {
  display: flex;
  flex: none;
  gap: 6px;
}
section#player-profile .ga .ga {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
section#player-profile .ga .ga b {
  color: var(--ink);
}
section#player-profile .ga .ga .ic {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
section#player-profile .ga .ga.g .ic {
  background: var(--brand);
}
section#player-profile .ga .ga.a .ic {
  background: var(--muted);
}
section#player-profile .gka {
  flex: none;
  min-width: 38px;
  padding: 3px 8px;
  background: color-mix(in oklch, var(--kc) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--kc) 50%, transparent);
  border-radius: 7px;
  color: var(--kc);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

section#player-edit .input-group {
  padding: 12px;
}
section#player-edit .input-field {
  border-bottom: 0;
}
section#player-edit .idrow {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
section#player-edit .numfield {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 7px;
}
section#player-edit .numbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  background: var(--brand);
  border-radius: 18px;
  color: var(--brand-ink);
  font-size: 34px;
  font-weight: 700;
}
section#player-edit .numbox .pen {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}
section#player-edit .numbox .pen svg {
  width: 12px;
  height: 12px;
  stroke: var(--ink);
}
section#player-edit .namecol {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
section#player-edit .divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}
section#player-edit .sheetbg {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}
section#player-edit .num-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  max-height: 72vh;
  background: var(--card);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-bottom: none;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}
section#player-edit .num-sheet .sheet-handle {
  flex-shrink: 0;
  width: 42px;
  height: 5px;
  margin: 12px auto 4px;
  background: var(--line);
  border-radius: 3px;
}
section#player-edit .num-sheet .sheet-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 6px 22px 4px;
}
section#player-edit .num-sheet .sheet-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
section#player-edit .num-sheet .sheet-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}
section#player-edit .num-sheet .sheet-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 12px 18px 32px;
}
section#player-edit .num-sheet .num-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
section#player-edit .num-sheet .num-btn {
  aspect-ratio: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
section#player-edit .num-sheet .num-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

section#profile .pr-id {
  display: flex;
  justify-content: center;
  margin: 8px 0 24px;
}
section#profile .pr-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--brand);
  border-radius: 50%;
  color: var(--brand-ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
section#profile .pr-delete {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--perf-low) 50%, transparent);
  border-radius: 14px;
  color: var(--perf-low);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

section#team-noplayers {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 18px;
  text-align: center;
}

section#team #meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
section#team #meta .dot {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
}
section#team .player {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 4px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
section#team .player:last-of-type {
  border-bottom: 1px solid var(--line);
}
section#team .player .jersey {
  flex: none;
  width: 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
section#team .player .info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
section#team .player .info .name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
section#team .player .info .sub {
  display: flex;
  align-items: center;
  gap: 8px;
}
section#team .player .info .sub .lvlbadge {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}
section#team .player .right {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
section#team .player .right .ka {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
section#team .player .right .games {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
section#team .player .chevron {
  flex: none;
}
section#team .player .chevron svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
}
section#team #teamstats {
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}
section#team .stat {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
}
section#team .stat .number {
  font-size: 22px;
  font-weight: 700;
}
section#team .stat .title {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
section#team .divider {
  width: 1px;
  margin: 12px 0;
  background: var(--line);
}

section#team-edit .coach-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
section#team-edit .coach-row:last-of-type {
  border-bottom: 1px solid var(--line);
}
section#team-edit .coach-info {
  flex: 1;
  min-width: 0;
}
section#team-edit .coach-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
section#team-edit .coach-email {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}
section#team-edit .coach-role {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
section#team-edit .coach-you {
  padding: 2px 6px;
  border: 1px solid color-mix(in oklch, var(--brand) 35%, transparent);
  border-radius: 5px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
section#team-edit .coach-remove {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--perf-low);
  cursor: pointer;
}
section#team-edit .coach-remove svg {
  width: 16px;
  height: 16px;
}
section#team-edit .add-coach-form {
  margin-top: 14px;
}
section#team-edit .input-field:has(.icon) input {
  padding-right: 40px;
}
section#team-edit .te-save {
  width: 100%;
  height: 58px;
  margin-top: 32px;
  background: var(--brand);
  border: none;
  border-radius: 16px;
  color: var(--brand-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}
section#team-edit .joincode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
section#team-edit .joincode-val {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
section#team-edit .joincode-copy {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
section#team-edit .joincode-copy svg {
  width: 14px;
  height: 14px;
}
section#team-edit .status-badge {
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
section#team-edit .status-badge--pending {
  border: 1px solid color-mix(in oklch, var(--perf-mid) 35%, transparent);
  color: var(--perf-mid);
}
section#team-edit .approve-btn {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-left: auto;
  padding: 0 14px;
  background: var(--brand);
  border: none;
  border-radius: 9px;
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
section#team-edit .approve-btn svg {
  width: 16px;
  height: 16px;
}
section#team-edit .te-formset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}
section#team-edit .te-formset[disabled] {
  opacity: 0.85;
}
section#team-edit .coach-actions {
  position: relative;
  flex: none;
}
section#team-edit .coach-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
}
section#team-edit .coach-menu-btn svg {
  width: 16px;
  height: 16px;
}
section#team-edit .coach-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}
section#team-edit .coach-menu[hidden] {
  display: none;
}
section#team-edit .coach-menu-item {
  padding: 11px 12px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
section#team-edit .coach-menu-item:hover {
  background: var(--line);
}
section#team-edit .coach-menu-item.danger {
  color: var(--perf-low);
}
section#team-edit .coach-role-form {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
section#team-edit .coach-role-form .selectpicker-toggle {
  display: none;
}
section#team-edit .js-remove-form {
  display: none;
}
section#team-edit .te-delete {
  width: 100%;
  height: 52px;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--perf-low) 50%, transparent);
  border-radius: 14px;
  color: var(--perf-low);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

section#teams {
  display: flex;
  flex-direction: column;
}
section#teams #header .iconbubble {
  margin-bottom: 16px;
}
section#teams #header .greet {
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}
section#teams #header .title {
  margin-top: 6px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
section#teams #noteams {
  display: flex;
  flex: 1;
  justify-content: center;
}
section#teams #noteams #content {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  row-gap: 18px;
  text-align: center;
}

section#add-team {
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 12px;
}

section#create-team {
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 18px;
}
section#create-team #submit-btn {
  margin-top: 18px;
}
section#create-team .codecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 18px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 18px;
}
section#create-team .codecard .code-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
section#create-team .codecard .code-value {
  padding-left: 0.22em;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

section#join-team {
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 18px;
}
section#join-team #codeblock {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
section#join-team #codeblock .code {
  display: flex;
  gap: 9px;
}
section#join-team #codeblock .code input {
  flex: 1;
  min-width: 0;
  height: 62px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background 0.15s ease;
}
section#join-team #codeblock .code input:focus {
  border-color: color-mix(in oklch, var(--brand) 55%, transparent);
}
section#join-team #codeblock .code input.filled {
  background: color-mix(in oklch, var(--brand) 5%, var(--card));
  border-color: color-mix(in oklch, var(--brand) 35%, transparent);
}
section#join-team #codeblock .code input.err {
  background: var(--error-soft);
  border-color: var(--error);
  color: var(--error);
}
section#join-team .join-msg {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}
section#join-team .join-msg.err {
  color: var(--error);
  font-weight: 600;
}
section#join-team #submit-btn {
  margin-top: 24px;
}

/*# sourceMappingURL=styles.css.map */
