/* ============================================================
   GoTracks 디자인 시스템 v1 — 단일 출처. 패치는 여기 규칙 안에서.
   토큰 → 기본 → 헤더 → 레이아웃 → 카드/타일 → 리스트 → 모달 → 로그인 → 지도 → 반응형
   ============================================================ */

/* ---------- 1. 토큰 ---------- */
:root {
  --bg: #0f1115; --panel: #171a21; --panel2: #1e222b; --line: #262b36; --border: #333a48;
  --text: #e8eaf0; --muted: #8b93a7;
  --accent: #ff5a1f; --drive: #ff5a1f; --walk: #2ecc71; --visit: #5b6cff; --warn: #ffd166; --danger: #ff6b6b;
  --overlay: rgba(15,17,21,.92); --topbar: rgba(15,17,21,.92); --code: #0a0c10;
  --shadow: 0 2px 10px rgba(0,0,0,.28); --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
  --r-sm: 10px; --r: 14px; --r-lg: 18px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --hdr: 54px; --stick: 110px;
  color-scheme: dark;
}
html.light {
  --bg: #f4f5f8; --panel: #ffffff; --panel2: #eef0f4; --line: #e2e6ee; --border: #cfd5e0;
  --text: #15181e; --muted: #667085; --walk: #16a34a; --visit: #4f5fe6;
  --overlay: rgba(255,255,255,.95); --topbar: rgba(244,245,248,.92); --code: #eef0f4;
  --shadow: 0 2px 8px rgba(20,30,60,.08); --shadow-lg: 0 10px 28px rgba(20,30,60,.14);
  color-scheme: light;
}

