:root {
  color-scheme: dark;
  --bg: #03040a;
  --panel: rgba(12, 16, 30, 0.78);
  --panel-soft: rgba(13, 17, 32, 0.62);
  --panel-strong: rgba(15, 19, 34, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f7fb;
  --muted: #9ba1b5;
  --purple: #a855f7;
  --gold: #ffd76a;
  --blue: #3f86ff;
  --orange: #ff7a18;
  --green: #36d36f;
  --yellow: #f7c600;
  --rose: #ff5d8f;
  --teal: #22d3d5;
  --amber: #ffb344;
  --pink: #ff5cb8;
  --red: #ff4d57;
  --gray: #c8ccd6;
  --cyan: #13bed4;
}

/* v3 compact production polish */
body {
  font-size: 14px;
}

.site-header {
  height: 66px;
  padding: 8px 26px;
  grid-template-columns: minmax(260px, 1fr) auto minmax(210px, 1fr);
  background: rgba(3, 4, 10, .16);
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.brand strong {
  font-size: 23px;
}

.brand small {
  margin-top: 5px;
  font-size: 12px;
}

.site-nav {
  gap: 44px;
  transform: translateX(54px);
}

.site-nav a {
  font-size: 14px;
}

.site-nav a.active::after {
  bottom: -19px;
  width: 70px;
}

.header-actions {
  gap: 16px;
}

.icon-btn {
  width: 38px;
  height: 38px;
}

.icon-btn svg {
  width: 25px;
  height: 25px;
}

.write-link {
  min-width: 112px;
  height: 38px;
  font-size: 14px;
}

.map-page {
  padding-top: 66px;
}

.world-svg {
  width: min(1420px, 108vw);
  top: 47%;
}

.country {
  fill: rgba(12, 27, 45, .72);
  stroke: rgba(230, 222, 205, .28);
  stroke-width: .48;
}

.country.active-country {
  fill: color-mix(in srgb, var(--emotion-color) 13%, rgba(12, 27, 45, .78));
  stroke: color-mix(in srgb, var(--emotion-color) 54%, rgba(255,255,255,.55));
}

.country-pin {
  opacity: .2;
}

.country-pin path {
  display: none;
}

.country-pin circle {
  r: 1.7px;
  fill: rgba(230, 222, 205, .72);
}

.country-pin text {
  opacity: 0;
  font-size: 7.2px;
  fill: rgba(239, 236, 229, .82);
}

.map-zoomed .country-pin {
  opacity: .72;
}

.map-zoomed .country-pin text {
  opacity: .86;
}

.hotspot-halo {
  opacity: .13;
}

.hotspot {
  stroke-width: .8;
}

.map-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 13;
}

.map-log-bubble {
  position: fixed;
  min-width: 132px;
  max-width: 212px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(10, 13, 24, .72);
  backdrop-filter: blur(13px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--emotion-color) 18%, transparent), 0 18px 42px rgba(0,0,0,.34);
  color: #eef1f8;
}

.map-log-bubble p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
}

.map-log-bubble span {
  color: var(--emotion-color);
  font-weight: 900;
}

.map-log-bubble small {
  color: var(--muted);
}

.map-log-bubble em {
  display: block;
  margin-top: 6px;
  color: #cda6ff;
  font-style: normal;
  font-size: 12px;
}

.map-stats {
  width: min(420px, calc(100vw - 64px));
}

.map-stats article {
  grid-template-columns: 40px 1fr;
  min-height: 62px;
  padding: 9px 11px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  font-size: 21px;
}

.map-stats strong {
  font-size: 17px;
}

.permission-bar {
  padding: 8px 12px;
  font-size: 13px;
}

.permission-bar button {
  min-height: 30px;
  padding: 0 12px;
}

.map-controls {
  right: 24px;
  bottom: 24px;
  gap: 8px;
}

.map-controls button {
  width: 40px;
  height: 40px;
  font-size: 23px;
}

.content-page {
  width: min(1120px, calc(100vw - 52px));
  padding-top: 104px;
}

.page-title h1 {
  font-size: clamp(28px, 3vw, 36px);
}

.page-title p {
  font-size: 14px;
}

.filter-chips {
  margin: 18px 0 16px;
  gap: 8px;
}

.filter-chip {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

.feed-layout {
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 18px;
}

.feed-list {
  gap: 9px;
}

.log-card {
  grid-template-columns: 24px minmax(0, 1fr) 120px 190px;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 11px 13px;
}

.log-card .glow-dot {
  width: 15px;
  height: 15px;
  margin-top: 0;
}

.log-meta {
  font-size: 11px;
}

.log-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.38;
}

.log-tag {
  justify-self: center;
  font-size: 13px;
}

.log-actions {
  min-width: 0;
}

.comfort-btn {
  min-width: 154px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #f0d992;
  background: rgba(255, 215, 106, .045);
  box-shadow: none;
}

.comfort-btn.gold {
  color: #ffe4a5;
  background: rgba(255, 215, 106, .11);
  box-shadow: 0 0 12px rgba(255, 215, 106, .24);
}

.comfort-count {
  margin-left: 8px;
  color: #f7f1d6;
  font-weight: 500;
}

.translate-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.flow-panel {
  padding: 15px;
  border-radius: 8px;
}

.flow-panel h2 {
  font-size: 15px;
}

.flow-panel article {
  padding: 14px 0;
}

.flow-panel strong {
  font-size: 24px;
}

.flow-panel em {
  font-size: 12px;
}

.live-line {
  color: #9fdc91 !important;
}

.me-page {
  width: min(1140px, calc(100vw - 52px));
}

.my-stats {
  gap: 18px;
  margin: 26px 0 20px;
}

.my-stats article {
  min-height: 80px;
  padding: 15px 18px;
}

.my-stats strong {
  font-size: 26px;
}

.me-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.timeline-card {
  padding: 14px 16px 14px 66px;
}

.my-log-list {
  gap: 10px;
}

.my-log-card {
  min-height: 58px;
  padding: 10px 12px;
}

.my-log-card time,
.my-log-card .log-location {
  font-size: 11px;
}

.my-log-card .emotion-label {
  min-width: 78px;
  font-size: 12px;
}

.anonymous-card,
.settings-card {
  padding: 18px;
  border-radius: 8px;
}

.settings-card h2 {
  font-size: 17px;
}

.settings-card button {
  min-height: 46px;
  font-size: 13px;
}

.composer-modal {
  width: min(680px, calc(100vw - 40px));
  padding: 38px 36px 28px;
  border-radius: 8px;
}

.composer-modal h2 {
  font-size: 30px;
}

.composer-modal p {
  font-size: 14px;
}

.emotion-grid .emotion-btn {
  min-height: 42px;
  font-size: 14px;
}

.modal-bottom {
  font-size: 13px;
}

.primary-action {
  min-height: 40px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #03040a;
  overflow-x: hidden;
}

body[data-page="map"] {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.cosmos {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 8%, rgba(175, 136, 255, 0.35), transparent 16%),
    radial-gradient(circle at 42% 55%, rgba(36, 101, 174, 0.18), transparent 36%),
    radial-gradient(circle at 73% 70%, rgba(167, 75, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #050611 0%, #03040a 100%);
}

.cosmos::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.92) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(180,142,255,.8) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(255,195,125,.55) 0 1px, transparent 1.4px);
  background-size: 150px 150px, 230px 230px, 310px 310px;
  background-position: 0 0, 70px 90px, 30px 50px;
  opacity: .72;
}

.cosmos::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(106deg, transparent 0 36%, rgba(101, 93, 190, .12) 45%, rgba(255,255,255,.18) 48%, rgba(118, 86, 220, .1) 52%, transparent 64%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.65) 78%);
  transform: rotate(-2deg);
  opacity: .9;
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 10px 30px;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(3, 4, 10, .26);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(168, 85, 247, .72);
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: #b5b8c8;
  font-size: 13px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 48px;
  transform: translateX(42px);
}

.site-nav a {
  position: relative;
  color: #d7dae5;
  font-size: 16px;
  font-weight: 800;
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 78px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--purple);
  box-shadow: 0 0 18px var(--purple);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--text);
  background: transparent;
}

