/* 레퍼런스 — 토스 느낌: 흰 바탕, 회색 면, 파란 단추, 큰 둥근 모서리, 굵고 또렷한 글자 */

:root {
  --blue: #3182f6;
  --blue-press: #1b64da;
  --blue-soft: #e8f3ff;
  --text: #191f28;
  --text-2: #4e5968;
  --text-3: #8b95a1;
  --line: #e5e8eb;
  --bg: #ffffff;
  --bg-2: #f2f4f6;
  --bg-3: #f9fafb;
  --red: #f04452;
  --green: #03b26c;
  --orange: #fe9800;
  --hero-bg: #191f28;
  --hero-fg: #ffffff;
  --hero-sub: #b0b8c1;
  --hero-track: rgba(255, 255, 255, .14);
  --card: #ffffff;
  --shadow: 0 2px 12px rgba(0, 29, 58, 0.06);
  --sheet-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #3182f6;
    --blue-press: #4f95f7;
    --blue-soft: #1c2a3f;
    --text: #f9fafb;
    --text-2: #c3c8cf;
    --text-3: #8b95a1;
    --line: #2c2c35;
    --bg: #17171c;
    --bg-2: #202027;
    --bg-3: #1d1d23;
    --card: #202027;
    --shadow: none;
    --sheet-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    --hero-bg: #24242c;
    --hero-sub: #9ea6b0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ── 상단 ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.brand { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.03em; cursor: pointer; }
.text-btn { color: var(--text-2); font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: 10px; }
.text-btn:active { background: var(--bg-2); }
.text-btn.small { font-size: 14px; padding: 6px 8px; }

.page {
  max-width: 1080px; margin: 0 auto;
  padding: 8px 20px calc(var(--tabbar-h) + 100px + env(safe-area-inset-bottom));
}

/* ── 검색 · 필터 ── */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border-radius: 14px; height: 50px; padding: 0 16px;
  color: var(--text-3);
}
.search svg { width: 20px; height: 20px; flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 17px; color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.filter-row { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.select-chip {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 36px; padding: 0 12px 0 14px; border-radius: 18px;
  background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: 14px;
}
.select-chip svg { width: 16px; height: 16px; }
.select-chip.on { background: var(--blue-soft); color: var(--blue); }
#viewModeBtn { padding: 0 14px; }

.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 17px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text-2);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

.count { color: var(--text-3); font-size: 14px; font-weight: 500; margin: 18px 2px 10px; }

/* ── 카드 목록 ── */
.grid { columns: 2; column-gap: 12px; }
@media (min-width: 640px) { .grid { columns: 3; column-gap: 16px; } }
@media (min-width: 960px) { .grid { columns: 4; } }
.item {
  break-inside: avoid; display: block; width: 100%; text-align: left;
  margin: 0 0 14px; border-radius: 16px; overflow: hidden;
  background: var(--card); transition: transform .15s ease;
}
.item:active { transform: scale(0.98); }
.item-img { display: block; width: 100%; height: auto; background: var(--bg-2); border-radius: 16px; min-height: 80px; }
.item-noimg {
  border-radius: 16px; background: var(--bg-2); padding: 16px; color: var(--text-2);
  font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.item-meta { padding: 8px 4px 2px; }
.item-title { font-weight: 700; font-size: 15px; line-height: 1.35; margin: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-artist { color: var(--text-3); font-size: 13px; font-weight: 500; margin-top: 2px; }
.item-count {
  position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.item-media { position: relative; }

/* 목록 보기 */
.grid.rows { columns: 1; }
.grid.rows .item { display: flex; gap: 14px; align-items: center; margin: 0; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.grid.rows .item-media { flex: none; width: 64px; height: 64px; }
.grid.rows .item-img, .grid.rows .item-noimg { width: 64px; height: 64px; min-height: 0; object-fit: cover; border-radius: 12px; padding: 0; font-size: 0; }
.grid.rows .item-count { display: none; }
.grid.rows .item-meta { padding: 0; min-width: 0; }
.grid.rows .item-memo { display: block; }
.item-memo { display: none; color: var(--text-2); font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { text-align: center; color: var(--text-3); padding: 64px 20px; font-size: 16px; line-height: 1.7; }
.empty strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; }
.empty .btn { margin-top: 18px; }

/* ── 작가 목록 ── */
.list { list-style: none; margin: 12px 0 0; padding: 0; }
.list li button {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 4px; border-radius: 14px;
}
.list li button:active { background: var(--bg-2); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 700; font-size: 17px; }
.list-sub { color: var(--text-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-count { color: var(--text-3); font-size: 15px; font-weight: 600; }

/* ── 작가 상세 ── */
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-weight: 600; font-size: 15px; padding: 6px 8px 6px 0; }
.back svg { width: 20px; height: 20px; }
.artist-head { display: flex; align-items: center; gap: 16px; margin: 16px 0 20px; }
.artist-name { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -0.03em; line-height: 1.25; }
.sub { color: var(--text-3); margin: 2px 0 0; font-weight: 500; }
.card { background: var(--bg-2); border-radius: var(--radius); padding: 20px; }
.ai-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ai-actions { display: flex; align-items: center; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.ai-text { white-space: pre-line; margin: 14px 0 0; font-size: 16px; line-height: 1.75; color: var(--text); }
.ai-text.muted { color: var(--text-3); }
.ai-edit { margin-top: 14px; }
.ai-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sources { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sources a { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: 4px 10px; text-decoration: none; }
.ai-note { color: var(--text-3); font-size: 13px; margin: 10px 0 0; }
.ai-note:empty { display: none; }
.section-title { font-size: 20px; font-weight: 800; margin: 32px 0 14px; }

/* ── 단추 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px; padding: 0 20px; border-radius: 14px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 17px;
  transition: background .15s, transform .1s;
}
.btn:active { background: var(--blue-press); transform: scale(0.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.small { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.ghost { background: var(--bg-2); color: var(--text-2); }
.btn.ghost:active { background: var(--line); }
.btn.danger { background: #ffeeee; color: var(--red); }
@media (prefers-color-scheme: dark) { .btn.danger { background: #3a1f23; } }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.ghost.loading::after { border-color: var(--line); border-top-color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

.fab {
  position: fixed; right: max(20px, calc(50% - 520px)); bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); z-index: 25;
  width: 58px; height: 58px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(49,130,246,.4);
  transition: transform .15s;
}
.fab:active { transform: scale(0.94); background: var(--blue-press); }
.fab svg { width: 28px; height: 28px; stroke-width: 2.4; }

/* ── 아래 탭 ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center; gap: 0;
  background: var(--bg); border-top: 1px solid var(--line);
}
.tab {
  flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); font-size: 12px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--text); }

/* ── 바텀시트 ── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 640px; margin: 0 auto; max-height: 92dvh;
  background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: var(--sheet-shadow);
  display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 720px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 24px; max-height: 88dvh; animation: pop .22s ease; }
}
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-body { overflow-y: auto; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet h2 { font-size: 22px; font-weight: 800; margin: 4px 0 18px; letter-spacing: -0.02em; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translateY(-46%); } }
@keyframes fade { from { opacity: 0; } }

/* 선택 목록 */
.options { list-style: none; margin: 0; padding: 0; }
.options button { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; font-size: 17px; font-weight: 500; border-radius: 12px; }
.options button:active { background: var(--bg-2); }
.options button.on { color: var(--blue); font-weight: 700; }
.options .n { color: var(--text-3); font-size: 15px; }

/* 입력 */
.form { display: flex; flex-direction: column; gap: 18px; }
.label { display: block; color: var(--text-2); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field {
  width: 100%; border: 0; outline: 0; background: var(--bg-2); border-radius: 14px;
  padding: 14px 16px; font-size: 17px; color: var(--text); resize: vertical;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s;
}
.field:focus { box-shadow: inset 0 0 0 2px var(--blue); background: var(--bg); }
.field::placeholder { color: var(--text-3); }
textarea.field { min-height: 120px; line-height: 1.6; }

.photos { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.photos::-webkit-scrollbar { display: none; }
.photo, .photo-add {
  flex: none; width: 92px; height: 92px; border-radius: 14px; position: relative; overflow: hidden; background: var(--bg-2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.uploading img { opacity: .4; }
.photo.uploading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px;
  border-radius: 50%; border: 2.5px solid rgba(49,130,246,.25); border-top-color: var(--blue); animation: spin .7s linear infinite;
}
.photo-del {
  position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center;
}
.photo-del svg { width: 14px; height: 14px; stroke-width: 2.6; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); font-size: 13px; font-weight: 600; border: 1.5px dashed var(--line); background: var(--bg-3); }

.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--bg-2); border-radius: 14px; padding: 10px 12px; min-height: 52px; }
.tag-input:focus-within { box-shadow: inset 0 0 0 2px var(--blue); background: var(--bg); }
.tag-input input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 2px; background: var(--blue-soft); color: var(--blue);
  font-size: 14px; font-weight: 600; border-radius: 8px; padding: 4px 6px 4px 10px;
}
.tag button { display: grid; place-items: center; width: 18px; height: 18px; color: inherit; }
.tag button svg { width: 12px; height: 12px; stroke-width: 2.8; }
.hint { color: var(--text-3); font-size: 13px; margin-top: 6px; }

/* 상세 */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: none; width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 16px; background: var(--bg-2); scroll-snap-align: center; cursor: zoom-in; }
.carousel.multi img { width: 88%; }
.dots { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 8px; font-weight: 600; }
.detail-title { font-size: 24px; font-weight: 800; margin: 18px 0 4px; letter-spacing: -0.02em; line-height: 1.3; }
.detail-artist { display: inline-flex; align-items: center; gap: 2px; color: var(--blue); font-weight: 700; font-size: 16px; }
.detail-artist svg { width: 16px; height: 16px; }
.detail-memo { white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 1.75; margin: 16px 0 0; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.detail-tags button { background: var(--bg-2); color: var(--text-2); font-size: 14px; font-weight: 600; border-radius: 8px; padding: 6px 10px; }
.detail-source { display: block; margin-top: 14px; color: var(--text-2); font-size: 14px; word-break: break-all; }
.detail-date { color: var(--text-3); font-size: 13px; margin-top: 16px; }
.detail-actions { margin-top: 24px; }

/* 사진 크게 보기 */
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; display: grid; place-items: center; animation: fade .15s; }
.viewer img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.viewer-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }

/* 알림 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #333d4b; color: #fff; padding: 14px 20px; border-radius: 14px; font-size: 15px; font-weight: 600;
  max-width: calc(100vw - 32px); width: max-content; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { break-inside: avoid; margin-bottom: 14px; border-radius: 16px; background: var(--bg-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.top-actions { display: flex; align-items: center; gap: 4px; }
.key-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 10px; border-radius: 18px;
  background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px;
}
.key-btn svg { width: 18px; height: 18px; }
.key-btn:active { opacity: .8; }

/* ── 분류 키맵 (전체 · 전시관 · 영화 · 그 외) ── */
.cat-tabs { display: flex; gap: 4px; margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: none; display: inline-flex; align-items: baseline; gap: 4px;
  padding: 8px 10px 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text-3); border-radius: 12px; position: relative;
}
.cat-tab:first-child { padding-left: 2px; }
.cat-tab .cat-n { font-size: 14px; font-weight: 700; color: var(--text-3); }
.cat-tab.on { color: var(--text); }
.cat-tab.on .cat-n { color: var(--blue); }
.cat-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--text); }
.cat-tab:first-child.on::after { left: 2px; }
.cat-tab:focus-visible, .seg-big button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.seg-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 14px; }
.seg-big button { height: 44px; border-radius: 11px; font-size: 16px; font-weight: 700; color: var(--text-3); }
.seg-big button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 29, 58, .12); }

