:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f1f4fb;
  --surface-blue: #edf2ff;
  --ink: #151923;
  --muted: #697083;
  --subtle: #9097a8;
  --line: #e3e7ef;
  --line-strong: #cdd4e2;
  --blue: #1b41b9;
  --blue-2: #3661ea;
  --blue-dark: #12328f;
  --green: #16794f;
  --green-bg: #e8f8f1;
  --amber: #9a6200;
  --amber-bg: #fff5dc;
  --red: #b52f3c;
  --red-bg: #fff0f2;
  --shadow: 0 14px 40px rgba(18, 35, 78, 0.1);
  --shadow-soft: 0 8px 24px rgba(18, 35, 78, 0.07);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-max: 520px;
  font-family: SUIT, Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: #eef1f8; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(54, 97, 234, 0.09), transparent 28rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell {
  width: min(100%, var(--page-max));
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(92px + var(--safe-bottom));
}
.app-shell.no-nav { padding-bottom: calc(28px + var(--safe-bottom)); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(64px + var(--safe-top));
  padding: calc(12px + var(--safe-top)) 18px 12px;
  background: rgba(247, 248, 252, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(227, 231, 239, 0.72);
}
.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-2), var(--blue-dark));
  box-shadow: 0 8px 18px rgba(27, 65, 185, 0.26);
  font-size: 15px;
  letter-spacing: -0.06em;
}
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
}
.icon-button:active { transform: scale(0.97); }

