
:root{
  --bg-tint: rgba(247,243,239,.88);
  --panel: rgba(255,255,255,.84);
  --panel-soft: rgba(255,255,255,.76);
  --panel-strong: rgba(255,255,255,.92);
  --stroke: rgba(80,60,40,.08);
  --stroke-soft: rgba(80,60,40,.05);
  --shadow-shell: 0 20px 42px rgba(103, 82, 63, .16);
  --shadow-card: 0 10px 24px rgba(70, 48, 31, .08);
  --shadow-soft: 0 6px 16px rgba(70, 48, 31, .06);
  --radius-shell: 42px;
  --radius-card: 26px;
  --radius-mid: 22px;
  --radius-sm: 18px;
  --brand:#2f5ea5;
  --red1:#df5b45;
  --red2:#d84f39;
  --text:#2c2c2e;
  --muted:#76767a;
  --line:#e9e4de;
  --blue:#2f6bd7;
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:#efdcc6;
  overflow-x:hidden;
}

.court-bg{
  position:fixed;
  inset:0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    url("backgr.png") center / cover no-repeat fixed;
}

.wrap{
  position:relative;
  min-height:100vh;
  display:flex;
  justify-content:center;
  padding:26px 14px 42px;
}

.shell{
  width:min(100%, 540px);
  min-height:calc(100vh - 68px);
  padding:22px 22px 28px;
  border-radius:var(--radius-shell);
  background:var(--bg-tint);
  border:1px solid rgba(255,255,255,.55);
  box-shadow:var(--shadow-shell);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:6px 4px 16px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(95,80,65,.10);
}

.brand{
  margin:0;
  font-size:clamp(31px, 5.2vw, 42px);
  font-weight:340;
  letter-spacing:-.03em;
  color:var(--brand);
}
.brand::first-letter{ font-weight:800; }

.ball{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  font-size:38px;
  line-height:1;
  border-radius:999px;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.16));
  user-select:none;
}

.view{ display:none; }
.view.active{ display:block; }

.glass,
.glass2,
.card,
.menu,
.pill,
.viewbar{
  border-radius:var(--radius-card);
}

.glass,
.glass2,
.card{
  background:var(--panel);
  border:1px solid var(--stroke-soft);
  box-shadow:var(--shadow-card);
}

.panel{
  background:transparent;
  border:none;
  box-shadow:none;
}

.panel-inner{
  padding:0;
}

.bar-red{
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  margin:8px 0 18px;
  border:none;
  border-radius:22px;
  background:linear-gradient(180deg, var(--red1), var(--red2));
  color:#fff;
  box-shadow:0 10px 20px rgba(216,79,57,.18);
  cursor:pointer;
}

.bar-red .bar-icon{
  font-size:24px;
  line-height:1;
  flex:0 0 auto;
}
.bar-title{
  font-size:18px;
  font-weight:700;
  line-height:1.1;
}
.bar-sub{
  font-size:17px;
  font-weight:600;
  line-height:1.1;
  margin-left:6px;
}

.menu{
  overflow:hidden;
  background:var(--panel-strong);
  border:1px solid var(--stroke-soft);
  box-shadow:var(--shadow-card);
}

.row{
  width:100%;
  display:flex;
  align-items:center;
  gap:16px;
  padding:22px 18px;
  background:transparent;
  border:none;
  text-decoration:none;
  color:inherit;
  cursor:pointer;
  border-radius:0;
}
.row + .row{
  border-top:1px solid var(--line);
}

.ico{
  font-size:33px;
  line-height:1;
  flex:0 0 42px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.label{
  font-size:28px;
  font-weight:400;
  letter-spacing:-.02em;
}

.chev{
  margin-left:auto;
  color:#909097;
  font-size:42px;
  line-height:1;
  font-weight:300;
}

.viewbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:6px 0 14px;
  padding:14px 16px;
  background:var(--panel-soft);
  border:1px solid var(--stroke-soft);
  box-shadow:var(--shadow-soft);
}

.viewtitle{
  font-size:24px;
  font-weight:700;
  letter-spacing:-.02em;
}

.card{
  overflow:hidden;
}

