/* ==========================================================
   스타일 시트 (수정가이드.md 의 '디자인 수정' 항목 참고)
   1. 색상 변수  2. 기본  3. 레이아웃  4. 스토리  5. 게시물
   6. 댓글 시트  7. 알림·DM  8. 스토리 뷰어  9. 토스트
   ========================================================== */

/* 폰트 설정하기 ------------------------------------------- */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');

/* 1. 색상 변수 -------------------------------------------- */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #737373;
  --line: #dbdbdb;
  --soft: #efefef;
  --sheet: #ffffff;
  --accent: #0095f6;
  --like: #ff3040;
  --ring: linear-gradient(45deg, #fcb045, #fd1d1d 45%, #c13584 75%, #833ab4);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #f5f5f5;
    --muted: #a8a8a8;
    --line: #262626;
    --soft: #262626;
    --sheet: #1c1c1e;
  }
}

/* 2. 기본 -------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", Roboto, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
b { font-weight: 600; }
.muted { color: var(--muted); }

svg.ic { width: var(--is, 24px); height: var(--is, 24px); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.fill { fill: currentColor; }

.avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden;
  background: var(--soft); color: var(--muted); font-weight: 600;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute; top: 0; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--like); color: #fff; font-size: 11px; font-weight: 600;
  display: none; align-items: center; justify-content: center;
}
.badge.on { display: flex; }
.badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: -1px; right: -1px; border: 2px solid var(--bg); box-sizing: content-box; }

/* 3. 레이아웃 ---------------------------------------------- */
#app { min-height: 100vh; display: flex; justify-content: center; }
#main { width: 100%; max-width: 630px; min-width: 0; padding-bottom: 110px; }
#sidebar, #rightbar { display: none; }

#topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 0;
  position: fixed; left: 0; right: 0;
}
#topbar + #main { padding-top: calc(56px + env(safe-area-inset-top)); }
body:not([data-route="home"]) #topbar { display: none; }
body:not([data-route="home"]) #topbar + #main { padding-top: 0; }
.tb-left { display: flex; }
.tb-right { display: flex; justify-content: flex-end; gap: 22px; }
.tb-icon { position: relative; display: flex; }
.wordmark, .logo-full {
  font-family: "Lobster", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 30px; letter-spacing: .5px;
}

/* 하단 탭바 (모바일) */
#tabbar {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; height: 62px; z-index: 30;
  display: flex; align-items: center; justify-content: space-around; padding: 0 8px;
  background: var(--bg); border-radius: 34px; box-shadow: 0 2px 18px rgba(0, 0, 0, .2);
}
@media (prefers-color-scheme: dark) { #tabbar { background: #1c1c1e; } }
.tab { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 46px; border-radius: 26px; }
.tab.active { background: var(--soft); }
.tab .ico { position: relative; display: flex; }
.tab .badge { top: -8px; right: -12px; }
.tab .dotmark { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--like); border: 2px solid var(--bg); box-sizing: content-box; }
.tab.active svg.ic, .nav-item.active svg.ic { stroke-width: 2.6; }
.tab.active[data-nav="home"] svg.ic, .nav-item.active[data-nav="home"] svg.ic { fill: currentColor; }
body.in-thread #tabbar { display: none; }
body.in-thread #main { padding-bottom: 0; }