.icon-btn svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notice-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff4d57;
  box-shadow: 0 0 14px #ff4d57;
}

.write-link,
.primary-action {
  border: 1px solid rgba(168, 85, 247, .95);
  border-radius: 8px;
  color: #fff;
  background: rgba(168, 85, 247, .16);
  box-shadow: 0 0 22px rgba(168,85,247,.34) inset, 0 0 28px rgba(168,85,247,.24);
  font-weight: 900;
}

.write-link {
  min-width: 132px;
  height: 42px;
}

.primary-action {
  min-width: 118px;
  min-height: 44px;
  padding: 0 22px;
  background: linear-gradient(135deg, #6f39ff, #a855f7);
}

.map-page {
  height: 100vh;
  min-height: 760px;
  padding-top: 76px;
}

.map-stage {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}

.map-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 45%, rgba(255, 179, 68, .13), transparent 22%),
    radial-gradient(circle at 50% 42%, rgba(63, 134, 255, .11), transparent 25%),
    radial-gradient(circle at 78% 45%, rgba(168, 85, 247, .13), transparent 22%);
  filter: blur(8px);
}

.world-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1560px, 116vw);
  height: auto;
  overflow: visible;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 32px rgba(63, 134, 255, .22));
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
}

.country {
  fill: rgba(13, 31, 50, .76);
  stroke: rgba(215, 226, 238, .22);
  stroke-width: .55;
  vector-effect: non-scaling-stroke;
  transition: fill .35s, stroke .35s, opacity .35s;
}

.country.active-country {
  stroke: color-mix(in srgb, var(--emotion-color) 68%, white);
  fill: color-mix(in srgb, var(--emotion-color) 16%, rgba(13, 31, 50, .78));
  filter: url(#countryGlow);
}

.map-star {
  fill: rgba(255,255,255,.5);
  opacity: .62;
}

.hotspot-halo {
  fill: var(--emotion-color);
  opacity: .11;
  filter: blur(2px) drop-shadow(0 0 18px var(--emotion-color));
  transform-origin: center;
  animation: softPulse 4.4s ease-in-out infinite;
}

.hotspot {
  fill: var(--emotion-color);
  stroke: rgba(255,255,255,.32);
  stroke-width: 1;
  filter: drop-shadow(0 0 10px var(--emotion-color)) drop-shadow(0 0 26px var(--emotion-color));
  animation: pulse 3s ease-in-out infinite;
}

.hotspot-core {
  fill: rgba(255,255,255,.85);
  pointer-events: none;
}

.country-pin {
  opacity: .74;
  filter: drop-shadow(0 0 9px rgba(168,85,247,.38));
}

.country-pin path {
  fill: rgba(9, 12, 22, .86);
  stroke: rgba(210, 185, 255, .76);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.country-pin circle {
  fill: #b980ff;
}

.country-pin text,
.city-label text {
  paint-order: stroke;
  stroke: rgba(3,4,10,.92);
  stroke-width: 4px;
  fill: #e9e4ff;
  font-size: 8.8px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
}

.city-label {
  opacity: 0;
  transition: opacity .2s ease;
}

.city-label circle {
  fill: rgba(255, 214, 122, .9);
  filter: drop-shadow(0 0 7px rgba(255, 214, 122, .7));
}

.city-label text {
  fill: #f8edd4;
  font-size: 8px;
}

.map-zoomed .city-label {
  opacity: .9;
}

.log-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 16, 30, .72);
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 54px rgba(0,0,0,.36);
}

.map-stats {
  position: absolute;
  z-index: 15;
  left: 32px;
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(470px, calc(100vw - 64px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 16, 30, .72);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.map-stats article {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 11px 13px;
}

.map-stats article + article {
  border-left: 1px solid var(--line-soft);
}

.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  font-size: 24px;
  font-style: normal;
}

.stat-icon.purple { color: var(--purple); box-shadow: 0 0 22px rgba(168,85,247,.26); }
.stat-icon.green { color: var(--green); box-shadow: 0 0 22px rgba(54,211,111,.2); }
.stat-icon.slate { color: #dce1ed; }

.map-stats span,
.map-stats small,
.flow-panel small,
.my-stats small {
  color: var(--muted);
  font-size: 12px;
}

.map-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  line-height: 1.08;
}

.map-stats strong small {
  margin-left: 2px;
  color: inherit;
  font-size: 13px;
}

.composer-dock {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 16, 30, .74);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.inline-composer {
  position: absolute;
  z-index: 16;
  right: 150px;
  bottom: 64px;
  width: min(720px, calc(100vw - 360px));
  padding: 18px 22px;
}

.inline-composer h2,
.composer-modal h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.quick-input,
.field-wrap {
  position: relative;
}

.quick-input input,
.field-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 64px 0 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.045);
}

.quick-input input:focus,
.field-wrap input:focus {
  border-color: rgba(168,85,247,.85);
  box-shadow: 0 0 0 3px rgba(168,85,247,.15);
}

.quick-input span,
.field-wrap span {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}

.emotion-row,
.emotion-grid,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.emotion-row.compact {
  margin: 14px 0;
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.emotion-btn,
.filter-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--emotion-color) 60%, rgba(255,255,255,.15));
  border-radius: 8px;
  color: var(--emotion-color);
  background: color-mix(in srgb, var(--emotion-color) 10%, rgba(255,255,255,.035));
  font-weight: 900;
}

.emotion-grid .emotion-btn {
  min-height: 48px;
  font-size: 16px;
}

.emotion-btn.active,
.filter-chip.active {
  color: var(--emotion-color);
  background: color-mix(in srgb, var(--emotion-color) 20%, rgba(255,255,255,.04));
  box-shadow: 0 0 22px color-mix(in srgb, var(--emotion-color) 40%, transparent);
}

.composer-foot,
.modal-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
}

.composer-foot {
  justify-content: space-between;
}

.lock-note {
  color: #c7cbda;
  font-size: 14px;
}

.permission-bar {
  position: absolute;
  z-index: 16;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 16, 30, .76);
  backdrop-filter: blur(18px);
  color: #d8dce8;
  white-space: nowrap;
}

.permission-bar button,
.status-pill,
.draft-btn,
.translate-btn,
.comfort-btn,
.delete-btn,
.settings-card button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.045);
}

.permission-bar button {
  min-height: 34px;
  padding: 0 14px;
}

.permission-bar button:not(.plain-close) {
  border-color: rgba(168,85,247,.7);
  color: #d8c7ff;
}

.plain-close {
  border: 0 !important;
  background: transparent !important;
  font-size: 24px;
}

.map-controls {
  position: absolute;
  z-index: 16;
  right: 30px;
  bottom: 30px;
  display: grid;
  gap: 10px;
}

.map-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(12,16,30,.72);
  backdrop-filter: blur(14px);
  font-size: 26px;
  font-weight: 900;
}

.content-page {
  width: min(1160px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 112px 0 54px;
}

.world-watermark {
  position: fixed;
  inset: 76px 0 0;
  z-index: -3;
  background:
    radial-gradient(circle at 60% 40%, rgba(168,85,247,.15), transparent 18%),
    radial-gradient(ellipse at 52% 32%, rgba(255,180,96,.08), transparent 34%),
    radial-gradient(ellipse at 45% 42%, rgba(63,134,255,.1), transparent 42%);
  opacity: .28;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.page-title p {
  margin: 8px 0 0;
  color: #bdc1d1;
  font-size: 15px;
}

.filter-chips {
  margin: 26px 0 22px;
}

.filter-chip.all {
  color: #fff;
  border-color: rgba(168,85,247,.85);
  background: rgba(168,85,247,.18);
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 22px;
  align-items: start;
}

.feed-list {
  display: grid;
  gap: 12px;
}

.log-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
}

.log-card .glow-dot {
  width: 18px;
  height: 18px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--emotion-color);
  box-shadow: 0 0 20px var(--emotion-color);
}

.log-main {
  min-width: 0;
}