.card-h{
  padding:16px 18px;
  font-size:22px;
  font-weight:700;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.35);
}
.card-b{ padding:16px 18px 18px; }

label{
  display:block;
  margin:10px 0 7px;
  font-weight:700;
  color:#333;
}

input, select{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(60,60,67,.10);
  background:rgba(255,255,255,.98);
  font:inherit;
  color:inherit;
  outline:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
input:focus, select:focus{
  border-color:rgba(47,107,215,.35);
  box-shadow:0 0 0 4px rgba(47,107,215,.12);
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 460px){
  .grid2{ grid-template-columns:1fr; }
}

.btn{
  min-height:48px;
  padding:12px 15px;
  border-radius:18px;
  border:1px solid rgba(60,60,67,.08);
  background:rgba(255,255,255,.96);
  color:var(--text);
  font:inherit;
  font-weight:700;
  box-shadow:var(--shadow-soft);
  cursor:pointer;
}
.btn.primary{
  background:linear-gradient(180deg, #3a78e1, #2f67c6);
  color:#fff;
  border-color:rgba(255,255,255,.18);
}
.btn.danger{
  background:linear-gradient(180deg, #d9604b, #c94837);
  color:#fff;
  border-color:rgba(255,255,255,.18);
}
.btn.small{
  min-height:42px;
  padding:10px 12px;
  border-radius:16px;
}

.pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  background:var(--panel-soft);
  border:1px solid var(--stroke-soft);
  box-shadow:var(--shadow-soft);
}
.pill strong{ font-weight:800; }

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}
.check input{
  width:22px;
  height:22px;
  min-height:22px;
  accent-color:var(--blue);
}

.cal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.month{
  font-weight:800;
  font-size:20px;
}

.cal{
  width:100%;
  border-collapse:separate;
  border-spacing:6px;
  table-layout:fixed;
}
.cal th{
  padding:0 0 6px;
  text-align:center;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  color:#57575c;
  letter-spacing:.08em;
}
.cal td{
  padding:0;
  text-align:center;
}
.day{
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(60,60,67,.08);
  font-weight:700;
  cursor:pointer;
}
.day.dim{ opacity:.42; }
.day.sel{ outline:3px solid rgba(47,107,215,.24); }
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:6px;
  border-radius:999px;
  background:rgba(47,107,215,.92);
  color:#fff;
  font-size:12px;
  font-weight:800;
}

table.stats{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  table-layout:fixed;
  border:1px solid rgba(60,60,67,.08);
  border-radius:22px;
  background:rgba(255,255,255,.96);
  box-shadow:var(--shadow-soft);
}
table.stats th,
table.stats td{
  padding:10px 8px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
table.stats th{
  background:rgba(247,247,249,.96);
  color:#4a4a4f;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
table.stats tr:last-child td{ border-bottom:none; }

.right{ text-align:right; }
.center{ text-align:center; }
.muted{ color:var(--muted); }
.smalltxt{ font-size:12px; }

.spacer-10{ height:10px; }
.spacer-12{ height:12px; }
.spacer-14{ height:14px; }

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  max-width:min(92vw, 540px);
  padding:10px 13px;
  border-radius:16px;
  background:rgba(30,30,31,.92);
  color:#fff;
  font-size:13px;
  font-weight:700;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.toast.show{ opacity:1; }

img, svg, canvas{ max-width:100%; height:auto; }

@media (max-width: 640px){
  .wrap{ padding:18px 10px 28px; }
  .shell{
    min-height:calc(100vh - 36px);
    padding:18px 16px 24px;
    border-radius:34px;
  }
  .top{ padding:6px 2px 14px; margin-bottom:12px; }
  .brand{ font-size:29px; }
  .ball{ width:48px; height:48px; font-size:34px; }
  .bar-red{ padding:16px 16px; border-radius:20px; margin-bottom:16px; }
  .bar-title{ font-size:17px; }
  .bar-sub{ font-size:16px; }
  .row{ padding:20px 16px; }
  .ico{ font-size:31px; flex-basis:40px; }
  .label{ font-size:24px; }
  .chev{ font-size:38px; }
  .card-h{ font-size:20px; }
}

@media (min-width: 900px){
  .shell{
    width:min(100%, 560px);
  }
}
