:root {
  --bg: #f4f5f7;
  --card: #fff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111827;
  --ok: #059669;
  --warn: #b45309;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body:has(.sheet[open]) {
  overflow: hidden;
}

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

.app {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  margin: 0 auto;
  padding: calc(12px + var(--safe-t)) 16px calc(24px + var(--safe-b));
}

@media (min-width: 520px) {
  body { background: #e5e7eb; }
  .app {
    max-width: 430px;
    min-height: 100dvh;
    box-shadow: 0 0 0 1px var(--line);
  }
}

.page { display: none; }
.page.is-active { display: block; }
.page-result.is-active {
  display: block;
}

.bar {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 8px;
}
.bar-home {
  justify-content: space-between;
  gap: 12px;
}
.bar-home > div { min-width: 0; }
.account-btn i { font-size: 18px; color: var(--muted); }
.account-btn.is-on i { color: #00a5de; }
.bar-back {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.logo {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo i {
  font-size: 22px;
  color: #00a5de;
}
.lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search {
  position: relative;
  overflow: hidden;
}
.search-row {
  width: 100%;
  min-height: 72px;
  padding: 16px 52px 16px 16px;
  text-align: left;
}
.search-row:active { background: #f9fafb; }
.label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.value {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.value.is-empty { color: #9ca3af; font-weight: 500; }
.divider { height: 1px; background: var(--line); }
.swap {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
}

.btn {
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn:disabled { opacity: 0.35; }

.recent-wrap { margin-top: 28px; }
.recent-wrap h2 {
  margin: 0 0 10px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.recent {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.recent li + li { border-top: 1px solid var(--line); }
.recent button {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
}
.fav-list li {
  display: flex;
  align-items: stretch;
}
.fav-list .fav-route {
  flex: 1;
  min-width: 0;
}
.fav-list .fav-del {
  width: 52px;
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 16px;
  border-left: 1px solid var(--line);
}
.fav-list .fav-del:active { background: #fef2f2; color: #dc2626; }

#btn-favorite.is-on { color: #f59e0b; }

.auth-body { padding-top: 4px; }
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.auth-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-field {
  display: block;
  margin-bottom: 12px;
}
.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.auth-form .sheet-input { width: 100%; }
.auth-error {
  margin: 0 0 12px;
  font-size: 13px;
  color: #dc2626;
}
.auth-submit { margin-top: 4px; }
.btn-ghost {
  margin-top: 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.auth-user {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}
.auth-logout { margin-top: 0; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 42px;
  text-align: center;
}
.spacer { width: 44px; }

.route {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route span:nth-child(2) { margin: 0 6px; color: var(--muted); font-weight: 500; }

/* ── unified chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}
.chip em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}
.chip-live { color: var(--muted); }
.chip-live.is-on {
  color: var(--ok);
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.chip-origin {
  margin-top: 4px;
  background: color-mix(in srgb, var(--line-color, #00a5de) 10%, #fff);
  border-color: color-mix(in srgb, var(--line-color, #00a5de) 25%, #e5e7eb);
  color: var(--line-color, #00a5de);
}
.chip-map {
  max-width: 96px;
  margin-bottom: 4px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-map.is-active {
  background: color-mix(in srgb, var(--line-color, #00a5de) 8%, #fff);
  border-color: color-mix(in srgb, var(--line-color, #00a5de) 30%, #e5e7eb);
}
.chip-map.is-active em { color: var(--line-color, #00a5de); }

.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* ── route card (single panel) ── */
.route-card {
  --line-color: #00a5de;
  padding: 12px 14px 14px;
  margin-bottom: 10px;
  border-top: 3px solid var(--line-color);
}
.route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.route-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.route-line[hidden] { display: none !important; }

.route-summary {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.route-summary-eta {
  min-width: 88px;
}
.route-summary-info {
  min-width: 0;
  text-align: left;
}
.route-eta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.route-eta strong {
  display: block;
  margin-bottom: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.05;
}
.route-eta span { font-weight: 600; }
.route-loc {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: keep-all;
  color: var(--text);
}
.route-meta {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
  word-break: keep-all;
}
.route-meta:empty { display: none; }

.train-pick {
  margin: 10px 0 0;
}
.train-pick-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.train-pick-dot {
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #f3f4f6;
  border: 1px solid transparent;
}
.train-pick-dot.is-active {
  color: var(--line-color, #00a5de);
  background: color-mix(in srgb, var(--line-color, #00a5de) 10%, #fff);
  border-color: color-mix(in srgb, var(--line-color, #00a5de) 35%, #e5e7eb);
}
.train-pick-row {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: #f3f4f6;
}
.train-pick-btn {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 0;
}
.train-pick-btn.is-active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08);
}
.train-pick-hint {
  margin: 8px 4px 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.btn-check-eta {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--line-color, #00a5de);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.btn-check-eta[hidden] { display: none !important; }
.route-eta-wrap[hidden] { display: none !important; }

.route-board-block {
  flex-shrink: 0;
  margin: 0 -2px;
}

.route-map-hint {
  margin: 0 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.route-board-viewport {
  height: 118px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  padding: 4px 0 6px;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 14px,
    #000 calc(100% - 14px),
    transparent 100%
  );
}
.route-board-viewport::-webkit-scrollbar { display: none; }

.route-kakao {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.route-kakao-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.route-kakao-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.route-kakao-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.route-kakao-empty {
  margin: 0;
  padding: 28px 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  background: #f9fafb;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.kakao-map-wrap {
  width: 100%;
  height: 440px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e5e7eb;
}

.map-picto-btn {
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transform: rotate(var(--bearing, 0deg));
  will-change: transform;
}
.map-picto {
  display: grid;
  place-items: center;
  color: var(--line-color, #007aff);
}
.map-picto-train {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--line-color, #007aff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.map-picto-train i {
  font-size: 14px;
  line-height: 1;
}
.map-picto-btn.is-active .map-picto-train {
  width: 36px;
  height: 36px;
  border-width: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}
.map-picto-btn.is-active .map-picto-train i {
  font-size: 17px;
}
.map-picto-btn.is-dim {
  opacity: 0.9;
  transform: rotate(var(--bearing, 0deg)) scale(0.94);
}

.map-picto-stop {
  width: auto;
  height: auto;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}
.map-picto-stop i {
  font-size: 9px;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 1.5px var(--line-color, #007aff);
  paint-order: stroke fill;
}
.map-picto-stop.is-origin i {
  font-size: 20px;
  color: var(--line-color, #007aff);
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.map-picto-stop.is-dest i {
  font-size: 18px;
  color: #ef4444;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.map-train {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--line-color, #00a5de);
  border: 0;
  background: transparent;
  padding: 2px;
  cursor: pointer;
}
.map-train-dir {
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
}
.map-train-status {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  white-space: nowrap;
}
.map-train-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-color, #00a5de);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.map-train-icon i { font-size: 12px; line-height: 1; }
.map-train.is-active .map-train-icon {
  width: 28px;
  height: 28px;
  border-width: 3px;
}
.map-train.is-active .map-train-icon i { font-size: 14px; }
.map-train.is-dim { opacity: 0.9; }
.map-train.is-dim .map-train-icon {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
}
.map-train.is-dim .map-train-icon i { font-size: 12px; }
.map-train.is-dim .map-train-dir,
.map-train.is-dim .map-train-status {
  display: block;
  opacity: 0.72;
}

.timeline-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  width: 100%;
}

.h-board {
  display: block;
  padding: 8px 0 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.h-rail {
  position: relative;
  margin: 0;
  min-height: 88px;
  --line-y: 36px;
  --line-h: 4px;
  --track-cy: calc(var(--line-y) + var(--line-h) / 2);
  --name-y: calc(var(--track-cy) + 20px);
}
.h-line {
  position: absolute;
  top: var(--line-y);
  height: var(--line-h);
  border-radius: 99px;
  background: var(--line-color);
  z-index: 0;
}
.h-stops {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  height: 100%;
  z-index: 1;
}
.h-stop {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: max-content;
  max-width: none;
  text-align: center;
  pointer-events: none;
}
.h-stop.is-origin {
  left: auto;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  min-width: 0;
  padding-right: 0;
}
.h-name {
  display: block;
  position: absolute;
  top: var(--name-y);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  z-index: 2;
}
.h-stop.is-origin .h-name {
  font-weight: 800;
  color: var(--line-color);
}
.h-stop.is-dest .h-name {
  font-weight: 800;
  color: #ef4444;
}
.h-stop.is-dest .h-dot {
  background: #ef4444;
  border-color: #fff;
  box-shadow: 0 0 0 1px #ef4444;
}
.h-dot {
  display: block;
  position: absolute;
  top: var(--track-cy);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-color);
  z-index: 1;
  box-sizing: border-box;
}
.h-stop.is-covered .h-dot {
  visibility: hidden;
}
.h-train-pin {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  z-index: 4;
  width: 72px;
  height: calc(var(--track-cy) + 14px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.h-pin-dir {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  font-size: 9px;
  font-weight: 800;
  color: var(--line-color);
  white-space: nowrap;
  line-height: 1.1;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #f9fafb;
}
.h-pin-status {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  color: #374151;
  background: #e5e7eb;
}
.h-pin-status.is-dwell {
  color: #b45309;
  background: #fef3c7;
}
.h-pin-status.is-approaching {
  color: #0369a1;
  background: #e0f2fe;
}
.h-pin-status.is-cruising {
  color: #4b5563;
  background: #f3f4f6;
}
.h-pin-status.is-departing {
  color: #7c3aed;
  background: #ede9fe;
}
.h-train-pin.is-active .h-pin-status {
  font-size: 8px;
}
.h-train-pin.is-dim .h-pin-status {
  display: none;
}
.h-train-pin.is-dim .h-pin-dir {
  display: block;
  opacity: 0.78;
  font-size: 8px;
}
.h-pin-icon {
  position: absolute;
  top: var(--track-cy);
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f9fafb;
  border: 2px solid var(--line-color);
  color: var(--line-color);
  box-shadow: 0 0 0 2px #f9fafb;
  box-sizing: border-box;
}
.h-train-pin.is-active .h-pin-icon {
  width: 26px;
  height: 26px;
  border-width: 3px;
  box-shadow: 0 0 0 3px #f9fafb, 0 2px 6px rgba(17, 24, 39, 0.1);
}
.h-train-pin.is-active .h-pin-dir {
  font-size: 10px;
}
.h-train-pin.is-dim {
  opacity: 0.92;
}
.h-train-pin.is-dim .h-pin-icon {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
  background: #fff;
  box-shadow: 0 0 0 2px #f9fafb, 0 1px 5px rgba(17, 24, 39, 0.14);
}
.h-pin-icon i { font-size: 11px; }
.h-train-pin.is-active .h-pin-icon i { font-size: 12px; }
.h-train-pin.is-dim .h-pin-icon i { font-size: 11px; }

.h-stop.is-origin .h-dot {
  width: 14px;
  height: 14px;
  border-width: 3px;
}

.route-queue {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.route-queue[hidden] { display: none !important; }
.route-next {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.route-next + .route-next {
  border-top: 1px solid var(--line);
}
.route-next-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.route-next-loc {
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-next-eta {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.route-foot {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  flex-shrink: 0;
}

.page-result .notice {
  flex-shrink: 0;
  margin-top: 8px;
}

.notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: var(--warn);
  font-size: 13px;
  line-height: 1.45;
}

.sheet {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--text);
}
.sheet::backdrop {
  background: rgba(17, 24, 39, 0.45);
}
.sheet-top[open] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: var(--vv-h, 100dvh);
  max-height: var(--vv-h, 100dvh);
  padding-top: var(--safe-t);
  box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.12);
  animation: sheet-top-in 180ms ease-out;
}
@keyframes sheet-top-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 4px 12px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.sheet-head strong {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}
.sheet-head-action {
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.sheet-head .icon-btn {
  flex-shrink: 0;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 12px 16px calc(8px + var(--safe-b));
}

.sheet-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  font-size: 17px;
  background: #f9fafb;
  flex-shrink: 0;
}
.sheet-input:focus {
  border-color: #9ca3af;
  background: #fff;
}

.sheet-list {
  flex: 1;
  overflow: auto;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.sheet-list::-webkit-scrollbar { display: none; }

.sheet-item {
  width: 100%;
  min-height: 60px;
  padding: 14px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sheet-item:active { background: #f3f4f6; }
.sheet-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.line-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.sheet-empty {
  margin: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 520px) {
  .sheet-top[open] {
    inset: 12px auto auto auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(430px, calc(100% - 24px));
    max-width: 430px;
    height: min(640px, var(--vv-h, 92dvh));
    max-height: min(640px, var(--vv-h, 92dvh));
    border-radius: var(--radius);
    border: 1px solid var(--line);
  }
  @keyframes sheet-top-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
}
