/* Layout: 바다 위 지도가 주인공. 지역을 누르면 지도가 그곳으로 확대되고, 지도 위에 '방문한 곳' 시트가 열린다. 오른쪽은 진행 현황. */
:root {
  --bg: #EDF1F0;
  --surface: #FFFFFF;
  --ink: #1C2A29;
  --muted: #5A6B69;
  --line: #D3DCDA;
  --sea: #CFE3EC;
  --land: #FBFAF6;
  --pin: #03A84E;
  --pin-approx: #86A894;
  --land-stroke: #AEBDBA;
  --prov-stroke: #6F8380;
  --vs: 68%; --vl: 0%;   /* 지역 색의 채도와 밝기 보정 */
  --vis: #E06A3A;
  --vis-soft: #FBE3D6;
  --vis-ink: #9E3727;
  --focus: #2F6F8F;
  --danger: #C8443A;
  --shadow: 0 1px 2px rgba(28,42,41,.06), 0 10px 30px rgba(28,42,41,.12);
  --font-display: "Black Han Sans", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111818; --surface: #182222; --ink: #E4ECEA; --muted: #92A3A0; --line: #2A3837;
    --vs: 42%; --vl: -20%; --sea: #0B1820; --land: #1F2B2B; --pin: #1FC46A; --pin-approx: #5F7D6C; --land-stroke: #3B4E4D; --prov-stroke: #74908C;
    --vis: #E0743F; --vis-soft: #3A2A22; --vis-ink: #F4A270; --focus: #7FC0DD; --danger: #FF8F84;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111818; --surface: #182222; --ink: #E4ECEA; --muted: #92A3A0; --line: #2A3837;
  --vs: 42%; --vl: -20%; --sea: #0B1820; --land: #1F2B2B; --pin: #1FC46A; --pin-approx: #5F7D6C; --land-stroke: #3B4E4D; --prov-stroke: #74908C;
  --vis: #E0743F; --vis-soft: #3A2A22; --vis-ink: #F4A270; --focus: #7FC0DD; --danger: #FF8F84;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1320px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 48px;
  display: grid; gap: 20px;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- header ---------- */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.top h1 {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 4.2vw, 42px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance;
}
.top p { margin: 4px 0 0; color: var(--muted); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status[data-s="cloud"] i { background: #3E9B6E; }
.status[data-s="saving"] i, .status[data-s="connecting"] i { background: var(--vis); }
.status[data-s="error"] i, .status[data-s="stale"] i { background: var(--danger); }

/* ---------- main grid ---------- */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .main { grid-template-columns: minmax(0, 1fr); } }

/* ---------- map ---------- */
.mapcard { position: relative; background: var(--sea); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.mapstage { position: relative; touch-action: none; }
#map { display: block; width: 100%; height: auto; max-height: 84vh; cursor: pointer; user-select: none; -webkit-user-select: none; }
#map .rg { fill: var(--land); stroke: var(--land-stroke); stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .2s ease; }
#map .rg.v { fill: hsl(var(--h) var(--vs) calc(var(--l) + var(--vl))); }
#map .rg:hover { filter: brightness(.94); }
#map .prov { fill: none; stroke: var(--prov-stroke); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
#map .sel { fill: none; stroke: var(--ink); stroke-width: 2.6; vector-effect: non-scaling-stroke; pointer-events: none; }
#map .lbl { fill: var(--ink); paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round;
  font-family: var(--font-body); font-weight: 500; text-anchor: middle; dominant-baseline: central; pointer-events: none; opacity: 0; transition: opacity .2s; }
#map.zoomed .lbl { opacity: .92; }
#map .dokdo { cursor: pointer; }
#map .dokdo .hit { fill: transparent; }
#map .dokdo .isle { fill: var(--land); stroke: var(--prov-stroke); stroke-width: 1; vector-effect: non-scaling-stroke; }
#map .dokdo.v .isle { fill: hsl(var(--h) var(--vs) calc(var(--l) + var(--vl))); }
#map .dokdo.on .isle { stroke: var(--ink); stroke-width: 1.8; }
#map .dokdo:hover .isle { filter: brightness(.94); }
#map .dok-lbl { fill: var(--ink); paint-order: stroke; stroke: var(--sea); stroke-linejoin: round;
  font-family: var(--font-body); font-weight: 600; text-anchor: middle; dominant-baseline: auto; pointer-events: none; }
#map .lbl.on { font-weight: 700; }
.zoombox { position: absolute; left: 12px; top: 12px; display: grid; gap: 4px; z-index: 2; }
.zoombox button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 18px; line-height: 1; box-shadow: var(--shadow);
}
.zoombox button.small { font-size: 12px; }
.hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; max-width: min(340px, calc(100% - 24px));
  font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; color: var(--muted); box-shadow: var(--shadow);
}
.tip {
  position: absolute; z-index: 3; pointer-events: none; padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--surface); font-size: 13px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px));
}
.tip small { opacity: .75; margin-left: 6px; }