main { padding: 18px 16px 28px; }
.section { margin-top: 22px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 0 2px 12px;
}
.section-head h2 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -0.035em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.section-link { color: var(--blue); font-size: 13px; font-weight: 750; text-decoration: none; }

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 95% 5%, rgba(255,255,255,.22), transparent 35%),
    linear-gradient(145deg, #234cc6 0%, #17389d 68%, #102a7a 100%);
  box-shadow: 0 18px 44px rgba(27, 65, 185, 0.22);
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -72px;
  bottom: -92px;
  border-radius: 50%;
  border: 28px solid rgba(255,255,255,.09);
}
.hero-eyebrow { margin: 0 0 8px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; }
.hero-card h1 { margin: 0; font-size: 26px; line-height: 1.25; letter-spacing: -0.045em; }
.hero-card p { margin: 9px 0 0; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.55; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero-chip {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card-body { padding: 18px; }
.card + .card { margin-top: 10px; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  background: var(--surface-blue);
  color: #294180;
  font-size: 13px;
  line-height: 1.55;
}
.notice-icon {
  flex: 0 0 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(54, 97, 234, .14);
  font-weight: 900;
}
.notice.warning { background: var(--amber-bg); color: #7b5107; }
.notice.success { background: var(--green-bg); color: #176342; }
.notice.danger { background: var(--red-bg); color: #8f2632; }

.status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 6px rgba(144,151,168,.12); }
.status-dot.pending { background: #d88b00; box-shadow: 0 0 0 6px rgba(216,139,0,.12); }
.status-dot.confirmed { background: #159563; box-shadow: 0 0 0 6px rgba(21,149,99,.12); }
.status-dot.rejected, .status-dot.cancelled { background: #c94755; box-shadow: 0 0 0 6px rgba(201,71,85,.11); }
.status-title { font-size: 14px; font-weight: 800; letter-spacing: -0.025em; }
.status-sub { margin-top: 3px; color: var(--muted); font-size: 12px; }
.status-arrow { color: var(--subtle); font-size: 20px; }

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  margin: 0 -1px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-button {
  flex: 0 0 64px;
  min-height: 78px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  cursor: pointer;
  scroll-snap-align: start;
}
.date-button strong { font-size: 20px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.date-button span { font-size: 11px; font-weight: 700; }
.date-button em { font-style: normal; font-size: 10px; color: var(--subtle); }
.date-button.active { border-color: var(--blue); background: var(--blue); color: rgba(255,255,255,.78); box-shadow: 0 10px 22px rgba(27,65,185,.2); }
.date-button.active strong, .date-button.active em { color: #fff; }
.date-button.empty { opacity: .52; }

.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slot-button {
  min-height: 56px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: .16s ease;
}
.slot-button:active { transform: scale(.98); }
.slot-button.selected { border-color: var(--blue); background: var(--surface-blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.slot-button:disabled { background: var(--surface-soft); color: var(--subtle); border-color: var(--line); cursor: default; }
.empty-state {
  padding: 30px 18px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255,255,255,.55);
}
.empty-state strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.55; }

.button {
  min-height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 820;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, opacity .14s ease, background .14s ease;
}
.button:active { transform: scale(.985); }
.button:disabled { opacity: .48; cursor: default; transform: none; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 10px 22px rgba(27,65,185,.22); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: var(--blue); background: var(--surface-blue); border: 1px solid #cfdaff; }
.button.ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.button.danger { color: var(--red); background: var(--red-bg); border: 1px solid #ffd4da; }
.button.small { min-height: 42px; padding: 0 13px; border-radius: 12px; font-size: 13px; }
.button.block { width: 100%; }
.button-row { display: flex; gap: 8px; }
.button-row > * { flex: 1 1 0; }

.field { display: grid; gap: 7px; margin-top: 14px; }
.field:first-child { margin-top: 0; }
.field label { font-size: 13px; font-weight: 760; color: #383f50; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(54,97,234,.11); }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
}
.pill.pending { background: var(--amber-bg); color: var(--amber); }
.pill.confirmed { background: var(--green-bg); color: var(--green); }
.pill.suggested { background: var(--surface-blue); color: var(--blue); }
.pill.cancelled, .pill.rejected { background: var(--red-bg); color: var(--red); }

.request-card { padding: 17px; }
.request-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-name { font-size: 17px; font-weight: 850; letter-spacing: -0.035em; }
.request-time { margin-top: 8px; font-size: 16px; font-weight: 800; color: #26324a; }
.request-meta { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.request-actions { display: grid; grid-template-columns: .85fr 1.15fr 1.4fr; gap: 7px; margin-top: 15px; }
.request-actions .button { padding: 0 8px; }

.schedule-list { display: grid; gap: 9px; }
.schedule-entry {
  display: grid;
  grid-template-columns: 58px 4px 1fr auto;
  gap: 11px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
}
.schedule-time { font-size: 14px; font-weight: 850; font-variant-numeric: tabular-nums; padding-top: 2px; }
.schedule-line { width: 4px; border-radius: 99px; background: var(--blue-2); }
.schedule-line.pending { background: #e2a52d; }
.schedule-line.block { background: #a4aabc; }
.schedule-title { font-size: 14px; font-weight: 820; }
.schedule-sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.schedule-menu { color: var(--subtle); align-self: center; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 15px 10px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.metric strong { display: block; font-size: 22px; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.metric span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.week-window { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.week-window:last-child { border-bottom: 0; }
.weekday-badge { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-blue); color: var(--blue); font-weight: 850; font-size: 12px; }
.week-window-time { flex: 1; font-size: 14px; font-weight: 780; }
.week-window button { min-width: 42px; min-height: 42px; border-radius: 12px; background: var(--red-bg); color: var(--red); cursor: pointer; }

.bottom-nav {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, var(--page-max));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.nav-button { min-height: 58px; border-radius: 15px; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 760; cursor: pointer; }
.nav-button .nav-icon { font-size: 20px; line-height: 1; }
.nav-button.active { color: var(--blue); background: var(--surface-blue); }
.nav-badge { position: absolute; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 99px; background: var(--red); color: #fff; font-size: 9px; transform: translate(13px,-13px); }

.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(12, 18, 36, .42); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.overlay.open { opacity: 1; pointer-events: auto; }
.bottom-sheet {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 0;
  width: min(100%, var(--page-max));
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  transform: translate(-50%, 105%);
  transition: transform .22s cubic-bezier(.2,.75,.25,1);
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px rgba(12, 18, 36, .18);
  padding: 9px 18px calc(18px + var(--safe-bottom));
}
.bottom-sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: #d7dbe5; margin: 2px auto 15px; }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sheet-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.04em; }
.sheet-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.sheet-close { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; background: var(--surface-soft); cursor: pointer; }
.sheet-summary { margin: 16px 0; padding: 15px; border-radius: 16px; background: var(--surface-blue); }
.sheet-summary strong { display: block; color: var(--blue-dark); font-size: 17px; }
.sheet-summary span { display: block; margin-top: 4px; color: #5b6c9d; font-size: 12px; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  width: min(calc(100% - 32px), 480px);
  transform: translate(-50%, 20px);
  padding: 13px 15px;
  border-radius: 15px;
  background: #202634;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
  font-size: 13px;
  line-height: 1.45;
}
.toast.open { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8e2530; }
.toast.success { background: #176346; }

.loading-block { position: relative; overflow: hidden; background: #e9ecf3; border-radius: 10px; color: transparent !important; }
.loading-block::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.38); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-hero { text-align: center; padding: 24px 18px; }
.status-symbol { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 23px; background: var(--amber-bg); color: var(--amber); font-size: 28px; font-weight: 900; }
.status-symbol.confirmed { background: var(--green-bg); color: var(--green); }
.status-symbol.rejected, .status-symbol.cancelled { background: var(--red-bg); color: var(--red); }
.status-symbol.suggested { background: var(--surface-blue); color: var(--blue); }
.detail-hero h1 { margin: 0; font-size: 24px; letter-spacing: -0.045em; }
.detail-hero p { margin: 8px auto 0; max-width: 320px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.detail-time { margin: 18px 0 0; padding: 16px; border-radius: 17px; background: var(--surface-soft); font-size: 18px; font-weight: 850; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--muted); }
.detail-row dd { margin: 0; text-align: right; font-weight: 740; }

.suggestion-grid { display: grid; gap: 9px; }
.suggestion-button { width: 100%; min-height: 58px; display: flex; justify-content: space-between; align-items: center; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface); cursor: pointer; }
.suggestion-button strong { font-size: 14px; }
.suggestion-button span { color: var(--blue); font-size: 12px; font-weight: 800; }

.launcher-shell { width: min(100% - 28px, 920px); margin: 0 auto; padding: calc(34px + var(--safe-top)) 0 50px; }
.launcher-head { text-align: center; margin-bottom: 28px; }
.launcher-head .brand-mark { margin: 0 auto 14px; width: 48px; height: 48px; border-radius: 16px; }
.launcher-head h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.055em; }
.launcher-head p { margin: 10px auto 0; color: var(--muted); line-height: 1.65; max-width: 600px; }
.launch-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.launch-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-soft); }
.launch-card h2 { margin: 0; font-size: 20px; letter-spacing: -0.04em; }
.launch-card p { margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.qr-box { aspect-ratio: 1; display: grid; place-items: center; max-width: 220px; margin: 4px auto 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.qr-box img { width: 92%; height: 92%; object-fit: contain; }
.launch-url { padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); font-size: 11px; word-break: break-all; }
.launch-steps { margin-top: 16px; padding: 20px; background: #162c75; color: #fff; border-radius: 22px; }
.launch-steps h3 { margin: 0 0 12px; }
.launch-steps ol { margin: 0; padding-left: 20px; color: rgba(255,255,255,.78); line-height: 1.75; }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 15px; background: #e9edf5; }
.tab { flex: 1; min-height: 42px; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 3px 10px rgba(22,36,74,.08); }

@media (min-width: 600px) {
  body.mobile-page { padding: 18px 0; }
  body.mobile-page .app-shell { min-height: calc(100dvh - 36px); border-radius: 28px; box-shadow: 0 22px 70px rgba(20,31,66,.14); border: 1px solid #e2e6ef; overflow: hidden; }
  body.mobile-page .bottom-nav { bottom: 18px; border-radius: 0 0 28px 28px; }
  body.mobile-page .bottom-sheet { bottom: 18px; border-radius: 26px; }
}

@media (max-width: 680px) {
  .launch-grid { grid-template-columns: 1fr; }
  .launcher-shell { width: min(100% - 24px, 520px); }
  .qr-box { max-width: 190px; }
}

@media (max-width: 350px) {
  main { padding-left: 13px; padding-right: 13px; }
  .hero-card { padding: 19px; }
  .hero-card h1 { font-size: 23px; }
  .request-actions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   v0.5 Calendar-first mobile experience
   -------------------------------------------------------------------------- */
.calendar-first main { padding-top: 16px; }
.calendar-first .section { margin-top: 18px; }
.section-kicker {
  margin: 0 0 4px;
  color: var(--blue-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.compact-head { align-items: center; }
.optional-label { color: var(--subtle); font-weight: 500; }
.status-stack { display: grid; gap: 8px; }

.profile-avatar {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #315be0, #173cae);
  color: #fff;
  font-size: 21px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(27,65,185,.18);
}

/* Customer: trainer identity first, available slots second. */
.trainer-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 2px;
}
.trainer-summary-copy { min-width: 0; flex: 1; }
.profile-kicker { margin: 0 0 2px; color: var(--blue-2); font-size: 11px; font-weight: 760; }
.trainer-summary h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.045em; }
.trainer-summary-copy > p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approval-badge {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.booking-rule {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfdaff;
  border-radius: 16px;
  background: #f4f7ff;
  color: #38518f;
}
.rule-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.booking-rule p { margin: 0; font-size: 12px; line-height: 1.45; }
.booking-rule strong { color: var(--blue); font-size: 11px; white-space: nowrap; }
.availability-head { align-items: flex-end; }
.availability-head h2 { font-size: 24px; }
.availability-count {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.availability-feed { display: grid; gap: 12px; }
.availability-day-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(18,35,78,.035);
}
.availability-day-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.relative-date { display: block; margin-bottom: 2px; color: var(--blue-2); font-size: 10px; font-weight: 800; }
.availability-day-head h3 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.availability-day-head > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.time-periods { display: grid; gap: 10px; }
.time-period-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
}
.time-period-label { padding-top: 14px; color: var(--muted); font-size: 10px; font-weight: 700; }
.compact-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.compact-slots .slot-button { min-height: 46px; border-radius: 13px; font-size: 14px; }

/* Instructor: compact identity, action metrics, then calendar. */
.instructor-overview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 2px;
}
.instructor-overview-copy { flex: 1; min-width: 0; }
.instructor-overview h1 { margin: 2px 0 0; font-size: 21px; line-height: 1.25; letter-spacing: -.045em; }
.instructor-overview-copy > p { margin: 3px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-state { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; font-weight: 750; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #31b77b; box-shadow: 0 0 0 4px rgba(49,183,123,.12); }
.quick-add-button {
  flex: 0 0 60px;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid #cbd7ff;
  border-radius: 16px;
  background: var(--surface-blue);
  color: var(--blue);
  cursor: pointer;
}
.quick-add-button strong { font-size: 20px; line-height: 1; }
.quick-add-button span { font-size: 10px; font-weight: 750; }
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.quick-stat {
  min-height: 66px;
  padding: 9px 6px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  background: transparent;
  cursor: pointer;
}
.quick-stat + .quick-stat { border-left: 1px solid var(--line); }
.quick-stat span { color: var(--muted); font-size: 10px; }
.quick-stat strong { color: var(--ink); font-size: 19px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.quick-stat .metric-word { font-size: 11px; color: var(--muted); }
.quick-stat .connected-word { color: var(--green); }

.calendar-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.calendar-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-card-head h2 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.04em; }
.calendar-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 14px;
  background: #edf0f6;
}
.calendar-view-tab {
  min-height: 42px;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.calendar-view-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px rgba(18,35,78,.08); }
.calendar-navigation {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  margin-top: 10px;
}
.calendar-nav-button, .calendar-today-button {
  min-height: 44px;
  border-radius: 12px;
  background: #f1f3f8;
  color: var(--ink);
  cursor: pointer;
}
.calendar-nav-button { font-size: 26px; line-height: 1; }
.calendar-today-button { font-size: 12px; font-weight: 780; }
.agenda-date-strip { margin-top: 10px; }
.agenda-date-strip .date-button { flex-basis: 52px; min-height: 70px; border-radius: 14px; }
.agenda-date-strip .date-button strong { font-size: 18px; }
.calendar-card .schedule-list { margin-top: 10px; }
.compact-empty { padding: 22px 14px; margin-top: 10px; }
.schedule-copy { min-width: 0; }
.schedule-line.external { background: #4285f4; }
.schedule-line.confirmed { background: var(--blue-2); }
.pill.external { background: #eef4ff; color: #2864c7; }
.pill.block { background: #eff1f5; color: #6c7485; }
.request-note { margin-top: 12px; }
.request-history-action { margin-top: 14px; }

.week-agenda { display: grid; gap: 9px; margin-top: 12px; }
.week-day-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.week-day-card.today { border-color: #b9c9ff; box-shadow: inset 0 0 0 1px #e0e7ff; }
.week-day-head {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfe;
  color: var(--ink);
  cursor: pointer;
}
.week-day-head span { font-size: 13px; font-weight: 800; }
.week-day-head strong { color: var(--muted); font-size: 11px; }
.week-day-events { display: grid; gap: 7px; padding: 10px 13px 12px; }
.week-day-events > p { margin: 0; color: var(--subtle); font-size: 11px; }
.week-mini-entry { display: grid; grid-template-columns: 7px 40px 1fr; gap: 7px; align-items: center; min-width: 0; }
.week-mini-entry time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.week-mini-entry strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-2); }
.mini-dot.pending { background: #e2a52d; }
.mini-dot.block { background: #a4aabc; }
.mini-dot.external { background: #4285f4; }
.more-count { color: var(--muted); font-size: 10px; }

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 12px;
  color: var(--subtle);
  font-size: 10px;
  text-align: center;
}
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 3px; margin-top: 4px; }
.month-day {
  min-width: 40px;
  min-height: 48px;
  padding: 5px 2px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.month-day.outside { color: #bcc2cf; }
.month-day.today .month-day-number { color: var(--blue); font-weight: 900; }
.month-day.selected { border-color: #b8c8ff; background: var(--surface-blue); }
.month-day-number { font-size: 12px; font-variant-numeric: tabular-nums; }
.month-dots { min-height: 5px; display: flex; gap: 3px; }
.month-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--blue-2); }
.month-dot.pending { background: #e2a52d; }
.month-dot.block { background: #9ea6b8; }
.month-dot.external { background: #4285f4; }
.month-day-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.month-day-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.month-day-head strong { font-size: 13px; }
.month-day-head span { color: var(--muted); font-size: 11px; }

/* Google Calendar settings demo. */
.google-calendar-card { border-color: #dce4f7; }
.google-card-head { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; }
.google-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eef4ff;
  color: #1a73e8;
  font-size: 17px;
  font-weight: 900;
}
.google-card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.03em; }
.google-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.connection-badge { min-height: 27px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; background: #f0f2f6; color: var(--muted); font-size: 10px; font-weight: 800; }
.connection-badge.connected { background: var(--green-bg); color: var(--green); }
.google-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-top: 14px; }
.google-detail-grid > div { padding: 10px; border-radius: 13px; background: #f1f3f8; min-width: 0; }
.google-detail-grid span { display: block; color: var(--muted); font-size: 9px; }
.google-detail-grid strong { display: block; margin-top: 3px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.google-actions { margin-top: 13px; flex-wrap: wrap; }
.google-actions .button { min-width: 0; }
.settings-footnote { margin: 12px 1px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.settings-card-title { font-size: 16px !important; }

@media (max-width: 350px) {
  .compact-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .compact-slots .slot-button { min-height: 44px; padding: 0 3px; font-size: 13px; }
  .time-period-row { grid-template-columns: 26px 1fr; gap: 7px; }
  .calendar-card { padding: 13px; }
  .calendar-card-head .button { padding: 0 9px; }
  .quick-stat span { font-size: 9px; }
  .month-day { min-width: 38px; }
  .schedule-entry { grid-template-columns: 50px 4px 1fr; }
  .schedule-entry .pill, .schedule-entry .button { grid-column: 3; justify-self: start; }
}

/* M2.5 touch-safe month grid: keep each date selectable on compact phones.
   The grid may scroll inside the calendar card, never the full page. */
.month-grid {
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.month-grid::-webkit-scrollbar { display: none; }
.month-day { min-width: 40px; min-height: 48px; }
@media (max-width: 350px) {
  .calendar-card { padding-inline: 8px; }
  .month-day { min-width: 40px; }
}

/* M2P-020 authentication gate. Touch targets stay at or above the 48px floor
   and the card never exceeds the 320px viewport. */
.auth-gate { max-width: 100%; }
.auth-gate h2 { font-size: 20px; margin: 4px 0 6px; }
.auth-gate-help { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.auth-gate .field input { min-height: 48px; }
.auth-gate .button.block { margin-top: 16px; min-height: 48px; }
.auth-gate-error { margin-top: 12px; color: #c0392b; font-size: 13px; line-height: 1.5; }

/* Development-only verification hint. The dev route that feeds it is not
   registered outside AUTH_MODE=dev, so this stays empty in production. */
.dev-code-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #b9c0d4;
  border-radius: 10px;
  background: #eef1f8;
  color: #37405a;
  font-size: 13px;
  line-height: 1.5;
}
.dev-code-hint strong { font-size: 20px; letter-spacing: 3px; }

/* Public landing. Kept deliberately small: the product entry points are a
   login for instructors and a shared link for customers. */
.help-text { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.help-text strong { color: #1c2333; }

/* Kakao's brand colours are fixed by their guidelines, so they do not follow
   the palette. */
.button.kakao { background: #fee500; color: #191600; border-color: #fee500; }
.button.kakao:hover { background: #f5dc00; border-color: #f5dc00; }
