/* ===== 디자인 토큰 ===== */
:root {
  --bg: #F2F4F6;
  --surface: #FFFFFF;
  --field: #F2F4F6;
  --text: #191F28;
  --text-2: #4E5968;
  --text-3: #8B95A1;
  --line: #E5E8EB;
  --primary: #3182F6;
  --primary-press: #1B64DA;
  --primary-weak: #E8F3FF;
  --green: #03B26C;
  --green-weak: #E5F8EF;
  --gray-weak: #F2F4F6;
  --red: #F04452;
  --overlay: rgba(0, 0, 0, .4);

  --radius: 20px;
  --radius-sm: 14px;
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101113;
    --surface: #1C1D21;
    --field: #26282D;
    --text: #F2F4F6;
    --text-2: #B0B8C1;
    --text-3: #6B7684;
    --line: #2C2E33;
    --primary: #4C94FF;
    --primary-press: #3182F6;
    --primary-weak: #1A2A44;
    --green: #2FCB89;
    --green-weak: #15302A;
    --gray-weak: #26282D;
    --overlay: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ===== 기본 ===== */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.sheet-open { overflow: hidden; }
html, body { overflow-x: clip; }

button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px calc(var(--tabbar-h) + var(--safe-b) + 96px);
  min-height: 100dvh;
}

/* ===== 타이포 ===== */
.page-head { padding: 32px 4px 20px; }
.eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--text-3); }
.title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.subtitle { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }
.section-label { margin: 28px 4px 10px; font-size: 14px; font-weight: 600; color: var(--text-3); }
.hint { margin: 12px 4px 0; font-size: 14px; color: var(--text-3); }