.detail-cat { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 4px 10px; border-radius: 8px; }
.detail-cat + .detail-title { margin-top: 8px; }

/* ── 작성일 · 전시관 이름 ── */
.item-sub { color: var(--text-3); font-size: 12px; font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.detail-place { display: flex; gap: 8px; align-items: baseline; margin: 10px 0 0; font-size: 16px; font-weight: 600; color: var(--text); }
.detail-place span { flex: none; font-size: 13px; font-weight: 700; color: var(--text-3); }

/* ── AI 자동 채우기 ── */
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.label-row .label { margin: 0; }
.ai-fill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 6px 10px; border-radius: 10px; }
.ai-fill svg { width: 16px; height: 16px; }
.ai-fill:disabled { opacity: .5; }
.ai-hint { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 10px 12px; border-radius: 12px; }

/* ── 추가 방법 고르기 ── */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 18px; background: var(--bg-2); }
.choice:active { background: var(--line); }
.choice strong { display: block; font-size: 17px; }
.choice small { display: block; color: var(--text-2); font-size: 14px; margin-top: 2px; line-height: 1.45; }
.choice-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--blue); color: #fff; display: grid; place-items: center; }

/* ── 여러 장 진행 목록 ── */
.bulk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bulk-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg-3); }
.bulk-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; }
.bulk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bulk-main strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-main span { font-size: 13px; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-row.done .bulk-main span { color: var(--blue); }
.bulk-row.fail .bulk-main span { color: var(--red); }
.bulk-row.wait { opacity: .55; }
.spin { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--blue); animation: spin .7s linear infinite; }
.ai-merge-line { display: block; margin-top: 8px; color: var(--text); }
.ai-hint .btn { margin-top: 8px; }
.bulk-step { margin: -8px 0 12px; font-size: 15px; font-weight: 700; color: var(--blue); }
.bulk-thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.bulk-thumbs::-webkit-scrollbar { display: none; }
.bulk-thumbs img { flex: none; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.bulk-thumbs img.fail { opacity: .3; outline: 2px solid var(--red); }
.bulk-main strong em { font-style: normal; font-size: 13px; color: var(--blue); margin-left: 4px; }

/* ── 첫 화면 게임 카드: 전시 레벨 · AI 에너지 ── */
.hero {
  background: var(--hero-bg); color: var(--hero-fg); border-radius: 24px; padding: 20px;
  margin: 4px 0 18px; display: flex; flex-direction: column; gap: 10px;
}
.hero.levelup { animation: levelup .9s ease; }
@keyframes levelup { 30% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(49, 130, 246, .35); } }
@media (prefers-reduced-motion: reduce) { .hero.levelup { animation: none; } }
.hero-top { display: flex; align-items: center; gap: 14px; }
.lv-badge {
  flex: none; width: 60px; height: 60px; border-radius: 18px; background: var(--blue); color: #fff;
  display: flex; align-items: baseline; justify-content: center; padding-top: 12px;
  font-size: 30px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}