/* 태블릿 이상: 좌측 사이드바 */
@media (min-width: 768px) {
  #tabbar, #topbar { display: none !important; }
  #app { padding-left: 72px; }
  #main { padding: 24px 0 40px !important; }
  body[data-route="dm"] #main, body[data-route="notifications"] #main { padding-top: 0 !important; }
  #sidebar {
    display: flex; flex-direction: column; align-items: center;
    position: fixed; left: 0; top: 0; bottom: 0; width: 72px; padding: 16px 8px;
    border-right: 1px solid var(--line); background: var(--bg); z-index: 30;
  }
  .logo { display: none; }
  .nav-item {
    display: flex; align-items: center; gap: 16px; width: 100%; height: 48px; padding: 0 12px;
    margin: 2px 0; border-radius: 10px; font-size: 16px; cursor: default; justify-content: center;
  }
  a.nav-item { cursor: pointer; }
  .nav-item:hover { background: var(--soft); }
  .nav-item.active { font-weight: 700; }
  .nav-item .ico { position: relative; display: flex; }
  .nav-item .lb { display: none; }
  .nav-item .badge { top: -8px; right: -10px; }
  .stories, .feed { max-width: 470px; margin-left: auto; margin-right: auto; }
  .post { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
  .p-head, .actions, .caption, .date { padding-left: 0; padding-right: 0; }
  .media { border: 1px solid var(--line); border-radius: 8px; }
  .car-btn { display: flex; }
}
/* 데스크톱: 사이드바에 글씨 표시 */
@media (min-width: 1024px) {
  #app { padding-left: 244px; }
  #sidebar { width: 244px; align-items: stretch; padding: 24px 12px; }
  .logo { display: block; padding: 8px 12px 26px; }
  .nav-item { justify-content: flex-start; }
  .nav-item .lb { display: inline; }
}
/* 넓은 화면: 우측 추천 영역 */
@media (min-width: 1260px) {
  #app { gap: 64px; }
  #rightbar { display: block; width: 320px; padding: 36px 0; flex: none; }
}
.rb-me { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.rb-title { color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.rb-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.rb-row .meta { flex: 1; min-width: 0; }
.rb-foot { color: var(--muted); font-size: 12px; margin-top: 26px; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 13px; }
.link-btn.on { color: var(--muted); }

/* 4. 스토리 ------------------------------------------------ */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 10px 16px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-item { flex: 0 0 auto; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.story-item .nm { font-size: 12px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring { display: flex; width: 72px; height: 72px; padding: 3px; border-radius: 50%; background: var(--ring); }
.ring.seen { background: var(--line); }
.ring .avatar { border: 3px solid var(--bg); }
.my-wrap { position: relative; width: 72px; height: 72px; cursor: default; }
.my-wrap .plus {
  position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%;
  background: #262626; color: #fff; border: 3px solid var(--bg); display: flex; align-items: center; justify-content: center; box-sizing: content-box; margin: -3px;
}

/* 5. 게시물 ------------------------------------------------ */
.post { padding-bottom: 14px; }
.p-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.p-head .meta { flex: 1; min-width: 0; }
.p-head .name { font-weight: 600; font-size: 15px; }
.p-head .sub { font-size: 13px; color: var(--muted); }
.follow-btn { background: var(--soft); padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.follow-btn.on { color: var(--muted); }
.p-head .menu { display: flex; padding: 4px; cursor: default; }

.media { position: relative; background: var(--soft); overflow: hidden; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: var(--ratio, 4/5); background: #000; overflow: hidden; }
.slide[data-audio]:not([data-audio=""]), .slide.has-video { cursor: pointer; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.counter, .duration { position: absolute; top: 14px; color: #fff; font-size: 13px; z-index: 2; }
.counter { right: 12px; background: rgba(40, 40, 40, .72); padding: 5px 11px; border-radius: 14px; }
.duration { right: 14px; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.media.multi .duration { right: auto; left: 14px; }
.sound-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(40, 40, 40, .72); color: #fff; display: flex; align-items: center; justify-content: center;
}
.sound-btn.on { background: var(--accent); }
.flash { position: absolute; left: 50%; top: 50%; z-index: 3; width: 72px; height: 72px; margin: -36px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; animation: flash .7s ease forwards; }
@keyframes flash { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
.car-btn { display: none; position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #000; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.media:hover .car-btn { opacity: 1; }
.car-btn.prev { left: 8px; } .car-btn.next { right: 8px; }
.dots { display: flex; justify-content: center; gap: 4px; padding-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }

.actions { display: flex; align-items: center; gap: 18px; padding: 10px 14px 4px; }
.act { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; cursor: default; }
button.act { cursor: pointer; }
.act.like.on { color: var(--like); }
.act.like.pop svg { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.act.save { margin-left: auto; }
.caption { padding: 4px 14px 0; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.more { color: var(--muted); }
.date { padding: 4px 14px 0; color: var(--muted); font-size: 13px; }

/* 6. 댓글 시트 --------------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; height: 78vh; height: 78dvh; background: var(--sheet); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 768px) { .backdrop { align-items: center; } .sheet { height: 70vh; border-radius: 14px; } }
.sheet-head { position: relative; text-align: center; font-weight: 700; padding: 16px; border-bottom: 1px solid var(--line); }
.sheet-head button { position: absolute; right: 12px; top: 12px; display: flex; padding: 4px; }
.sheet-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.c-row { display: flex; gap: 12px; padding: 10px 16px; }
.c-row.reply { padding-left: 64px; }
.c-body { flex: 1; min-width: 0; }
.c-time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.c-text { white-space: pre-wrap; word-break: break-word; }
.c-like { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); min-width: 24px; }
.c-like.on { color: var(--like); }
.sheet-input, .chat-input { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--sheet); }
.sheet-input input, .chat-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: var(--soft); color: var(--fg); padding: 11px 16px; border-radius: 22px; font-size: 16px; font-family: inherit; }
.post-btn { color: var(--accent); font-weight: 600; font-size: 15px; }
.post-btn:disabled { opacity: .4; cursor: default; }

/* 7. 알림 · DM --------------------------------------------- */
.page-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 700; }
@media (max-width: 767px) { .page-head { padding-top: calc(16px + env(safe-area-inset-top)); } }
.n-group { padding: 16px 16px 6px; font-weight: 700; font-size: 16px; }
.n-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.n-row.new { background: rgba(0, 149, 246, .09); }
.n-text { flex: 1; min-width: 0; word-break: break-word; }
.n-time { color: var(--muted); }
.n-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }

.dm-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.dm-row .meta { flex: 1; min-width: 0; }
.dm-last { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row.unread .dm-last { color: var(--fg); font-weight: 600; }
.dm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

.thread { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.thread-head { font-size: 16px; }
.thread-head .back { display: flex; margin-right: 2px; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.t-label { align-self: center; color: var(--muted); font-size: 12px; margin: 12px 0 4px; }
.bubble { max-width: 75%; padding: 10px 14px; border-radius: 20px; white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; }
.bubble.them { align-self: flex-start; background: var(--soft); }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* 8. 스토리 뷰어 ------------------------------------------- */
.story-backdrop { background: #000; align-items: center; z-index: 80; }
.sv { position: relative; width: min(100vw, calc(100vh * 9 / 16)); height: min(100vh, calc(100vw * 16 / 9)); background: #111; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
@supports (height: 100dvh) { .sv { width: min(100vw, calc(100dvh * 9 / 16)); height: min(100dvh, calc(100vw * 16 / 9)); } }
@media (min-width: 768px) { .sv { border-radius: 12px; } }
.sv-media, .sv-media img, .sv-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sv-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .45), transparent 22%, transparent 75%, rgba(0, 0, 0, .5)); }
.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 10px; color: #fff; }
.sv-head .sp { flex: 1; }
.sv-time { opacity: .75; }
.sv-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; }
.sv-btn.on { background: rgba(255, 255, 255, .25); }
.sv-zone { position: absolute; top: 70px; bottom: 80px; width: 38%; z-index: 2; }
.sv-zone.prev { left: 0; } .sv-zone.next { right: 0; }
.sv-caption { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 3; color: #fff; font-size: 16px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); white-space: pre-wrap; }

/* 9. 토스트 알림 ------------------------------------------- */
#toast {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; z-index: 100; width: min(92vw, 420px);
  transform: translate(-50%, -160%); transition: transform .35s ease;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  background: var(--sheet); color: var(--fg); border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
}
#toast.show { transform: translate(-50%, 0); }
#toast .t-body { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }

/* 10. 만들기(스토리에 추가) · 편집 화면 --------------------- */
body.immersive #tabbar { display: none; }
body[data-route="create"] #main { padding: 0 !important; }
.create-page, .editor { background: #000; color: #fff; }
.create-page { min-height: 100vh; padding-bottom: 20px; }
.cr-top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
.cr-x, .cr-gear { display: flex; justify-content: center; }
.cr-gear { cursor: default; }
.cr-title { text-align: center; font-size: 17px; font-weight: 700; }
.cr-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px 20px; }
.cr-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 84px; border-radius: 12px; background: #1c1c1e; border: 1px solid #2c2c2e; font-size: 15px; cursor: default; }
.cr-tile .em { font-size: 28px; line-height: 1; }
.cr-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 12px; }
.cr-recent { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; cursor: default; }
.cr-select { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 20px; background: #262626; font-size: 15px; cursor: default; }
.cr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.cr-cell { position: relative; display: block; aspect-ratio: 9 / 16; background: #1c1c1e; overflow: hidden; }
.cr-cell img, .cr-cell video { width: 100%; height: 100%; object-fit: cover; }
.cr-cell.cam { display: flex; align-items: center; justify-content: center; cursor: default; }
.cr-dur { position: absolute; right: 8px; bottom: 8px; font-size: 16px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }

.editor { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: calc(12px + env(safe-area-inset-top)) 0 calc(10px + env(safe-area-inset-bottom)); }
.ed-stage { position: relative; flex: 1; min-height: 0; border-radius: 28px; overflow: hidden; background: linear-gradient(#8d929d, #c3c4de); cursor: pointer; }
.ed-stage img, .ed-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ed-x, .ed-tool { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(50, 50, 52, .78); color: #fff; z-index: 3; }
.ed-x { position: absolute; left: 14px; top: 14px; }
.ed-tools { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-tool { cursor: default; font-size: 22px; font-weight: 600; }
button.ed-tool { cursor: pointer; }
.ed-tool.sm { width: 54px; height: 32px; border-radius: 16px; }
.ed-cap { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 3; font-size: 16px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ed-bottom { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; }
.ed-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-radius: 28px; background: #262626; font-size: 15px; font-weight: 600; cursor: default; }
.ed-pill > span:last-child { flex: 1; text-align: center; white-space: nowrap; margin-right: 28px; }
.ed-star { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #2fbf4b; color: #fff; }
.ed-send { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #4a54ff; color: #fff; cursor: default; flex: none; }
@media (min-width: 768px) { .editor { height: 100vh; } }

/* 11. 아이디 설정 화면 (프로필 편집 느낌) */
.ns { position: fixed; inset: 0; z-index: 120; background: var(--bg); color: var(--fg); overflow-y: auto; display: flex; justify-content: center; }
.ns-card { width: 100%; max-width: 480px; padding-top: env(safe-area-inset-top); padding-bottom: 24px; }
.ns-top { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 14px 16px; }
.ns-title { text-align: center; font-size: 16px; font-weight: 700; }
.ns-skip { justify-self: start; color: var(--fg); font-size: 15px; }
.ns-done { justify-self: end; color: var(--accent); font-size: 15px; font-weight: 700; }
.ns-done:disabled { opacity: .4; cursor: default; }
.ns-avatar { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0 24px; }
.ns-sub { color: var(--muted); font-size: 14px; min-height: 20px; }
.ns-field { display: block; margin: 0 16px; padding: 9px 14px 8px; border: 1px solid var(--line); border-radius: 12px; }
.ns-field:focus-within { border-color: var(--fg); }
.ns-field span { display: block; color: var(--muted); font-size: 12px; }
.ns-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--fg); font-size: 16px; font-family: inherit; padding: 2px 0; }
.ns-help { padding: 10px 20px 0; color: var(--muted); font-size: 13px; }
.ns-help.err { color: var(--like); }
.ns-note { padding: 18px 20px 0; color: var(--muted); font-size: 12px; text-align: center; }

/* 12. 프로필 */
.profile { padding-bottom: 20px; }
.pf-top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; }
.pf-top a, .pf-menu { display: flex; }
.pf-menu { justify-content: flex-end; }
.pf-name { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 22px; font-weight: 700; }
.pf-info { display: flex; align-items: center; gap: 24px; padding: 12px 16px; }
.pf-stats { flex: 1; display: flex; justify-content: space-around; }
.pf-stats b { display: block; font-size: 18px; }
.pf-bio { padding: 4px 16px 12px; white-space: pre-wrap; }
.pf-btns { display: flex; gap: 8px; padding: 4px 16px 16px; }
.pf-btn { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; background: var(--soft); font-weight: 600; cursor: pointer; }
.pf-btn.sm { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; }
.pf-tabs { display: flex; border-bottom: 1px solid var(--line); }
.pf-tab { flex: 1; display: flex; justify-content: center; padding: 12px 0; color: var(--muted); border-bottom: 2px solid transparent; }
.pf-tab.on { color: var(--fg); border-bottom-color: var(--fg); }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding-top: 2px; }
.pf-cell { position: relative; aspect-ratio: 4 / 5; background: var(--soft); overflow: hidden; }
.pf-cell img, .pf-cell video { width: 100%; height: 100%; object-fit: cover; }
.pf-multi { position: absolute; top: 8px; right: 8px; display: flex; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.pf-empty { text-align: center; padding: 48px 24px; }
.pf-empty h3 { font-size: 22px; margin-bottom: 8px; }
.pf-empty .muted { margin-bottom: 20px; }
.pf-make { display: block; padding: 14px; border-radius: 12px; background: #4a54ff; color: #fff; font-weight: 700; font-size: 16px; }