/* ===== 버튼 ===== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 56px; padding: 0 20px;
  border-radius: 16px;
  font-size: 17px; font-weight: 600;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-press); }
.btn-secondary { background: var(--primary-weak); color: var(--primary); }
.btn-ghost { background: var(--gray-weak); color: var(--text-2); }
.btn-sm { height: 44px; font-size: 15px; border-radius: 12px; }
.btn-danger { color: var(--red); }
.btn-danger.is-armed { background: var(--red); color: #fff; }

.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }

.link-btn {
  display: block; margin: 16px auto 0; padding: 8px 12px;
  font-size: 15px; font-weight: 500; color: var(--text-3);
}

/* ===== 카드 ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
}

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.tip-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  transition: transform .12s ease;
}
.tip-card:active { transform: scale(.985); }
.tip-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.tip-card h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.tip-card .preview {
  margin: 6px 0 0; font-size: 15px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-line; overflow-wrap: anywhere;
}
.meta { font-size: 13px; color: var(--text-3); }
.tip-card .meta { margin-top: 12px; }

/* ===== 태그 / 배지 ===== */
.tag {
  --tag: var(--text-2);
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--tag);
  background: color-mix(in srgb, var(--tag) 12%, transparent);
}
.tag-0 { --tag: #3182F6; }
.tag-1 { --tag: #E8710A; }
.tag-2 { --tag: #029359; }
.tag-3 { --tag: #E42939; }
.tag-4 { --tag: #7C4DDB; }
.tag-5 { --tag: #0A93A6; }
.tag-6 { --tag: #D6336C; }
.tag-7 { --tag: #4E6A8C; }
.tag-8 { --tag: #9A6B1F; }
@media (prefers-color-scheme: dark) {
  .tag-0 { --tag: #6AA5FF; }
  .tag-1 { --tag: #FFA14A; }
  .tag-2 { --tag: #2FCB89; }
  .tag-3 { --tag: #FF6B76; }
  .tag-4 { --tag: #A98BFF; }
  .tag-5 { --tag: #3CC6D8; }
  .tag-6 { --tag: #FF6B9A; }
  .tag-7 { --tag: #93AACB; }
  .tag-8 { --tag: #E0AE5C; }
}

.badge {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  background: var(--gray-weak); color: var(--text-2);
}
.badge-new { background: var(--primary-weak); color: var(--primary); }
.badge-trying { background: var(--primary-weak); color: var(--primary); }
.badge-graduated { background: var(--green-weak); color: var(--green); }

/* ===== 오늘 화면 ===== */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 8px; gap: 4px;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 4px; border-radius: 14px;
  transition: background-color .15s ease;
}
.stat:active { background: var(--gray-weak); }
.stat-num { font-size: 22px; font-weight: 700; }
.stat-num.is-green { color: var(--green); }
.stat-label { font-size: 13px; color: var(--text-3); }

.cta { margin-top: 20px; }

.empty {
  text-align: center;
  padding: 36px 24px;
}
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-weak); color: var(--primary);
  font-size: 26px;
}
.empty h3 { margin: 0; font-size: 18px; font-weight: 700; }
.empty p { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }

.steps { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.steps b { color: var(--text); font-weight: 600; }
.step-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-weak); color: var(--primary);
  font-size: 13px; font-weight: 700;
}

/* ===== 팁 목록 ===== */
.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 14px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.segmented button {
  height: 40px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--text-3);
  transition: background-color .15s ease, color .15s ease;
}
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.segmented .count { margin-left: 4px; font-weight: 500; }

.search { position: relative; margin-top: 12px; }
.search svg {
  position: absolute; left: 14px; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round;
}
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 42px;
  border: 0; border-radius: 14px;
  background: var(--surface);
  font-size: 16px; outline: none;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { box-shadow: 0 0 0 2px var(--primary); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -20px 0; padding: 0 20px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.chip.is-selected { background: var(--text); color: var(--surface); }

.list { padding: 6px 0; margin-top: 16px; }
.list-desc { margin: 16px 4px 0; font-size: 14px; color: var(--text-3); }

.row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 20px; text-align: left;
  transition: background-color .15s ease;
}
.row:active { background: var(--gray-weak); }
.row + .row { box-shadow: inset 0 1px 0 var(--line); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* MS To Do 느낌의 상태 동그라미 */
.dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--primary);
}
.dot svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dot-graduated { background: var(--green); border-color: var(--green); }
.dot-archived { border-color: var(--text-3); border-style: dashed; }

/* ===== 기록 화면 ===== */
.session { display: block; width: 100%; text-align: left; transition: transform .12s ease; }
.session:active { transform: scale(.985); }
.session-content {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--text); white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.session-content.is-empty { color: var(--text-3); font-weight: 500; }
.session-results { margin: 14px 0 0; padding: 12px 0 0; list-style: none; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.session-results li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.session-results .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* ===== 하단 추가 바 (MS To Do) ===== */
.addbar {
  position: fixed; z-index: 10;
  left: 50%; translate: -50% 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  width: min(440px, calc(100% - 40px));
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 18px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--primary);
  font-size: 16px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.08), 0 0 0 1px var(--line);
  transition: transform .12s ease;
}
.addbar:active { transform: scale(.98); }
.addbar-plus { font-size: 26px; font-weight: 400; line-height: 1; margin-top: -2px; }

/* ===== 탭바 ===== */
.tabbar {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; max-width: 160px; height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 11px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tab.is-active { color: var(--text); }

/* ===== 바텀 시트 ===== */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--overlay);
  opacity: 0; transition: opacity .2s ease;
}
.sheet-overlay.is-open { opacity: 1; }
.sheet {
  width: 100%; max-width: 480px; max-height: 92dvh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 8px 24px calc(24px + var(--safe-b));
  translate: 0 100%; transition: translate .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet-overlay.is-open .sheet { translate: 0 0; }
.sheet-grabber { width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line); }

.sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 8px; }
.sheet-head .step { font-size: 14px; font-weight: 600; color: var(--text-3); }
.close-btn {
  width: 36px; height: 36px; margin-right: -8px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-3);
}
.close-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.close-btn:active { background: var(--gray-weak); }

.sheet-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.sheet-desc { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }
.sheet-actions { display: grid; gap: 8px; margin-top: 28px; }

.progress { height: 4px; border-radius: 2px; background: var(--gray-weak); overflow: hidden; margin-bottom: 20px; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 2px; transition: width .3s ease; }

/* 폼 */
.form { display: grid; gap: 20px; margin-top: 20px; }
.field { display: grid; gap: 8px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field-label small { font-weight: 400; color: var(--text-3); }
.input {
  width: 100%; border: 0; outline: none;
  border-radius: var(--radius-sm);
  background: var(--field);
  padding: 14px 16px; font-size: 16px;
  transition: box-shadow .15s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus { box-shadow: 0 0 0 2px var(--primary); }
textarea.input { resize: none; min-height: 120px; line-height: 1.6; }
.field .chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
.field .chip { background: var(--field); }
.field .chip.is-selected { background: var(--text); color: var(--surface); }
/* 새 태그 추가 */
.field .chip-add { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 45%, transparent); }
.tag-new { display: inline-flex; gap: 6px; align-items: center; }
.chip-input {
  width: 9.5em; height: 36px; padding: 0 14px;
  border: 0; outline: none; border-radius: 18px;
  background: var(--field); font-size: 14px;
  box-shadow: 0 0 0 2px var(--primary);
}
.field .chip-confirm { background: var(--primary); color: #fff; }
.form-error { margin: -12px 0 0; font-size: 13px; color: var(--red); }

/* 결과 체크 선택지 */
.question { margin: 24px 0 12px; font-size: 16px; font-weight: 600; color: var(--text-2); }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; border-radius: 16px; text-align: left;
  background: var(--field);
  transition: transform .12s ease, background-color .15s ease;
}
.option:active { transform: scale(.98); }
.option-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
}
.option-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.option-again .option-icon { background: var(--primary-weak); color: var(--primary); }
.option-ok .option-icon { background: var(--green-weak); color: var(--green); }
.option-archived .option-icon { background: color-mix(in srgb, var(--text-3) 18%, transparent); color: var(--text-2); }
.option-text { display: flex; flex-direction: column; gap: 2px; }
.option-label { font-size: 16px; font-weight: 700; }
.option-desc { font-size: 13px; color: var(--text-3); }

/* 팁 상세 */
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.detail-body { margin: 16px 0 0; font-size: 16px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-body.is-empty { color: var(--text-3); }
.detail-meta { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--field); display: grid; gap: 6px; font-size: 14px; }
.detail-meta div { display: flex; justify-content: space-between; gap: 12px; }
.detail-meta dt { color: var(--text-3); }
.detail-meta dd { margin: 0; font-weight: 600; }
.history { margin: 8px 0 0; padding: 0; list-style: none; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.history li + li { border-top: 1px solid var(--line); }
.history .d { color: var(--text-3); }

/* 체크 완료 */
.done-hero { text-align: center; padding: 12px 0 4px; }
.done-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-weak); color: var(--primary);
}
.done-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-hero .sheet-desc { margin-top: 8px; }

/* ===== 기록: 달력 ===== */
:root { --game: #F08A24; }
@media (prefers-color-scheme: dark) { :root { --game: #FFA14A; } }

.cal { padding: 16px 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.cal-title { font-size: 18px; font-weight: 700; padding: 6px 10px; border-radius: 10px; }
.cal-title:active { background: var(--gray-weak); }
.cal-nav {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
}
.cal-nav:active { background: var(--gray-weak); }
.cal-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.cal-week span { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-3); padding-bottom: 6px; }
.cal-week span:first-child { color: color-mix(in srgb, var(--red) 70%, var(--text-3)); }

.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 3px 0 6px; border-radius: 12px;
}
.cal-num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 500; color: var(--text);
  transition: background-color .15s ease, color .15s ease;
}
.cal-day.is-sun .cal-num { color: color-mix(in srgb, var(--red) 75%, var(--text)); }
.cal-day.is-today .cal-num { color: var(--primary); font-weight: 700; background: var(--primary-weak); }
.cal-day.is-selected .cal-num { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day:active .cal-num { transform: scale(.94); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.cal-dot.is-training { background: var(--primary); }
.cal-dot.is-game { background: var(--game); }

.cal-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px 4px 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-3);
}
.cal-summary b { color: var(--text); font-weight: 600; }
.cal-legend { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend .cal-dot:not(:first-child) { margin-left: 6px; }

.day-empty { padding: 20px; }
.day-empty p { margin: 0 0 14px; font-size: 15px; color: var(--text-3); }
.badge-game { background: color-mix(in srgb, var(--game) 14%, transparent); color: var(--game); }

/* ===== 대회 모드 ===== */
.empty-icon svg, .banner-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 첫 화면 경기 배너 */
.banner { margin-bottom: 16px; }
.banner-top { display: flex; align-items: center; gap: 12px; }
.banner-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-weak); color: var(--primary);
}
.banner-icon svg { width: 22px; height: 22px; }
.banner-text { display: flex; flex-direction: column; min-width: 0; }
.banner-label { font-size: 13px; font-weight: 600; color: var(--primary); }
.banner-text strong { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-desc { margin: 12px 0 14px; font-size: 14px; color: var(--text-2); }

/* 지난 경기 결과 동그라미 */
.outcome {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  background: var(--gray-weak); color: var(--text-3);
}
.outcome-win { background: var(--primary-weak); color: var(--primary); }
.outcome-lose { background: var(--gray-weak); color: var(--text-2); }

/* 경기 등록: 시도할 팁 고르기 */
.pick-list { display: grid; gap: 8px; }
.pick {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: var(--radius-sm); text-align: left;
  background: var(--field);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.pick .dot svg { opacity: 0; }
.pick.is-selected { background: var(--primary-weak); box-shadow: inset 0 0 0 2px var(--primary); }
.pick.is-selected .dot { background: var(--primary); }
.pick.is-selected .dot svg { opacity: 1; }

/* 경기 직전 브리핑 — 큰 글씨 */
.brief-title { font-size: 28px; }
.brief-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.brief-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px; border-radius: 18px; background: var(--field);
}
.brief-num {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 700;
}
.brief-list strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.brief-list p {
  margin: 6px 0 0; font-size: 15px; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 경기 후 체크: 큰 선택 버튼 */
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
  height: 56px; border-radius: var(--radius-sm);
  background: var(--field); color: var(--text-2);
  font-size: 15px; font-weight: 600;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.choice:active { transform: scale(.97); }
.choice.is-selected { background: var(--primary-weak); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chips.wrap .chip { background: var(--field); }
.chips.wrap .chip.is-selected { background: var(--text); color: var(--surface); }

.score { display: flex; align-items: center; gap: 10px; }
.score .input { flex: 1; min-width: 0; text-align: center; font-size: 18px; font-weight: 600; }
.score span { font-size: 18px; font-weight: 700; color: var(--text-3); }

.option-game-ok .option-icon { background: var(--green-weak); color: var(--green); }
.option-game-miss .option-icon { background: var(--primary-weak); color: var(--primary); }
.option-game-skip .option-icon { background: color-mix(in srgb, var(--text-3) 18%, transparent); color: var(--text-2); }

.insight {
  margin: 0; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--field); font-size: 15px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ===== 저장 상태 ===== */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.head-row .eyebrow { margin: 0; }
.sync-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 14px;
  background: var(--surface); color: var(--text-3);
  font-size: 12px; font-weight: 600;
}
.sync-pill:active { background: var(--gray-weak); }
.sync-dot { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.is-saved .sync-dot { background: var(--green); }
.is-saving .sync-dot { background: var(--primary); animation: sync-blink 1s ease-in-out infinite; }
.is-offline .sync-dot, .is-local .sync-dot { background: var(--game); }
.sync-pill.is-local, .sync-pill.is-offline { color: var(--game); }
@keyframes sync-blink { 50% { opacity: .3; } }

.data-status {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius-sm); background: var(--field);
}
.data-status .sync-dot { width: 10px; height: 10px; margin-top: 6px; }
.data-status strong { font-size: 16px; font-weight: 700; }
.data-status p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.data-link { margin-top: 28px; }

/* ===== 닫기 확인 다이얼로그 ===== */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 24px;
  background: var(--overlay);
  opacity: 0; transition: opacity .15s ease;
}
.confirm-overlay.is-open { opacity: 1; }
.confirm {
  width: 100%; max-width: 340px;
  padding: 24px 20px 20px; border-radius: 24px;
  background: var(--surface);
  scale: .96; transition: scale .18s ease;
}
.confirm-overlay.is-open .confirm { scale: 1; }
.confirm-title { margin: 0 4px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.confirm-desc { margin: 8px 4px 22px; font-size: 15px; color: var(--text-2); }

/* ===== 토스트 ===== */
.toast {
  position: fixed; z-index: 100;
  left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px);
  translate: -50% 12px;
  max-width: calc(100% - 40px);
  padding: 12px 18px; border-radius: 14px;
  background: #333D4B; color: #fff;
  font-size: 15px; font-weight: 500; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, translate .2s ease;
}
.toast.is-show { opacity: 1; translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ===== 첫 화면 빠른 버튼: 지금 훈련 가요 / 훈련 등록 / 경기 등록 ===== */
.quick { display: grid; gap: 8px; margin-bottom: 16px; }
.quick-go { height: 58px; font-size: 18px; font-weight: 700; border-radius: 18px; gap: 8px; }
.quick .btn-sm { background: var(--surface); }
.quick-next {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2);
  font-size: 14px; text-align: left;
}
.quick-next b { color: var(--primary); font-weight: 700; }
.quick-next:active { background: var(--gray-weak); }

.banner-plan .banner-icon { font-size: 22px; }
.brief-reason { margin-bottom: 6px; }
.brief-rest { margin-top: 0; box-shadow: inset 0 0 0 1px var(--line); }
.cal-dot.is-plan { box-shadow: inset 0 0 0 1.5px var(--primary); }

/* ===== 통통이 (응원해주는 농구공) ===== */
.mascot { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.mascot-ball {
  flex: none; width: 52px; height: 52px;
  animation: mascot-bounce 2.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.m-body { fill: #F5A04A; }
.m-seam { fill: none; stroke: #C96A1B; stroke-width: 1.4; stroke-linecap: round; opacity: .45; }
.m-cheek { fill: #FF7A8A; opacity: .45; }
.m-face { fill: #2B1B10; }
.m-line { fill: none; stroke: #2B1B10; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m-tear { fill: #6FB6FF; }
.mascot-bubble {
  position: relative; margin: 0 0 8px;
  padding: 11px 14px; border-radius: 16px 16px 16px 4px;
  background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600; line-height: 1.45;
  word-break: keep-all; overflow-wrap: anywhere;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.sheet .mascot-bubble { background: var(--field); box-shadow: none; }
.mascot.is-big { flex-direction: column; align-items: center; gap: 12px; margin-bottom: 12px; }
.mascot.is-big .mascot-ball { width: 84px; height: 84px; }
.mascot.is-big .mascot-bubble { margin: 0; border-radius: 16px; }

.mascot-mini {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px 0 0; font-size: 14px; font-weight: 600; color: var(--text-2);
}
.mascot-mini .mascot-ball { width: 28px; height: 28px; animation-duration: 1.2s; }

@keyframes mascot-bounce {
  0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
  70% { transform: translateY(0) scale(1.08, .92); }
  80% { transform: translateY(-7px) scale(.96, 1.04); }
  90% { transform: translateY(0) scale(1.04, .96); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-ball { animation: none; }
}

/* ===== 졸업까지 연속 성공 ●●○ ===== */
.streak { display: inline-flex; gap: 4px; align-items: center; }
.streak i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text-3) 70%, transparent); }
.streak i.is-on { background: var(--green); box-shadow: none; }
.tip-card-top .streak { margin-left: auto; }
.streak-line { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--green); }
.streak-dd { display: inline-flex; align-items: center; gap: 8px; }

/* ===== 명장면 ===== */
.hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hl-tile {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px; background: var(--surface); text-align: left;
  transition: transform .12s ease;
}
.hl-tile:active { transform: scale(.97); }
.hl-media {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: color-mix(in srgb, var(--text-3) 22%, var(--surface));
}
.hl-media img, .hl-mini img, .hl-preview img, .hl-drop img, .hl-drop video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hl-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); color: #fff;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hl-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.hl-mini .hl-play { width: 28px; height: 28px; }
.hl-mini .hl-play svg { width: 13px; height: 13px; }
.hl-cap { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.hl-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-date { font-size: 12px; color: var(--text-3); }

/* 올리기: 파일 고르는 칸 */
.hl-drop {
  position: relative; display: block; overflow: hidden; cursor: pointer;
  border-radius: 18px; background: var(--field);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
}
.hl-drop-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 180px; padding: 20px; text-align: center;
}
.hl-drop-icon { font-size: 34px; margin-bottom: 4px; }
.hl-drop b { font-size: 16px; color: var(--primary); }
.hl-drop small { font-size: 13px; color: var(--text-3); }
.hl-drop.has-file { box-shadow: none; }
.hl-drop.has-file .hl-drop-inner { position: relative; aspect-ratio: 4 / 3; min-height: 0; padding: 0; }
.hl-change {
  position: absolute; right: 10px; bottom: 10px;
  padding: 6px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600;
}
.hl-preview { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: var(--field); }

/* 보기: 크게 */
.hl-view { margin: 0 -4px; border-radius: 18px; overflow: hidden; background: #000; }
.hl-full { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #000; }

/* 팁 상세의 작은 썸네일 줄 */
.hl-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.hl-strip::-webkit-scrollbar { display: none; }
.hl-mini {
  position: relative; flex: none; width: 76px; height: 76px; overflow: hidden;
  border-radius: 14px; background: var(--field);
}
.btn:disabled { opacity: .7; }

/* ===== 통통이 안내 (오른쪽 위에 떠 있음, 누르면 이 화면 설명) ===== */
.page-head { padding-right: 60px; }
.guide-btn {
  position: fixed; z-index: 60;
  top: calc(env(safe-area-inset-top) + 10px);
  right: max(12px, calc(50% - 240px + 12px));
  width: 46px; height: 46px; padding: 3px; border: 0; border-radius: 50%;
  background: var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
  cursor: pointer;
}
.guide-btn .mascot-ball { width: 40px; height: 40px; }
