/* 인생 맵 (메인 페이지·편집기 공용). 색은 페이지의 변수를 쓰고, 없으면 기본값 */
.mapvp { position: relative; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--code-bg, #1f1f1d); }
.mapvp.grabbing { cursor: grabbing; }
.mapworld { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mapedges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.medge .line { fill: none; stroke: var(--faint, #6f6d66); stroke-width: 1.6; }
.medge .hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.medge.on .line { stroke: var(--accent, #a78bfa); stroke-width: 2.4; }
.arrowhead { fill: var(--faint, #6f6d66); }
.elabel { font-size: 12px; font-weight: 600; text-anchor: middle; fill: var(--muted, #a29f95);
  paint-order: stroke; stroke: var(--code-bg, #1f1f1d); stroke-width: 5px; stroke-linejoin: round; }

/* 카드: 안쪽 크기를 전부 em으로 정해서, 배율(--s) 하나만 바꾸면 글자·여백·이미지가 같이 커짐. 기본 1em = 10px */
.mnode { position: absolute; width: max-content; max-width: 22em; padding: 1em 1.3em; cursor: pointer; font-size: calc(10px * var(--s, 1));
  background: var(--surface, #2d2d2b); color: var(--text, #f3f1ea); border: 1px solid var(--line, #3d3d3a); border-radius: 1em;
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .5); transition: border-color .15s; }
.mnode:hover { border-color: var(--muted, #a29f95); }
.mnode.on { border-color: var(--accent, #a78bfa); box-shadow: 0 0 0 2px var(--accent, #a78bfa); }
.mnode.img { width: 22em; }
.mnode img { display: block; width: calc(100% + 2.6em); margin: .9em -1.3em -1em; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0 0 .9em .9em; background: var(--line, #3d3d3a); }
.mnode time { display: block; font-size: 1.15em; color: var(--muted, #a29f95); }
.mnode b { display: block; font-size: 1.45em; line-height: 1.35; letter-spacing: -0.01em; }
.mnode p { margin: .4em 0 0; font-size: 1.25em; line-height: 1.5; color: var(--muted, #a29f95);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mnode strong { font-weight: 800; color: inherit; }
.mnode b strong { font-weight: 900; }
/* 크기를 직접 정한 카드: 이야기를 줄이지 않고 전부 보여주고, 남는 높이는 이야기가 채워서 이미지는 맨 아래로 */
.mnode.sized { display: flex; flex-direction: column; }
.mnode.sized > img, .mnode.sized > time, .mnode.sized > b { flex: none; }
.mnode.sized > p { display: block; flex: 1 0 auto; overflow: visible; -webkit-line-clamp: none; }
/* 크기 조절 손잡이 (편집기). 카드 글자 크기와 상관없이 같은 크기 */
.mresize { position: absolute; background: var(--accent, #a78bfa); border: 2px solid var(--code-bg, #1f1f1d); }
.mresize.e { right: -6px; top: 50%; width: 10px; height: 26px; margin-top: -13px; border-radius: 5px; cursor: ew-resize; }
.mresize.s { bottom: -6px; left: 50%; width: 26px; height: 10px; margin-left: -13px; border-radius: 5px; cursor: ns-resize; }
.mresize.se { right: -8px; bottom: -8px; width: 16px; height: 16px; border-radius: 50%; cursor: nwse-resize; }
.mnode[data-tone="accent"] { border-color: var(--accent, #a78bfa); background: var(--accent, #a78bfa); color: #fff; }
.mnode[data-tone="accent"] time, .mnode[data-tone="accent"] p { color: rgba(255, 255, 255, .82); }
.mnode[data-tone="dim"] { background: transparent; border-style: dashed; }
