:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card2: #22262f;
  --line: #2d323d;
  --text: #e8eaed;
  --muted: #9aa0ab;
  --accent: #ff6b35;      /* 사이클링 오렌지 */
  --accent-dim: #3a2419;
  --green: #2ecc71;
  --red: #e74c3c;
  --amber: #f39c12;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
header.app {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px; max-width: 760px; margin: 0 auto;
}
header.app h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
header.app h1 span { color: var(--accent); }
.hello { font-size: 13px; color: var(--muted); }

/* 탭 네비게이션 */
nav.tabs {
  display: flex; gap: 4px; padding: 4px; margin: 0 16px 16px;
  max-width: 760px; margin-left: auto; margin-right: auto;
  background: var(--card); border-radius: var(--radius);
}
nav.tabs button {
  flex: 1; padding: 10px 8px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
nav.tabs button.active { background: var(--accent); color: #fff; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; vertical-align: middle;
}
.badge.ride { background: var(--accent-dim); color: var(--accent); }
.badge.race { background: #2a1f3a; color: #b388ff; }
.badge.flash { background: #3a3419; color: var(--amber); }
.badge.pin { background: #3a1f1f; color: var(--red); }

/* 참석 버튼 그룹 */
.attend { display: flex; gap: 8px; margin-top: 12px; }
.attend button {
  flex: 1; padding: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--muted);
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.attend button.yes.on { background: var(--green); color: #fff; border-color: var(--green); }
.attend button.maybe.on { background: var(--amber); color: #fff; border-color: var(--amber); }
.attend button.no.on { background: var(--red); color: #fff; border-color: var(--red); }

.count { font-size: 13px; color: var(--green); font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* 폼 요소 */
input, textarea, select {
  width: 100%; padding: 10px 12px; margin: 4px 0 12px;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 15px;
  font-family: inherit;
}
label { font-size: 13px; color: var(--muted); font-weight: 600; }
button.primary {
  width: 100%; padding: 12px; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
button.ghost {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 13px; cursor: pointer;
}
.qty { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 18px; cursor: pointer;
}
.qty span { font-size: 18px; font-weight: 700; min-width: 30px; text-align: center; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; }
.dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--red); margin-left:4px; vertical-align:middle;}

/* 총무 화면은 넓은 PC 에서 2열로 */
@media (min-width: 720px) {
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid2 .card { margin-bottom: 0; }
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; }
.bar { height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden; margin-top: 4px;}
.bar > i { display:block; height:100%; background: var(--accent); }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 18px; border-radius: 20px; font-size: 14px; opacity: 0;
  transition: opacity .2s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; }
