:root {
  --green: #07c160;
  --green-dark: #06a050;
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --line: #eee;
  --danger: #e54545;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--green); color: #fff; padding: 10px 14px;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar .brand { font-weight: 700; font-size: 18px; }
.topbar nav a { margin-left: 14px; font-size: 14px; opacity: .95; }
.topbar nav { display: flex; align-items: center; }
.lang-toggle {
  margin-left: 14px; padding: 3px 12px; width: auto;
  background: rgba(255,255,255,.16); color: #fff; font-size: 13px;
  border: 1px solid rgba(255,255,255,.65); border-radius: 999px;
}
main { max-width: 640px; margin: 0 auto; padding: 14px 12px 40px; }
.card {
  background: var(--card); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card h2 { margin: 0 0 8px; font-size: 18px; }
.card h3 { margin: 16px 0 8px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
a.session-card { display: block; text-decoration: none; color: var(--text); }
.session-card .row1 { display: flex; justify-content: space-between; align-items: center; }
.session-card .sport { font-weight: 700; font-size: 17px; }
.badge {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: #e8f8ef; color: var(--green-dark); margin-left: 6px; vertical-align: middle;
}
.badge.demo { background: #fff3e0; color: #b26a00; }
.badge.lock { background: #fdecec; color: var(--danger); }
.badge.promoted { background: var(--green); color: #fff; }
.progress { height: 8px; background: #eee; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--green); }
button, .btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  border-radius: 8px; padding: 10px 18px; font-size: 15px; text-align: center;
}
.btn-primary { background: var(--green); color: #fff; width: 100%; font-weight: 600; }
.btn-primary:active { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid #ddd; padding: 7px 13px; font-size: 14px; }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 1px solid #f3c2c2; padding: 5px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
label.field { display: block; margin: 12px 0 4px; font-size: 14px; color: #444; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px;
  border: 1px solid #ddd; border-radius: 8px; background: #fff; appearance: none;
}
textarea { min-height: 64px; resize: vertical; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.roster li:last-child { border-bottom: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: #ccc; transition: .2s;
}
.switch .track:before {
  content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .2s;
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track:before { transform: translateX(22px); }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 99; max-width: 86vw; text-align: center;
}
.install-card { border: 1.5px dashed var(--green); }
code.link { word-break: break-all; font-size: 13px; background: #f6f6f6; padding: 2px 6px; border-radius: 4px; }
.empty { text-align: center; color: var(--muted); padding: 26px 0; }
h1.page-title { font-size: 20px; margin: 4px 0 12px; }