.lv-badge small { font-size: 13px; font-weight: 800; margin-right: 1px; opacity: .85; }
.hero-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hero-title span { font-size: 13px; font-weight: 700; color: var(--hero-sub); }
.hero-title strong { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.hero-visits { flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.1; }
.hero-visits b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-visits small { font-size: 12px; font-weight: 700; color: var(--hero-sub); }
.bar { display: block; height: 12px; border-radius: 6px; background: var(--hero-track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--blue); min-width: 6px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.xp { height: 14px; }
.bar.xp i { background: repeating-linear-gradient(90deg, var(--blue) 0 18px, #4c93f7 18px 22px); }
.bar-caption { margin: 0; font-size: 13px; font-weight: 600; color: var(--hero-sub); }
.bar-caption b { color: var(--hero-fg); }
.hero-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-chips span { font-size: 13px; font-weight: 600; color: var(--hero-sub); background: var(--hero-track); padding: 5px 10px; border-radius: 999px; }
.hero-chips b { color: var(--hero-fg); font-variant-numeric: tabular-nums; }
.energy {
  display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%;
  margin-top: 4px; padding: 14px; border-radius: 16px; background: var(--hero-track); color: var(--hero-fg);
}
.energy:active { opacity: .85; }
.energy-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
.energy-head b { font-variant-numeric: tabular-nums; }
.energy-label { display: inline-flex; align-items: center; gap: 4px; }
.energy-label svg { width: 16px; height: 16px; }
.energy-bar { background: rgba(255, 255, 255, .12); }
.energy-bar.high i { background: var(--green); }
.energy-bar.mid i { background: var(--orange); }
.energy-bar.low i { background: var(--red); }
.energy-bar.none i { background: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 8px, rgba(255,255,255,.12) 8px 16px); }
.energy-table { display: flex; flex-direction: column; gap: 8px; }
.energy-table div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); }
.energy-table span { color: var(--text-2); font-weight: 600; }
.energy-table b { font-variant-numeric: tabular-nums; }

/* ── 전시관 정보 팝업 ── */
.venue-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; padding-bottom: 2px; }
.venue-row::-webkit-scrollbar { display: none; }
.venue-row-label { flex: none; font-size: 13px; font-weight: 700; color: var(--text-3); margin-right: 2px; }
.venue-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 8px; border-radius: 17px; background: var(--blue-soft); color: var(--blue); font-size: 14px; font-weight: 700; white-space: nowrap; }
.venue-chip svg { width: 16px; height: 16px; }
.venue-chip b { font-size: 12px; opacity: .75; margin-left: 2px; }
.venue-link { width: 100%; text-align: left; padding: 12px 14px; margin-top: 12px; border-radius: 14px; background: var(--blue-soft); color: var(--text); flex-wrap: wrap; align-items: center; }
.venue-link svg { width: 16px; height: 16px; color: var(--blue); }
.venue-link em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--blue); margin-left: auto; }
.venue-title { margin-bottom: 4px !important; }
.venue-mine { margin: 0 0 14px; color: var(--text-2); font-size: 14px; }
.venue-mine b { color: var(--blue); }
.venue-maps { display: flex; gap: 8px; margin-bottom: 18px; }
.venue-maps .btn { flex: 1; text-decoration: none; gap: 4px; }
.venue-maps svg { width: 16px; height: 16px; }
.venue-loading { display: flex; align-items: center; gap: 10px; padding: 24px 4px; color: var(--text-2); font-weight: 600; font-size: 15px; }
.vinfo { display: flex; flex-direction: column; border-radius: 16px; background: var(--bg-2); padding: 4px 16px; }
.vrow { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.vrow:last-child { border-bottom: 0; }
.vrow > span { color: var(--text-3); font-weight: 700; font-size: 14px; }
.vrow > div { min-width: 0; word-break: break-word; font-weight: 600; }
.vrow a { color: var(--blue); }
.pre { white-space: pre-line; }
.vex { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vex li { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); }
.vex strong { display: block; font-size: 16px; }
.vex span { display: block; color: var(--blue); font-size: 13px; font-weight: 700; margin-top: 2px; }
.vex p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.vnotes { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); color: var(--text-2); font-size: 14px; }
.venue-foot { margin: 16px 0 12px; color: var(--text-3); font-size: 13px; line-height: 1.6; }

