﻿:root {
  --bg: #0d0d12;
  --surface: #16161f;
  --surface2: #1e1e2a;
  --border: #2a2a3a;
  --accent: #6366f1;
  --accent-h: #818cf8;
  --text: #e8e8f0;
  --muted: #7878a0;
  --danger: #f87171;
  --success: #4ade80;
  --sidebar-w: 230px;
  --radius: 10px;
}
[data-theme="light"] {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface2: #ebebf2;
  --border: #d8d8e8;
  --accent: #6366f1;
  --accent-h: #4f46e5;
  --text: #18182a;
  --muted: #6b6b90;
  --danger: #ef4444;
  --success: #16a34a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 모바일 맨 위로 버튼 ── */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 72px; right: 16px;
  z-index: 900;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(12px) scale(.9);
  transition: opacity .25s, transform .25s;
  display: none;
  align-items: center;
  justify-content: center;
}
#scrollTopBtn svg { display: block; }
#scrollTopBtn.visible { opacity: 1; transform: translateY(0) scale(1); }
#scrollTopBtn:active { transform: translateY(0) scale(.93); }
@media (max-width: 768px) {
  #scrollTopBtn { display: flex; }
}

/* ── 페이지 로딩 바 ── */
#_loadingBar {
  position: fixed; top: 0; left: 0; z-index: 99999;
  height: 3px; width: 0;
  background: var(--accent);
  pointer-events: none;
  transition: none;
}
#_loadingBar.loading-bar-active {
  width: 80%;
  transition: width 8s cubic-bezier(0.1, 0.05, 0, 1);
}
#_loadingBar.loading-bar-done {
  width: 100% !important;
  transition: width 0.15s ease, opacity 0.2s ease 0.15s;
  opacity: 0;
}
html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ── SIDEBAR ── */
#sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-logo {
  padding: 18px 16px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.sidebar-section { padding: 10px 0 2px; }
.sidebar-sec-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 16px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
  user-select: none;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { color: var(--text); background: rgba(99,102,241,0.1); }
.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2.5px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-col-expand { width: 14px; flex-shrink: 0; font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.nav-col-expand span { cursor: pointer; padding: 2px; line-height: 1; }
.nav-col-expand span:hover { color: var(--text); }
.nav-more-btn { font-size: 11px; color: var(--muted); justify-content: center; padding: 4px 12px; }
.nav-count {
  flex-shrink: 0;
  font-size: 10.5px;
  background: var(--surface2);
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 400;
}
.nav-vis { font-size: 11px; flex-shrink: 0; opacity: 0.6; }
.sidebar-add-btn {
  margin: 8px 12px 16px;
  padding: 9px 12px;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s;
  flex-shrink: 0;
}
.sidebar-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-user {
  margin: auto 12px 14px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-user-top { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.sidebar-user-avatar { font-size: 16px; flex-shrink: 0; }
.sidebar-user-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
.sidebar-action-btn { display: flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 11.5px; padding: 5px 8px; font-family: inherit; transition: all .12s; white-space: nowrap; }
.sidebar-action-btn:hover { color: var(--text); border-color: var(--muted); }
.sidebar-action-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout-btn { background: transparent; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 5px; border-radius: 4px; font-family: inherit; line-height: 1; }
.sidebar-logout-btn:hover { color: var(--danger); }

/* ── MAIN ── */
#main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; overflow-x: hidden; }
#topbar {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  flex-shrink: 0;
}
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 7px;
  transition: all 0.12s;
  border: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.back-btn:hover { color: var(--text); border-color: var(--muted); }
.search-wrap { position: relative; flex: 1; }
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px 9px 34px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }
.topbar-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-btn-primary { background: var(--accent); color: #fff; }
.topbar-btn-primary:hover { background: var(--accent-h); }
.topbar-btn-primary:active { transform: scale(0.97); }
.topbar-btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.topbar-btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ── CONTENT ── */
#content { flex: 1; padding: 24px 20px; min-width: 0; overflow-x: hidden; }

/* ── COLLECTION CARDS ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cols-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 32px; }
.col-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.col-card:hover {
  transform: translateY(-2px);
  border-color: var(--col-color, var(--accent));
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.col-card-banner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.col-card-icon { font-size: 34px; line-height: 1; }
.col-card-vis {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(4px);
}
.vis-public { background: rgba(74,222,128,0.2); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.vis-private { background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.1); }
.col-card-edit {
  position: absolute;
  top: 8px; left: 8px;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: all 0.12s;
  font-family: inherit;
  backdrop-filter: blur(4px);
}
.col-card:hover .col-card-edit { opacity: 1; }
.col-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.col-card-name { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; }
.col-card-owner { font-size: 11px; color: var(--accent); font-weight: 500; }
.col-card-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 17px;
}
.col-card-stats { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.col-sub-badge { font-size: 11px; background: rgba(108,99,255,.12); color: var(--accent); border-radius: 4px; padding: 1px 7px; }
.col-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; min-height: 20px; }
.col-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.col-card-empty {
  border: 1.5px dashed var(--border);
  background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 20px;
  min-height: 150px;
  gap: 7px;
  color: var(--muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.12s;
}
.col-card-empty:hover { border-color: var(--accent); color: var(--accent); }
.col-card-empty-icon { font-size: 26px; }

/* ── DISCOVER ── */
.discover-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.discover-tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: all 0.12s;
}
.discover-tab:hover { border-color: var(--accent); color: var(--accent); }
.discover-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager { display:flex; gap:4px; justify-content:center; align-items:center; padding:16px 0 4px; flex-wrap:wrap; }
.page-btn { min-width:32px; height:32px; border:1px solid var(--border); background:var(--card); color:var(--text); border-radius:6px; cursor:pointer; font-size:13px; padding:0 8px; transition:all 0.12s; }
.page-btn:hover:not(:disabled):not(.active) { border-color:var(--accent); color:var(--accent); }
.page-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; }
.page-btn:disabled { opacity:0.35; cursor:default; }
.page-btn.page-nav { font-size:16px; }
.page-ellipsis { font-size:13px; color:var(--muted); padding:0 2px; line-height:32px; }
.more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}
.more-btn button {
  padding: 9px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.more-btn button:hover { border-color: var(--accent); color: var(--accent); }
.discover-search-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.discover-search-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.discover-search-input-wrap { position: relative; margin-bottom: 14px; }
.discover-search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.discover-search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 10px 36px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.discover-search-input:focus { border-color: var(--accent); }
.discover-search-input::placeholder { color: var(--muted); }
.tag-cloud { display: flex; gap: 7px; flex-wrap: wrap; transition: max-height .25s ease; }
.tag-cloud-more-btn { margin-top:8px; background:none; border:none; color:var(--accent); font-size:12px; font-family:inherit; cursor:pointer; padding:2px 4px; }
.tag-cloud-more-btn:hover { text-decoration:underline; }
.tag-cloud-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface2);
  user-select: none;
}
.tag-cloud-pill:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-cloud-pill.size-lg { font-size: 13px; padding: 6px 14px; }
.tag-cloud-pill.size-sm { font-size: 11px; padding: 4px 10px; }
.dedup-notice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: 8px;
}

/* ── 브레드크럼 ── */
.col-breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.col-breadcrumb span:first-child { cursor: pointer; color: var(--accent); }
.col-breadcrumb span:first-child:hover { text-decoration: underline; }

