/* DearMind — 따뜻한 마음속 정원: 크림빛 배경 · 흰 카드 · 세이지 그린 포인트 · 둥근 모서리.
 * 뼈대는 DearInside 의 styles.css — 포인트 색 변수 이름(--pink …)은 그대로 두고 값만 바꿨다. DearMind 전용 규칙은 맨 아래. */
:root {
  --bg: #f7f5ee;
  --bg2: #ecebe0;
  --card: #ffffff;
  --ink: #2b2a2d;
  --ink2: #5a5860;
  --muted: #96939b;
  --line: #e7e4d8;
  --pink: #4b9a72;      /* 포인트 색 (세이지 그린) */
  --pink2: #7fbf97;
  --pinkSoft: #e7f3ea;
  --pinkLine: #bfdfc8;
  --violet: #9a8fd1;
  --shadow: 0 6px 24px rgba(70, 90, 70, .09);
  --radius: 22px;
  --tabs: 74px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg2); color: var(--ink); font: 15px/1.5 var(--sans); letter-spacing: -.01em; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; box-shadow: 0 0 60px rgba(120, 70, 60, .07); }
.main { padding-bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); min-height: 100dvh; }
body.no-tabs .main { padding-bottom: 0; }
body.no-tabs .tabs { display: none; }

/* ── 하단 탭 ── */
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30;
  height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 500; }