/* ── 가볼 곳 (퀘스트) ── */
.quest-head { background: var(--hero-bg); color: var(--hero-fg); border-radius: 24px; padding: 20px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.quest-top { display: flex; align-items: center; justify-content: space-between; }
.quest-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.quest-head .text-btn { color: var(--hero-sub); }
.quest-sub { margin: 0; color: var(--hero-sub); font-weight: 600; }
.quest-sub b { color: var(--hero-fg); font-size: 18px; }
.quest-bar { height: 14px; }
.quest-bar i { background: var(--green); }
.quest-group { margin-top: 22px; }
.quest-area { display: flex; align-items: baseline; gap: 6px; font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.quest-area span { font-size: 14px; color: var(--blue); }
.quest-list { list-style: none; margin: 0; padding: 0; }
.quest-list li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.quest-list li > svg { width: 18px; height: 18px; flex: none; }
.quest-check { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.quest-check svg { width: 18px; height: 18px; stroke-width: 3; }
.quest-list li.ok .quest-check { background: var(--green); border-color: var(--green); }
.quest-check:disabled { cursor: default; }
.quest-main { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; padding: 6px 0; }
.quest-main strong { font-size: 17px; color: var(--text); }
.quest-main span { font-size: 13px; font-weight: 600; color: var(--text-3); }
.quest-list li.ok .quest-main span { color: var(--green); }
.quest-del { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--red); background: var(--danger-bg, #ffeeee); }
.quest-del svg { width: 16px; height: 16px; }
.todo-new { display: flex; flex-direction: column; gap: 8px; }
.quest-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--hero-fg); background: var(--green); padding: 5px 10px; border-radius: 999px; }
.quest-chip svg { width: 14px; height: 14px; }
.quest-chip b { font-variant-numeric: tabular-nums; }
.hero-visits:active { opacity: .8; }
.hero-visits { color: inherit; }
.visit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.visit-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.visit-date { flex: none; font-size: 13px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.visit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.visit-main strong { font-size: 16px; }
.visit-main span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-n { flex: none; font-size: 13px; color: var(--blue); }

/* ── 더보기 · 백업 ── */
.icon-more { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.icon-more:active { background: var(--bg-2); }
.more-info { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--blue-soft); color: var(--text); font-size: 14px; line-height: 1.6; }

/* ── 다녀온 기록 합치기 ── */
.merge-btn { margin-top: 8px; align-self: flex-start; }

/* ── 사진 옮기기 ── */
.move-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.move-ph { flex: none; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px transparent; }
.move-ph img { width: 100%; height: 100%; object-fit: cover; }
.move-ph.on { box-shadow: 0 0 0 3px var(--blue); }
.move-targets button span:first-child { display: flex; flex-direction: column; min-width: 0; }
.move-targets small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.move-targets button:disabled { opacity: .45; }

/* ── 연도별 영화 기록 ── */
.hero-chip-btn { font-size: 13px; font-weight: 600; color: var(--hero-sub); background: var(--hero-track); padding: 5px 10px; border-radius: 999px; }
.hero-chip-btn b { color: var(--hero-fg); }
.movie-hero { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: var(--hero-bg); color: var(--hero-fg); margin-bottom: 12px; }
.lv-badge.movie { background: var(--orange); }
.movie-bar { background: var(--bg-2); }
.movie-bar i { background: var(--orange); }
.year-chart { display: flex; flex-direction: column; gap: 10px; }
.year-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; position: relative; }
.year-label { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-2); }
.year-row.now .year-label { color: var(--text); }
.year-track { height: 16px; border-radius: 8px; background: var(--bg-2); overflow: hidden; }
.year-track i { display: block; height: 100%; border-radius: 8px; background: var(--text-3); min-width: 4px; }
.year-row.now .year-track i { background: var(--orange); }
.year-n { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.year-row em { grid-column: 2 / 4; font-style: normal; font-size: 12px; font-weight: 700; color: var(--orange); margin-top: -6px; }

/* ── 가볼 곳: 이번 주 · 코스 · 보고 싶은 전시 ── */
.todo-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.todo-tools .chip { display: inline-flex; align-items: center; gap: 4px; }
.todo-tools .chip svg { width: 14px; height: 14px; }
.week-strip { display: flex; gap: 3px; margin-top: 6px; }
.week-strip i { font-style: normal; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.week-strip i.open { background: rgba(3, 178, 108, .16); color: var(--green); }
.week-strip i.closed { background: rgba(240, 68, 82, .14); color: var(--red); }
.week-strip i.unknown { background: var(--bg-2); color: var(--text-3); }
.week-strip i.today { box-shadow: inset 0 0 0 1.5px currentColor; }
.course-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 5px 10px; border-radius: 10px; }
.course-btn svg { width: 14px; height: 14px; }
.course { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.course li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.course li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.course small { color: var(--text-3); font-size: 13px; font-weight: 600; }
.course .closed { color: var(--red); }
.course-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.wish-box { margin-top: 18px; padding: 16px; border-radius: 20px; background: var(--bg-3); border: 1px solid var(--line); }
.dday { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 6px; margin-left: 4px; background: var(--blue-soft); color: var(--blue); vertical-align: middle; }
.dday.soon { background: rgba(240, 68, 82, .14); color: var(--red); }
.dday.over, .dday.seen { background: var(--bg-2); color: var(--text-3); }
.wish-add { margin-top: 10px; }
.wish-done { display: block; margin-top: 8px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--green); }

/* ── 다마고치 화분 ── */
.tama {
  flex: none; width: 108px; height: 124px; padding: 14px 14px 22px; color: inherit;
  border-radius: 54px 54px 50px 50px / 60px 60px 64px 64px;
  background: linear-gradient(160deg, #ffd3e0, #f7a9c2); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12), 0 4px 0 rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.tama::after { content: ''; position: absolute; bottom: 8px; left: 50%; width: 30px; height: 6px; margin-left: -15px; border-radius: 3px;
  background: radial-gradient(circle, #c4587d 3px, transparent 3.5px) 0 0/10px 6px repeat-x; }
.tama-screen { width: 76px; height: 76px; border-radius: 14px; background: #e3efd2; box-shadow: inset 0 0 0 3px #b9caa3; display: block; padding: 6px; }
.tama.small { width: 72px; height: 82px; padding: 9px 9px 14px; border-radius: 36px 36px 34px 34px / 40px 40px 42px 42px; background: linear-gradient(160deg, #ffe7a8, #ffbf47); }
.tama.small::after { display: none; }
.tama.small .tama-screen { width: 54px; height: 54px; border-radius: 10px; padding: 4px; }
.pixel-plant { width: 100%; height: 100%; display: block; overflow: visible; fill: initial; stroke: none; stroke-width: 0; }
.pixel-plant * { stroke: none; }
.pixel-plant .pl-top { animation: sway 1.6s steps(1) infinite; }
.pixel-plant.wilt .pl-top, .pixel-plant.thirsty .pl-top { animation-duration: 3.2s; }
.pixel-plant .pl-icon { animation: blink 1.2s steps(1) infinite; }
.pixel-plant .pl-drops { opacity: 0; }
@keyframes sway { 0% { transform: translateX(0); } 50% { transform: translateX(1px); } }
@keyframes blink { 50% { opacity: 0; } }
.tama.jump .tama-screen svg { animation: hop .5s steps(3); }
@keyframes hop { 33% { transform: translateY(-3px); } 66% { transform: translateY(-1px); } }
.tama.drink .pl-drops { animation: drops 1.2s steps(4) 2; }
@keyframes drops { 0% { opacity: 1; transform: translateY(0); } 99% { opacity: 1; transform: translateY(10px); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pixel-plant .pl-top, .pixel-plant .pl-icon, .tama.jump .tama-screen svg, .tama.drink .pl-drops { animation: none; } }
.tama-say { word-break: keep-all; margin: 6px 0 0; padding: 8px 11px; border-radius: 4px 14px 14px 14px; background: var(--hero-track); color: var(--hero-fg); font-size: 13px; font-weight: 600; line-height: 1.45; }
.tama-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.tama-actions button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--hero-track); color: var(--hero-fg); font-size: 13px; font-weight: 700; }
.tama-actions button:active { opacity: .8; }
.tama-actions button.done { color: #8fc1ff; }
.tama-actions .ta-ic { font-size: 18px; line-height: 1.1; }
.tama-actions b { font-variant-numeric: tabular-nums; }
