/* DearDino Park — 자연과 미래 기술이 공존하는 공원 (기획 02 "브랜드 톤": 사실적 · 전문적 · 따뜻하지만 과장되지 않은 유머) */
:root {
  --bg: #f1eee5; --paper: #faf8f2; --card: #ffffff; --ink: #1c2620; --ink2: #3f4b44; --muted: #69736c; --line: #e2ded2; --line2: #d3cebf;
  --moss: #2c4636; --moss2: #3d5c49; --fern: #5d7c50; --leaf: #8fa96a; --amber: #b97a22; --amber-bg: #f5e7cc; --clay: #a5513a; --clay-bg: #f6e1d9;
  --ai: #2f6788; --ai-bg: #e2edf3; --fact: #2c6a4c; --fact-bg: #e1efe6; --hyp: #8f620f; --hyp-bg: #f6ecd5; --fic: #644b8a; --fic-bg: #ece6f4;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --tab: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --r: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.stage { min-height: 100vh; max-width: 480px; margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.03), 0 10px 40px rgba(40,50,30,.06); }
.app { padding-bottom: calc(var(--tab) + var(--safe-b) + 24px); min-height: 100vh; }
body.notab .app { padding-bottom: 32px; }
body.notab .tabbar { display: none; }

/* 위 막대 */
.bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 54px; padding: 0 8px; padding-top: env(safe-area-inset-top, 0px); background: rgba(250,248,242,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar h1 { font: 600 17px/1.2 var(--sans); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.clear { background: transparent; border: 0; backdrop-filter: none; position: absolute; left: 0; right: 0; max-width: 480px; margin: 0 auto; }
.ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.glass { background: rgba(250,248,242,.85); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ic .dot { position: absolute; }

/* 아래 탭 */
.tabbar { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(250,248,242,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tabbar a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--moss); }
.tabbar a.on svg { stroke-width: 2.1; }
.tabbar .tab-face { width: 25px; height: 25px; border-radius: 50%; overflow: hidden; background: var(--line); box-shadow: 0 0 0 2px transparent; }
.tabbar a.on .tab-face { box-shadow: 0 0 0 2px var(--moss); }
.tabbar .tab-face img { width: 100%; height: 100%; object-fit: cover; }
.badge-n { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--clay); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15.5px; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-main { background: var(--moss); color: #f7f4ea; }
.btn-amber { background: var(--amber); color: #fffaf0; }
.btn-ghost { background: #ebe7dc; color: var(--ink); }
.btn-line { border: 1.5px solid var(--line2); color: var(--ink); background: var(--card); }
.btn-danger { background: var(--clay); color: #fff; }
.btn-sm { height: 38px; padding: 0 15px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { color: var(--moss2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* 글자 */
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
.kicker { font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--fern); }
.serif { font-family: var(--serif); }
.pad { padding: 18px 20px; }
.sec { padding: 6px 20px 18px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 20px 10px; }
.sec-h h2 { font-size: 19px; }
.sec-h a, .sec-h button { font-size: 13.5px; font-weight: 600; color: var(--moss2); }

/* 카드 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.soft-bg { background: #f4f1e8; border-color: transparent; }
.card.tap { display: block; transition: border-color .15s; }
.card.tap:hover { border-color: var(--line2); }

/* AI · 사실 표시 (기획 15 · 22) */
.ai { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--ai-bg); color: var(--ai); font: 600 11px/1 var(--sans); letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.ai svg { width: 11px; height: 11px; fill: currentColor; }
.human { background: #edeae1; color: var(--ink2); }
.lab { display: inline-block; padding: 2px 7px; border-radius: 6px; font: 600 10.5px/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.lab.fact { background: var(--fact-bg); color: var(--fact); }
.lab.hypothesis { background: var(--hyp-bg); color: var(--hyp); }
.lab.fiction { background: var(--fic-bg); color: var(--fic); }
.facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.facts li .lab { justify-self: start; margin-top: 1px; white-space: nowrap; }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; background: #ece8dd; color: var(--ink2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.chip.green { background: var(--fact-bg); color: var(--fact); }
.chip.amber { background: var(--amber-bg); color: #7a5214; }
.chip.clay { background: var(--clay-bg); color: var(--clay); }
.chip.on { background: var(--moss); color: #f7f4ea; }

/* 입사 · 시작 화면 */
.hero-join { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 22px calc(28px + var(--safe-b)); color: #f8f5ec; background: #1d2b22 center/cover no-repeat; }
.hero-join::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,22,17,.3) 0%, rgba(14,22,17,.45) 22%, rgba(14,22,17,.7) 40%, rgba(14,22,17,.94) 72%); }
.hero-join > * { position: relative; }
.logo { font: 600 22px/1 var(--serif); letter-spacing: -.01em; }
.logo b { font-weight: 600; color: var(--leaf); }
.hero-join .logo { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 22px); left: 22px; font-size: 22px; }
.hero-join .soft { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 24px); right: 22px; }
.hero-join h1 { font-size: 34px; line-height: 1.12; margin: 8px 0 12px; }
.hero-join p { color: rgba(248,245,236,.82); margin: 0 0 18px; }
.steps { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: rgba(255,255,255,.09); font-weight: 500; font-size: 14.5px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 600; flex: none; }
.steps.light li { background: #f0ece2; }
.steps.light li::before { background: #fff; }
.steps li.done::before { content: '✓'; background: var(--leaf); color: #1d2b22; }
.hero-join .btn-ghost { background: rgba(255,255,255,.12); color: #f8f5ec; }

/* 입사증 */
.idcard { position: relative; overflow: hidden; border-radius: 20px; padding: 18px; background: linear-gradient(135deg, #2c4636, #3e5f48 60%, #557452); color: #f6f2e6; box-shadow: 0 10px 30px rgba(28,45,34,.25); }
.idcard::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,255,255,.06); }
.idcard .top { display: flex; justify-content: space-between; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.idcard .who { display: flex; gap: 14px; align-items: center; margin: 18px 0 14px; }
.idcard .who img, .idcard .who .face { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: rgba(255,255,255,.12); flex: none; }
.idcard .who b { display: block; font: 600 21px/1.2 var(--serif); }
.idcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.idcard dt { opacity: .7; }
.idcard dd { margin: 0; font-weight: 600; }

/* 종 고르기 */
.species { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 12px; }
.species img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; background: #e7e3d6; }
.species h3 { font-size: 18px; margin-bottom: 2px; }
.species .latin { font-style: italic; font-size: 12.5px; color: var(--muted); }
.species p { margin: 6px 0 8px; font-size: 13.5px; color: var(--ink2); }
.diff { font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.diff.Starter { color: var(--fact); } .diff.Standard { color: var(--ai); } .diff.Advanced { color: var(--hyp); } .diff.Expert { color: var(--clay); }

.indiv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); }
.indiv.on { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(44,70,54,.12); }
.indiv .code { font: 600 14px var(--mono); }
.meter { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pips { display: flex; gap: 3px; }
.pips i { width: 18px; height: 6px; border-radius: 3px; background: #e5e1d5; }
.pips i.on { background: var(--fern); }

/* 내 공룡 홈 */
.hero { position: relative; aspect-ratio: 4 / 3.4; background: #cfd6c4 center/cover no-repeat; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 26%, rgba(0,0,0,0) 55%, rgba(18,26,21,.78)); }
.hero .dino { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .over { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; color: #faf7ee; }
.hero .over h1 { font-size: 30px; line-height: 1.1; }
.hero .over .sub { font-size: 13.5px; opacity: .92; margin-top: 4px; }
.hero .top { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; right: 12px; display: flex; justify-content: space-between; }
.nametag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 8px; font: 600 12px/1.2 var(--sans); color: #fff; }
.nametag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.75); }
.tag-moss { background: #3d5c49; } .tag-amber { background: #b97a22; } .tag-slate { background: #4d5c6a; } .tag-clay { background: #a5513a; } .tag-sand { background: #9a8862; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 20px 6px; }
.stat { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.stat b { display: block; font: 600 24px/1 var(--serif); margin: 6px 0 8px; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 500; }
.bar-v { height: 5px; border-radius: 3px; background: #ebe7dc; overflow: hidden; }
.bar-v i { display: block; height: 100%; border-radius: 3px; background: var(--fern); }
.stat.stability .bar-v i { background: var(--ai); }
.stat.trust .bar-v i { background: var(--amber); }

.tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 20px; }
.task { display: grid; place-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.task svg { width: 26px; height: 26px; fill: none; stroke: var(--moss2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task b { font-size: 14px; }
.task span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.task.done { background: #eef2e8; border-color: transparent; }
.task.done svg { stroke: var(--fern); }
.task.done b::after { content: ' ✓'; color: var(--fern); }

.casecard { display: block; margin: 0 20px; padding: 18px; border-radius: 20px; color: #f6f2e6; background: linear-gradient(135deg, #24382c, #34503f); }
.casecard .kicker { color: var(--leaf); }
.casecard h3 { font-size: 20px; margin: 8px 0 6px; }
.casecard p { margin: 0 0 14px; color: rgba(246,242,230,.8); font-size: 14px; }
.casecard .btn { background: #f3eedf; color: var(--moss); }
.casecard.done { background: #eef2e8; color: var(--ink); }
.casecard.done p { color: var(--ink2); }
.casecard.done .kicker { color: var(--fern); }

.note { display: flex; gap: 12px; align-items: flex-start; margin: 0 20px; padding: 14px; border-radius: 16px; background: #f4f1e8; }
.note .ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; }
.note .ico svg { width: 18px; height: 18px; fill: none; stroke: var(--fern); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note b { display: block; font-size: 14px; }
.note span { font-size: 13.5px; color: var(--ink2); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px; }
.tile { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; position: relative; }
.tile svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--moss2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile .n { position: absolute; top: 8px; right: 10px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--clay); color: #fff; font-size: 11px; line-height: 20px; text-align: center; padding: 0 5px; }

/* 기록 */
.logs { list-style: none; margin: 0; padding: 0 20px; }
.logs li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.logs li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.logs li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.logs li:last-child::after { display: none; }
.logs li.milestone::before, .logs li.first::before, .logs li.meet::before { background: var(--amber); width: 9px; height: 9px; left: 3px; }
.logs time { display: block; font: 500 11.5px var(--mono); color: var(--muted); }
.logs b { font-weight: 600; }

/* 사건 */
.brief { display: flex; gap: 12px; margin: 16px 20px 0; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.staff { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font: 600 15px var(--serif); }
.staff.senior { background: #4a6a55; } .staff.vet { background: #2f6788; } .staff.lab { background: #6a5b8f; }
.brief .who { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.brief .who b { color: var(--ink); }
.brief p { margin: 0; font-size: 14.5px; }
.goal { margin: 12px 20px 0; padding: 12px 16px; border-radius: 14px; background: var(--amber-bg); color: #6b4810; font-weight: 600; font-size: 14.5px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px; }
.act { text-align: left; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.act b { display: block; font-size: 14.5px; }
.act span { font-size: 12.5px; color: var(--muted); }
.act.seen { background: #f4f1e8; border-color: transparent; }
.clue { margin: 8px 20px 0; padding: 12px 14px 12px 16px; border-left: 3px solid var(--fern); background: var(--card); border-radius: 4px 12px 12px 4px; font-size: 14px; }
.clue b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--fern); margin-bottom: 3px; }
.choice { display: block; width: 100%; text-align: left; padding: 15px 16px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); font-weight: 500; font-size: 15px; }
.choice + .choice { margin-top: 8px; }
.choice.on { border-color: var(--moss); background: #eef2e8; }
.result { margin: 16px 20px 0; padding: 18px; border-radius: 18px; background: #24382c; color: #f6f2e6; }
.result p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; }
.deltas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.deltas span { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 12.5px; font-weight: 600; }
.ask { margin: 0 20px; }
.ask form { display: flex; gap: 8px; }
.ask .field { flex: 1; }
.qa { margin: 10px 20px 0; }
.qa .q { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.qa .a { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.qa .a .staff { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }

/* 입력 */
.field { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--card); font: inherit; color: inherit; outline: none; }
textarea.field { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.field:focus { border-color: var(--moss2); }
.form { padding: 18px 20px; }
.form label.lbl { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border: 0; }
.switch div { flex: 1; }
.switch b { display: block; font-size: 15px; }
.switch span { font-size: 13px; color: var(--muted); }
.tog { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: #d9d4c6; transition: background .15s; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.tog[aria-checked="true"] { background: var(--moss2); }
.tog[aria-checked="true"]::after { transform: translateX(20px); }
.tog[disabled] { opacity: .5; }

/* 서식지 */
.theme-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 20px; }
.theme { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #cfd6c4 center/cover; box-shadow: 0 0 0 2px transparent; }
.theme span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.theme.on { box-shadow: 0 0 0 3px var(--moss); }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.item + .item { margin-top: 8px; }
.item b { font-size: 14.5px; }
.item span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.item .chk { grid-row: 1 / 3; grid-column: 2; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line2); display: grid; place-items: center; }
.item.on { border-color: var(--moss2); background: #f2f5ee; }
.item.on .chk { background: var(--moss2); border-color: var(--moss2); color: #fff; }
.item.lock { opacity: .55; }
.tags { display: flex; gap: 10px; padding: 0 20px; }
.tags button { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 2px transparent; }
.tags button.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }

/* 성장 */
.growth { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 20px; }
.gstage { text-align: center; font-size: 12px; }
.gstage .pic { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #e6e2d6; margin-bottom: 6px; }
.gstage .pic img { width: 100%; height: 100%; object-fit: cover; }
.gstage.locked .pic img { filter: grayscale(1) brightness(1.1) contrast(.5); opacity: .45; }
.gstage b { display: block; font-size: 12.5px; }
.gstage.now b { color: var(--moss); }

/* 소셜 */
.tabs { display: flex; gap: 6px; padding: 12px 20px 10px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 54px; z-index: 5; background: rgba(250,248,242,.95); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; background: #ece8dd; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.tabs button.on { background: var(--ink); color: var(--paper); }
.post { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.post .head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #e2ddcf; display: grid; place-items: center; font-weight: 600; color: var(--ink2); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.dino { border-radius: 12px; }
.av.lg { width: 84px; height: 84px; font-size: 28px; }
.av.lg.dino { border-radius: 22px; }
.post .who { min-width: 0; line-height: 1.25; }
.post .who b { font-size: 14.5px; }
.post .who .sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .text { font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.post .translated { margin-top: 6px; font-size: 12px; color: var(--ai); }
.post .acts2 { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.post .acts2 button, .post .acts2 a { display: inline-flex; gap: 5px; align-items: center; }
.post .acts2 svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.post .acts2 .liked { color: var(--clay); }
.post .acts2 .liked svg { fill: var(--clay); stroke: var(--clay); }
.moment { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; margin-top: 10px; padding: 8px; border-radius: 14px; background: #f3f0e6; }
.moment img { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; }
.moment .kicker { font-size: 10.5px; }
.moment p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink2); }
.moment.big { grid-template-columns: 1fr; padding: 0; overflow: hidden; background: none; }
.moment.big img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; }
.moment.big .cap { padding: 0 2px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 22px 20px 4px; font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fab { position: fixed; z-index: 15; right: max(18px, calc(50% - 240px + 18px)); bottom: calc(var(--tab) + var(--safe-b) + 18px); width: 56px; height: 56px; border-radius: 50%; background: var(--moss); color: #f7f4ea; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(28,45,34,.35); }
.fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.comment { display: flex; gap: 10px; padding: 12px 20px; }
.comment .av { width: 32px; height: 32px; font-size: 13px; }
.comment .body { flex: 1; min-width: 0; font-size: 14px; }
.comment .body b { font-size: 13.5px; }
.comment .tools { display: flex; gap: 12px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--moss2); }
.comment.pending { background: #fbf4e4; }
.composer { position: sticky; bottom: calc(var(--tab) + var(--safe-b)); display: flex; gap: 8px; padding: 10px 14px; background: rgba(250,248,242,.97); border-top: 1px solid var(--line); }
.composer .field { height: 44px; }

/* 프로필 */
.ptop { padding: 20px 20px 6px; text-align: center; }
.ptop .av { margin: 0 auto 12px; }
.ptop h1 { font-size: 24px; }
.ptop .handle { font: 500 13.5px var(--mono); color: var(--muted); margin-top: 2px; }
.ptop .bio { margin: 10px auto 0; max-width: 360px; font-size: 14.5px; color: var(--ink2); }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 20px 6px; padding: 12px 0; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.pstats b { display: block; font: 600 20px/1.2 var(--serif); }
.pstats span { font-size: 12px; color: var(--muted); }
.pacts { display: flex; gap: 8px; justify-content: center; padding: 10px 20px 4px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.mini img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.mini b { display: block; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.friend { flex: none; width: 78px; text-align: center; font-size: 12.5px; }
.friend img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; margin: 0 auto 6px; }

/* 만남 */
.pair { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; }
.pair img { width: 108px; height: 108px; border-radius: 24px; object-fit: cover; }
.pair .x { font: 600 22px var(--serif); color: var(--muted); }

/* 알림 */
.inbox li { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.inbox li.fresh { background: #f7f2e3; }
.inbox ul { list-style: none; margin: 0; padding: 0; }
.inbox time { display: block; font-size: 12px; color: var(--muted); }

/* 빈 화면 · 불러오기 */
.empty { padding: 48px 28px; text-align: center; }
.empty h3 { font-size: 19px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.1); border-top-color: var(--moss2); animation: spin .8s linear infinite; }
.btn .spinner { width: 18px; height: 18px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.btn-ghost .spinner, .btn-line .spinner { border-color: rgba(0,0,0,.1); border-top-color: var(--moss2); }
@keyframes spin { to { transform: rotate(360deg); } }
.writing { padding: 40px 28px; text-align: center; }
.writing .spinner { width: 30px; height: 30px; margin-bottom: 14px; }

/* 시트 */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(18,24,20,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 26px 20px calc(22px + var(--safe-b)); border-radius: 24px 24px 0 0; background: var(--paper); }
.sheet h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; padding-right: 34px; }
.sheet p { margin: 0 0 14px; }
.sheet .btn { width: 100%; margin-top: 10px; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--muted); }
.warn { color: var(--clay); font-size: 14px; }
.err { color: var(--clay); font-size: 14px; margin: 8px 0 0; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0; }
.avgrid button { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px transparent; background: #e6e2d6; }
.avgrid button.on { box-shadow: 0 0 0 3px var(--amber); }
.avgrid img { width: 100%; height: 100%; object-fit: cover; }
.nickrow { display: flex; gap: 8px; align-items: center; }
.nickrow .field { flex: 1; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); margin-top: 8px; }
.radio i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); margin-top: 1px; }
.radio.on { border-color: var(--moss2); }
.radio.on i { border: 6px solid var(--moss2); }
.radio b { display: block; font-size: 14.5px; }
.radio span span { display: block; font-size: 13px; color: var(--muted); }
.fb-stars { display: flex; gap: 6px; margin: 10px 0; }
.fb-stars button { font-size: 28px; color: #d8d1c0; }
.fb-stars button.on { color: var(--amber); }

/* 입장 암호 · 18세 확인 */
.dw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 15%, #2f4a39, #131c16); color: #f4f0e4; }
.gate-card { width: 100%; max-width: 360px; text-align: center; }
.gate-card .logo { font-size: 36px; margin-bottom: 8px; }
.gate-card .slogan { font: italic 500 18px var(--serif); color: #d9c48f; margin: 0 0 22px; }
.gate-card p { color: rgba(244,240,228,.75); }
.gate-card input { width: 100%; height: 52px; margin: 12px 0 8px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; font-size: 16px; outline: none; }
.gate-card .btn { width: 100%; margin-top: 8px; }
.gate-card .btn-cream { background: #f2ecd9; color: var(--moss); }
.gate-card .btn-ghost { background: rgba(255,255,255,.1); color: #f4f0e4; }
.gate-card .err { color: #ffc3b5; }
.gate-card .soft { display: inline-block; margin: 2px 0 8px; }
.soft { font: 600 10px/1 var(--sans); letter-spacing: .08em; padding: 4px 7px; border-radius: 99px; border: 1px solid rgba(217,196,143,.6); background: rgba(0,0,0,.25); color: #e6d39c; cursor: pointer; }
.soft.on-light { background: transparent; color: #7a5a1a; border-color: rgba(122,90,26,.4); }
.soft-note { margin: 4px 24px 28px; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--muted); }

/* 알림 토스트 */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 16px); transform: translate(-50%, 20px); max-width: min(440px, 92vw); padding: 12px 18px; border-radius: 14px; background: #24302a; color: #f6f2e6; font-size: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.notab .toast { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -20px); }
body.notab .toast.show { transform: translate(-50%, 0); }

/* 자매품 */
.sister { padding: 26px 20px 0; }
.sister-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sister-home { text-decoration: underline; }
.sister-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sister-row::-webkit-scrollbar { display: none; }
.sister-card { flex: none; width: 124px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.sister-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.sister-name { display: block; font-weight: 600; font-size: 14px; }
.sister-tag { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.foot { text-align: center; padding: 18px 20px 0; font-size: 13px; }
.foot button { text-decoration: underline; color: var(--muted); }

/* PC 가로 줄 넘기기 (시리즈 sister/phase1.md 9절) — 마우스 기기에서만 */
.pcrail { position: relative; }
.pcnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(250,248,242,.92); color: var(--ink); font-size: 11px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.pcnav.l { left: 2px; } .pcnav.r { right: 2px; }
.pcnav[hidden] { display: none; }
.pcrail.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.pcrail.more-l > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.pcrail.more-l.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.pcrail > .dragging { cursor: grabbing; user-select: none; }
.pcrail > .dragging * { pointer-events: none; }

@media (max-width: 360px) { .hero-join h1 { font-size: 29px; } .tasks { gap: 7px; } .stat b { font-size: 21px; } .facts li { grid-template-columns: 1fr; gap: 4px; } }
@media (min-width: 520px) { body { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
