:root {
  --bg: #16191c;
  --panel: #1f2327;
  --panel-2: #272c31;
  --line: #343a40;
  --text: #eef1f3;
  --muted: #9aa4ad;
  --teal: #19e3d1;
  --teal-dim: #0f8f84;
  --orange: #ff9f43;
  --red: #ff5c5c;
  --green: #3ddc84;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--teal); }
button, input, select { font: inherit; }

.top { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: rgba(22,25,28,.95); backdrop-filter: blur(6px); z-index: 10; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .08em; }
.brand span { color: var(--teal); }
.who { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 6px 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; }
.step-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); color: #062a27; font-weight: 800; font-size: 12px; margin-right: 8px; }

.btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.btn:hover { border-color: var(--teal-dim); }
.btn.primary { background: var(--teal); color: #062a27; border-color: var(--teal); font-weight: 700; }
.btn.primary:disabled { opacity: .4; cursor: not-allowed; }
.btn.danger { color: var(--red); }
.btn.on { border-color: var(--teal); color: var(--teal); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }

input[type=text], input[type=email], input[type=password], input[type=date], select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }

.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; max-height: 320px; overflow-y: auto; }
.list .item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line); background: var(--panel); }
.list .item:last-child { border-bottom: 0; }
.list .item:nth-child(even) { background: #22272b; }
.list .item.sel { outline: 2px solid var(--teal); outline-offset: -2px; }
.list .item .date { width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tag.teal { color: var(--teal); border-color: var(--teal-dim); }
.tag.red { color: var(--red); border-color: var(--red); }

.frame-box { position: relative; margin-top: 10px; }
.frame-box canvas { width: 100%; border-radius: 10px; background: #000; cursor: crosshair; display: block; }
.prompt { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #0d2b29;
  border: 1px solid var(--teal-dim); color: var(--teal); font-weight: 600; }
.prompt.done { background: #12301f; border-color: var(--green); color: var(--green); }
input[type=range] { width: 100%; accent-color: var(--teal); }

.bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--teal); width: 0; transition: width .4s; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .k { font-size: 12px; color: var(--muted); }

video { width: 100%; border-radius: 10px; background: #000; display: block; }
.court { width: 100%; height: auto; display: block; background: #1b2a2a; border-radius: 10px; }
.court .line { fill: none; stroke: #cfe9e6; stroke-opacity: .55; stroke-width: 2; }
.court .dot { cursor: pointer; }
.court .dot:hover { stroke: #fff; stroke-width: 3; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel-2); }
.note { border-left: 3px solid var(--orange); padding: 6px 10px; background: #2b2418; border-radius: 6px;
  margin: 6px 0; font-size: 14px; }
.error { color: var(--red); margin-top: 8px; }
.login { max-width: 380px; margin: 40px auto; }