.log-meta,
.log-actions,
.log-location {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-meta {
  color: #e4e6ef;
  font-size: 12px;
}

.log-text {
  margin: 8px 0 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.46;
}

.log-tag {
  color: var(--emotion-color);
  font-weight: 900;
}

.log-actions {
  justify-content: flex-end;
  min-width: 210px;
}

.translate-area {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: #dce1ed;
}

.translate-area small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.translate-btn,
.comfort-btn,
.delete-btn {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 900;
}

.comfort-btn {
  min-width: 150px;
  color: #efd480;
  border-color: rgba(255,215,106,.3);
  background: rgba(255,215,106,.055);
}

.comfort-btn.gold {
  color: #ffe7a0;
  background: rgba(255,215,106,.16);
  border-color: rgba(255,215,106,.7);
  box-shadow: 0 0 18px rgba(255,215,106,.46), 0 0 34px rgba(255,215,106,.18);
}

.comfort-btn .spark {
  display: inline-block;
  animation: sparkle 1.6s ease-in-out infinite;
}

.flow-panel,
.settings-card,
.anonymous-card,
.timeline-card,
.my-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12,16,30,.68);
  backdrop-filter: blur(16px);
}

.flow-panel {
  position: sticky;
  top: 110px;
  padding: 18px;
}

.flow-panel h2 {
  margin: 0 0 18px;
  font-size: 19px;
}

.flow-panel article {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.flow-panel article:last-child {
  border-bottom: 0;
}

.flow-panel strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
}

.flow-panel em {
  color: #b2b7c8;
  font-size: 12px;
  font-style: normal;
}

.my-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 18px;
}

.my-stats article {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
}

.my-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.me-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.timeline-card {
  position: relative;
  min-height: 470px;
  padding: 16px 16px 16px 66px;
}

.timeline-line {
  position: absolute;
  left: 34px;
  top: 32px;
  bottom: 32px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, var(--purple), var(--purple), transparent);
  box-shadow: 0 0 18px rgba(168,85,247,.85);
}

.my-log-list {
  display: grid;
  gap: 12px;
}

.my-log-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 82px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.my-log-card::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #101322;
  border: 4px solid var(--purple);
  transform: translateY(-50%);
  box-shadow: 0 0 18px rgba(168,85,247,.8);
}

.my-log-card time,
.my-log-card .log-location {
  color: var(--muted);
  font-size: 12px;
}

.emotion-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--emotion-color);
  background: color-mix(in srgb, var(--emotion-color) 18%, transparent);
  font-weight: 900;
}

.delete-btn {
  color: #ff7b82;
}

.settings-panel {
  display: grid;
  gap: 24px;
  align-content: start;
}

.anonymous-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 24px;
}

.anonymous-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.45;
}

.anonymous-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.settings-card {
  padding: 20px;
}

.settings-card h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.settings-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 0 16px;
  text-align: left;
}

.settings-card b {
  color: #85f16e;
}

.settings-card .danger {
  display: block;
  min-height: 88px;
  border-color: rgba(255,77,87,.55);
  color: #ff6d75;
}

.settings-card .danger small {
  display: block;
  margin-top: 8px;
  color: #b7bdce;
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 100px 20px 28px;
  background: rgba(3,4,10,.36);
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden],
.notification-panel[hidden] {
  display: none;
}

.composer-modal {
  position: relative;
  width: min(680px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14,18,32,.82);
  backdrop-filter: blur(24px);
  box-shadow: 0 26px 100px rgba(0,0,0,.55);
}

.composer-modal h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.composer-modal p {
  margin: 0 0 18px;
  color: #c2c7d6;
}

.modal-close,
.draft-btn {
  position: absolute;
  top: 18px;
}

.modal-close {
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 28px;
}

.draft-btn {
  right: 64px;
  min-height: 36px;
  padding: 0 12px;
}

.section-label {
  margin: 22px 0 0 !important;
  color: var(--muted) !important;
}