/* ---------- 2. 기본 ---------- */
* { box-sizing: border-box; }
html { overflow-x: hidden; }
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
html, body { margin: 0; max-width: 100vw; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
body { padding-top: var(--hdr); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h3 { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 22px var(--sp-2); font-size: 14px; line-height: 1.6; }

/* 폼 컨트롤 공통 */
input:not([type]), input[type=text], input[type=number], input[type=search], input[type=password] {
  width: 100%; background: var(--panel2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 16px; outline: none; transition: border-color .15s; }
input:focus { border-color: var(--accent); }
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px var(--panel2) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); border: 1px solid var(--border); transition: background-color 9999s; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
code { display: block; background: var(--code); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--r-sm);
  word-break: break-all; font-size: 12px; user-select: all; }

/* 버튼 변형 */
.btn, .modal-box .row button, .modal-box .row .btn, .login-card button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; font-size: 15px;
  white-space: nowrap; background: var(--accent); color: #fff; transition: filter .15s, transform .05s; }
.btn:hover, .modal-box .row button:hover { filter: brightness(1.08); }
.btn:active, .modal-box .row button:active { transform: scale(.98); }
.ghost, .btn.ghost, .modal-box .row button.ghost { background: var(--panel2); color: var(--text); font-weight: 600; }
.danger, .modal-box .row button.danger { color: var(--danger); }
.list li .edit, .list li .mode, .datenav button, .cal-head button, .map-ctl button {
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.list li .edit:hover, .list li .mode:hover, .datenav button:hover, .cal-head button:hover { color: var(--text); border-color: var(--border); }

/* ---------- 3. 헤더 / 탭 / 날짜 ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--hdr);
  display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4);
  background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.logo-mark { color: var(--accent); font-size: 16px; }
.logo-text { display: inline; }
.logo b { color: var(--accent); font-weight: inherit; }
.tabs { display: flex; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--panel2); }
.tabs button { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.tabs button.active { background: var(--accent); color: #fff; }
.user { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; }
.user span { margin-right: 6px; white-space: nowrap; }
.user button, .user a { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-sm); font-size: 18px; color: var(--muted); }
.user button:hover, .user a:hover { color: var(--text); background: var(--panel2); }
.badge { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.datenav { position: sticky; top: var(--hdr); z-index: 19; display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 10px var(--sp-4); background: var(--topbar); backdrop-filter: blur(10px); }
.datenav button { width: 38px; height: 38px; font-size: 20px; line-height: 1; color: var(--text); }
.datenav button.ghost { width: auto; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.datenav button.datelabel, .datelabel { flex: 0 0 auto; width: auto !important; min-width: 0; height: 38px; padding: 0 var(--sp-3); line-height: 38px; border: 0 !important; background: transparent !important;
  font-weight: 800; font-size: 17px; color: var(--text) !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.datenav { flex-wrap: nowrap; overflow: visible; }
@media (max-width: 480px) { .datenav { gap: 6px; padding-left: var(--sp-2); padding-right: var(--sp-2); } .datenav button { width: 34px; height: 34px; } .datenav button.datelabel { font-size: 16px; } .datenav button.ghost { padding: 0 8px; } }

/* ---------- 4. 레이아웃 ---------- */
main { display: grid; gap: var(--sp-3); padding: 0 var(--sp-4) 48px; grid-template-columns: 1fr; }
.side { display: contents; }

/* ---------- 5. 카드 / 타일 ---------- */
.card, .tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card { padding: var(--sp-4); }
.card h3 { margin: 0 0 var(--sp-3); font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--muted); }
.card h3 + p { margin-top: -6px; }
.card p { margin: 0 0 var(--sp-3); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.tile { position: relative; overflow: hidden; padding: 14px 16px; min-width: 0; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border); }
.tile.drive::before { background: var(--drive); }
.tile.walk::before { background: var(--walk); }
.tile .k { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.tile .v { margin-top: 2px; font-size: 28px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .s { margin-top: 2px; color: var(--muted); font-size: 12px; }
.tile .cmp { margin-top: 4px; font-size: 11px; font-weight: 600; }
.cmp .up { color: var(--walk); } .cmp .down { color: var(--danger); } .cmp .flat { color: var(--muted); }
.goal { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.goal .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.goal .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--walk); transition: width .4s; }
.goal .bar i.done { background: var(--warn); }
.goal span { color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 건강 카드: 동일 크기 3칸, 같은 배경 */
.h-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.h-grid.three { grid-template-columns: repeat(3, 1fr); }
.h-big, .h-item { min-width: 0; padding: var(--sp-3); border-radius: var(--r); background: var(--panel2); }
.health .k, .h-item .k { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health .v { margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.h-big .v { color: var(--accent); }
.health .v small { margin-left: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.health .s { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
#homeWrap .v { font-size: 20px; }
#weightWrap { margin-top: var(--sp-4); }
#weightWrap .k { color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.card .tip, .tip { margin: var(--sp-4) 0 0; padding: 9px 12px; border-left: 3px solid var(--walk); border-radius: var(--r-sm);
  background: var(--panel2); font-size: 13px; }
.tip:empty { display: none; }
.nudge { border-color: rgba(255,209,102,.55); }
.nudge h3 { color: var(--warn); }

/* 차트 / 파이 */
.pie-row { display: flex; align-items: center; gap: var(--sp-4); }
.pie-row canvas { flex: none; max-width: 150px; max-height: 150px; }
.legend { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: var(--sp-2); padding: 3px 0; }
.legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.legend .pct { margin-left: auto; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 6. 리스트 (타임라인·장소·검색·관리) ---------- */
.list { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.list li:first-child { border-top: 0; }
.list li > div:nth-child(2) { flex: 1; min-width: 0; }
.list li.empty { display: block; cursor: default; }
.ic { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
.ic svg { width: 22px; height: 22px; display: block; }
.ic.visit, .ic.drive, .ic.walk, .ic.home, .ic.trans { border-radius: var(--r-sm); font-size: 13px; font-weight: 800; }
.ic.visit { background: var(--visit); color: #fff; }   /* 순위 숫자·달력 등 텍스트 아이콘용 */
.ic.walk { background: var(--walk); color: #fff; } .ic.drive { background: var(--drive); color: #fff; }
.list .main { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .sub { margin-top: 2px; color: var(--muted); font-size: 12px; }
.list .sub .cont { color: var(--warn); }
.list .memo { display: block; width: 100%; margin-top: 6px; padding: 6px 10px; font-size: 13px; border-radius: 8px; border: 1px dashed var(--border); background: transparent; color: var(--text); }
.list .memo::placeholder { color: var(--muted); }
.list .memo:focus { border-style: solid; border-color: var(--accent); background: var(--panel2); }
.list .memo:not(:placeholder-shown) { border-style: solid; background: var(--panel2); }
.list .memo.saved { border-color: var(--walk); }
.list .sub.addr:empty { display: none; }
.list .sub.addr { white-space: normal; word-break: keep-all; font-variant-numeric: tabular-nums; }
.list .stat { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.list .stat b { color: var(--text); font-weight: 600; }
.list .right { flex: none; text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .right small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.list li .edit, .list li .mode { flex: none; height: 32px; min-width: 32px; padding: 0 8px; font-size: 14px; }
.list li .mode { font-size: 12px; }
.list li .mode.ov { border-color: var(--warn); color: var(--warn); }
.list li .ign:hover { color: var(--danger); border-color: var(--danger); }
.list li.empty a { color: var(--accent); font-weight: 600; }
.list li .approve { background: var(--walk); border-color: var(--walk); color: #fff; }
.list li .pair.on { border-color: var(--accent); color: var(--accent); }
.pill { display: inline-block; padding: 2px 7px; border-radius: 999px; background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: middle; }

/* ---------- 7. 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--sp-4); background: rgba(0,0,0,.6); }
.modal-box { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden;
  padding: var(--sp-5); border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.modal-box h3 { margin: 0 0 var(--sp-2); font-size: 17px; font-weight: 800; }
.modal-box h3 .small { font-weight: 600; }
.modal-box .sec { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.modal-box p { margin: 0 0 var(--sp-2); }
.modal-box label { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-2) 0; font-size: 14px; color: var(--muted); }
.modal-box label input[type=text], .modal-box label input[type=number], .modal-box label input[type=password] { width: 150px; text-align: right; }
.modal-box label.chk { justify-content: flex-start; margin-top: var(--sp-3); cursor: pointer; color: var(--text); }
.modal-box code { margin: var(--sp-2) 0; }
.modal-box .list { max-height: 45vh; overflow-y: auto; overflow-x: hidden; margin-top: var(--sp-2); }
.modal-box .list:empty { display: none; }
.modal-box .row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.modal-box .row > * { flex: 1 1 0; min-width: 0; }
.modal-box .row > .wide { flex-basis: 100%; }
.modal-box a:not(.btn) { color: var(--accent); font-weight: 600; }

/* 달력 */
.cal { max-width: 360px; }
.cal-head { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin: 4px 0 var(--sp-3); }
.cal-head b { font-size: 17px; font-weight: 800; min-width: 150px; text-align: center; white-space: nowrap; }
.cal-head button { width: 38px; height: 38px; font-size: 20px; color: var(--text); border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-sm); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { padding: 4px 0; text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; }
.cal-grid .d { position: relative; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 5px; border-radius: var(--r-sm); font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.cal-grid .d .km { margin-top: 2px; font-size: 9.5px; line-height: 1.15; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-grid .d .km b { font-weight: 600; }
.cal-grid .d .km .dr { color: var(--drive); } .cal-grid .d .km .wk { color: var(--walk); }
.cal-grid .d.sel .km, .cal-grid .d.sel .km .dr, .cal-grid .d.sel .km .wk { color: #fff; }
.cal-grid .dow.sat, .cal-grid .d.sat { color: #4f8cff; }
.cal-grid .dow.sun, .cal-grid .d.sun, .cal-grid .d.hol { color: var(--danger); }
.cal-grid .d.hol .hn { font-size: 8.5px; line-height: 1; color: var(--danger); margin-top: 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .sat { color: #4f8cff; } .cal .sun { color: var(--danger); }
.cal { max-width: 420px; }
.cal-grid .d:hover { background: var(--panel2); }
.cal-grid .d.today { border-color: var(--accent); }
.cal-grid .d.sel { background: var(--accent); color: #fff; }
.cal-grid .d.has::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--walk); }
.cal-grid .d.sel.has::after { background: #fff; }
.cal-grid .d.empty { cursor: default; border: 0; }
#shot.busy { opacity: .5; pointer-events: none; }

/* ---------- 8. 로그인 / 가입 ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: var(--sp-4); }
.login-card { display: flex; flex-direction: column; gap: var(--sp-3); width: 100%; max-width: 360px;
  padding: 32px 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.login-card .logo { justify-content: center; font-size: 28px; }
.login-card p { margin: 0; text-align: center; }
.login-card button { width: 100%; }
.err { min-height: 1em; color: var(--danger); font-size: 13px; }

/* ---------- 9. 지도 ---------- */
.map { position: relative; isolation: isolate; width: 100%; height: 46vh; min-height: 280px; overflow: hidden;
  border-radius: var(--r-lg); border: 2px solid var(--border); background: var(--panel); box-shadow: var(--shadow-lg); }
.map > #map { width: 100%; height: 100%; }
.map > div { border-radius: var(--r-lg); }
.map::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 0 40px rgba(0,0,0,.3); }
html.light .map::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), inset 0 0 32px rgba(0,0,0,.06); }
html:not(.light) .map img[src*="daumcdn"], html:not(.light) .map img[src*="kakaocdn"] { filter: invert(1) hue-rotate(180deg) brightness(.9) saturate(.6); }
.map-ctl { position: absolute; right: 12px; bottom: 14px; z-index: 5; display: flex; flex-direction: column; gap: 6px; }
.map-ctl button { width: 40px; height: 40px; font-size: 20px; font-weight: 700; color: var(--text); background: var(--overlay); border-color: var(--border); box-shadow: var(--shadow); backdrop-filter: blur(6px); }
#locate { color: var(--text); }
#locate svg { display: block; }
#locate.busy { opacity: .5; }
#partners { font-size: 17px; }
#partners.on { border-color: var(--visit); box-shadow: 0 0 0 2px rgba(91,108,255,.35); }

.gt-label { padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--overlay); color: var(--text);
  font-size: 12px; font-weight: 700; white-space: nowrap; transform: translateY(-28px); box-shadow: var(--shadow); }
.gt-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--visit); border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(91,108,255,.35); }
.gt-pin { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--warn); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.gt-avatar { width: 28px; height: 28px; border-radius: 50%; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.gt-avatar svg { display: block; }
.gt-avatar.me, .gt-avatar.partner { animation: gt-pulse 1.8s ease-out infinite; }
.gt-me-label, .gt-partner-label { transform: translateY(18px); }
.gt-label.blue { border-color: #2f6fff; }
.gt-label.red { border-color: #e5484d; }
@keyframes gt-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,0,0,.25); } 100% { box-shadow: 0 0 0 14px rgba(0,0,0,0); } }

/* ---------- 10. 반응형 ---------- */
@media (max-width: 640px) {
  /* 모바일: 헤더 2줄 — 1줄 로고·아이콘, 2줄 탭(전체 폭 균등) */
  .top { height: auto; flex-wrap: wrap; gap: 0 var(--sp-2); padding: 8px var(--sp-3) 8px; }
  .logo { flex: 1; font-size: 19px; }
  .user { flex: none; gap: 0; order: 2; }
  .user span { display: none; }
  .tabs { order: 3; flex-basis: 100%; margin: 8px 0 0; }
  .tabs button { flex: 1; padding: 8px 0; font-size: 14px; }
}
@media (max-width: 420px) {
  .health .v { font-size: 19px; }
  .health .s { font-size: 10px; }
  .tile .v { font-size: 24px; }
}
@media (min-width: 900px) {
  main { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .side { display: grid; gap: var(--sp-3); }
  .map { position: sticky; top: var(--stick); align-self: start; height: calc(100vh - var(--stick) - 16px); }
}

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel2); }
.seg button { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg button.active { background: var(--accent); color: #fff; }

/* 내 장소 폼 */
.pform { margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r); background: var(--panel2); display: flex; flex-direction: column; gap: var(--sp-2); }
.pform input { background: var(--panel); }
.pf-row { display: flex; gap: var(--sp-2); }
.pf-row input { flex: 1; min-width: 0; }
.pf-row button { flex: none; padding: 0 14px; min-height: 42px; border-radius: var(--r-sm); font-weight: 700; }
#pfResults { max-height: 160px; }
#pfResults li { padding: 8px 0; }
#pfResults li .main { font-size: 14px; }
.pform .row { margin-top: 0; }
#myPlaces li .preset { color: var(--muted); }
#myPlaces li .edit { font-size: 13px; }

/* 타임라인 편집 토글 */
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.card-head h3 { margin: 0; }
.mini { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 700; }
.mini.on { border-color: var(--accent); color: var(--accent); }
#list:not(.editing) li .mode, #list:not(.editing) li .ign { display: none; }
.list .sub .wk { color: var(--walk); font-weight: 600; }
#list:not(.editing) li.edit-only { display: none; }

#play { font-size: 15px; }
#play.on { border-color: var(--accent); color: var(--accent); }
.gt-play-label { transform: translateY(20px); border-color: var(--accent); }

/* 경로 진행 화살표 */
.gt-arrow { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #fff; opacity: .95; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }

#playSpeed { width: 40px; height: 40px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--accent); background: var(--overlay); color: var(--accent); font-size: 11px; font-weight: 800; text-align: center; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* 모달 우상단 고정 닫기 */
.modal-box { position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; background: var(--panel2); color: var(--muted); font-size: 15px; font-weight: 700; box-shadow: var(--shadow); }
.modal-box > h3:first-of-type { padding-right: 40px; }
.modal-box.cal .cal-head { padding-right: 40px; padding-left: 40px; }
.modal-x:hover { color: var(--text); }