.tabs a.on { color: var(--pink); }
.tabs a.on svg { stroke-width: 2.2; }
.tab-plus { display: flex; justify-content: center; align-items: center; }
.tab-plus b { width: 56px; height: 56px; margin-top: -14px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--pink2), var(--pink)); box-shadow: 0 8px 20px rgba(75, 154, 114, .35); }
.tab-plus b svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* ── 머리 ── */
.top { display: flex; align-items: center; gap: 6px; padding: 14px 18px 8px; position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 238, .92); backdrop-filter: blur(10px); }
.logo { font-family: var(--serif); font-size: 31px; line-height: 1; letter-spacing: -.01em; margin-right: auto; }
.logo sup { font: 600 10px var(--sans); color: var(--pink); margin-left: 3px; letter-spacing: .04em; text-transform: uppercase; vertical-align: super; }
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--ink); }
.ibtn:active { background: var(--line); }
.ibtn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); border: 2px solid var(--bg); }
.top .me-av { width: 36px; height: 36px; }
.bar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 12px 10px; position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 238, .94); backdrop-filter: blur(10px); }
.bar h1 { margin: 0; text-align: center; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .bar-r { justify-self: end; }
.bar .back { justify-self: start; }
.chip-ai { font-size: 11px; font-weight: 600; color: var(--pink); background: var(--pinkSoft); border-radius: 99px; padding: 3px 9px; }

/* ── 아바타 ── */
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--pinkSoft); }
.av.sm { width: 32px; height: 32px; }
.av.xs { width: 24px; height: 24px; }
.av.lg { width: 64px; height: 64px; }
.uav { display: inline-block; border-radius: 50%; padding: 2px; background: var(--ring, #f7838f); flex: none; }
.uav img { width: 100%; height: 100%; border-radius: 50%; background: #fff; object-fit: cover; }
.ring0 { --ring: #f7838f; } .ring1 { --ring: #f6b26b; } .ring2 { --ring: #ffd966; } .ring3 { --ring: #93c47d; }
.ring4 { --ring: #76a5af; } .ring5 { --ring: #6fa8dc; } .ring6 { --ring: #8e7cc3; } .ring7 { --ring: #c27ba0; }

/* ── 스토리 줄 (캐릭터 필터) ── */
.stories { display: flex; gap: 10px; overflow-x: auto; padding: 6px 16px 12px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink2); min-width: 56px; }
.story i { width: 56px; height: 56px; border-radius: 50%; padding: 2.5px; background: var(--line); display: block; }
.story i img, .story i span { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--bg); object-fit: cover; }
.story i span { display: grid; place-items: center; background: linear-gradient(140deg, #f9d6c8, #e7c2f0); font-size: 20px; }
.story.on { color: var(--ink); }
.story.on i { background: linear-gradient(140deg, var(--pink2), var(--violet)); }

/* ── 카드 ── */
.feed { display: flex; flex-direction: column; gap: 14px; padding: 0 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; position: relative; overflow: hidden; }
.card.tap { cursor: pointer; }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.who b { font-weight: 700; font-size: 15px; }
.who small { color: var(--muted); font-size: 12.5px; }
.who .organ { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.badge { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 9px; background: var(--pinkSoft); color: var(--pink); white-space: nowrap; }
.badge.news { background: #eef0ff; color: #5b6bd6; letter-spacing: .03em; }
.badge.new { background: #e9f8ef; color: #2f9a5d; }
.badge.me { background: #fff1e0; color: #d9822b; }
.post-text { margin: 10px 0 0; font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.acts { display: flex; align-items: center; gap: 18px; margin-top: 12px; color: var(--ink2); font-size: 14px; }
.acts button, .acts a { display: inline-flex; align-items: center; gap: 6px; }
.acts .sp { margin-left: auto; }
.acts .heart.on svg { fill: var(--pink); stroke: var(--pink); }
.acts .mark.on svg { fill: var(--ink); }
.heart svg { width: 21px; height: 21px; }

/* 큰 그림 카드 (히어로) — 그림 위에 글 */
.card.hero { padding: 0; min-height: 260px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.card.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 30, .35) 0%, rgba(20, 10, 30, 0) 30%, rgba(20, 10, 30, .15) 50%, rgba(20, 10, 30, .78) 100%); }
.card.hero > * { position: relative; z-index: 1; }
.card.hero .who { padding: 14px 14px 0; }
.card.hero .who small, .card.hero .who .organ { color: rgba(255, 255, 255, .8); }
.card.hero .hero-body { padding: 70px 16px 14px; }
.card.hero .post-text { font-size: 17px; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.card.hero .acts { color: #fff; }
.card.hero .acts .heart.on svg { fill: #fff; stroke: #fff; }
.card.hero .acts .mark.on svg { fill: #fff; }
.card.hero .badge { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .5); }

/* 옆 그림 카드 */
.side { display: grid; grid-template-columns: 1fr 132px; gap: 12px; align-items: start; }
.side .thumb { width: 132px; height: 132px; border-radius: 16px; object-fit: cover; }
.thumb.wait, .pimg.wait { background: linear-gradient(110deg, #f6ece6 30%, #fbf4ef 50%, #f6ece6 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 내 기록 카드 */
.card.rec { border: 1.5px solid #fbe3d0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--ink2); }
.peek { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.peek p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink2); }
.peek p b { color: var(--ink); white-space: nowrap; }
.typing { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--pink2); animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* 투표 */
.poll { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.poll-q { font-size: 15.5px; font-weight: 600; margin: 10px 0 2px; }
.opt { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--bg); overflow: hidden; font-size: 14px; text-align: left; width: 100%; border: 1.5px solid transparent; }
.opt:not([disabled]):hover { border-color: var(--pinkLine); }
.opt i { position: absolute; inset: 0 auto 0 0; background: var(--pinkSoft); border-radius: 14px; transition: width .6s; }
.opt span, .opt em { position: relative; font-style: normal; }
.opt em { color: var(--muted); font-size: 13px; }
.opt.mine { border-color: var(--pink2); font-weight: 600; }
.opt.mine i { background: #fbd3d8; }
.poll-meta { font-size: 12.5px; color: var(--muted); }

/* 샘플 안내 */
.banner { margin: 4px 14px 14px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(130deg, #fff0ee, #f5ecff); display: flex; gap: 12px; align-items: center; }
.banner p { margin: 0; font-size: 13.5px; color: var(--ink2); flex: 1; }
.banner b { color: var(--ink); }
.ticking { margin: 0 14px 12px; padding: 10px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; color: var(--ink2); display: flex; gap: 10px; align-items: center; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 99px; font-weight: 700; font-size: 15.5px; }
.btn-cta { background: linear-gradient(140deg, var(--pink2), var(--pink)); color: #fff; box-shadow: 0 8px 18px rgba(240, 90, 110, .28); }
.btn-cta:disabled { opacity: .5; box-shadow: none; }
.btn-ghost { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.btn-danger { background: #d94b5c; color: #fff; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.pill-btn { height: 34px; padding: 0 16px; border-radius: 99px; background: linear-gradient(140deg, var(--pink2), var(--pink)); color: #fff; font-weight: 700; font-size: 14px; }
.pill-btn:disabled { opacity: .45; }
.link { color: var(--pink); font-weight: 600; }

/* ── 게시물 페이지 ── */
.pimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; margin-top: 12px; }
.thread { padding: 4px 14px 120px; display: flex; flex-direction: column; gap: 10px; }
.cmt { background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.cmt.child { margin-left: 26px; position: relative; }
.cmt.child::before { content: '↳'; position: absolute; left: -20px; top: 14px; color: var(--muted); }
.cmt .who b { font-size: 14px; }
.cmt p { margin: 4px 0 0 41px; font-size: 14.5px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.cmt .cacts { margin: 6px 0 0 41px; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.cmt .cacts button { display: inline-flex; align-items: center; gap: 4px; }
.cmt .cacts svg { width: 16px; height: 16px; }
.cmt .cacts .on svg { fill: var(--pink); stroke: var(--pink); }
.cmt.mine { background: #fff8f1; }
.composer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 25; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.composer .replying { font-size: 12.5px; color: var(--muted); margin: 0 0 6px 6px; display: flex; gap: 8px; }
.composer form { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; border: 1.5px solid var(--line); background: var(--bg); border-radius: 22px; padding: 10px 16px; max-height: 120px; min-height: 44px; outline: none; }
.composer textarea:focus { border-color: var(--pinkLine); }
.send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--pink2), var(--pink)); flex: none; }
.send:disabled { opacity: .4; }

/* ── 기록 ── */
.rec-bar { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; padding: 14px; }
.rec-bar h1 { margin: 0; font-size: 17px; text-align: center; }
.rec-bar .pill-btn { justify-self: end; }
.writer { margin: 0 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.writer textarea { width: 100%; border: 0; outline: none; resize: none; min-height: 150px; font-size: 16px; line-height: 1.6; background: transparent; }
.writer .count { text-align: right; color: var(--muted); font-size: 12.5px; }
.tools { display: flex; gap: 10px; align-items: center; margin: 12px 14px; }
.tool { width: 46px; height: 46px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink2); }
.tool.on { color: #fff; background: var(--pink); }
.tool-wide { margin-left: auto; height: 42px; padding: 0 16px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.ideas { margin: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.idea { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; font-size: 14.5px; }
.panel { margin: 0 14px 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 15px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; }
.chip.on { border-color: var(--pink2); background: var(--pinkSoft); color: var(--pink); font-weight: 600; }
.recent { display: flex; flex-direction: column; gap: 10px; }
.recent a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--bg); }
.recent .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff2e6; font-size: 20px; flex: none; }
.recent div { min-width: 0; flex: 1; }
.recent b { display: block; font-size: 13.5px; }
.recent span { display: block; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 인터뷰 · DM (채팅) ── */
.chat { padding: 6px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; }
.msg .bub { background: var(--card); border-radius: 20px 20px 20px 6px; padding: 12px 15px; box-shadow: var(--shadow); font-size: 15px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.msg .bub small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bub { background: linear-gradient(140deg, #fff0f1, #ffe6e9); border-radius: 20px 20px 6px 20px; }
.rumi-hello { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 4px; padding: 6px 14px 0; }
.rumi-hello img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; }
.rumi-hello .bub { background: var(--card); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); font-size: 15px; }
.qcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.qcard .q { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { min-height: 50px; padding: 8px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font-size: 14.5px; position: relative; }
.choice.on { border-color: var(--pink2); background: var(--pinkSoft); font-weight: 600; }
.choice.on::after { content: '✓'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 12px; display: grid; place-items: center; }
.free { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.free textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 18px; padding: 11px 14px; resize: none; min-height: 46px; max-height: 120px; outline: none; background: var(--bg); }
.progress { display: flex; align-items: center; gap: 12px; padding: 4px 14px; font-size: 13.5px; color: var(--ink2); }
.progress .track { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; max-width: 110px; }
.progress .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink2), var(--pink)); border-radius: 6px; transition: width .4s; }
.progress .btn { margin-left: auto; }
.skip { padding: 14px 18px 4px; font-size: 13.5px; color: var(--muted); }
.skip button { color: var(--ink2); text-decoration: underline; }
.iv-start { padding: 10px 18px 20px; text-align: center; }
.iv-start img { width: 190px; height: 190px; border-radius: 50%; margin: 10px auto 14px; object-fit: cover; box-shadow: var(--shadow); }
.iv-start h2 { margin: 0 0 6px; font-size: 22px; }
.iv-start p { color: var(--ink2); margin: 0 auto 18px; max-width: 320px; }

/* ── 캐스트 ── */
.cast-head { padding: 18px 20px 4px; }
.cast-head h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; }
.cast-head p { margin: 4px 0 0; color: var(--ink2); }
.orbit { position: relative; width: min(360px, 88vw); aspect-ratio: 1; margin: 34px auto 10px; }
.orbit::before { content: ''; position: absolute; inset: 16%; border-radius: 50%; border: 1.5px dashed var(--pinkLine); }
.orbit a { position: absolute; width: 21%; text-align: center; transform: translate(-50%, -50%); font-size: 12.5px; font-weight: 600; }
.orbit a img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 16px rgba(120, 70, 60, .16); border: 3px solid #fff; }
.orbit a small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.orbit .center { width: 25%; left: 50%; top: 50%; }
.orbit .center .uav { width: 100%; aspect-ratio: 1; padding: 4px; box-shadow: 0 10px 26px rgba(240, 90, 110, .25); }
.orbit .center b { display: block; margin-top: 4px; font-size: 14px; }
.cast-list { display: flex; flex-direction: column; gap: 12px; padding: 8px 14px; }
.ccard { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.ccard img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.ccard h3 { margin: 0; font-size: 17px; }
.ccard h3 small { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.ccard p { margin: 2px 0 6px; font-size: 13.5px; color: var(--ink2); }
.meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.meter .track { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter .track i { display: block; height: 100%; border-radius: 6px; }
.section-t { padding: 18px 20px 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rels { display: flex; flex-direction: column; gap: 10px; padding: 0 14px; }
.rel { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.rel .pair { display: flex; flex: none; }
.rel .pair img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.rel .pair img + img { margin-left: -12px; }
.rel b { font-size: 14px; }
.rel p { margin: 2px 0 0; font-size: 13px; color: var(--ink2); }

/* 캐릭터 프로필 */
.prof-cover { height: 120px; margin: 0 14px; border-radius: 26px 26px 0 0; }
.prof { margin: -70px 14px 0; text-align: center; position: relative; }
.prof > img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 5px solid var(--bg); box-shadow: var(--shadow); }
.prof h1 { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.prof .sub { color: var(--ink2); font-size: 14px; }
.prof blockquote { margin: 12px auto; max-width: 320px; font-size: 16px; font-weight: 600; }
.prof .bio { color: var(--ink2); font-size: 14.5px; max-width: 360px; margin: 0 auto 14px; }
.prof .row { display: flex; gap: 10px; justify-content: center; }
.kv { margin: 16px 14px 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; }
.kv h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.seg { display: flex; margin: 18px 14px 12px; background: var(--line); border-radius: 99px; padding: 4px; }
.seg button { flex: 1; height: 36px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.mem { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14px; }
.mem time { font-size: 12px; color: var(--muted); }
.mem p { margin: 4px 0 0; }
.mem q { display: block; margin-top: 6px; color: var(--ink2); quotes: none; }

/* DM 목록 */
.inbox { display: flex; flex-direction: column; padding: 0 8px; }
.inbox a { display: flex; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 16px; }
.inbox a:active { background: var(--line); }
.inbox div { min-width: 0; flex: 1; }
.inbox b { font-size: 15px; }
.inbox span { display: block; font-size: 13.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 마이 */
.mehead { display: flex; gap: 16px; align-items: center; padding: 18px 20px; }
.mehead .uav { width: 76px; height: 76px; padding: 3px; }
.mehead h1 { margin: 0; font-size: 22px; }
.mehead p { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 0; text-align: center; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 12.5px; color: var(--muted); }
.menu { margin: 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
.menu > :last-child { border-bottom: 0; }
.menu .danger { color: #d94b5c; }
.menu em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13.5px; }

/* 알림 */
.noti { display: flex; flex-direction: column; padding: 0 8px; }
.noti a { display: flex; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 16px; font-size: 14.5px; }
.noti a.new { background: #fff3f1; }
.noti time { display: block; font-size: 12px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 40px 24px; font-size: 14.5px; }
.loading { display: grid; place-items: center; padding: 60px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--pinkLine); border-top-color: var(--pink); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--ink2); }
.err { color: #d94b5c; font-size: 13.5px; }

/* ── 토스트 · 시트 ── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: rgba(42, 34, 36, .92); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal, .overlay { position: fixed; inset: 0; z-index: 90; background: rgba(42, 34, 36, .45); display: grid; place-items: end center; }
@media (min-width: 560px) { .modal, .overlay { place-items: center; } .sheet { border-radius: 26px !important; } }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); position: relative; max-height: 92dvh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { margin: 0; font-size: 21px; }
.sheet p { margin: 0; }
.sheet-x { position: absolute; top: 14px; right: 16px; font-size: 26px; color: var(--muted); width: 36px; height: 36px; }
.sheet .logo { font-size: 30px; }
.sheet textarea, .sheet input[type=text], .sheet input[type=password] { width: 100%; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #fff; outline: none; }
.sheet .tiny { font-size: 12px; color: var(--muted); }
.fb-stars { display: flex; gap: 6px; }
.fb-stars button { font-size: 30px; color: var(--line); }
.fb-stars button.on { color: #f5b942; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opts button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 18px; background: #fff; border: 2px solid transparent; font-size: 12.5px; }
.opts button.on { border-color: var(--pink2); background: var(--pinkSoft); }
.opts .uav { width: 58px; height: 58px; }
.keep { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); }
.gbtn { min-height: 44px; display: grid; place-items: center; }
.warn { background: #fff3e0; color: #8a5a14; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }

/* 입장 암호 · 나이 */
.dw-gate { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .cast-row { display: flex; justify-content: center; margin-bottom: 4px; }
.gate-card .cast-row img { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--bg); margin-left: -10px; object-fit: cover; }
.gate-card .logo { font-size: 42px; margin: 0; }
.gate-card p { margin: 0; color: var(--ink2); }
.gate-card input { height: 50px; border-radius: 16px; border: 1.5px solid var(--line); padding: 0 16px; text-align: center; outline: none; background: #fff; }

/* 자매품 · 바닥글 */
.foot { padding: 30px 18px 10px; text-align: center; }
.foot-link { color: var(--muted); font-size: 13.5px; text-decoration: underline; }
.sisters { margin-top: 22px; text-align: left; }
.sisters-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 4px; }
.sisters ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sisters a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); }
.sisters img { width: 44px; height: 44px; border-radius: 12px; }
.sisters b { display: block; font-size: 14px; }
.sisters small { color: var(--muted); font-size: 12.5px; }
.guide-link { display: block; text-align: center; font-size: 13.5px; color: var(--ink2); margin: 2px 0 12px; }
.guide-link b { color: var(--pink); }

/* 설치 팝업 (install.js) 은 자체 스타일 */

/* ── 앱 설치 팝업 (install.js, DearWorld 공통) ── */
.dwi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; display: flex; justify-content: center; padding: 0 12px calc(var(--tabs) + 12px + env(safe-area-inset-bottom)); pointer-events: none; animation: fadeUp .4s ease both; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(120, 70, 60, .25); display: flex; flex-direction: column; gap: 12px; }
.dwi-head { display: flex; gap: 12px; align-items: flex-start; }
.dwi-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.dwi-head b { display: block; font-weight: 700; font-size: 16px; }
.dwi-head p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; }
.dwi-main { background: linear-gradient(140deg, var(--pink2), var(--pink)); color: #fff; }
.dwi-ghost { border: 1px solid var(--line); color: var(--ink2); }
.dwi-more { font-size: 13.5px; color: var(--ink); }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: var(--bg); color: #2f7cf6; }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

/* 조연 주민 (Cast 페이지, 머리 → 발끝) */
.rsearch { padding: 0 14px 6px; }
.rsearch input { width: 100%; height: 44px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; padding: 0 18px; outline: none; }
.rsearch input:focus { border-color: var(--pinkLine); }
.region-t { margin: 16px 20px 8px; font-size: 14px; }
.region-t small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.rgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 14px; }
.rgrid a { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 4px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.rgrid img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; background: var(--pinkSoft); }
.rgrid b { font-size: 13px; }
.rgrid small { font-size: 11px; color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; }
.rgrid a.met { box-shadow: var(--shadow), inset 0 0 0 2px #bfe8cf; }

/* ＋ 시트: Post · Interview */
.plus-sheet .choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plus-sheet a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.plus-sheet a img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.plus-sheet a .ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--pink2), var(--pink)); }
.plus-sheet a .ico svg { width: 32px; height: 32px; }
.plus-sheet a b { font-size: 16px; }
.plus-sheet a small { font-size: 12.5px; color: var(--ink2); }

/* 홈 (개요) */
.hello { margin: 4px 14px 14px; padding: 20px 18px; border-radius: 26px; background: linear-gradient(135deg, #ffe9e6 0%, #f3e9ff 100%); position: relative; overflow: hidden; }
.hello h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.hello p { margin: 6px 0 14px; color: var(--ink2); font-size: 14px; }
.hello .row { display: flex; gap: 8px; }
.hello .peeps { position: absolute; right: -8px; top: 12px; display: flex; opacity: .95; }
.hello .peeps img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; margin-left: -12px; object-fit: cover; }
.home-sec { margin: 18px 0 0; }
.home-sec .sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px 8px; }
.home-sec .sec-h h3 { margin: 0; font-size: 16px; }
.home-sec .sec-h a { font-size: 13px; color: var(--pink); font-weight: 600; }
.hstrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 8px; scrollbar-width: none; }
.hstrip::-webkit-scrollbar { display: none; }
.hstrip a { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 6px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.hstrip img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.hstrip b { font-size: 13px; }
.hstrip small { font-size: 11px; color: var(--muted); }
.ask { display: flex; gap: 12px; align-items: center; margin: 0 14px 10px; padding: 12px 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.ask div { flex: 1; min-width: 0; }
.ask b { font-size: 13px; }
.ask p { margin: 2px 0 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask .go { color: var(--pink); flex: none; }
.close3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px; }
.close3 a { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 12px 8px; text-align: center; }
.close3 img { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 6px; object-fit: cover; }
.close3 b { font-size: 13px; display: block; }
.close3 .meter { margin-top: 6px; }
/* 내 댓글은 그림이 조금 크다 (40px) — 글 들여쓰기도 맞춘다 */
.cmt.mine p, .cmt.mine .cacts { margin-left: 49px; }

/* ── 글의 종류별 카드 ── */
.k-card { margin-top: 12px; border-radius: 18px; padding: 14px; background: var(--bg); font-size: 14.5px; }
.k-card p { margin: 6px 0 0; }
.k-title { display: block; font-size: 15.5px; line-height: 1.45; }
.k-answer { font-weight: 700; color: var(--ink2); }
.forecast { background: linear-gradient(160deg, #eef6ff, #f6f0ff); }
.fc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 6px; }
.fc-row div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: rgba(255,255,255,.7); border-radius: 14px; padding: 8px 4px; }
.fc-row small { font-size: 11.5px; color: var(--muted); font-weight: 700; } .fc-row i { font-style: normal; font-size: 24px; } .fc-row span { font-size: 12px; line-height: 1.35; }
.fc-sum { font-size: 13.5px; color: var(--ink2); }

/* ── 이미지 카드 공유 ── */
.acts .sp { margin-left: auto; }
.acts .mark { margin-left: 4px; }
.acts .mark.sp { margin-left: auto; }
.sc-host { position: fixed; left: -10000px; top: 0; pointer-events: none; }
.sharecard { width: 400px; padding: 22px 18px 18px; background: linear-gradient(180deg, #fff4ef 0%, #fbf5ef 30%, #f6ecff 100%); font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; color: var(--ink); }
.sharecard .card { box-shadow: 0 8px 24px rgba(120, 70, 60, .12); }
.sharecard .k-btns, .sharecard .ms-row button, .sharecard .acts { display: none; }
.sc-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sc-top .logo { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 26px; }
.sc-top small { color: var(--muted); font-size: 12px; }
.sc-cmt { display: flex; gap: 8px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 10px 12px; margin-top: 8px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 4px 14px rgba(120, 70, 60, .08); }
.sc-cmt b { font-weight: 700; margin-right: 4px; }
.sc-foot { text-align: center; margin-top: 18px; }
.sc-faces { display: flex; justify-content: center; margin-bottom: 6px; }
.sc-faces img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; margin: 0 -4px; object-fit: cover; }
.sc-foot b { display: block; font-size: 13px; } .sc-foot small { color: var(--muted); font-size: 11.5px; }
.share-sheet .sh-preview { display: grid; place-items: center; min-height: 160px; max-height: 52dvh; overflow: auto; background: #f3ebe6; border-radius: 18px; padding: 10px; }
.share-sheet .sh-preview img { width: 100%; max-width: 300px; border-radius: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
.sh-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@keyframes sayPop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }

/* 프로필 편집 */
.prof-sheet .pf-me { display: flex; gap: 14px; align-items: center; }
.prof-sheet #pfAv { width: 72px; height: 72px; display: grid; place-items: center; flex: none; }
.prof-sheet input[type=text] { margin-top: 6px; }
.pf-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-upload { cursor: pointer; }
.pf-rings { display: flex; gap: 6px; }
.pf-rings button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.pf-rings button.on { box-shadow: 0 0 0 2px var(--ink); }
.pf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 34dvh; overflow: auto; padding: 4px; background: #fff; border-radius: 16px; }
.pf-grid button { aspect-ratio: 1; border-radius: 50%; padding: 2px; border: 2px solid transparent; }
.pf-grid button.on { border-color: var(--pink); background: var(--pinkSoft); }
.pf-grid img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* 주민이 먼저 보낸 DM */
.ibtn .nbadge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; display: grid; place-items: center; border: 2px solid var(--bg); }
.dm-banner { display: flex; align-items: center; gap: 10px; margin: 2px 14px 12px; padding: 10px 12px; border-radius: 18px; background: linear-gradient(120deg, #fff0f3, #f3edff); box-shadow: var(--shadow); animation: sayPop .3s ease-out; }
.dm-banner div { flex: 1; min-width: 0; }
.dm-banner b { display: block; font-size: 14px; }
.dm-banner small { display: block; color: var(--ink2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-banner .n, .inbox .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.inbox a.unread { background: #fff3f5; }
.inbox a.unread b, .inbox a.unread span { color: var(--ink); font-weight: 700; }
.ib-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ib-meta small { color: var(--muted); font-size: 12px; }

.qcard .q-for { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }

/* 몸 지도 확대 */

/* 손가락 동작: 확대 전엔 세로 스크롤은 브라우저에, 확대하면 전부 지도가 받는다 */

/* 글쓰기 사진 */
label.tool { cursor: pointer; }
.ph-prev { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.ph-prev button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 1; }

/* DM 시각 */
.chat .msg time { font-size: 11px; color: var(--muted); align-self: flex-end; white-space: nowrap; flex: none; }
.chat .msg.cont { margin-top: -6px; }
.chat .av-gap { width: 32px; flex: none; }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 12px; color: var(--muted); }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }


/* ════════ DearMind 전용 ════════ */

/* DearInside 의 분홍빛 바탕들을 정원 빛으로 */
.shell { box-shadow: 0 0 60px rgba(70, 90, 70, .08); }
.top { background: rgba(247, 245, 238, .92); }
.hello { background: linear-gradient(135deg, #e8f3e2 0%, #f1edfb 100%); }
.banner { background: linear-gradient(130deg, #edf6e8, #f3eefc); }
.dm-banner { background: linear-gradient(120deg, #eef6ea, #f3eefc); }
.card.rec { border-color: #dcebd2; }
.story.on i { background: linear-gradient(140deg, var(--pink2), var(--violet)); }
.story i span { background: linear-gradient(140deg, #dcefd6, #e7dcf5); }
.btn-cta { box-shadow: 0 8px 18px rgba(75, 154, 114, .28); }
.badge.me { background: #eef3dc; color: #6f8a2c; }
.sharecard { background: linear-gradient(180deg, #eef6e9 0%, #f7f5ee 30%, #f1ecfb 100%); }
.sharecard .card { box-shadow: 0 8px 24px rgba(70, 90, 70, .12); }
.sharecard .cn-opts, .sharecard .diary button, .sharecard .rx-pick, .sharecard .acts, .sharecard .poll-meta { display: none; }
.iv-start img, .rumi-hello img { background: #f3ead9; }

/* ── 마음 정원 (홈 맨 위, app.js mountGarden) ── */
.garden { margin: 4px 14px 12px; border-radius: 26px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.gd-scene { position: relative; aspect-ratio: 6 / 5; overflow: hidden; cursor: pointer; user-select: none; -webkit-user-select: none; }
.gd-art { position: absolute; inset: 0; width: 100%; height: 100%; stroke: none; stroke-width: 0; }
.gd-r { position: absolute; translate: -50% -78%; width: 46px; height: 46px; border-radius: 50%; padding: 0; background: #fff; box-shadow: 0 3px 10px rgba(40, 60, 40, .25); z-index: 2; transition: box-shadow .2s; }
.gd-r img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2.5px solid #fff; }
.gd-r.guest { width: 34px; height: 34px; z-index: 1; }
.gd-r.guest img { border-width: 2px; }
.gd-r.st-idle, .gd-r.st-talk { animation: gdBreath 4.6s ease-in-out infinite; }
.gd-r:nth-of-type(2n) { animation-delay: -1.3s; } .gd-r:nth-of-type(3n) { animation-delay: -2.6s; }
.gd-r.st-sleep { opacity: .82; filter: saturate(.6) brightness(.92); animation: gdBreath 7s ease-in-out infinite; }
.gd-r.st-near { box-shadow: 0 0 0 3px #ffe9a3, 0 0 16px 4px rgba(255, 220, 120, .65); animation: gdBreath 3s ease-in-out infinite; }
.gd-r.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--pink2), 0 6px 16px rgba(40, 60, 40, .3); z-index: 4; }
.gd-r.speaking { z-index: 5; }
.gd-r .fx { position: absolute; right: -9px; top: -11px; font-style: normal; font-size: 13px; pointer-events: none; }
.gd-r .fx.z { font-weight: 800; color: #aab0ea; font-size: 13px; animation: zz 2.6s infinite ease-in-out; }
@keyframes zz { 0% { transform: translate(0, 4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translate(6px, -10px); opacity: 0; } }
@keyframes gdBreath { 0%, 100% { scale: 1; } 50% { scale: 1.045; } }
.gd-say { position: absolute; z-index: 6; transform: translate(-50%, calc(-100% - 48px)); max-width: 190px; width: max-content; text-align: left; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.38;
  padding: 8px 12px; border-radius: 15px; box-shadow: 0 6px 18px rgba(40, 50, 40, .22); animation: sayPop .25s ease-out; }
.gd-say b { display: block; font-size: 11px; color: var(--pink); margin-bottom: 1px; }
.gd-say::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.gd-say.left { transform: translate(calc(-100% + 24px), calc(-100% - 48px)); } .gd-say.left::after { left: calc(100% - 24px); }
.gd-say.right { transform: translate(-24px, calc(-100% - 48px)); } .gd-say.right::after { left: 24px; }
.gd-say.below { transform: translate(-50%, 20px); } .gd-say.below::after { top: -6px; bottom: auto; border-top: 0; border-bottom: 7px solid #fff; }
.gd-say.left.below { transform: translate(calc(-100% + 24px), 20px); } .gd-say.right.below { transform: translate(-24px, 20px); }
.gd-foot { padding: 12px 14px 14px; }
.gd-cap { margin: 0; font-size: 13.5px; color: var(--ink2); }
.gd-cap b { color: var(--ink); }
.gd-cap span { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.gd-sel { display: flex; gap: 10px; align-items: center; }
.gd-sel div { flex: 1; min-width: 0; }
.gd-sel b { font-size: 15px; }
.gd-sel small { display: block; color: var(--muted); font-size: 12.5px; }
.gd-more { font-size: 13px; font-weight: 700; color: var(--pink); flex: none; }
.gd-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.gd-acts button { height: 42px; border-radius: 99px; background: var(--bg); border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.gd-acts button:disabled { opacity: .5; }
/* 정원의 작은 움직임 */
.gd-cloud { animation: gdDrift 70s linear infinite alternate; } .gd-cloud.slow { animation-duration: 110s; animation-direction: alternate-reverse; }
@keyframes gdDrift { from { transform: translateX(-20px); } to { transform: translateX(60px); } }
.gd-tree { transform-origin: 66px 190px; }
.gd-scene.breeze .gd-tree { animation: gdSway 2.6s ease-in-out; }
.gd-scene.breeze .gd-flower { animation: gdSway 1.3s ease-in-out 2; }
.gd-scene.breeze .gd-petals { animation: gdPetals 2.8s ease-out; }
.gd-scene.breeze .gd-cloud { animation-duration: 20s; }
@keyframes gdSway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(3.2deg); } 65% { transform: rotate(-1.6deg); } }
@keyframes gdPetals { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: .95; } 100% { opacity: 0; transform: translate(230px, 90px); } }
.gd-bfly { animation: gdBfly 16s ease-in-out infinite; }
@keyframes gdBfly { 0%, 100% { transform: translate(198px, 150px); } 25% { transform: translate(230px, 128px) rotate(12deg); } 50% { transform: translate(176px, 118px) rotate(-10deg); } 75% { transform: translate(150px, 156px) rotate(8deg); } }
.gd-fire { transform-origin: 24px 268px; animation: gdFlick 1.1s ease-in-out infinite alternate; }
@keyframes gdFlick { from { transform: scale(1, 1); } to { transform: scale(.92, 1.12); } }
.gd-star { animation: gdTwinkle 3.4s ease-in-out infinite; }
@keyframes gdTwinkle { 50% { opacity: .25; } }
.gd-fly { animation: gdFly 6s ease-in-out infinite; }
@keyframes gdFly { 0%, 100% { transform: translate(0, 0); opacity: .2; } 50% { transform: translate(10px, -14px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .garden *, .gd-r { animation: none !important; } }

.hello h2 { font-size: 21px; }
.hello .row { flex-wrap: wrap; }
.hello .row .btn { white-space: nowrap; }
.hello p { margin-bottom: 14px; }
.bench-line { display: block; margin: 0 14px; padding: 22px 18px; border-radius: 22px; background: linear-gradient(160deg, #fff8e6, #eef5e6); box-shadow: var(--shadow); text-align: center; }
.bench-line blockquote { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.6; word-break: keep-all; }
.bench-line blockquote::before { content: '“'; } .bench-line blockquote::after { content: '”'; }
.bench-line small { display: block; margin-top: 8px; color: var(--muted); font-size: 12.5px; }

/* ── 반응 (좋아요 수 대신) ── */
.acts { gap: 14px; }
.acts .rx i { font-style: normal; font-size: 18px; line-height: 1; }
.acts .rx.on { color: var(--ink); font-weight: 600; }
.rx-others { display: inline-flex; align-items: center; }
.rx-others i { position: relative; display: inline-flex; margin-right: 9px; font-style: normal; }
.rx-others .av { width: 22px; height: 22px; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.rx-others b { position: absolute; right: -8px; bottom: -5px; font-size: 11px; font-weight: 400; }
.rx-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.rx-pick button { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border-radius: 14px; background: var(--bg); border: 1.5px solid transparent; font-size: 13.5px; color: var(--ink); }
.rx-pick button i { font-style: normal; font-size: 18px; }
.rx-pick button.on { border-color: var(--pink2); background: var(--pinkSoft); font-weight: 600; }
.card.hero .rx-pick button { background: rgba(255, 255, 255, .92); }
.opt em { color: var(--pink); font-weight: 800; }

/* ── 글의 종류: 마음속 회의 · 비밀 일기 · 마음 날씨 · 오늘의 한 문장 ── */
.badge.k-council { background: #efeaff; color: #6b5fc0; } .badge.k-diary { background: #2f2a3d; color: #fff; }
.badge.k-forecast { background: #e5f2ff; color: #3a77b8; } .badge.k-line { background: #fff3cf; color: #937000; }
.council { background: linear-gradient(160deg, #f3f0ff, #edf5ee); }
.cn-head { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; color: #7468bd; margin-bottom: 6px; }
.cn-voices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cn-v { display: flex; gap: 8px; align-items: flex-start; }
.cn-v p { margin: 0; background: #fff; border-radius: 4px 14px 14px 14px; padding: 8px 11px; font-size: 13.5px; line-height: 1.45; }
.cn-v p b { display: block; font-size: 12px; color: var(--ink2); }
.cn-opts { display: grid; gap: 8px; margin-top: 14px; }
.cn-opts button { text-align: left; padding: 11px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; }
.cn-opts button:hover { border-color: var(--pinkLine); }
.cn-opts .later { background: transparent; border-style: dashed; color: var(--ink2); font-weight: 500; }
.diary { background: #2f2a3d; color: #f1edf8; }
.dy-lock { display: flex; gap: 12px; align-items: center; }
.dy-lock .av { width: 54px; height: 54px; }
.dy-lock small { display: block; color: #bdb6d3; font-size: 12.5px; margin-top: 2px; }
.diary button[data-diary] { margin-top: 12px; width: 100%; height: 42px; border-radius: 99px; background: #fff; color: #2f2a3d; font-weight: 700; font-size: 14px; }
.diary.open { background: #fffdf4; color: var(--ink); border: 1.5px solid #eee5c6; }
.dy-head { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.dy-body { line-height: 1.8; font-size: 15px; word-break: keep-all; }
.dy-sign { text-align: right; color: var(--muted); font-size: 13px; margin-top: 8px; }
.k-card.line { background: linear-gradient(160deg, #fff8e6, #eef5e6); text-align: center; padding: 24px 16px; }
.k-card.line blockquote { margin: 0; font-size: 18.5px; line-height: 1.6; font-weight: 600; word-break: keep-all; }
.k-card.line blockquote::before { content: '“'; } .k-card.line blockquote::after { content: '”'; }
.ln-from { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ln-from .av { width: 20px; height: 20px; }
.ln-from span { margin-left: 4px; }

/* ── 도움받을 곳 (위험 신호가 보인 글 · 대화) ── */
.care { margin-top: 12px; padding: 14px; border-radius: 16px; background: #fff7e8; border: 1.5px solid #f0d8a6; font-size: 13.5px; line-height: 1.55; }
.care b { display: block; margin-bottom: 4px; font-size: 14.5px; }
.care p { margin: 0; color: var(--ink2); }
.care a { font-weight: 800; text-decoration: underline; color: var(--ink); }
.chat .care { margin: 8px 0; }

/* ── 주민 ── */
.ccard .guards { font-size: 12.5px; color: var(--ink2); margin: 2px 0 6px; }
.guards-big { margin: 0; font-size: 14.5px; color: var(--ink2); }

/* ════════ DearMind 만의 모양 (2026-10-10 사용자 피드백: "DearInside 와 너무 비슷하다") ════════
 * DearInside = 인스타식 SNS(원형 얼굴 · 흰 카드 · 스토리 줄 · 하단 탭 바).
 * DearMind  = 그림책 정원 + 일기장: 화면 위를 가득 채운 정원 · 날짜별 Journal · 내 글은 일기장 한 쪽 ·
 *             주민의 말은 그 감정 색의 말풍선/쪽지 · 떠 있는 캡슐 내비 · 시각에 따라 바뀌는 바탕색. */
:root { --serif: 'Fraunces', Georgia, serif; --hand: 'Gowun Batang', 'Noto Serif KR', serif; --round: 'Gowun Dodum', var(--sans); }
body[data-mode="morning"] { --bg: #fbf4ea; --bg2: #f1e6d8; --line: #ecdfcd; }
body[data-mode="dusk"] { --bg: #f9f0e8; --bg2: #eddfd4; --line: #eaddd0; }
body[data-mode="night"] { --bg: #eeecf6; --bg2: #dcd9ea; --line: #dddaea; }
body { transition: background .6s; }
.top, .bar { background: color-mix(in srgb, var(--bg) 93%, transparent); }
.logo { font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: -.025em; }
.gate-card .logo { font-size: 40px; }
.cast-head h1, .hello h2, .iv-start h2, .prof h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; }
.av { border-radius: 34%; }   /* 감정들은 동그란 프로필 사진이 아니라 스티커 */
.story i, .story i img { border-radius: 34%; }

/* 떠 있는 캡슐 내비 */
.tabs { bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 28px); max-width: 452px; height: 62px; padding: 0 6px; border: 0; border-radius: 99px;
  background: rgba(38, 52, 44, .93); backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(30, 45, 35, .28); }
.tabs a { color: rgba(255, 255, 255, .58); font-size: 10.5px; gap: 2px; }
.tabs a.on { color: #fff; }
.tabs a.on svg { stroke: #bfe6cd; }
.tab-plus b { margin-top: 0; width: 46px; height: 46px; background: #f7dc8f; color: #2a3a30; box-shadow: 0 0 0 5px rgba(247, 220, 143, .18); }
.main { padding-bottom: calc(var(--tabs) + 40px + env(safe-area-inset-bottom)); }

/* 홈: 정원이 화면 위쪽을 가득 채우고 머리글은 하늘 위에 뜬다 */
.garden.mode-morning { --sky: #fde3d0; } .garden.mode-day { --sky: #c9e8f5; } .garden.mode-dusk { --sky: #f6c3ae; } .garden.mode-night { --sky: #252c57; }
body[data-view="home"] .top.gd-top { position: absolute; left: 0; right: 0; top: 0; background: transparent; backdrop-filter: none; z-index: 8; }
body[data-view="home"] .garden { margin: 0 0 6px; border-radius: 0 0 34px 34px; }
body[data-view="home"] .garden::before { content: ''; display: block; height: 62px; background: var(--sky); }
body[data-view="home"][data-mode="night"] .gd-top .logo, body[data-view="home"][data-mode="night"] .gd-top .ibtn { color: #fff; }
body[data-view="home"] .dm-banner { position: relative; z-index: 9; margin-top: 66px; margin-bottom: -58px; }
.hello { background: none; padding: 14px 22px 4px; margin: 0; border-radius: 0; }
.hello h2 { font-size: 26px; }
.hello p { font-size: 14.5px; }

/* Journal: 날짜별 */
.jr-top { align-items: flex-end; padding-top: 18px; }
.jr-title { margin-right: auto; }
.jr-title h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 32px; letter-spacing: -.02em; line-height: 1; }
.jr-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.day-h { display: flex; align-items: baseline; gap: 10px; padding: 22px 22px 10px; }
.day-h b { font-family: var(--serif); font-weight: 600; font-style: italic; font-size: 22px; }
.day-h span { color: var(--muted); font-size: 13px; }
.day-h::after { content: ''; flex: 1; border-top: 1.5px dotted var(--line); translate: 0 -4px; }
.feed { gap: 12px; }

/* 내 글 = 일기장 한 쪽 */
.card.page { background: #fffdf6; border: 1px solid #ece3c9; border-radius: 6px 24px 24px 6px; box-shadow: 4px 6px 0 rgba(120, 100, 60, .06); padding: 16px 18px 16px 30px; }
.card.page::before { content: ''; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 6px; background: radial-gradient(circle, #e2d7b8 2.6px, transparent 3px) 0 0 / 6px 22px repeat-y; }
.pg-head { display: flex; justify-content: space-between; gap: 10px; font-family: var(--serif); font-style: italic; font-size: 13.5px; color: #a09472; padding-bottom: 8px; border-bottom: 1px dashed #e6dcc0; }
.page .post-text { font-family: var(--hand); font-size: 17px; line-height: 1.85; margin-top: 12px; }
.page .tags span { background: #f4eeda; }
.talk { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e6dcc0; display: flex; flex-direction: column; gap: 8px; }
.talk-h { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #a09472; font-weight: 700; }
.say { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
.say.re { margin-left: 22px; }
.say .av { background: color-mix(in srgb, var(--c) 22%, #fff); }
.say span { background: color-mix(in srgb, var(--c) 17%, #fff); border-radius: 4px 16px 16px 16px; padding: 8px 12px; font-family: var(--round); font-size: 14.5px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.say b { display: block; font-family: var(--sans); font-size: 11.5px; color: color-mix(in srgb, var(--c) 68%, #1d1d24); }
.say.me { justify-content: flex-end; }
.say.me span { background: #f1ebd8; border-radius: 16px 4px 16px 16px; }
.talk-more { color: var(--muted); font-size: 12.5px; margin-left: 40px; }

/* 주민의 글 = 그 감정 색의 쪽지 */
.card.note { background: color-mix(in srgb, var(--c) 10%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 24%, #fff); border-radius: 8px 26px 26px 26px; box-shadow: none; }
.note .who .av { width: 46px; height: 46px; background: color-mix(in srgb, var(--c) 24%, #fff); }
.note .who b { font-family: var(--serif); font-weight: 600; font-size: 17.5px; color: color-mix(in srgb, var(--c) 62%, #1d1d24); }
.note .post-text { font-family: var(--round); font-size: 15.5px; line-height: 1.65; }
.note .opt { background: rgba(255, 255, 255, .8); }
.note .k-card.council, .note .k-card.forecast { background: rgba(255, 255, 255, .72); }
.note .poll-q { font-family: var(--round); }

/* 댓글 = 말풍선 */
.cmt { background: color-mix(in srgb, var(--c, #b9b6c4) 13%, #fff); box-shadow: none; border-radius: 6px 20px 20px 20px; }
.cmt .who b { color: color-mix(in srgb, var(--c, #555) 62%, #1d1d24); }
.cmt p { font-family: var(--round); line-height: 1.55; }
.cmt.mine { background: #f3eedd; border-radius: 20px 6px 20px 20px; margin-left: 44px; }
.cmt.child::before { content: none; }
.chat .bub, .cn-v p, .gd-say, .dy-body, .bench-line blockquote, .k-card.line blockquote { font-family: var(--round); }
.bench-line blockquote, .k-card.line blockquote, .dy-body { font-family: var(--hand); }

/* ── Journal = 일기장: 내 글 한 쪽 + 거기서 이어진 글들, 하루를 닫는 한 문장 ── */
.entry { display: flex; flex-direction: column; }
.attached { margin: 0 0 0 22px; padding: 10px 0 2px 16px; border-left: 2px dotted #dcd3b8; display: flex; flex-direction: column; gap: 10px; }
.att-h { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #a09472; font-weight: 700; }
.day-line { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.day-line .att-h { text-align: center; }
.jr-empty { text-align: center; padding: 48px 28px 20px; }
.jr-empty p { margin: 0 0 8px; }
.jr-empty p:first-child { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.jr-empty .btn { margin-top: 10px; display: inline-flex; }
/* 정원의 쪽지 */
.gd-r .fx.mail { right: -10px; top: -12px; font-size: 15px; animation: gdBreath 2.4s ease-in-out infinite; }
.gd-note { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 6px 16px 16px 16px; background: var(--bg); border: 1.5px solid var(--line); }
.gd-note b { display: block; font-size: 12.5px; color: var(--pink); }
.gd-note span { display: block; font-family: var(--round); font-size: 14px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask[style*="--c"] { background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: none; border: 1.5px solid color-mix(in srgb, var(--c) 22%, #fff); border-radius: 8px 20px 20px 20px; }
.ask[style*="--c"] p { font-family: var(--round); }