/* ── 하위 컬렉션 패널 ── */
.sub-cols-section { margin-bottom: 16px; }
.sub-cols-label { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.sub-col-add-btn {
  font-size: 11px; font-family: inherit; font-weight: 500;
  padding: 2px 8px; border-radius: 5px;
  border: 1px dashed var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: color .12s, border-color .12s;
}
.sub-col-add-btn:hover { color: var(--accent); border-color: var(--accent); }
.sub-cols-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.sub-col-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color .12s;
  position: relative; font-size: 12px; color: var(--text);
}
.sub-col-card:hover { border-color: var(--accent); }
.sub-col-icon { font-size: 20px; }
.sub-col-name { font-size: 11.5px; font-weight: 500; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.sub-col-edit { position: absolute; top: 4px; right: 4px; font-size: 11px; opacity: 0; transition: opacity .12s; }
.sub-col-card:hover .sub-col-edit { opacity: 1; }


/* ── COLLECTION VIEW ── */
.col-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--col-color) 18%, transparent), color-mix(in srgb, var(--col-color) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--col-color) 30%, transparent);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.col-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.col-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.col-hero-icon { font-size: 44px; line-height: 1; flex-shrink: 0; }
.col-hero-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.col-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.col-hero-stats { font-size: 12px; color: var(--muted); }
.col-hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.8;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--col-color) 20%, transparent);
}
.col-view-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; flex-wrap: wrap; }
.col-secondary-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all 0.12s;
  font-family: inherit;
}
.icon-btn:hover { border-color: var(--text); color: var(--text); }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid rgba(74,222,128,0.35);
  background: rgba(74,222,128,0.1);
  color: #4ade80;
  cursor: pointer; font-family: inherit;
  transition: all 0.12s;
}
.share-btn:hover { background: rgba(74,222,128,0.18); }
.readonly-banner {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tag bar */
.tag-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tag-pill {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  user-select: none;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.tag-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Links grid */
#linksGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-content: start; }
.link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 9px;
  transition: all 0.15s;
  position: relative;
}
.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.1);
}
.link-card-row { display: flex; align-items: flex-start; gap: 10px; }
.link-favicon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 14px;
}
.link-favicon img { width: 18px; height: 18px; display: block; }
.link-text { flex: 1; min-width: 0; }
.link-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-host { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card-actions {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.link-card:hover .link-card-actions { opacity: 1; }
.card-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: all 0.12s;
  font-family: inherit;
}
.card-btn:hover { color: var(--text); border-color: var(--muted); }
.card-btn.del:hover { background: rgba(248,113,113,0.12); color: var(--danger); border-color: rgba(248,113,113,0.3); }
.card-btn.pin-active { color: var(--accent); border-color: var(--accent); background: rgba(99,102,241,.1); }
.link-pin-badge { font-size: 10px; margin-right: 3px; vertical-align: middle; }
.link-card.pinned { border-color: var(--accent); }

/* ── 링크 정렬 바 ── */
.link-sort-bar { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.link-sort-btn { font-size: 11.5px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-family: inherit; transition: all .12s; }
.link-sort-btn:hover { color: var(--text); border-color: var(--muted); }
.link-sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sort-drag-notice { font-size: 11.5px; color: var(--muted); margin-left: 6px; display: flex; align-items: center; gap: 4px; }
.sort-drag-notice-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 11.5px; font-family: inherit; padding: 0; text-decoration: underline; }

/* ── 하위 링크박스 페이지네이션 ── */
.sub-col-pager { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 0 4px; }
.sub-col-pager-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all .12s; font-family: inherit; }
.sub-col-pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.sub-col-pager-btn:disabled { opacity: .3; cursor: default; }
.sub-col-pager-num { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 12.5px; font-family: inherit; display: flex; align-items: center; justify-content: center; transition: all .12s; }
.sub-col-pager-num:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.sub-col-pager-num.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ── 숨김 처리 ── */
.hidden-notice { background: #7f1d1d22; border: 1px solid #ef444455; color: #fca5a5; font-size: 13px; padding: 10px 16px; border-radius: 10px; margin-bottom: 12px; }
.hidden-card-badge { display: inline-block; font-size: 10.5px; font-weight: 600; color: #fca5a5; background: #7f1d1d33; border: 1px solid #ef444444; border-radius: 4px; padding: 1px 5px; margin-right: 5px; vertical-align: middle; }

/* ── 공지사항 ── */
.announcements-section { margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.announcements-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.announcements-title { font-size: 13px; font-weight: 700; color: var(--text); }
.announcement-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.announcement-item:last-child { border-bottom: none; }
.announcement-body { flex: 1; min-width: 0; }
.announcement-item-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.announcement-item-content { font-size: 13px; color: var(--muted); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.announcement-item-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; opacity: .7; }
.announcement-del-btn { flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; line-height: 1; }
.announcement-del-btn:hover { color: var(--danger); }

/* ── 컬렉션 순서 변경 ── */
.col-sort-ghost { opacity: .4; background: rgba(99,102,241,.15); outline: 2px dashed var(--accent); border-radius: 12px; }
.home-col-card { cursor: grab; }
.home-col-card:active { cursor: grabbing; }

/* ── 복사 버튼 (픽피드 카드 하단) ── */
.col-card-fork-row {
  margin-top: 8px; padding: 5px 8px;
  font-size: 11.5px; color: var(--accent);
  border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; text-align: center;
  opacity: 0; transition: opacity .15s, background .15s;
}
.col-card:hover .col-card-fork-row { opacity: 1; }
.col-card-fork-row:hover { background: rgba(99,102,241,.1); border-color: var(--accent); }
.col-card-mod-btn {
  margin-top: 6px; width: 100%; padding: 4px 8px;
  font-size: 11px; font-family: inherit;
  background: rgba(239,68,68,.12); color: #ef4444;
  border: 1px solid rgba(239,68,68,.25); border-radius: 7px;
  cursor: pointer; opacity: 0; transition: opacity .15s;
}
.col-card:hover .col-card-mod-btn { opacity: 1; }
.col-card-mod-btn.btn-danger { background: rgba(74,222,128,.12); color: #4ade80; border-color: rgba(74,222,128,.25); }

/* ── 링크 일괄 선택 ── */
.bulk-card { cursor: pointer; transition: background .1s, border-color .1s; display: flex; align-items: center; gap: 10px; }
.bulk-card:hover { background: var(--surface); }
.bulk-selected { background: rgba(99,102,241,.1) !important; border-color: var(--accent) !important; }
.bulk-checkbox { font-size: 18px; line-height: 1; flex-shrink: 0; color: var(--muted); }
.bulk-selected .bulk-checkbox { color: var(--accent); }
.bulk-card .link-card-row { flex: 1; min-width: 0; }

.bulk-action-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); z-index: 9000;
  font-size: 13px; font-weight: 500;
}
.bulk-bar-count { color: var(--text); }
.bulk-bar-actions { display: flex; gap: 6px; }

/* ── share-btn 활성 상태 ── */
.share-btn.btn-active { background: rgba(99,102,241,.15); color: var(--accent); border-color: var(--accent); }

.link-desc { font-size: 12px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 18px; }
.link-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.link-source {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── RUNNING ── */
.running-header     { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.running-header-top { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.running-title      { font-size:20px; font-weight:700; flex-shrink:0; }
.running-header-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.running-subnav     { display:flex; gap:6px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding-bottom:2px; }
.running-subnav::-webkit-scrollbar { display:none; }
.running-tab {
  padding:6px 14px; border-radius:20px; font-size:13px; font-family:inherit;
  border:1px solid var(--border); background:transparent; color:var(--muted);
  cursor:pointer; transition:all 0.15s; flex-shrink:0; white-space:nowrap;
}
.running-tab:hover { border-color:var(--accent); color:var(--accent); }
.running-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }

.running-region-wrap {
  display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px;
}
.running-region-btn {
  padding:4px 12px; border-radius:16px; font-size:12px; font-family:inherit;
  border:1px solid var(--border); background:transparent; color:var(--muted);
  cursor:pointer; transition:all 0.15s;
}
.running-region-btn:hover { border-color:var(--accent); color:var(--accent); }
.running-region-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; }

.running-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.running-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; cursor:pointer; position:relative; transition:all 0.15s;
  display:flex; flex-direction:column; gap:8px;
}
.running-card:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow:0 6px 20px rgba(99,102,241,0.1); }
.running-card-cat   { font-size:22px; }
.running-card-title { font-size:14px; font-weight:600; line-height:1.4; }
.running-card-meta  { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.running-meta-chip  { font-size:11.5px; padding:2px 8px; border-radius:12px; background:var(--surface2); border:1px solid var(--border); color:var(--muted); }
.diff-badge         { font-size:11px; padding:2px 8px; border-radius:12px; color:#fff; font-weight:600; }

/* 코스 모달 네이버 검색 */
.running-naver-box   { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius); padding:12px; margin-bottom:16px; }
.running-naver-label { font-size:12px; font-weight:600; color:var(--muted); margin-bottom:8px; }
.running-naver-row   { display:flex; gap:8px; }
.running-naver-row .form-input { flex:1; }
.running-naver-results { margin-top:8px; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; max-height:220px; overflow-y:auto; }
.naver-result-item { padding:10px 12px; cursor:pointer; border-bottom:1px solid var(--border); transition:background 0.12s; }
.naver-result-item:last-child { border-bottom:none; }
.naver-result-item:hover { background:var(--surface2); }
.naver-result-title { font-size:13px; font-weight:600; margin-bottom:3px; }
.naver-result-desc  { font-size:11.5px; color:var(--muted); line-height:1.4; margin-bottom:3px; }
.naver-result-meta  { font-size:11px; color:var(--accent); }

/* 폼 2열 그리드 */
.form-row-2col { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(max-width:480px) { .form-row-2col { grid-template-columns:1fr; } }

/* 상세 뷰 */
.running-detail       { max-width:100%; }
.detail-topbar        { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.detail-topbar .running-back-btn { margin-bottom:0; }

/* 러닝 상세 2컬럼 */
.running-detail-layout { display:grid; grid-template-columns:1fr 280px; gap:32px; align-items:start; }
.running-detail-aside  { display:flex; flex-direction:column; gap:16px; }

/* 커뮤니티 상세 2컬럼 */
.comm-detail-layout  { display:grid; grid-template-columns:1fr 320px; gap:32px; align-items:start; }
.comm-detail-sidebar { position:sticky; top:16px; }
.detail-topbar-actions { display:flex; align-items:center; gap:8px; }
.detail-share-btn     { font-size:12px; }
.running-back-btn     { background:none; border:none; color:var(--accent); cursor:pointer; font-size:13px; padding:0; font-family:inherit; display:inline-flex; align-items:center; gap:3px; }
.running-back-btn:hover { text-decoration:underline; }
.detail-direct-urls   { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; margin-bottom:8px; }
.detail-direct-url-item { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:8px; background:var(--surface2); border:1px solid var(--border); color:var(--text); text-decoration:none; font-size:13px; transition:all .15s; }
.detail-direct-url-item:hover { border-color:var(--accent); color:var(--accent); }
.detail-direct-url-item img   { width:16px; height:16px; flex-shrink:0; }
.running-detail-header  { margin-bottom:20px; }
.running-detail-cat     { font-size:13px; color:var(--muted); margin-bottom:6px; }
.running-detail-title   { font-size:22px; font-weight:700; margin-bottom:6px; }
.running-detail-by      { font-size:12px; color:var(--muted); margin-bottom:12px; }
.running-detail-content { font-size:14px; line-height:1.7; color:var(--text); white-space:pre-wrap; margin-bottom:20px; padding:16px; background:var(--surface2); border-radius:var(--radius); border:1px solid var(--border); }
.running-detail-fields  { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.running-detail-row     { display:flex; align-items:center; gap:10px; font-size:13.5px; }
.running-detail-label   { font-size:12px; font-weight:600; color:var(--muted); min-width:80px; flex-shrink:0; }
.running-link-btn       { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:8px; background:var(--surface2); border:1px solid var(--border); color:var(--text); text-decoration:none; font-size:13px; transition:all 0.15s; }
.running-link-btn:hover { border-color:var(--accent); color:var(--accent); }

/* modal-wide */
.modal.modal-wide { max-width: 560px; }

/* ── 커뮤니티 ── */
.comm-type-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.comm-type-tab {
  padding:5px 14px; border-radius:20px; font-size:13px; font-family:inherit;
  border:1px solid var(--border); background:transparent; color:var(--muted);
  cursor:pointer; transition:all .15s;
}
.comm-type-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
.comm-sort-row { display:flex; gap:6px; margin-bottom:14px; }
.comm-sort-tab {
  padding:4px 12px; border-radius:16px; font-size:12px; font-family:inherit;
  border:1px solid var(--border); background:transparent; color:var(--muted);
  cursor:pointer; transition:all .15s;
}
.comm-sort-tab.active { background:var(--surface2); border-color:var(--accent); color:var(--accent); font-weight:600; }
.comm-search-wrap { position:relative; margin-bottom:14px; }
.comm-search-input {
  width:100%; padding:9px 12px 9px 34px;
  border-radius:8px; border:1px solid var(--border); background:var(--surface);
  color:var(--text); font-size:13.5px; font-family:inherit;
}
.comm-search-input:focus { outline:none; border-color:var(--accent); }
.comm-list { display:flex; flex-direction:column; gap:8px; }
.comm-card {
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:14px 16px; cursor:pointer; transition:border-color .12s;
}
.comm-card:hover { border-color:var(--accent); }
.comm-card-has-image { display:flex; gap:14px; align-items:flex-start; padding:12px 14px; }
.comm-card-thumb { width:96px; height:80px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.comm-card-body  { flex:1; min-width:0; }
.comm-source-links { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.comm-source-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 16px; background:var(--surface2); border:1px solid var(--border);
  border-radius:10px; font-size:13px; font-weight:500; color:var(--accent);
  text-decoration:none; transition:border-color .12s;
}
.comm-source-btn:hover { border-color:var(--accent); }
.comm-source-btn img  { width:14px; height:14px; }
.comm-source-host     { font-size:11px; color:var(--muted); margin-left:4px; }
.comm-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.comm-card-date { font-size:11px; color:var(--muted); }
.comm-card-title { font-size:15px; font-weight:600; margin-bottom:5px; line-height:1.3; }
.comm-card-preview { font-size:13px; color:var(--muted); line-height:1.5; margin-bottom:8px; }
.comm-card-foot { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.comm-card-comments { color:var(--accent); }
.comm-type-badge {
  display:inline-flex; align-items:center; gap:4px;
  font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:6px;
}
.comm-type-free  { background:rgba(59,130,246,.15);  color:#3b82f6; }
.comm-type-meet  { background:rgba(34,197,94,.15);   color:#22c55e; }
.comm-type-worry { background:rgba(245,158,11,.15);  color:#f59e0b; }
.comm-comments-section { margin-top:28px; border-top:1px solid var(--border); padding-top:20px; }
.comm-comments-title { font-size:14px; font-weight:700; margin-bottom:14px; }
.comm-comment { padding:12px 0; border-bottom:1px solid var(--border); }
.comm-comment:last-child { border-bottom:none; }
.comm-comment-meta { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.comm-comment-author { font-size:12.5px; font-weight:600; }
.comm-comment-date   { font-size:11.5px; color:var(--muted); }
.comm-comment-body   { font-size:13.5px; line-height:1.6; }
.comm-comment-form   { margin-top:16px; display:flex; flex-direction:column; gap:8px; }
.comm-comment-input  {
  width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--border);
  background:var(--surface); color:var(--text); font-size:13.5px; font-family:inherit; resize:vertical;
}
.comm-comment-input:focus { outline:none; border-color:var(--accent); }
.comm-comment-footer { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.comm-comment-len    { font-size:11.5px; color:var(--muted); }
.comm-type-select-row { display:flex; gap:8px; flex-wrap:wrap; }
.comm-type-opt { cursor:pointer; }
.comm-type-opt input[type="radio"] { display:none; }
.comm-type-opt span {
  display:inline-block; font-size:13px; padding:5px 14px; border-radius:20px;
  border:1.5px solid var(--border); background:transparent; color:var(--muted);
  transition:all .15s;
}
.comm-type-opt input[type="radio"]:checked + span {
  background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600;
}

/* 블로그 에디터 */
.comm-modal-blog { max-width: 700px; width: 95vw; }
.comm-blog-title-input {
  width:100%; font-size:20px; font-weight:700; padding:10px 0;
  border:none; border-bottom:2px solid var(--border); background:transparent;
  color:var(--text); font-family:inherit; margin-bottom:12px; outline:none;
}
.comm-blog-title-input:focus { border-bottom-color:var(--accent); }
.comm-editor-toolbar {
  display:flex; align-items:center; gap:2px; flex-wrap:wrap;
  padding:6px 8px; border-radius:8px 8px 0 0;
  background:var(--surface); border:1px solid var(--border); border-bottom:none;
}
.comm-editor-toolbar button {
  padding:4px 9px; border-radius:5px; border:none; background:transparent;
  color:var(--muted); cursor:pointer; font-family:inherit; font-size:13px;
  transition:background .12s, color .12s;
}
.comm-editor-toolbar button:hover { background:var(--bg); color:var(--text); }
.comm-preview-btn { margin-left:auto !important; color:var(--accent) !important; font-weight:600; }
.toolbar-sep { width:1px; height:18px; background:var(--border); margin:0 4px; flex-shrink:0; }
.comm-editor-body { position:relative; }
.comm-blog-editor {
  width:100%; min-height:260px; padding:14px; resize:vertical;
  border:1px solid var(--border); border-radius:0 0 8px 8px;
  background:var(--surface); color:var(--text);
  font-family:'Segoe UI', system-ui, sans-serif; font-size:14.5px; line-height:1.7;
}
.comm-blog-editor:focus { outline:none; border-color:var(--accent); }
.comm-blog-preview {
  min-height:260px; padding:14px;
  border:1px solid var(--accent); border-radius:0 0 8px 8px;
  background:var(--surface);
  overflow:hidden; width:100%; box-sizing:border-box;
}
.comm-ref-chips { display:flex; gap:8px; flex-wrap:wrap; min-height:28px; }
.comm-ref-chip {
  display:inline-flex; align-items:center; gap:6px;
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  padding:4px 10px; font-size:12.5px;
}
.comm-ref-chip button { background:none; border:none; cursor:pointer; color:var(--muted); font-size:11px; padding:0 2px; }
.comm-ref-chip button:hover { color:var(--danger); }

/* 마크다운 렌더 */
.comm-blog-content { font-size:15px; line-height:1.8; margin-bottom:24px; }
.comm-blog-content .md-h1 { font-size:24px; font-weight:700; margin:28px 0 10px; letter-spacing:-.3px; }
.comm-blog-content .md-h2 { font-size:20px; font-weight:700; margin:24px 0 8px; padding-bottom:6px; border-bottom:1px solid var(--border); }
.comm-blog-content .md-h3 { font-size:16px; font-weight:700; margin:20px 0 6px; }
.comm-blog-content .md-p  { margin:6px 0; }
.comm-blog-content .md-gap { height:10px; }
.comm-blog-content .md-quote {
  border-left:3px solid var(--accent); margin:12px 0; padding:8px 16px;
  background:color-mix(in srgb,var(--accent) 6%,transparent); border-radius:0 6px 6px 0;
  color:var(--muted); font-style:italic;
}
.comm-blog-content .md-list { padding-left:22px; margin:8px 0; }
.comm-blog-content .md-list li { margin-bottom:4px; }
.comm-blog-content .md-img { display:block; width:auto; max-width:100%; max-height:360px; object-fit:contain; border-radius:8px; margin:10px 0; }
.comm-blog-content .md-link { color:var(--accent); text-decoration:underline; }
.comm-blog-content .md-code {
  font-family:monospace; font-size:13px;
  background:color-mix(in srgb,var(--muted) 12%,transparent);
  padding:1px 5px; border-radius:4px;
}
.comm-blog-content strong { font-weight:700; }
.comm-blog-content em     { font-style:italic; }

/* 커뮤니티 상세 헤더 */
.comm-detail { max-width:100%; }
.comm-detail-header { margin-bottom:20px; }
.comm-detail-title { font-size:22px; font-weight:700; letter-spacing:-.3px; margin:8px 0 4px; line-height:1.3; }

/* 연결된 러닝 게시물 */
.comm-linked-runs { margin:20px 0; padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.comm-linked-title { font-size:13px; font-weight:700; color:var(--muted); margin-bottom:10px; }
.comm-linked-list { display:flex; flex-direction:column; gap:6px; }
.comm-linked-card {
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:8px; cursor:pointer;
  border:1px solid var(--border); background:var(--bg); transition:border-color .12s;
}
.comm-linked-card:hover { border-color:var(--accent); }
.comm-linked-cat  { font-size:18px; flex-shrink:0; }
.comm-linked-name { font-size:13.5px; font-weight:600; }
.comm-linked-meta { font-size:11.5px; color:var(--muted); margin-top:1px; }
.comm-linked-arrow { margin-left:auto; color:var(--muted); font-size:13px; flex-shrink:0; }

/* 러닝 피커 */
.rp-pick-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; cursor:pointer; border-bottom:1px solid var(--border);
  transition:background .1s;
}
.rp-pick-item:hover { background:var(--bg); }
.rp-pick-item.selected { background:color-mix(in srgb,var(--accent) 8%,transparent); }
.rp-pick-icon  { font-size:18px; flex-shrink:0; }
.rp-pick-title { flex:1; font-size:13.5px; }
.rp-pick-check { color:var(--accent); font-weight:700; font-size:15px; width:18px; text-align:center; flex-shrink:0; }

/* ── 자랑 카드 ── */
.running-card-brag              { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.running-card-brag .brag-card-thumb { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.running-card-brag .brag-card-body  { padding: 12px; flex:1; }
.running-card-brag.has-image .running-card-cat { display:none; }
.running-card-race              { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.race-card-thumb                { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.race-card-body                 { padding: 12px; flex:1; display:flex; flex-direction:column; gap:8px; }

/* ── 러닝 정렬 / 작성자 ── */
.running-sort-select       { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 5px 8px; font-size: 12px; cursor: pointer; }
.running-sort-select:focus { outline: none; border-color: var(--accent); }

.running-card-byline       { font-size: 11px; color: var(--muted); margin-top: 6px; }
.running-byline-author     { color: var(--accent); }

.running-detail-by         { font-size: 12px; color: var(--muted); margin-top: 4px; }
.detail-edited             { font-size: 11px; color: var(--muted); cursor: default; }

/* ── 대회 캘린더 ── */
.cal-toggle-btn            { padding: 6px 10px; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); border-radius: 8px; cursor: pointer; transition: all .2s; }
.cal-toggle-btn:hover,
.cal-toggle-btn.active     { background: var(--accent); border-color: var(--accent); color: #fff; }

.running-calendar          { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.cal-nav                   { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.cal-nav-title             { font-weight: 700; font-size: 16px; }
.cal-nav-btn               { background: var(--surface2); border: 1px solid var(--border); color: var(--text); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.cal-nav-btn:hover         { background: var(--accent); border-color: var(--accent); }

.cal-grid                  { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head                  { text-align: center; padding: 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); }
.cal-head.sun              { color: #f87171; }
.cal-head.sat              { color: #60a5fa; }

.cal-cell                  { min-height: 90px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); vertical-align: top; position: relative; }
.cal-cell:nth-child(7n)    { border-right: none; }
.cal-empty                 { background: var(--bg); opacity: .4; }
.cal-cell.sun .cal-day-num { color: #f87171; }
.cal-cell.sat .cal-day-num { color: #60a5fa; }
.cal-cell.today .cal-day-num {
  background: var(--accent); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
}
.cal-cell.has-races        { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }

.cal-day-num               { font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 4px; min-width: 22px; text-align: center; }

.cal-race-item             { font-size: 11px; background: var(--accent); color: #fff; border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: opacity .15s; }
.cal-race-item:hover       { opacity: .8; }
.cal-race-more             { font-size: 10px; color: var(--muted); padding-left: 4px; }

@media (max-width: 767px) {
  .cal-cell                { min-height: 60px; padding: 3px; }
  .cal-race-item           { font-size: 9px; padding: 1px 3px; }
  .cal-nav-title           { font-size: 14px; }
}

/* ── 후기 카드 ── */
.running-card-review { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }

/* ── 관리자 크롤러 패널 ── */
.crawler-panel       { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.crawler-grid        { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.crawler-card        { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.crawler-card-full   { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.crawler-card-full .crawler-log { width: 100%; margin: 0; }
.crawler-card-info   { flex: 1; min-width: 0; }
.crawler-card-title  { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.crawler-card-desc   { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.crawler-log         { font-size: 12px; line-height: 1.7; color: var(--muted); min-height: 0; }
@media (max-width: 600px) { .crawler-grid { grid-template-columns: 1fr; } }
.review-card-body    { display: flex; flex-direction: column; gap: 8px; }
.review-card-content { font-size: 13px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 자랑 갤러리 (상세) ── */
.brag-gallery            { display:flex; gap:8px; margin-bottom:16px; border-radius:12px; overflow:hidden; }
.brag-gallery a          { flex:1; min-width:0; display:block; }
.brag-gallery img        { width:100%; height:220px; object-fit:cover; object-position:center; display:block; border-radius:8px; transition:opacity .15s; image-rendering:auto; }
.brag-gallery img:hover  { opacity:.85; }
.brag-gallery.single a   { max-width:480px; }
.brag-gallery.many a     { max-height:180px; }
.brag-gallery.many img   { height:180px; }

/* ── 이미지 업로드 영역 ── */
.brag-upload-area            { border:2px dashed var(--border); border-radius:10px; padding:14px; display:flex; flex-direction:column; gap:10px; cursor:pointer; transition:border-color .15s, background .15s; }
.brag-upload-area:hover      { border-color:var(--accent); background:var(--surface2); }
.brag-upload-area.drag-over  { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 8%, transparent); }
.brag-drop-hint              { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 0; pointer-events:none; }
.brag-previews               { display:flex; gap:8px; flex-wrap:wrap; }
.brag-preview-item { position:relative; width:80px; height:80px; }
.brag-preview-item img { width:80px; height:80px; object-fit:cover; border-radius:8px; display:block; }
.brag-preview-remove {
  position:absolute; top:-6px; right:-6px;
  background:var(--danger); color:#fff; border:none;
  border-radius:50%; width:20px; height:20px;
  cursor:pointer; font-size:11px; line-height:20px; text-align:center; padding:0;
}

/* ── 연결된 refs 칩 (모달 내) ── */
.brag-ref-chips      { display:flex; flex-wrap:wrap; gap:6px; min-height:4px; }
.brag-ref-chip       { display:flex; align-items:center; gap:5px; padding:4px 8px; border-radius:20px; background:var(--surface2); border:1px solid var(--border); font-size:12px; max-width:220px; }
.brag-ref-chip span  { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brag-ref-chip button{ background:none; border:none; cursor:pointer; color:var(--muted); padding:0; font-size:12px; flex-shrink:0; }
.brag-ref-chip button:hover { color:var(--danger); }

/* ── 직접 URL 입력 ── */
.direct-url-input-row        { display:flex; gap:8px; align-items:center; }
.direct-url-input-row .form-input { flex:1; }
.direct-url-list             { display:flex; flex-direction:column; gap:4px; margin-top:6px; }
.direct-url-item             { display:flex; align-items:center; gap:8px; padding:5px 10px; border-radius:8px; background:var(--surface2); border:1px solid var(--border); font-size:12px; }
.direct-url-text             { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
.direct-url-item button      { background:none; border:none; cursor:pointer; color:var(--muted); padding:0; font-size:12px; flex-shrink:0; }
.direct-url-item button:hover{ color:var(--danger); }
.form-hint                   { font-size:11px; color:var(--muted); font-weight:400; }

/* ── 컬렉션 픽커 ── */
.ref-picker-col        { border-bottom:1px solid var(--border); }
.ref-picker-header     { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; gap:8px; background:var(--surface); }
.ref-picker-expand     { display:flex; align-items:center; gap:8px; flex:1; min-width:0; background:none; border:none; cursor:pointer; text-align:left; padding:0; color:var(--text); }
.ref-picker-expand:hover .ref-picker-name { color:var(--accent); }
.ref-picker-icon       { font-size:16px; flex-shrink:0; }
.ref-picker-name       { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
.ref-picker-count      { font-size:11px; color:var(--muted); flex-shrink:0; margin-left:4px; }
.ref-picker-add-btn    { background:var(--surface2); border:1px solid var(--border); border-radius:6px; width:28px; height:28px; cursor:pointer; font-size:13px; flex-shrink:0; transition:all .15s; color:var(--text); }
.ref-picker-add-btn:hover              { border-color:var(--accent); color:var(--accent); }
.ref-picker-add-btn[data-selected="1"] { background:var(--accent); border-color:var(--accent); color:#fff; }
.ref-picker-body       { padding:6px 14px 12px; display:flex; flex-direction:column; gap:6px; background:var(--bg); }
.ref-picker-section    { background:var(--surface); border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.ref-picker-sec-header { display:flex; align-items:center; justify-content:space-between; padding:6px 10px; font-size:12px; font-weight:600; color:var(--text); background:var(--surface2); border-bottom:1px solid var(--border); }
.ref-picker-link       { display:flex; align-items:center; justify-content:space-between; padding:7px 10px; gap:8px; border-bottom:1px solid var(--border); }
.ref-picker-link:last-child { border-bottom:none; }
.ref-picker-link-title { font-size:12.5px; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }

/* ── 상세뷰 embedded refs ── */
.embedded-refs             { display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.embedded-collection       { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); cursor:pointer; transition:border-color .15s; }
.embedded-collection:hover { border-color:var(--accent); }
.embedded-col-icon         { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.embedded-col-info         { flex:1; min-width:0; }
.embedded-col-name         { font-size:14px; font-weight:600; }
.embedded-col-desc         { font-size:12px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.embedded-col-meta         { font-size:11px; color:var(--muted); margin-top:3px; }
.embedded-col-arrow        { font-size:18px; color:var(--muted); flex-shrink:0; }
.embedded-section          { border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--surface); }
.embedded-sec-header       { padding:10px 14px; font-size:12px; font-weight:600; background:var(--surface2); border-bottom:1px solid var(--border); }
.embedded-sec-links        { display:flex; flex-direction:column; }
.embedded-link-row         { display:flex; align-items:center; gap:8px; padding:8px 14px; text-decoration:none; color:var(--text); border-bottom:1px solid var(--border); transition:background .12s; }
.embedded-link-row:last-child  { border-bottom:none; }
.embedded-link-row:hover   { background:var(--surface2); }
.embedded-link-favicon     { width:14px; height:14px; flex-shrink:0; opacity:.7; }
.embedded-link-title       { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.embedded-single-link      { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); text-decoration:none; color:var(--text); transition:border-color .15s; }
.embedded-single-link:hover { border-color:var(--accent); }
.embedded-single-info      { flex:1; min-width:0; }

/* ── SECTIONS ── */
.sections-wrap { display: flex; flex-direction: column; gap: 16px; }
.sections-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.sec-collapse-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 12px; padding: 0 2px; flex-shrink: 0; line-height: 1; transition: color .1s; }
.sec-collapse-btn:hover { color: var(--text); }
.col-link-search-wrap { margin-bottom: 10px; }
.col-link-search-input { width: 100%; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-family: inherit; outline: none; transition: border-color .15s; }
.col-link-search-input:focus { border-color: var(--accent); }
.btn-add-section {
  font-size: 12px; font-family: inherit;
  padding: 5px 14px; border-radius: 8px;
  border: 1px dashed var(--accent);
  background: transparent; color: var(--accent);
  cursor: pointer; transition: all 0.15s;
}
.btn-add-section:hover { background: rgba(99,102,241,0.08); }
.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  background: var(--surface);
}
.section-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  user-select: none;
  position: relative;
}
.section-icon { font-size: 14px; flex-shrink: 0; }
.section-name {
  font-size: 13px; font-weight: 600; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: default;
}

.section-count { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.section-actions { display: flex; gap: 4px; flex-shrink: 0; }
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px;
  min-height: 80px;
  align-content: start;
}
.section-drop-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 18px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  pointer-events: none;
}

.link-card.draggable         { cursor: grab; }
.link-card.draggable:active  { cursor: grabbing; }
.link-card.sortable-ghost { opacity: 0.35; background: var(--surface2); }
.link-card.sortable-drag  { box-shadow: 0 8px 28px rgba(0,0,0,0.18); transform: rotate(1deg); cursor: grabbing; }
.link-source-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Empty */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; grid-column: 1 / -1; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-desc { font-size: 13px; }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
  backdrop-filter: blur(6px);
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px 24px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px 24px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; letter-spacing: -0.2px; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; font-weight: 600; line-height: 1;
  color: var(--muted); padding: 2px 4px; border-radius: 6px;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.form-row { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; min-height: 68px; line-height: 1.5; }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Toggle */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-label-group { flex: 1; }
.toggle-label-title { font-size: 13.5px; font-weight: 600; }
.toggle-label-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.toggle-switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; border-radius: 20px; background: var(--border); cursor: pointer; transition: background 0.2s; }
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-track { background: rgba(74,222,128,0.3); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); background: #4ade80; }

/* Tag input in modal */
.tag-input-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex; flex-wrap: wrap; gap: 5px;
  cursor: text;
  transition: border-color 0.12s;
  min-height: 40px; align-items: center;
}
.tag-input-wrap:focus-within { border-color: var(--accent); }
.modal-tag-chip {
  background: rgba(99,102,241,0.15);
  color: var(--accent-h);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
  display: flex; align-items: center; gap: 3px;
}
.tag-rm { cursor: pointer; font-size: 15px; line-height: 1; color: var(--accent); border: none; background: none; padding: 0; font-family: inherit; display: flex; align-items: center; }
.tag-text-input { border: none; outline: none; background: transparent; color: var(--text); font-size: 13px; font-family: inherit; min-width: 80px; flex: 1; padding: 2px 0; }
.link-note { font-size: 12px; color: var(--muted); background: rgba(99,102,241,0.07); border-left: 2px solid var(--accent); padding: 5px 8px; border-radius: 0 6px 6px 0; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.link-note-input { min-height: 70px; resize: vertical; font-size: 13px; }
.tag-suggest-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-suggest-chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: border-color .12s, color .12s; }
.tag-suggest-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-text-input::placeholder { color: var(--muted); }

/* Pickers */
.color-row, .emoji-row { display: flex; gap: 7px; flex-wrap: wrap; }
.color-swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2.5px solid transparent; transition: transform 0.12s, border-color 0.12s; }
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.sel { border-color: #fff; transform: scale(1.15); }
.emoji-opt { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 18px; border-radius: 7px; cursor: pointer; border: 1.5px solid transparent; transition: all 0.12s; }
.emoji-opt:hover { background: var(--surface2); }
.emoji-opt.sel { background: var(--surface2); border-color: var(--accent); }
.emoji-more-btn { width: 100%; margin-top: 4px; padding: 4px; font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; font-family: inherit; text-align: center; }
.emoji-more-btn:hover { color: var(--accent); }

/* Modal footer */
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); align-items: center; }
.btn { padding: 9px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: all 0.12s; }
.btn-sm { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text); transition: all 0.12s; }
.btn-sm:hover { border-color: var(--muted); }
.btn-sm.btn-primary { border: none; }
.btn-sm.btn-danger { border-color: rgba(248,113,113,0.25); margin-right: 0; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-secondary { background: rgba(108,99,255,.15); color: var(--accent); border: 1px solid rgba(108,99,255,.3); }
.btn-secondary:hover { background: rgba(108,99,255,.25); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-danger { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); margin-right: auto; }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.hidden { display: none !important; }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── NOTEPAD ── */
.notepad-wrap { display:flex; height:calc(100vh - 56px); margin:-20px; overflow:hidden; }
.note-list-panel { width:220px; flex-shrink:0; border-right:1px solid var(--border); display:flex; flex-direction:column; overflow:hidden; background:var(--surface); }
.note-list-header { padding:10px 12px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.note-list-header-title { font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.note-new-btn { font-size:18px; background:none; border:none; cursor:pointer; color:var(--accent); padding:0 2px; line-height:1; }
.note-list-body { flex:1; overflow-y:auto; }
.note-list-section { padding:8px 12px 4px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.note-list-item { padding:10px 12px; cursor:pointer; border-bottom:1px solid var(--border); transition:background 0.1s; border-left:2px solid transparent; }
.note-list-item:hover { background:var(--card); }
.note-list-item.active { background:var(--accent)15; border-left-color:var(--accent); }
.note-list-title { font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.note-list-preview { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.note-list-date { font-size:10px; color:var(--muted); margin-top:3px; }
.note-received-item { padding:10px 12px; cursor:pointer; border-bottom:1px solid var(--border); transition:background 0.1s; border-left:2px solid transparent; }
.note-received-item:hover { background:var(--card); }
.note-received-item.active { background:var(--accent)15; border-left-color:var(--accent); }
.note-received-owner { font-size:12px; font-weight:600; }
.note-received-date { font-size:10px; color:var(--muted); margin-top:2px; }
.note-editor-panel { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.note-editor-inner { flex:1; padding:28px 32px; overflow-y:auto; display:flex; flex-direction:column; gap:0; }
.note-editor-title-input { font-size:22px; font-weight:700; border:none; background:transparent; outline:none; color:var(--text); width:100%; font-family:inherit; padding:0; }
.note-editor-meta { font-size:11px; color:var(--muted); margin:6px 0 16px; display:flex; align-items:center; gap:10px; }
.note-save-dot { width:6px; height:6px; border-radius:50%; background:var(--success); display:inline-block; }
.note-save-dot.saving { background:var(--muted); animation:pulse 1s infinite; }
.note-editor-content { flex:1; border:none; background:transparent; outline:none; color:var(--text); font-size:14px; line-height:1.85; resize:none; font-family:inherit; min-height:300px; width:100%; }
.note-editor-content[readonly] { cursor:default; }
.note-empty { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; color:var(--muted); }
.note-readonly-bar { background:var(--surface); border-bottom:1px solid var(--border); padding:8px 32px; font-size:12px; color:var(--muted); display:flex; align-items:center; gap:6px; flex-shrink:0; }
.note-delete-btn { background:none; border:none; cursor:pointer; font-size:12px; color:var(--danger); padding:0; font-family:inherit; }
.note-back-btn { background:none; border:none; cursor:pointer; font-size:12px; color:var(--accent); padding:0 0 0 2px; font-family:inherit; display:none; }
/* 공유 모달 */
.share-user-row { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--border); }
.share-user-id { font-size:13px; }
.share-revoke-btn { font-size:12px; color:var(--danger); background:none; border:none; cursor:pointer; font-family:inherit; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── MOBILE ── */
#mobileTopbar { display: none; }
#mobileDrawer { display: none; }
#mobileDrawerOverlay { display: none; }

/* 드로어 공통 구조 (display는 미디어쿼리에서 설정) */
#mobileDrawerOverlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.45);
  opacity: 0; transition: opacity 0.22s;
  pointer-events: none;
}
#mobileDrawerOverlay.open { opacity: 1; pointer-events: auto; }
#mobileDrawer {
  position: fixed; top: 0; right: -280px; bottom: 0;
  width: 260px; z-index: 201;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.25s cubic-bezier(.4,0,.2,1);
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
#mobileDrawer.open { right: 0; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  background: none; border: none; font-family: inherit;
  font-size: 15px; font-weight: 500; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.12s;
}
.drawer-item span { font-size: 19px; }
.drawer-item:hover { background: var(--hover); }
.drawer-item.active { color: var(--accent); background: rgba(99,102,241,0.08); }
.drawer-user {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.drawer-user strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.mobile-hamburger {
  display: none;
  flex-shrink: 0;
  width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 8px;
  background: none; font-size: 17px;
  cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
  font-family: inherit;
}
.mobile-search-btn {
  display: none;
  margin-left: auto; flex-shrink: 0;
  width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 8px;
  background: none; font-size: 15px;
  cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
  font-family: inherit;
}

@media (max-width: 900px) {
  .running-detail-layout { grid-template-columns: 1fr; }
  .comm-detail-layout    { grid-template-columns: 1fr; }
  .comm-detail-sidebar   { position:static; }
}

@media (max-width: 767px) {
  #app { grid-template-columns: 1fr; }
  #sidebar, #topbar { display: none; }
  #content { padding: 14px; }

  #mobileTopbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
  }
  #mobileDrawer { display: flex; }
  #mobileDrawerOverlay { display: block; }
  .mobile-hamburger { display: flex; }
  .mobile-search-btn { display: flex; }
  .mobile-back {
    width: 32px; height: 32px;
    border-radius: 7px; border: 1px solid var(--border);
    background: transparent; color: var(--muted);
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-family: inherit; flex-shrink: 0;
  }
  .mobile-logo {
    font-size: 15px; font-weight: 700; color: var(--accent);
    white-space: nowrap; display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  }
  .mobile-col-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

  .cols-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  #linksGrid { grid-template-columns: 1fr; }
  #toast { bottom: 16px; }
  .notepad-wrap { flex-direction:column; height:auto; margin:0; }
  .note-list-panel { width:100%; border-right:none; border-bottom:1px solid var(--border); max-height:300px; }
  .note-editor-panel { min-height:60vh; }
  .notepad-wrap.note-open .note-list-panel { display:none; }
  .notepad-wrap.note-open .note-editor-panel { min-height:calc(100dvh - 120px); }
  .note-back-btn { display:inline; }
  .note-editor-inner { padding:16px; }
  .col-card-banner { height: 68px; }
  .col-card-icon { font-size: 28px; }
  .discover-search-box { padding: 14px; }

  .col-hero-top { flex-wrap: wrap; }
  .col-view-actions { width: 100%; justify-content: flex-end; margin-top: 4px; }
  .col-hero-name { font-size: 18px; }
}
@media (max-width: 400px) { .cols-grid { grid-template-columns: 1fr; } }

/* ── 마이페이지 ── */
.mypage-wrap          { max-width:760px; margin:0 auto; }
.mypage-profile       { display:flex; align-items:center; gap:16px; margin-bottom:24px; padding:20px; background:var(--surface2); border-radius:var(--radius); border:1px solid var(--border); }
.mypage-avatar        { font-size:40px; line-height:1; }
.mypage-username      { font-size:18px; font-weight:700; margin-bottom:4px; }
.mypage-email         { font-size:13px; color:var(--muted); }
.mypage-tabs          { display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--border); padding-bottom:0; }
.mypage-tab           { background:none; border:none; border-bottom:2px solid transparent; padding:8px 16px; cursor:pointer; font-size:14px; color:var(--muted); font-family:inherit; margin-bottom:-1px; transition:all .15s; }
.mypage-tab.active    { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.mypage-tab:hover:not(.active) { color:var(--text); }
.mypage-section       { margin-bottom:28px; }
.mypage-section-title { font-size:13px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:10px; }
.mypage-row           { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; cursor:pointer; transition:background .12s; border:1px solid var(--border); margin-bottom:6px; background:var(--surface); }
.mypage-row:hover     { background:var(--surface2); border-color:var(--accent); }
.mypage-row-cat       { font-size:18px; flex-shrink:0; }
.mypage-row-title     { flex:1; font-size:14px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mypage-row-date      { font-size:11.5px; color:var(--muted); flex-shrink:0; }
.mypage-comment-row   { flex-direction:column; align-items:flex-start; gap:4px; }
.mypage-comment-post  { font-size:12px; color:var(--accent); font-weight:500; }
.mypage-comment-body  { font-size:13.5px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; }
.mypage-empty         { font-size:13px; color:var(--muted); padding:16px 0; }

/* ── 즐겨찾기 버튼 ── */
.col-bookmark-btn {
  position: absolute; bottom: 6px; right: 8px;
  background: rgba(0,0,0,.4); border: none; border-radius: 6px;
  font-size: 13px; padding: 3px 7px; cursor: pointer;
  color: rgba(255,255,255,.65); transition: color .15s, background .15s;
  z-index: 2; line-height: 1;
}
.col-bookmark-btn:hover { background: rgba(0,0,0,.65); color: #fff; }
.col-bookmark-btn.active { color: #fbbf24; }
.report-btn {
  background: none; border: none; cursor: pointer;
  font-size: 12px; padding: 2px 6px; border-radius: 6px;
  color: var(--muted); opacity: .55; transition: opacity .15s, color .15s;
  line-height: 1; white-space: nowrap;
}
.report-btn:hover { opacity: 1; color: var(--danger); }
.col-bookmark-col-btn {
  font-size: 12px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: color .12s, border-color .12s, background .12s;
  white-space: nowrap;
}
.col-bookmark-col-btn:hover { border-color: var(--accent); color: var(--accent); }
.col-bookmark-col-btn.active { background: rgba(99,102,241,.12); border-color: var(--accent); color: var(--accent); }

/* ── 링크 클릭수 배지 ── */
.link-click-badge {
  display: inline-block; margin-left: 6px;
  font-size: 10px; color: var(--muted); vertical-align: middle;
}

/* ── 러닝 조회수 배지 ── */
.running-view-badge { font-size: 10px; color: var(--muted); }

/* ── 러닝 카드 북마크 버튼 ── */
.running-bm-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.35); border: none; border-radius: 6px;
  font-size: 13px; padding: 3px 7px; cursor: pointer;
  color: rgba(255,255,255,.7); transition: color .15s, background .15s;
  z-index: 2; line-height: 1;
}
.running-bm-btn:hover { background: rgba(0,0,0,.6); color: #fff; }
.running-bm-btn.active { color: #fbbf24; }

/* ── 마이페이지 러닝 즐겨찾기 목록 ── */
.running-bm-list { display: flex; flex-direction: column; gap: 2px; }
.running-bm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; transition: background .12s;
}
.running-bm-item:hover { background: var(--surface2); }
.running-bm-cat { font-size: 20px; flex-shrink: 0; }
.running-bm-info { flex: 1; min-width: 0; }
.running-bm-title { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.running-bm-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.running-bm-remove-btn {
  flex-shrink: 0; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px;
  transition: color .12s, background .12s;
}
.running-bm-remove-btn:hover { color: var(--danger, #ef4444); background: rgba(239,68,68,.08); }

/* ── 공개 프로필 ── */
.profile-wrap { max-width: 800px; margin: 0 auto; padding: 24px 16px; }
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-avatar { font-size: 48px; }
.profile-info { flex: 1; }
.profile-username { font-size: 22px; font-weight: 700; color: var(--text); }
.profile-joined { font-size: 12px; color: var(--muted); margin-top: 4px; }
.profile-stats { display: flex; gap: 0; margin-bottom: 28px; background: var(--surface2); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.profile-stat { flex: 1; text-align: center; padding: 14px 8px; border-right: 1px solid var(--border); }
.profile-stat:last-child { border-right: none; }
.profile-stat-val { font-size: 20px; font-weight: 700; color: var(--accent); }
.profile-stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.profile-section-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 24px 0 12px; }
.empty-inline { font-size: 13px; color: var(--muted); padding: 12px 0; }
.profile-post-list { display: flex; flex-direction: column; gap: 2px; }
.profile-post-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.profile-post-item:hover { background: var(--surface2); }
.profile-post-cat { font-size: 20px; flex-shrink: 0; }
.profile-post-info { flex: 1; min-width: 0; }
.profile-post-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-post-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.profile-link { color: var(--accent); cursor: pointer; }
.profile-link:hover { text-decoration: underline; }

/* ── 러닝 좋아요 버튼 ── */
.running-like-btn {
  font-size: 12px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: all .12s;
  white-space: nowrap;
}
.running-like-btn:hover { border-color: #ef4444; color: #ef4444; }
.running-like-btn.active { background: rgba(239,68,68,.12); border-color: #ef4444; color: #ef4444; }
.running-like-display { font-size: 12px; color: var(--muted); }

/* ── 링크 클릭 통계 ── */
.stats-summary { display: flex; gap: 12px; margin-bottom: 20px; }
.stats-summary-item { flex: 1; background: var(--surface2); border-radius: 10px; padding: 14px; text-align: center; border: 1px solid var(--border); }
.stats-summary-val { font-size: 22px; font-weight: 700; color: var(--accent); }
.stats-summary-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stats-section-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.stats-link-list { display: flex; flex-direction: column; gap: 6px; }
.stats-link-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface2); border-radius: 8px; border: 1px solid var(--border); cursor: pointer; transition: border-color .12s; }
.stats-link-row:hover { border-color: var(--accent); }
.stats-rank { font-size: 13px; font-weight: 700; color: var(--muted); width: 20px; text-align: center; flex-shrink: 0; }
.stats-link-info { flex: 1; min-width: 0; }
.stats-link-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-link-col { font-size: 11px; color: var(--muted); margin-top: 1px; }
.stats-link-count { font-size: 12px; color: var(--accent); font-weight: 600; flex-shrink: 0; }
.stats-bar { height: 4px; background: var(--surface); border-radius: 2px; margin: 4px 0 2px; overflow: hidden; }
.stats-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s ease; }

/* ── 최근 본 링크 ── */
.history-list { display: flex; flex-direction: column; }
.history-date-sep { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.history-row:hover { background: var(--surface2); }
.history-fav { width: 28px; height: 28px; border-radius: 6px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; overflow: hidden; }
.history-fav img { width: 16px; height: 16px; display: block; }
.history-info { flex: 1; min-width: 0; }
.history-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.history-col { font-size: 11px; color: var(--accent); background: rgba(99,102,241,0.1); padding: 1px 6px; border-radius: 4px; }
.history-time { font-size: 11px; color: var(--muted); }

/* ── 컬렉션 잠금 ── */
.lock-note { font-size: 12px; color: var(--muted); background: rgba(99,102,241,0.07); border-left: 2px solid var(--accent); padding: 4px 8px; border-radius: 0 6px 6px 0; margin-top: 4px; }

/* ── 컬렉션 합치기 ── */
.merge-source-info { margin-bottom: 14px; }
.merge-source-chip { display: inline-block; padding: 5px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; font-size: 13px; font-weight: 600; }
.merge-warning { font-size: 12px; color: var(--danger); background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); border-radius: 8px; padding: 8px 12px; margin-top: 12px; line-height: 1.5; }

/* ── 관련 URL ── */
.extra-url-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.extra-url-section-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; opacity: .7; }
.extra-url-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.extra-url-pill { font-size: 11.5px; padding: 3px 9px 3px 7px; border-radius: 5px; background: transparent; border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: border-color .12s, color .12s, background .12s; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.extra-url-pill::before { content: ''; display: inline-block; width: 10px; height: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b91a7'%3E%3Cpath d='M8.75 3a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V4.81L7.28 10.78a.75.75 0 0 1-1.06-1.06L12.19 3.75H9.5A.75.75 0 0 1 8.75 3zM3.25 4A.25.25 0 0 0 3 4.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 11.75 14.5h-8.5A1.75 1.75 0 0 1 1.5 12.75v-8.5A1.75 1.75 0 0 1 3.25 2.5h3.5a.75.75 0 0 1 0 1.5h-3.5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: contain; flex-shrink: 0; }
.extra-url-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,.06); }
.extra-url-open-all { cursor: pointer; font-family: inherit; background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.3); color: var(--accent); font-weight: 600; }
.extra-url-open-all::before { display: none; }
.extra-url-open-all:hover { background: rgba(99,102,241,0.16); }
.extra-url-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.extra-url-label { width: 100px; flex-shrink: 0; }
.extra-url-input { flex: 1; min-width: 0; }
.extra-url-rm { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; flex-shrink: 0; line-height: 1; }
.extra-url-rm:hover { color: var(--danger); }

/* ── 팔로우 버튼 ── */
.follow-btn { font-size: 13px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; font-family: inherit; transition: all .12s; white-space: nowrap; }
.follow-btn:hover { background: var(--accent); color: #fff; }
.follow-btn.active { background: var(--surface2); border-color: var(--border); color: var(--muted); }
.follow-btn.active:hover { border-color: var(--danger); color: var(--danger); }

/* ── 픽피드 탭 ── */
.discover-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.discover-tab { font-size: 13px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-family: inherit; transition: all .12s; }
.discover-tab:hover { color: var(--text); border-color: var(--muted); }
.discover-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── OG 미리보기 ── */
.og-preview { margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); max-height: 160px; }
.og-preview img { width: 100%; object-fit: cover; max-height: 160px; display: block; }

/* ── 링크 썸네일 ── */
.link-thumbnail { margin: -14px -14px 0 -14px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; height: 110px; }
.link-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.link-card.has-thumbnail:hover .link-thumbnail img { transform: scale(1.04); }

/* ── 공유 배너 ── */
.share-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; background: var(--accent); padding: 10px 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.share-banner-inner { display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 0 auto; }
.share-banner-icon { font-size: 20px; flex-shrink: 0; }
.share-banner-text { flex: 1; min-width: 0; }
.share-banner-title { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-banner-url { font-size: 11px; color: rgba(255,255,255,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-banner-btn { padding: 6px 14px; font-size: 13px; flex-shrink: 0; }
.share-banner-close { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 18px; cursor: pointer; flex-shrink: 0; padding: 0 4px; line-height: 1; }
.share-banner-close:hover { color: #fff; }
.share-modal-preview { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.share-modal-url { font-size: 12px; color: var(--accent); word-break: break-all; }
.share-modal-title { font-size: 13px; font-weight: 600; margin-top: 4px; }

/* ── 전체 검색 오버레이 ── */
.gs-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 9000;
  align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.gs-overlay.active { display: flex; }
.gs-box {
  width: 100%; max-width: 580px; background: var(--surface);
  border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.4); overflow: hidden;
}
.gs-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.gs-search-icon { font-size: 18px; flex-shrink: 0; }
.gs-input { flex: 1; background: none; border: none; outline: none; font-size: 16px; color: var(--text); }
.gs-input::placeholder { color: var(--muted); }
.gs-esc-hint { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-family: inherit; background: var(--surface2); }
.gs-results { max-height: 440px; overflow-y: auto; padding: 8px 0; }
.gs-loading { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.gs-empty   { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.gs-group-title { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 16px 4px; text-transform: uppercase; letter-spacing: .05em; }
.gs-item { display: flex; align-items: center; gap: 12px; padding: 9px 16px; cursor: pointer; transition: background .1s; }
.gs-item:hover { background: var(--surface2); }
.gs-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.gs-info { flex: 1; min-width: 0; }
.gs-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-name mark { background: rgba(99,102,241,.25); color: var(--accent); border-radius: 2px; }
.gs-sub  { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .gs-overlay { padding-top: 20px; align-items: flex-start; } .gs-box { border-radius: 0 0 14px 14px; } }

/* ── 전체검색 하이라이트 ── */
@keyframes search-highlight-pulse {
  0%   { box-shadow: 0 0 0 3px var(--accent), 0 0 18px rgba(99,102,241,.35); outline: 2px solid var(--accent); }
  60%  { box-shadow: 0 0 0 3px var(--accent), 0 0 18px rgba(99,102,241,.35); outline: 2px solid var(--accent); }
  100% { box-shadow: none; outline: 2px solid transparent; }
}
.link-card.search-highlight { animation: search-highlight-pulse 2.5s ease-out forwards; }

/* ── 링크 가져오기 ── */
.import-guide { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.import-guide-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface2); }
.import-guide-tab { flex: 1; padding: 8px 4px; font-size: 12px; font-weight: 500; background: none; border: none; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; transition: color .12s, border-color .12s; }
.import-guide-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); }
.import-guide-tab:hover:not(.active) { color: var(--text); }
.import-guide-body { padding: 14px 16px; }
.import-guide-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.import-guide-steps li { font-size: 13px; color: var(--text); line-height: 1.5; }
.import-guide-steps code { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.import-csv-example { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font-size: 12px; margin: 10px 0 0; color: var(--text); line-height: 1.6; overflow-x: auto; }
.import-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.import-item { padding: 6px 8px; border-radius: 6px; }
.import-item:hover { background: var(--surface2); }
.import-item-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-item-url { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-item-more { font-size: 12px; color: var(--muted); padding: 6px 8px; text-align: center; }

/* ── 컬렉션 댓글 섹션 ── */
.col-comments-section { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 20px; }
.col-comments-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.col-comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
.col-comment:last-child { border-bottom: none; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.comment-time { font-size: 11px; color: var(--muted); }
.comment-del-btn { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 2px; opacity: 0; transition: opacity .12s; }
.col-comment:hover .comment-del-btn,
.comm-comment:hover .comment-del-btn { opacity: 1; }
.comment-content { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.comment-empty { font-size: 13px; color: var(--muted); padding: 12px 0; }
.comment-input-wrap { display: flex; gap: 8px; margin-top: 14px; align-items: flex-end; }
.comment-textarea { flex: 1; resize: vertical; min-height: 56px; font-family: inherit; font-size: 13.5px; }

/* ── 알림 패널 ── */
.notif-overlay { position: fixed; inset: 0; z-index: 1100; }
.notif-panel {
  position: fixed; top: 0; right: 0; width: 340px; max-width: 100vw; height: 100vh;
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 1101;
  box-shadow: -4px 0 24px rgba(0,0,0,.4);
}
.notif-panel.hidden { display: none; }
.notif-overlay.hidden { display: none; }
.notif-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.notif-panel-title { font-weight: 700; font-size: 14px; flex: 1; }
.notif-read-all-btn { font-size: 11px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.notif-read-all-btn:hover { border-color: var(--accent); color: var(--accent); }
.notif-close-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 0 4px; line-height: 1; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; cursor: pointer; transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: rgba(99,102,241,.06); }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 12.5px; line-height: 1.5; word-break: break-word; }
.notif-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.notif-del-btn { background: none; border: none; font-size: 16px; color: var(--muted); cursor: pointer; padding: 0; opacity: 0; flex-shrink: 0; }
.notif-item:hover .notif-del-btn { opacity: 1; }
.notif-empty, .notif-loading { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── 알림 벨 배지 ── */
.notif-bell-btn { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 8px;
  padding: 1px 4px; min-width: 14px; text-align: center; line-height: 14px;
  pointer-events: none;
}

/* ── LANDING PAGE ── */
.landing-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Hero */
.landing-hero {
  text-align: center;
  padding: 72px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.landing-hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 14px;
  border-radius: 20px;
}
.landing-hero-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
  letter-spacing: -.02em;
}
.landing-hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0;
}
.landing-hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.landing-cta-btn {
  padding: 12px 28px !important;
  font-size: 14px !important;
  border-radius: 10px !important;
}

/* Features */
.landing-features {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px;
}
.landing-feature-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 12px;
}
.landing-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.landing-feature-content { flex: 1; min-width: 0; }
.landing-feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.landing-feature-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.landing-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.landing-feature-list li {
  font-size: 13px;
  color: var(--text);
  opacity: .75;
}

/* How to use */
.landing-howto {
  padding: 48px 16px 32px;
  text-align: center;
}
.landing-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}
.landing-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.landing-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 140px;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.landing-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-step-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.landing-step-text strong { color: var(--text); }
.landing-step-arrow {
  font-size: 18px;
  color: var(--border);
  font-weight: 700;
}

/* CTA bottom */
.landing-cta-bottom {
  margin: 8px 16px 0;
  background: linear-gradient(135deg, var(--accent)22, var(--accent)08);
  border: 1px solid var(--accent)44;
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.landing-cta-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.landing-cta-sub {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .landing-hero { padding: 48px 16px 40px; }
  .landing-feature-card { flex-direction: column; gap: 14px; }
  .landing-feature-icon { width: 44px; height: 44px; font-size: 20px; }
  .landing-steps { gap: 6px; }
  .landing-step { min-width: 100px; max-width: 130px; padding: 10px 10px; }
  .landing-step-text { font-size: 11px; }
  .landing-step-arrow { display: none; }
}

/* ── ADMIN TABLE ── */
.admin-table { width:100%; border-collapse:collapse; font-size:13px; }
.admin-table th { text-align:left; padding:8px 10px; border-bottom:2px solid var(--border); color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.admin-table td { padding:10px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.admin-table tr:last-child td { border-bottom:none; }
.admin-table tr:hover td { background:var(--hover); }
.admin-row { cursor:pointer; }

/* ── 문의함 ── */
.inquiry-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; margin-bottom:12px; }
.inquiry-card.unread { border-color:var(--accent); }
.inquiry-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; font-size:12px; color:var(--muted); }
.inquiry-name { font-weight:700; color:var(--text); font-size:14px; }
.inquiry-email { color:var(--accent); text-decoration:none; }
.inquiry-email:hover { text-decoration:underline; }
.inquiry-badge { background:var(--accent); color:#fff; font-size:10px; font-weight:700; padding:2px 7px; border-radius:99px; letter-spacing:.04em; }
.inquiry-content { font-size:13px; line-height:1.6; white-space:pre-wrap; word-break:break-all; }
.inquiry-reply { margin-top:10px; padding:10px 12px; background:rgba(99,102,241,.08); border-radius:8px; font-size:13px; line-height:1.6; white-space:pre-wrap; }

/* ── 필터 버튼 가로 스크롤 행 (공통) ── */
.filter-scroll-row {
  display: flex; gap: 6px; margin-bottom: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-scroll-row::-webkit-scrollbar { display: none; }
.filter-scroll-row .discover-tab { flex-shrink: 0; white-space: nowrap; }

/* ── 모바일 전용 보정 (600px 이하) ── */
@media (max-width: 600px) {
  /* 모달 */
  .modal         { max-width: calc(100vw - 32px); padding: 16px 16px 18px; }
  .modal-wide    { max-width: calc(100vw - 32px); }
  .comm-modal-blog { max-width: calc(100vw - 32px); }
  .modal-overlay { padding: 12px; }

  /* 관리자 테이블 */
  .admin-table           { font-size: 11px; display: block; overflow-x: auto; }
  .admin-table th,
  .admin-table td        { padding: 6px 6px; white-space: nowrap; }

  /* 마이페이지 필터 버튼 행 */
  .mypage-section .discover-tab { padding: 5px 8px; font-size: 12px; }

  /* discover 탭 */
  .discover-tab  { padding: 7px 10px; font-size: 13px; }

  /* running 탭 */
  .running-tab            { padding: 5px 10px; font-size: 12px; }
  .running-region-btn     { padding: 3px 8px; font-size: 11px; }
  .running-sort-select    { font-size: 11px; padding: 4px 6px; max-width: 80px; }
  .running-header-actions { gap: 6px; }

  /* 커뮤니티 유형 탭 */
  .comm-type-tab { padding: 5px 10px; font-size: 12px; }
}

/* ── 모달 스크롤바 ── */
.modal-scroll::-webkit-scrollbar { width: 4px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.modal-scroll { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