.modal-bottom {
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.modal-bottom .primary-action {
  margin-left: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #d2d7e4;
  font-size: 13px;
}

.status-pill.green {
  color: #71ec83;
  border-color: rgba(54,211,111,.28);
}

.notification-panel {
  position: fixed;
  z-index: 90;
  top: 88px;
  right: 24px;
  width: min(380px, calc(100vw - 40px));
  max-height: calc(100vh - 110px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12,16,30,.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.notification-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.notification-panel header button {
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 24px;
}

.notification-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.notification-item strong {
  display: block;
  margin-bottom: 6px;
}

.notification-item p {
  margin: 0;
  color: #c5cad8;
  line-height: 1.5;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(14px);
  padding: 13px 18px;
  border-radius: 8px;
  color: #160f00;
  background: var(--gold);
  box-shadow: 0 0 28px rgba(255,215,106,.45);
  opacity: 0;
  pointer-events: none;
  transition: .22s;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes pulse {
  0%, 100% { opacity: .78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes softPulse {
  0%, 100% { opacity: .08; transform: scale(.88); }
  50% { opacity: .2; transform: scale(1.08); }
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(16deg); }
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .site-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 90;
    justify-content: space-around;
    gap: 0;
    height: 62px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 10, 20, .88);
    backdrop-filter: blur(18px);
    transform: none;
  }

  .site-nav a.active::after {
    bottom: 5px;
  }

  .map-stats {
    left: 16px;
    bottom: 86px;
  }

  .permission-bar {
    display: none;
  }

  .feed-layout,
  .me-layout {
    grid-template-columns: 1fr;
  }

  .flow-panel {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .flow-panel h2 {
    grid-column: 1 / -1;
  }

  .flow-panel article {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  body[data-page="map"] {
    overflow: auto;
  }

  .site-header {
    height: 72px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .brand strong {
    font-size: 24px;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .write-link {
    min-width: auto;
    height: 40px;
    padding: 0 14px;
  }

  .map-page {
    min-height: 940px;
    padding-top: 72px;
  }

  .world-svg {
    width: 1240px;
    top: 36%;
  }

  .map-stats {
    grid-template-columns: 1fr;
    width: auto;
    right: 16px;
    bottom: 96px;
  }

  .map-stats article + article {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .map-controls {
    display: none;
  }

  .emotion-row.compact {
    max-height: 88px;
    overflow: auto;
  }

  .content-page {
    width: calc(100vw - 28px);
    padding: 104px 0 104px;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .log-card {
    grid-template-columns: 24px 1fr;
  }

  .log-actions {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }

  .flow-panel,
  .my-stats {
    grid-template-columns: 1fr;
  }

  .my-stats {
    gap: 12px;
  }

  .timeline-card {
    padding: 16px 16px 16px 42px;
  }

  .timeline-line {
    left: 20px;
  }

  .my-log-card {
    grid-template-columns: 54px 86px minmax(0, 1fr) auto;
  }

  .my-log-card .log-location {
    display: none;
  }

  .my-log-card::before {
    left: -29px;
  }

  .composer-modal {
    padding: 34px 18px 20px;
  }

  .emotion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-bottom .primary-action {
    width: 100%;
    margin-left: 0;
  }

  .draft-btn {
    display: none;
  }
}

/* v13 map label scale and overlap cleanup */
.city-label text {
  font-size: 2.55px !important;
  stroke-width: .82px !important;
  opacity: .56;
}

.map-detail .city-label text {
  font-size: 2.75px !important;
  opacity: .58;
}

.map-close .city-label text {
  font-size: 2.95px !important;
  opacity: .64;
}

.country-pin text {
  font-size: 3.25px !important;
  stroke-width: .95px !important;
}

.map-close .country-pin text {
  font-size: 3.55px !important;
}

.city-star,
.map-star {
  opacity: .5;
}

/* v14 public policy pages and footer */
.site-footer {
  width: min(1380px, calc(100% - 84px));
  margin: 22px auto 30px;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(238, 241, 255, .58);
  font-size: 12px;
  position: relative;
  z-index: 3;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer a {
  color: rgba(238, 241, 255, .72);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.legal-page {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 34px;
  position: relative;
  z-index: 2;
}

.legal-hero {
  margin-bottom: 22px;
}

.legal-hero p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  font-weight: 500;
}

.legal-hero span {
  display: inline-block;
  margin-top: 12px;
  color: rgba(238, 241, 255, .62);
  font-size: 13px;
}

.legal-card {
  padding: 34px 38px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(17, 23, 39, .82), rgba(8, 11, 21, .9)),
    rgba(8, 11, 21, .82);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .32);
  backdrop-filter: blur(18px);
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.legal-write-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  color: rgba(238, 241, 255, .76);
  font-size: 14px;
  line-height: 1.82;
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal-card li + li {
  margin-top: 5px;
}

@media (max-width: 760px) {
  .site-footer {
    width: min(100% - 34px, 720px);
    margin-bottom: 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer nav {
    justify-content: flex-start;
    gap: 10px 13px;
  }

  .legal-page {
    width: min(100% - 34px, 720px);
    padding-top: 92px;
  }

  .legal-card {
    padding: 24px 20px;
    border-radius: 10px;
  }

  .legal-card h2 {
    font-size: 16px;
  }
}

/* v15 legal page header refinement */
.legal-write-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 118px !important;
  height: 42px !important;
  padding: 0 18px !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.legal-page {
  padding-top: 88px !important;
}

.legal-hero h1 {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 760px) {
  .legal-page {
    padding-top: 86px !important;
  }

  .legal-write-link {
    min-width: 104px !important;
    height: 38px !important;
  }
}

/* v3 final overrides: keep the original design, reduce the whole interface closer to the mockups. */
@media (min-width: 761px) {
  body { font-size: 14px; }

  .site-header {
    height: 66px;
    padding: 8px 26px;
    grid-template-columns: minmax(260px, 1fr) auto minmax(210px, 1fr);
    background: rgba(3, 4, 10, .16);
  }

  .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .brand strong { font-size: 23px; }
  .brand small { margin-top: 5px; font-size: 12px; }
  .site-nav { gap: 44px; transform: translateX(54px); }
  .site-nav a { font-size: 14px; }
  .site-nav a.active::after { bottom: -19px; width: 70px; }
  .header-actions { gap: 16px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 25px; height: 25px; }
  .write-link { min-width: 112px; height: 38px; font-size: 14px; }

  .map-page { padding-top: 66px; }
  .world-svg { width: min(1420px, 108vw); top: 47%; }
  .country { fill: rgba(12, 27, 45, .72); stroke: rgba(230, 222, 205, .28); stroke-width: .48; }
  .country.active-country {
    fill: color-mix(in srgb, var(--emotion-color) 13%, rgba(12, 27, 45, .78));
    stroke: color-mix(in srgb, var(--emotion-color) 54%, rgba(255,255,255,.55));
  }
  .country-pin { opacity: .2; }
  .country-pin path { display: none; }
  .country-pin circle { fill: rgba(230, 222, 205, .72); }
  .country-pin text { opacity: 0; font-size: 7.2px; fill: rgba(239, 236, 229, .82); }
  .map-zoomed .country-pin { opacity: .72; }
  .map-zoomed .country-pin text { opacity: .86; }

  .map-bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 13; }
  .map-log-bubble {
    position: fixed;
    min-width: 132px;
    max-width: 212px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(10, 13, 24, .72);
    backdrop-filter: blur(13px);
    box-shadow: 0 0 22px color-mix(in srgb, var(--emotion-color) 18%, transparent), 0 18px 42px rgba(0,0,0,.34);
    color: #eef1f8;
  }
  .map-log-bubble p { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; font-size: 12px; }
  .map-log-bubble span { color: var(--emotion-color); font-weight: 900; }
  .map-log-bubble small { color: var(--muted); }
  .map-log-bubble em { display: block; margin-top: 6px; color: #cda6ff; font-style: normal; font-size: 12px; }

  .map-stats { width: min(420px, calc(100vw - 64px)); }
  .map-stats article { grid-template-columns: 40px 1fr; min-height: 62px; padding: 9px 11px; }
  .stat-icon { width: 40px; height: 40px; font-size: 21px; }
  .map-stats strong { font-size: 17px; }
  .permission-bar { padding: 8px 12px; font-size: 13px; }
  .permission-bar button { min-height: 30px; padding: 0 12px; }
  .map-controls { right: 24px; bottom: 24px; gap: 8px; }
  .map-controls button { width: 40px; height: 40px; font-size: 23px; }

  .content-page { width: min(1120px, calc(100vw - 52px)); padding-top: 104px; }
  .page-title h1 { font-size: clamp(28px, 3vw, 36px); }
  .page-title p { font-size: 14px; }
  .filter-chips { margin: 18px 0 16px; gap: 8px; }
  .filter-chip { min-height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; }

  .feed-layout { grid-template-columns: minmax(0, 1fr) 216px; gap: 18px; }
  .feed-list { gap: 9px; }
  .log-card {
    grid-template-columns: 24px minmax(0, 1fr) 120px 190px;
    align-items: center;
    gap: 10px;
    min-height: 86px;
    padding: 11px 13px;
  }
  .log-card .glow-dot { width: 15px; height: 15px; margin-top: 0; }
  .log-meta { font-size: 11px; }
  .log-text { margin-top: 6px; font-size: 14px; line-height: 1.38; }
  .log-tag { justify-self: center; font-size: 13px; }
  .log-actions { min-width: 0; }
  .comfort-btn {
    min-width: 154px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    color: #f0d992;
    background: rgba(255, 215, 106, .045);
    box-shadow: none;
  }
  .comfort-btn.gold { color: #ffe4a5; background: rgba(255, 215, 106, .11); box-shadow: 0 0 12px rgba(255, 215, 106, .24); }
  .comfort-count { margin-left: 8px; color: #f7f1d6; font-weight: 500; }
  .translate-btn { min-height: 28px; padding: 0 10px; font-size: 12px; }
  .flow-panel { padding: 15px; border-radius: 8px; }
  .flow-panel h2 { font-size: 15px; }
  .flow-panel article { padding: 14px 0; }
  .flow-panel strong { font-size: 24px; }
  .flow-panel em { font-size: 12px; }
  .live-line { color: #9fdc91 !important; }

  .me-page { width: min(1140px, calc(100vw - 52px)); }
  .my-stats { gap: 18px; margin: 26px 0 20px; }
  .my-stats article { min-height: 80px; padding: 15px 18px; }
  .my-stats strong { font-size: 26px; }
  .me-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .timeline-card { padding: 14px 16px 14px 66px; }
  .my-log-list { gap: 10px; }
  .my-log-card { min-height: 58px; padding: 10px 12px; }
  .my-log-card time, .my-log-card .log-location { font-size: 11px; }
  .my-log-card .emotion-label { min-width: 78px; font-size: 12px; }
  .anonymous-card, .settings-card { padding: 18px; border-radius: 8px; }
  .settings-card h2 { font-size: 17px; }
  .settings-card button { min-height: 46px; font-size: 13px; }

  .composer-modal { width: min(680px, calc(100vw - 40px)); padding: 38px 36px 28px; border-radius: 8px; }
  .composer-modal h2 { font-size: 30px; }
  .composer-modal p { font-size: 14px; }
  .emotion-grid .emotion-btn { min-height: 42px; font-size: 14px; }
  .modal-bottom { font-size: 13px; }
  .primary-action { min-height: 40px; }
}

.map-viewport {
  cursor: grab;
}

.map-viewport.is-dragging {
  cursor: grabbing;
}

.country-pin text,
.city-label text {
  stroke: rgba(3, 4, 10, 0.82);
  stroke-width: 2px;
  font-weight: 500;
  letter-spacing: 0;
}

.country-pin text {
  font-size: 5.8px;
  opacity: 0;
}

.city-label text {
  font-size: 6.2px;
  opacity: 0.78;
}

.city-label circle {
  opacity: 0.55;
}

.map-zoomed .country-pin text {
  opacity: 0.58;
}

.map-zoomed .city-label {
  opacity: 0.72;
}

.map-zoomed .city-label text {
  opacity: 0.72;
}

.map-zoomed .country-pin {
  opacity: 0.5;
}

.map-viewport.is-dragging .map-bubbles {
  opacity: 0;
  transition: none;
}

.map-viewport.is-dragging .country,
.map-viewport.is-dragging .hotspot,
.map-viewport.is-dragging .hotspot-halo,
.map-viewport.is-dragging .hotspot-core,
.map-viewport.is-dragging .country-pin,
.map-viewport.is-dragging .city-label {
  transition: none !important;
  animation-play-state: paused;
}

/* 지도 라벨 정리 */
.country-pin,
.city-label {
  pointer-events: none;
}

.country-pin text,
.city-label text {
  opacity: 0;
  stroke: rgba(3, 4, 10, 0.72);
  stroke-width: 1.35px;
  font-weight: 500;
  letter-spacing: 0;
}

.country-pin text {
  font-size: 3.6px;
}

.city-label text {
  font-size: 3.9px;
}

.country-pin circle,
.city-label circle,
.country-star,
.city-star {
  opacity: 0.38;
}

.map-zoomed .country-pin {
  opacity: 0.34;
}

.map-zoomed .city-label {
  opacity: 0.45;
}

.map-detail .city-label text {
  opacity: 0.46;
}

.map-close .country-pin text {
  opacity: 0.38;
}

.map-close .city-label text {
  opacity: 0.62;
}

.city-label[data-rank="2"],
.city-label[data-rank="3"],
.city-label[data-rank="4"] {
  opacity: 0;
}

.map-detail .city-label[data-rank="2"] {
  opacity: 0.4;
}

.map-detail .city-label[data-rank="2"] text {
  opacity: 0.42;
}

.map-close .city-label[data-rank="2"] {
  opacity: 0.58;
}

.map-close .city-label[data-rank="3"] {
  opacity: 0.34;
}

.map-close .city-label[data-rank="4"] {
  opacity: 0.24;
}

.map-close .city-label[data-rank="2"] text {
  opacity: 0.6;
}

.map-close .city-label[data-rank="3"] text {
  opacity: 0.38;
}

.map-close .city-label[data-rank="4"] text {
  opacity: 0.28;
}

/* 감정 불빛 고정 */
.hotspot-halo,
.hotspot,
.hotspot-core {
  animation: none !important;
  transform: none !important;
}

.hotspot-halo {
  opacity: 0.09;
  filter: blur(3px) drop-shadow(0 0 18px var(--emotion-color));
}

.hotspot {
  opacity: 0.82;
  filter: drop-shadow(0 0 10px var(--emotion-color));
}

/* 감정 지도 하단 통계 박스 축소 */
.map-stats {
  width: min(520px, calc(100vw - 80px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 8px;
}

.map-stats article {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 64px;
  padding: 8px 14px;
  gap: 10px;
}

.map-stats .stat-icon {
  width: 38px;
  height: 38px;
  font-size: 23px;
}

.map-stats article > div {
  min-width: 0;
}

.map-stats span:not(.stat-icon) {
  display: block;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.15;
}

.map-stats strong {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.map-stats strong small {
  font-size: 12px;
}

/* 지도 이름 위치 보정 후 라벨을 더 얇고 작게 */
.country-pin text,
.city-label text {
  dominant-baseline: middle;
  stroke: rgba(3, 4, 10, 0.68);
  stroke-width: 1.1px;
  font-weight: 500;
}

.country-pin text {
  font-size: 3.2px;
}

.city-label text {
  font-size: 3.6px;
}

.city-label circle,
.country-pin circle {
  opacity: 0.42;
}

/* 감정 지도 하단 통계 아이콘 정렬 */
.map-stats .stat-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 30px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

/* 첫 번째 감정 아이콘 */
.map-stats article:first-child .stat-icon {
  font-size: 34px !important;
}

/* 두 번째 로그 아이콘 */
.map-stats article:nth-child(2) .stat-icon {
  font-size: 28px !important;
}

/* 세 번째 활성 국가 아이콘 */
.map-stats article:nth-child(3) .stat-icon {
  font-size: 32px !important;
}

/* 감정 불빛: 동그라미 자체가 숨 쉬듯 커졌다 작아지는 효과 */
.hotspot,
.hotspot-core,
.hotspot-halo {
  transform: none !important;
  transform-origin: center;
  transform-box: fill-box;
  will-change: r, opacity, filter;
}

/* 바깥 감정 동그라미 */
.hotspot {
  animation: hotspotRadiusBreath 2.7s ease-in-out infinite !important;
  filter: drop-shadow(0 0 12px var(--emotion-color))
          drop-shadow(0 0 24px var(--emotion-color)) !important;
}

/* 안쪽 밝은 중심 */
.hotspot-core {
  animation: hotspotCoreBreath 2.7s ease-in-out infinite !important;
  filter: drop-shadow(0 0 10px #fff)
          drop-shadow(0 0 18px var(--emotion-color)) !important;
}

/* 바깥 퍼지는 빛 */
.hotspot-halo {
  animation: hotspotHaloBreath 2.7s ease-in-out infinite !important;
  filter: blur(3px) drop-shadow(0 0 36px var(--emotion-color)) !important;
}

@keyframes hotspotRadiusBreath {
  0%, 100% {
    r: 7px;
    opacity: 0.66;
  }
  50% {
    r: 9px;
    opacity: 0.98;
  }
}

@keyframes hotspotCoreBreath {
  0%, 100% {
    r: 2.8px;
    opacity: 0.72;
  }
  50% {
    r: 4.6px;
    opacity: 1;
  }
}

@keyframes hotspotHaloBreath {
  0%, 100% {
    r: 17px;
    opacity: 0.06;
  }
  50% {
    r: 27px;
    opacity: 0.18;
  }
}

/* 감정 지도 세계지도 테두리/구분선 황금빛 보정 */
.country {
  stroke: rgba(255, 190, 105, 0.42) !important;
  stroke-width: 0.55 !important;
  filter: drop-shadow(0 0 2px rgba(255, 177, 86, 0.22));
}

.country:hover {
  stroke: rgba(255, 210, 130, 0.75) !important;
  filter: drop-shadow(0 0 5px rgba(255, 180, 90, 0.38));
}

/* 확대했을 때 선이 너무 두꺼워 보이지 않게 */
.map-zoomed .country {
  stroke-width: 0.42 !important;
  stroke: rgba(255, 196, 120, 0.34) !important;
}

.map-detail .country,
.map-close .country {
  stroke-width: 0.32 !important;
  stroke: rgba(255, 198, 120, 0.28) !important;
}

/* 세계지도 경계선: 별빛 같은 점선 하이라이트 */
.country {
  stroke: rgba(255, 205, 130, 0.38) !important;
  stroke-width: 0.55 !important;
  filter: drop-shadow(0 0 3px rgba(255, 190, 105, 0.3));
}

.country:nth-child(3n) {
  stroke-dasharray: 1.4 2.8;
  stroke: rgba(255, 220, 155, 0.5) !important;
}

.country:nth-child(4n) {
  stroke-dasharray: 0.8 3.2;
  stroke: rgba(255, 232, 185, 0.44) !important;
}

.country:nth-child(7n) {
  stroke-dasharray: 2 4;
  stroke: rgba(255, 196, 110, 0.44) !important;
}

/* 확대하면 점선이 너무 튀지 않게 차분하게 */
.map-zoomed .country {
  stroke-width: 0.42 !important;
  stroke: rgba(255, 205, 130, 0.34) !important;
}

.map-detail .country,
.map-close .country {
  stroke-width: 0.32 !important;
  stroke: rgba(255, 205, 130, 0.3) !important;
}

/* 위치 권한 바 아이콘 */
.permission-bar .permission-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.permission-pin {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 45% 35%, rgba(255,255,255,.08), rgba(31,36,52,.92) 52%, rgba(12,15,26,.96));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 0 18px rgba(120, 135, 170, .16);
}

.permission-pin svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #eef2ff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
}

.permission-pin svg circle {
  fill: #eef2ff;
  stroke: none;
}

/* 실제 은하수 이미지 배경 */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(3, 4, 10, .08), rgba(3, 4, 10, .28)),
    url("assets/human-log-milky-way-bg.png") center top / cover no-repeat;
  filter: saturate(.95) contrast(1.08) brightness(.82);
}

.cosmos::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 7%, rgba(255,255,255,.42), transparent 2px),
    radial-gradient(circle at 52% 19%, rgba(150,120,255,.2), transparent 20%),
    radial-gradient(circle at 20% 35%, rgba(255,190,120,.08), transparent 18%),
    radial-gradient(circle at 82% 32%, rgba(125,80,255,.1), transparent 20%);
  mix-blend-mode: screen;
}

.cosmos::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,.38) 100%);
}

.site-header {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

.site-header::before,
.site-header::after {
  display: none !important;
}

.map-stats article > div span {
  font-weight: 500 !important;
  color: rgba(226, 229, 244, 0.72) !important;
}

.map-stats strong {
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.map-stats strong small {
  font-weight: 500 !important;
  font-size: 0.78em;
  margin-left: 2px;
}

.map-stats .live-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 500;
  color: rgba(226, 229, 244, 0.82);
}

.map-stats .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #35df7e;
  box-shadow: 0 0 10px rgba(53, 223, 126, 0.7);
}

.map-stats .live-globe svg {
  width: 27px !important;
  height: 27px !important;
  fill: none;
  stroke: #28e58a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(40, 229, 138, 0.65));
}

.map-stats article:nth-child(2) .stat-icon {
  transform: translateY(-1px);
}

.map-stats .emotion-people svg,
.map-stats .log-list svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.map-stats .emotion-people {
  color: #b35cff;
}

.map-stats .emotion-people svg {
  width: 29px !important;
  height: 29px !important;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(179, 92, 255, 0.55));
}

.map-stats .log-list {
  color: rgba(238, 241, 255, 0.9);
}

.map-stats .log-list svg {
  width: 27px !important;
  height: 27px !important;
  stroke-width: 2.3;
}

/* Feed mockup alignment */
@media (min-width: 761px) {
  .feed-page {
    width: min(1240px, calc(100vw - 92px));
    padding-top: 116px;
    padding-bottom: 28px;
  }

  .feed-page .page-title h1 {
    font-size: 31px;
    line-height: 1;
  }

  .feed-page .page-title p {
    margin-top: 7px;
    font-size: 14px;
  }

  .feed-page .filter-chips {
    margin: 20px 0 14px;
    gap: 8px;
  }

  .feed-page .filter-chip {
    min-height: 29px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 12px;
  }

  .feed-layout {
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 24px;
  }

  .feed-list {
    gap: 7px;
  }

  .feed-page .log-card {
    grid-template-columns: 24px minmax(0, 1fr) 100px 178px;
    min-height: 72px;
    padding: 9px 12px;
    gap: 10px;
    background: rgba(12, 16, 30, .56);
  }

  .feed-page .log-card::after {
    content: "...";
    position: absolute;
    top: 10px;
    right: 15px;
    color: rgba(255, 255, 255, .86);
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 1;
  }

  .feed-page .log-card .glow-dot {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 15px var(--emotion-color), 0 0 24px color-mix(in srgb, var(--emotion-color) 55%, transparent);
  }

  .feed-page .log-meta {
    gap: 8px;
    font-size: 11px;
  }

  .feed-page .log-text {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.32;
  }

  .feed-page .log-tag {
    justify-self: start;
    font-size: 13px;
  }

  .feed-page .translate-btn {
    min-height: 24px;
    margin-top: 7px;
    padding: 0 10px;
    font-size: 11px;
  }

  .feed-page .translate-area {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 12px;
  }

  .feed-page .comfort-btn {
    min-width: 150px;
    min-height: 29px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
  }

  .feed-page .comfort-btn.gold {
    border-color: rgba(255, 215, 106, .95);
    background: rgba(255, 215, 106, .13);
    box-shadow: 0 0 18px rgba(255, 215, 106, .72), 0 0 34px rgba(255, 215, 106, .28);
  }

  .feed-page .comfort-count {
    margin-left: 9px;
  }

  .feed-page .flow-panel {
    top: 92px;
    padding: 18px 16px;
    background: rgba(12, 16, 30, .54);
  }

  .feed-page .flow-panel h2 {
    margin-bottom: 18px;
    font-size: 15px;
  }

  .feed-page .flow-panel article {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 17px 0;
  }

  .feed-page .flow-panel .stat-icon {
    grid-row: span 3;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, .045);
  }

  .feed-page .flow-panel .stat-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .feed-page .flow-panel .emotion-people {
    color: #b35cff;
    box-shadow: 0 0 22px rgba(179, 92, 255, .22);
  }

  .feed-page .flow-panel .log-list {
    color: rgba(238, 241, 255, .92);
  }

  .feed-page .flow-panel .live-globe {
    color: #35df7e;
    box-shadow: 0 0 22px rgba(53, 223, 126, .2);
  }

  .feed-page .flow-panel small,
  .feed-page .flow-panel strong,
  .feed-page .flow-panel em {
    min-width: 0;
    white-space: nowrap;
  }

  .feed-page .flow-panel small {
    font-size: 11px;
  }

  .feed-page .flow-panel strong {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.05;
  }

  .feed-page .flow-panel strong span {
    font-size: 18px;
  }

  .feed-page .flow-panel em {
    font-size: 11px;
  }

  .feed-page .flow-panel .live-line {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
    font-size: 11px;
  }
}

/* v4 feed + my log compact mockup pass */
@media (min-width: 761px) {
  .feed-page,
  .me-page {
    width: min(1240px, calc(100vw - 92px));
    padding-top: 92px;
    padding-bottom: 24px;
  }

  .feed-page .page-title h1,
  .me-page .page-title h1 {
    font-size: 30px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0;
  }

  .feed-page .page-title p,
  .me-page .page-title p {
    margin-top: 7px;
    font-size: 14px;
  }

  .feed-page .filter-chips {
    margin-top: 18px;
  }

  .feed-page .log-card::after {
    content: none;
  }

  .feed-page .log-card {
    min-height: 66px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .feed-page .log-card .glow-dot {
    align-self: center;
    width: 13px;
    height: 13px;
    margin: 0;
  }

  .feed-page .flow-panel .live-line {
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    color: #9fdc91 !important;
  }

  .feed-page .flow-panel .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #81e98a;
    box-shadow: 0 0 10px rgba(129, 233, 138, .7);
  }

  .feed-page .flow-panel .heartbeat-icon {
    width: 26px;
    height: 14px;
    margin-left: auto;
    fill: none;
    stroke: #9fdc91;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .my-stats {
    gap: 14px;
    margin: 22px 0 18px;
  }

  .my-stats article {
    min-height: 82px;
    padding: 14px 18px;
    grid-template-columns: 48px 1fr;
    background: rgba(12, 16, 30, .56);
  }

  .my-stats .stat-icon,
  .anonymous-card .stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    color: #bb71ff;
    background: rgba(168, 85, 247, .13);
    box-shadow: 0 0 24px rgba(168, 85, 247, .2);
  }

  .my-stats .stat-icon svg,
  .anonymous-card .stat-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .my-stats .log-list,
  .my-stats .pulse-icon {
    color: rgba(238, 241, 255, .92);
    background: rgba(255, 255, 255, .055);
    box-shadow: none;
  }

  .my-stats small {
    font-size: 12px;
  }

  .my-stats strong {
    margin-top: 4px;
    font-size: 25px;
    line-height: 1.04;
    font-weight: 700;
  }

  .me-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
  }

  .timeline-card {
    min-height: 0;
    padding: 14px 20px 14px 70px;
    background: rgba(12, 16, 30, .56);
  }

  .timeline-line {
    left: 35px;
    top: 30px;
    bottom: 30px;
    width: 3px;
  }

  .my-log-list {
    gap: 8px;
  }

  .my-log-card {
    grid-template-columns: 56px 90px minmax(0, 1fr) 150px 32px;
    min-height: 54px;
    padding: 8px 10px;
    gap: 10px;
    background: rgba(255, 255, 255, .03);
  }

  .my-log-card::before {
    left: -42px;
    width: 11px;
    height: 11px;
    border-width: 3px;
    background: #151827;
    box-shadow: 0 0 16px rgba(190, 108, 255, .9);
  }

  .my-log-card time {
    white-space: pre-line;
    text-align: center;
    font-size: 11px;
    line-height: 1.35;
  }

  .my-log-card .emotion-label {
    min-height: 32px;
    min-width: 82px;
    padding: 0 11px;
    font-size: 13px;
  }

  .my-log-card .log-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .my-log-card .log-location {
    justify-content: flex-start;
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  .my-log-card .log-location svg {
    width: 15px;
    height: 15px;
    min-width: 15px;
    fill: none;
    stroke: #bb71ff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    color: rgba(226, 229, 244, .7);
    background: transparent;
  }

  .delete-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .settings-panel {
    gap: 20px;
  }

  .anonymous-card,
  .settings-card {
    background: rgba(12, 16, 30, .56);
  }

  .anonymous-card {
    grid-template-columns: 58px 1fr;
    gap: 18px;
    padding: 20px;
  }

  .anonymous-card .lock-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
  }

  .anonymous-card .lock-icon svg {
    width: 30px;
    height: 30px;
  }

  .anonymous-card strong {
    font-size: 15px;
    line-height: 1.45;
  }

  .anonymous-card p {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.55;
  }

  .settings-card {
    padding: 18px;
  }

  .settings-card h2 {
    margin-bottom: 14px;
    font-size: 17px;
  }

  .settings-card button {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto 14px;
    min-height: 52px;
    margin-top: 9px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
  }

  .settings-card button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .settings-card button i {
    color: rgba(226, 229, 244, .45);
    font-style: normal;
    font-size: 22px;
    line-height: 1;
  }

  .settings-card b {
    color: #85f16e;
  }

  .settings-card .anonymous-mode b {
    color: #bb71ff;
  }

  .settings-card .danger {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 84px;
    align-items: start;
    padding: 14px;
  }

  .settings-card .danger svg {
    color: #ff4d57;
  }

  .settings-card .danger small {
    grid-column: 2;
    margin-top: 6px;
    font-size: 12px;
  }
}

/* v5 shared world-map backdrop and tighter my-log scale */
.app-shell {
  z-index: 1;
}

.world-watermark {
  z-index: 0;
  opacity: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 12%, rgba(168, 85, 247, .2), transparent 15%),
    radial-gradient(ellipse at 52% 44%, rgba(255, 180, 96, .08), transparent 38%),
    linear-gradient(to bottom, rgba(3, 4, 10, 0), rgba(3, 4, 10, .08));
}

.watermark-map {
  position: absolute;
  left: 50%;
  top: 36px;
  width: min(1260px, 112vw);
  height: auto;
  transform: translateX(-50%);
  opacity: .64;
  filter: drop-shadow(0 0 18px rgba(255, 183, 96, .18));
}

.watermark-country {
  fill: rgba(17, 31, 48, .34);
  stroke: rgba(255, 202, 135, .28);
  stroke-width: .45;
  vector-effect: non-scaling-stroke;
}

.watermark-country:nth-child(3n) {
  stroke-dasharray: 1.3 2.7;
  stroke: rgba(255, 218, 158, .34);
}

@media (min-width: 761px) {
  .feed-page .flow-panel .live-line {
    justify-content: center;
    text-align: center;
  }

  .feed-page .flow-panel .heartbeat-icon {
    margin-left: 8px;
  }

  .me-page {
    width: min(1120px, calc(100vw - 120px));
    padding-top: 86px;
  }

  .me-page .page-title h1 {
    font-size: 28px;
    font-weight: 600;
  }

  .me-page .page-title p {
    font-size: 13px;
  }

  .my-stats {
    gap: 12px;
    margin: 18px 0 16px;
  }

  .my-stats article {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 72px;
    padding: 12px 16px;
    gap: 3px 12px;
  }

  .my-stats .stat-icon {
    grid-row: 1 / 3;
    grid-column: 1;
    align-self: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .my-stats .stat-icon svg {
    width: 24px;
    height: 24px;
  }

  .my-stats small {
    grid-column: 2;
    align-self: end;
    font-size: 11px;
  }

  .my-stats strong {
    grid-column: 2;
    align-self: start;
    margin: 0;
    font-size: 23px;
  }

  .me-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
  }

  .timeline-card {
    padding: 12px 16px 12px 64px;
  }

  .timeline-line {
    left: 31px;
    top: 26px;
    bottom: 26px;
  }

  .my-log-list {
    gap: 7px;
  }

  .my-log-card {
    grid-template-columns: 52px 82px minmax(0, 1fr) 132px 28px;
    min-height: 48px;
    padding: 7px 9px;
    gap: 8px;
  }

  .my-log-card::before {
    left: -38px;
    width: 10px;
    height: 10px;
  }

  .my-log-card time,
  .my-log-card .log-location {
    font-size: 10px;
  }

  .my-log-card .emotion-label {
    min-width: 76px;
    min-height: 28px;
    font-size: 12px;
  }

  .my-log-card .log-text {
    font-size: 12px;
  }

  .my-log-card .log-location svg {
    width: 13px;
    height: 13px;
    min-width: 13px;
  }

  .delete-btn {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
  }

  .delete-btn svg {
    width: 15px;
    height: 15px;
  }

  .settings-panel {
    gap: 16px;
  }

  .anonymous-card {
    grid-template-columns: 50px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .anonymous-card .lock-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .anonymous-card .lock-icon svg {
    width: 26px;
    height: 26px;
  }

  .anonymous-card strong {
    font-size: 14px;
  }

  .anonymous-card p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
  }

  .settings-card {
    padding: 16px;
  }

  .settings-card h2 {
    margin-bottom: 12px;
    font-size: 16px;
  }

  .settings-card button {
    grid-template-columns: 24px minmax(0, 1fr) auto 12px;
    min-height: 46px;
    margin-top: 8px;
    padding: 0 12px;
    font-size: 12px;
  }

  .settings-card button svg {
    width: 19px;
    height: 19px;
  }

  .settings-card .danger {
    min-height: 74px;
    padding: 12px;
  }

  .settings-card .danger small {
    font-size: 11px;
    line-height: 1.45;
  }
}

/* v6 readability balance: let the map show through */
@media (min-width: 761px) {
  .feed-page .log-card,
  .feed-page .flow-panel,
  .me-page .my-stats article,
  .me-page .timeline-card,
  .me-page .anonymous-card,
  .me-page .settings-card {
    background: rgba(12, 16, 30, .42);
    backdrop-filter: blur(11px);
  }

  .feed-page .log-card {
    border-color: rgba(255, 255, 255, .11);
  }

  .feed-page .log-meta,
  .feed-page .log-meta strong {
    font-size: 10px;
    font-weight: 500;
  }

  .feed-page .log-text {
    font-size: 12px;
    font-weight: 400;
  }

  .feed-page .log-tag {
    font-size: 12px;
    font-weight: 500;
  }

  .feed-page .comfort-btn {
    font-weight: 600;
  }

  .feed-page .flow-panel .live-line {
    width: 78%;
    justify-self: center;
    justify-content: center;
    align-self: center;
    margin: 8px auto 0;
    padding-top: 10px;
  }

  .feed-page .flow-panel .heartbeat-icon {
    margin-left: 8px;
  }

  .me-page .my-stats small {
    font-size: 10px;
    font-weight: 400;
  }

  .me-page .my-stats strong {
    font-size: 21px;
    font-weight: 500;
  }

  .me-page .my-log-card .emotion-label {
    font-size: 11px;
    font-weight: 500;
  }

  .me-page .my-log-card .log-text,
  .me-page .my-log-card time,
  .me-page .my-log-card .log-location {
    font-weight: 400;
  }
}

/* v7 notification/composer icon polish */
.emotion-btn,
.filter-chip,
.draft-btn,
.lock-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.emotion-btn svg,
.filter-chip svg,
.draft-btn svg,
.lock-note svg {
  width: 17px;
  height: 17px;
  min-width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emotion-grid .emotion-btn svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

.draft-btn {
  gap: 7px;
}

.lock-note {
  justify-content: flex-start;
}

.lock-note svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: rgba(226, 229, 244, .86);
}

@media (min-width: 761px) {
  .feed-page .flow-panel .live-line {
    width: 66%;
    margin-top: 18px;
    padding-top: 13px;
    transform: translateY(6px);
  }

  .feed-page .flow-panel .heartbeat-icon {
    width: 24px;
  }

  .feed-page .filter-chip {
    gap: 6px;
  }
}

/* v8 immediate empathy/notification target state */
.feed-page .comfort-btn.gold,
.feed-page .comfort-btn.is-active,
.feed-page .comfort-btn[data-comfort].gold,
.feed-page .comfort-btn[data-comfort].is-active,
.comfort-btn.gold,
.comfort-btn.is-active {
  color: #ffe8aa !important;
  border-color: rgba(255, 215, 106, .96) !important;
  background: rgba(255, 215, 106, .16) !important;
  box-shadow:
    0 0 20px rgba(255, 215, 106, .82),
    0 0 42px rgba(255, 215, 106, .34) !important;
}

.feed-page .comfort-btn.gold .spark,
.feed-page .comfort-btn.is-active .spark {
  color: #fff2bd;
  filter: drop-shadow(0 0 7px rgba(255, 215, 106, .95));
}

.feed-page .log-card:target {
  border-color: rgba(255, 215, 106, .82);
  box-shadow:
    0 0 0 1px rgba(255, 215, 106, .22) inset,
    0 0 26px rgba(255, 215, 106, .22);
}

/* v9 smoother map zoom and pan */
.world-svg {
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
}

.map-bubbles {
  transform: translateZ(0);
  will-change: opacity;
}

.map-log-bubble {
  left: 0;
  top: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  transition: opacity .18s ease, filter .18s ease;
}

.hotspot-wrap,
.country-pin,
.city-label,
.map-star {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.map-viewport.is-zooming .country,
.map-viewport.is-zooming .hotspot,
.map-viewport.is-zooming .hotspot-halo,
.map-viewport.is-zooming .hotspot-core,
.map-viewport.is-zooming .country-pin,
.map-viewport.is-zooming .city-label {
  transition: none !important;
}

.map-viewport.is-dragging .map-bubbles,
.map-viewport.is-zooming .map-bubbles {
  opacity: 1 !important;
  transition: none !important;
}

.map-viewport.is-dragging .map-log-bubble,
.map-viewport.is-zooming .map-log-bubble {
  transition: none !important;
}

.map-viewport.is-dragging .hotspot,
.map-viewport.is-dragging .hotspot-halo,
.map-viewport.is-dragging .hotspot-core,
.map-viewport.is-zooming .hotspot,
.map-viewport.is-zooming .hotspot-halo,
.map-viewport.is-zooming .hotspot-core {
  animation-play-state: running !important;
}

@media (prefers-reduced-motion: no-preference) {
  .map-controls button {
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
  }

  .map-controls button:active {
    transform: scale(.95);
  }
}

/* v10 reverse-geocoded map labels and star markers */
.map-star,
.city-star,
.country-star {
  fill: rgba(255, 246, 222, .78);
  stroke: rgba(255, 216, 150, .42);
  stroke-width: .18;
  filter:
    drop-shadow(0 0 3px rgba(255, 230, 185, .55))
    drop-shadow(0 0 8px rgba(168, 85, 247, .18));
  transform-box: fill-box;
  transform-origin: center;
}

.map-star {
  opacity: .5;
}

.city-star {
  opacity: .48;
}

.country-star {
  opacity: .68;
}

.map-detail .city-star,
.map-close .city-star {
  opacity: .68;
}

.map-close .map-star {
  opacity: .72;
}

.city-label circle,
.country-pin circle {
  display: none;
}

/* v12 mobile stability and dense map labels */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .site-header,
  .topbar {
    max-width: 100vw;
  }

  .content-page,
  .me-page {
    width: min(100% - 28px, 100%);
    padding-top: 92px;
  }

  .feed-layout,
  .me-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .filter-chips {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .log-card {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    grid-template-areas:
      "dot main"
      "dot tag"
      "dot actions";
    gap: 8px 10px;
  }

  .log-card .glow-dot {
    grid-area: dot;
  }

  .log-main {
    grid-area: main;
    min-width: 0;
  }

  .log-tag {
    grid-area: tag;
    justify-self: start;
  }

  .log-actions {
    grid-area: actions;
    width: 100%;
  }

  .comfort-btn {
    width: 100%;
  }

  .me-page .my-log-card {
    grid-template-columns: 46px minmax(72px, auto) minmax(0, 1fr) 28px !important;
    grid-template-areas:
      "time emotion text delete"
      "time location location delete";
    row-gap: 6px;
  }

  .me-page .my-log-card time {
    grid-area: time;
  }

  .me-page .my-log-card .emotion-label {
    grid-area: emotion;
  }

  .me-page .my-log-card .log-text {
    grid-area: text;
  }

  .me-page .my-log-card .log-location {
    grid-area: location;
    justify-self: start;
    max-width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .me-page .delete-btn {
    grid-area: delete;
  }

  .map-stats {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto !important;
  }

  .map-controls {
    right: 12px !important;
    bottom: 96px !important;
  }

  .map-log-bubble {
    max-width: min(210px, calc(100vw - 34px));
  }
}

/* v11 my-log overflow and anchored hash targets */
.log-card,
.my-log-card {
  scroll-margin-top: 104px;
}

.me-page .my-log-card {
  grid-template-columns: 52px 82px minmax(0, 1fr) minmax(0, 176px) 30px !important;
  align-items: center;
  column-gap: 10px;
}

.me-page .my-log-card .log-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-page .my-log-card .log-location {
  justify-self: end;
  min-width: 0;
  max-width: 176px;
  width: 100%;
  min-height: 22px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .16);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-page .my-log-card .log-location svg {
  flex: 0 0 auto;
}

.me-page .delete-btn {
  grid-column: 5;
  justify-self: end;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .me-page .my-log-card {
    grid-template-columns: 46px minmax(72px, auto) minmax(0, 1fr) 28px !important;
    grid-template-areas:
      "time emotion text delete"
      "time location location delete";
  }

  .me-page .my-log-card time { grid-area: time; }
  .me-page .my-log-card .emotion-label { grid-area: emotion; }
  .me-page .my-log-card .log-text { grid-area: text; }

  .me-page .my-log-card .log-location {
    grid-area: location;
    justify-self: start;
    max-width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .me-page .delete-btn {
    grid-area: delete;
    grid-column: auto;
  }
}

/* v15 performance pass: keep the space mood, remove heavy paint work */
.modal-backdrop {
  background: rgba(3, 4, 10, .62) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.composer-modal,
.notification-panel,
.map-log-bubble,
.map-stats,
.quick-input,
.feed-card,
.log-card,
.my-log-card,
.profile-card,
.settings-card,
.legal-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.composer-modal {
  background: rgba(14, 18, 32, .94) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42) !important;
}

body.composer-open .world-svg,
body.composer-open .map-bubbles,
body.composer-open .map-stats,
body.composer-open .permission-bar,
body.composer-open .map-controls {
  opacity: .34;
}

body.composer-open .hotspot,
body.composer-open .hotspot-halo,
body.composer-open .hotspot-core,
body.composer-open .map-star,
body.composer-open .city-star,
body.composer-open .country-star {
  animation: none !important;
  filter: none !important;
}

.map-star,
.city-star,
.country-star,
.country,
.hotspot,
.hotspot-halo,
.hotspot-core,
.country-pin,
.city-label {
  will-change: auto !important;
}

.map-star,
.city-star,
.country-star {
  filter: drop-shadow(0 0 3px rgba(255, 230, 185, .42)) !important;
}

.hotspot,
.hotspot-core {
  filter: drop-shadow(0 0 8px var(--emotion-color)) !important;
}

.hotspot-halo {
  filter: blur(1.5px) !important;
}

.map-log-bubble,
.log-card,
.my-log-card {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035), 0 10px 26px rgba(0, 0, 0, .22) !important;
}

.comfort-btn.gold {
  box-shadow: 0 0 12px rgba(255, 215, 106, .46), 0 0 22px rgba(255, 215, 106, .18) !important;
}