/* ---------- region sheet (over the map on wide screens, under it on narrow) ---------- */
.sheet {
  position: absolute; z-index: 4; top: 12px; right: 12px; bottom: 12px; width: 360px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0;
}
@media (max-width: 720px) {
  .sheet { position: static; width: auto; border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.sheet-head .t { flex: 1 1 auto; min-width: 0; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.sheet-head .prov { color: var(--muted); font-size: 13px; }
.xbtn { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-size: 18px; line-height: 1; }
.visit {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; font-weight: 600;
}
.visit[aria-pressed="true"] { background: var(--vis); border-color: var(--vis); color: #fff; }
.visit .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
.visit[aria-pressed="true"] .dot { background: #fff; border-color: #fff; }
.sheet-body { overflow: auto; padding: 14px 16px 16px; display: grid; gap: 12px; align-content: start; min-height: 0; flex: 1 1 auto; }
.sec-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
.ask { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--vis-soft); }
.ask p { margin: 0; font-weight: 600; }
.ask small { color: var(--muted); }
.addrow { display: flex; gap: 6px; }
.addrow input { flex: 1 1 auto; min-width: 0; }
.inp {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); color: var(--ink); font-size: 14px; width: 100%;
}
.btn {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.danger { color: var(--danger); border-color: currentColor; }
.btn.link { border: 0; padding: 4px 0; color: var(--focus); }
.btn:disabled { opacity: .45; cursor: default; }

.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.place { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.place.open { border-color: var(--ink); }
.place-top { display: flex; align-items: baseline; gap: 8px; }
.place-top .pin { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--vis); transform: translateY(-1px); }
.place-top h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.place-top .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.place .addr { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.place .addr a { color: var(--focus); text-decoration: none; white-space: nowrap; margin-left: 4px; }
.place .memo { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.place .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.field textarea { min-height: 64px; resize: vertical; }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.photos:empty { display: none; }
.thumb { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; max-width: 100%; background: var(--sea); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.broken::after { content: "불러올 수 없음"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--muted); text-align: center; }
.thumb.broken img { visibility: hidden; }
.dropzone { border: 1.5px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); background: transparent; width: 100%; }
.dropzone:hover, .dropzone.over { border-color: var(--focus); color: var(--ink); }
.msg { font-size: 12px; color: var(--muted); margin: 0; }
.msg.err { color: var(--danger); }
.confirm { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.auto { font-size: 11px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.auto .tag { padding: 1px 6px; border-radius: 999px; background: var(--vis-soft); color: var(--vis-ink); font-weight: 600; }
.auto a { color: var(--focus); text-decoration: none; }
.looking { font-size: 12px; color: var(--muted); }
.imp-help { margin: 0; font-size: 13px; color: var(--muted); }
.imp-help b { color: var(--ink); font-weight: 600; }
#impBox { min-height: 92px; resize: vertical; font-size: 13px; }
.hint-s { font-size: 11px; color: var(--muted); }
.hint-s.err { color: var(--danger); }
.linked {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px;
}
.linked .tag { flex: none; padding: 1px 7px; border-radius: 999px; background: #03C75A; color: #fff; font-size: 11px; font-weight: 700; }
.linked a { flex: 1 1 auto; min-width: 0; color: var(--focus); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked a::after { content: " ↗"; }
.linked .unlink { flex: none; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 2px 4px; }
.linked .unlink:hover { color: var(--danger); }
.inp[aria-invalid] { border-color: var(--danger); }

/* click calendar */
.datebtn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); font-size: 14px; text-align: left;
}
.datebtn .chev { color: var(--muted); font-size: 12px; }
.cal { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; background: var(--surface); }
.cal-head { display: flex; align-items: center; gap: 2px; }
.cal-head b { flex: 1 1 auto; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-head button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 15px; color: var(--muted); }
.cal-head button:hover { background: var(--bg); color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid .wd { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
.cal-grid .wd.sun { color: var(--danger); }
.cal-grid .day { aspect-ratio: 1 / 1; max-width: 100%; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-variant-numeric: tabular-nums; padding: 0; }
.cal-grid .day:hover { background: var(--bg); }
.cal-grid .day.sun { color: var(--danger); }
.cal-grid .day.future { color: var(--muted); opacity: .55; }
.cal-grid .day.today { box-shadow: inset 0 0 0 1.5px var(--vis); font-weight: 600; }
.cal-grid .day.sel { background: var(--vis); color: #fff; font-weight: 700; }
.cal-foot { display: flex; gap: 6px; justify-content: space-between; }

/* ---------- side panel ---------- */
.side { display: grid; gap: 16px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.eyebrow { font-size: 12px; letter-spacing: .06em; color: var(--muted); margin: 0; font-weight: 500; }
.big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big b { font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.big span { color: var(--muted); font-size: 15px; }
.big .pct { margin-left: auto; font-family: var(--font-display); font-size: 26px; color: var(--vis); }
.bar { height: 10px; border-radius: 5px; background: var(--sea); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--vis); transition: width .3s ease; }
.mini { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.mini b { color: var(--ink); font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.provs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.provs button {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 52px; align-items: center; gap: 10px;
  padding: 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13px;
}
.provs button:hover { background: var(--bg); }
.provs .bar { height: 8px; }
.provs .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.provs .full .num { color: var(--vis); font-weight: 600; }

/* ---------- index ---------- */
.index { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 16px; }
.index-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.index-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.index-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
#q { width: min(280px, 100%); }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 24px; }
.group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.group h3 span { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; font-size: 13px; line-height: 1.3;
}
.chip:hover { border-color: var(--muted); }
.chip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--land-stroke); background: var(--land); flex: none; }
.chip.v .sw { background: hsl(var(--h) var(--vs) calc(var(--l) + var(--vl))); border-color: transparent; }
.chip .pc { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-q { color: var(--muted); font-size: 14px; margin: 0; }

.foot { font-size: 12px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 40; box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}
.copybox { width: 100%; min-height: 120px; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 30; background: rgba(8, 12, 12, .92); color: #F2F5F4;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.lb img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; display: block; min-height: 0; }
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; font-size: 14px; }
.lb-bar .grow { flex: 1 1 auto; }
.lb-bar button { padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: inherit; font-size: 13px; }
.lb-bar button:disabled { opacity: .35; cursor: default; }
.lb-bar .del { color: #FF8F84; border-color: currentColor; }
.lb-title { font-weight: 600; }
.lb-idx { color: rgba(242,245,244,.7); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 520px) { .big b { font-size: 46px; } }

/* ================= 웹사이트판에서 더한 부분 ================= */
:root { --seq1: #FBE1D2; --seq2: #F5BC9C; --seq3: #EC9366; --seq4: #DB6B3B; --seq5: #A9431D; --kakao: #FEE500; --kakao-ink: rgba(0,0,0,.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --seq1: #43302A; --seq2: #6E3F2B; --seq3: #A0532F; --seq4: #D56D3C; --seq5: #F4A270; }
}
:root[data-theme="dark"] { --seq1: #43302A; --seq2: #6E3F2B; --seq3: #A0532F; --seq4: #D56D3C; --seq5: #F4A270; }
body { margin: 0; }
a { color: var(--focus); }

/* header */
.top { align-items: flex-start; }
.brand { min-width: 0; flex: 1 1 360px; }
.top h1 { display: flex; align-items: center; gap: 12px; }
.title-av { flex: none; }
.backlink { text-decoration: none; font-weight: 600; }
.topright { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tabs a { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.account { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 38px; }
.acct-note { font-size: 13px; color: var(--muted); }
.kakao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  background: var(--kakao); color: var(--kakao-ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; border: 0;
}
.kakao:hover { filter: brightness(.96); }
.avatar {
  --s: 32px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center;
  background: var(--vis-soft); color: var(--vis-ink); font-weight: 700; font-size: calc(var(--s) * .42);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pubswitch {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted);
}
.pubswitch .track { width: 30px; height: 18px; border-radius: 9px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.pubswitch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pubswitch[aria-checked="true"] { color: var(--vis-ink); border-color: var(--vis); }
.pubswitch[aria-checked="true"] .track { background: var(--vis); }
.pubswitch[aria-checked="true"] .track::after { transform: translateX(12px); }
.me { position: relative; }
.mebtn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; max-width: 180px; }
.mebtn .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memenu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 240px; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: start;
}
.memenu p { margin: 0; }
.mm-name { font-weight: 700; }
.mm-sub { font-size: 13px; color: var(--muted); }
.danger-link { color: var(--danger) !important; font-size: 12px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.panel-head .status { padding: 3px 10px; font-size: 12px; }
.logincard { border-color: var(--vis); background: var(--vis-soft); }
.logincard .eyebrow { color: var(--vis-ink); }
.login-copy { margin: 0; font-size: 14px; }
.logincard .kakao { justify-self: start; }
body.viewing .hint { display: block; }

/* 모두의 지도 */
#map .rg.s1, .sw.s1 { fill: var(--seq1); background: var(--seq1); }
#map .rg.s2, .sw.s2 { fill: var(--seq2); background: var(--seq2); }
#map .rg.s3, .sw.s3 { fill: var(--seq3); background: var(--seq3); }
#map .rg.s4, .sw.s4 { fill: var(--seq4); background: var(--seq4); }
#map .rg.s5, .sw.s5 { fill: var(--seq5); background: var(--seq5); }
#map .dokdo.s1 .isle { fill: var(--seq1); } #map .dokdo.s2 .isle { fill: var(--seq2); } #map .dokdo.s3 .isle { fill: var(--seq3); }
#map .dokdo.s4 .isle { fill: var(--seq4); } #map .dokdo.s5 .isle { fill: var(--seq5); }
.legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; display: grid; gap: 6px; max-width: calc(100% - 24px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow); font-size: 12px;
}
.lg-title { color: var(--muted); font-weight: 600; }
.lg-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lg-item { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.lg-item .sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.mine { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.mine-copy { margin: 0; font-size: 14px; }
.mine .btn { text-decoration: none; color: var(--ink); }
.mine .btn.primary { color: var(--surface); }
.rp-name { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.rp-sub { margin: 0; color: var(--muted); font-size: 14px; }
.toplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: top; }
.toplist li { counter-increment: top; }
.toplist button {
  width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px;
  padding: 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px;
}
.toplist button::before { content: counter(top); color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.toplist button:hover { background: var(--bg); }
.tl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-prov { color: var(--muted); font-size: 12px; }
.tl-n { font-variant-numeric: tabular-nums; color: var(--vis-ink); font-weight: 600; }
.users { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ucard {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); background: var(--surface); min-width: 0;
}
.ucard:hover { border-color: var(--muted); }
.u-body { display: grid; gap: 4px; min-width: 0; flex: 1 1 auto; }
.u-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.u-me { flex: none; padding: 0 7px; border-radius: 999px; background: var(--vis); color: #fff; font-size: 11px; line-height: 18px; }
.u-stats { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.u-sub { font-size: 12px; color: var(--muted); }
.ucard .bar { height: 6px; }
#uq { width: min(240px, 100%); }
@media (max-width: 720px) {
  .topright { justify-content: flex-start; width: 100%; }
  .legend { position: static; margin: 8px; box-shadow: none; }
}