/* 포스터에서 가져온 아주 단순한 장식만 — 구조·디테일은 style.css(원본) 그대로 */

/* 연어 라인 드로잉: 입장 화면 위쪽에 작게 */
.auth-copy::before {
  content: "";
  display: block;
  width: 5.5rem;
  aspect-ratio: 720 / 320;
  margin-bottom: 1.25rem;
  background: url("/img/salmon.svg") center / contain no-repeat;
  opacity: .85;
}

/* 새로고침 중 */
.icon-button.is-loading .refresh-icon { animation: ss-spin .8s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }

/* ---- 게시판 목록 (게시판형: 검색 + 작은 글쓰기 버튼 / 제목 줄 목록 / 페이지 번호) */
.board { padding: .875rem 1rem 1.5rem; }
.board-toolbar { display: flex; align-items: center; gap: .5rem; }
.board-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .4rem;
  height: 2.375rem; padding: 0 .75rem; border: 1px solid #e3e3e3; border-radius: .625rem; background: #fff;
  color: #9a9393;
}
.board-search:focus-within { border-color: var(--primary); color: var(--primary); }
.board-search svg { flex: none; width: 1.05rem; height: 1.05rem; }
.board-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0;
  border: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; border-radius: 0;
  font: inherit; font-size: .875rem; color: var(--text);
}
.board-write {
  flex: none; display: inline-flex; align-items: center; gap: .3rem;
  height: 2.375rem; padding: 0 .8rem; border: 1px solid var(--primary); border-radius: .625rem;
  background: #fff; color: var(--primary); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer;
}
.board-write svg { width: .95rem; height: .95rem; }
.board-write:hover { background: var(--primary); color: #fff; }
.board-summary { min-height: 1rem; margin: .75rem 0 .25rem; font-size: .75rem; color: #9a9393; }

.board-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #2f2a2a; }
.board-list > li { border-bottom: 1px solid #ececec; }
.board-row {
  display: grid; gap: .3rem; width: 100%; padding: .8rem .25rem; border: 0; background: none;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.board-row:hover { background: #fafafa; }
.board-row:hover .board-row-text { text-decoration: underline; text-underline-offset: 2px; }
.board-row-title { display: flex; align-items: baseline; gap: .3rem; min-width: 0; font-size: .9375rem; font-weight: 600; color: var(--text); }
.board-row-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row-count { flex: none; font-size: .8125rem; font-weight: 700; color: var(--primary); }
.board-row-new {
  flex: none; display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 3px;
  background: #e05a3c; color: #fff; font-size: .625rem; font-weight: 800; line-height: 1; align-self: center;
}
.board-row-meta { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: #9a9393; min-width: 0; }
.board-row-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row-date::before { content: "·"; margin-right: .35rem; }
.board-row .mine-pill { font-size: .625rem; padding: .05rem .3rem; }
.board-empty { padding: 2.5rem 0; text-align: center; font-size: .875rem; color: #9a9393; border-bottom: 0 !important; }

.board-pages { display: flex; justify-content: center; gap: .25rem; margin-top: 1.25rem; }
.board-pages button {
  min-width: 2rem; height: 2rem; padding: 0 .4rem; border: 1px solid transparent; border-radius: .5rem;
  background: none; font: inherit; font-size: .8125rem; color: #6f6868; cursor: pointer;
}
.board-pages button:hover:not(:disabled) { background: #f4f4f4; }
.board-pages button[aria-current="page"] { border-color: var(--primary); color: var(--primary); font-weight: 800; }
.board-pages button:disabled { color: #d2cdcd; cursor: default; }
.board-more { display: flex; justify-content: center; padding: 1rem 0 0; }
.board-more [hidden] { display: none; }

/* 데스크톱: 작성자·날짜를 제목 오른쪽 한 줄로 */
@media (min-width: 768px) {
  .board { padding: 1rem 1.5rem 2rem; }
  .board-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .85rem .5rem; }
  .board-row-meta { justify-content: flex-end; }
  .board-row-author { max-width: 9rem; }
}

/* ---- 글 보기 (Threads 문법)
   아바타·이름·시간 한 줄 → 제목·본문 → 댓글 수 → 얇은 구분선으로 나뉜 댓글 → 하단 답글 입력창 */
.avatar {
  flex: none; display: inline-grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font-size: .9rem; font-weight: 700; color: #3d3636; background: #ebeef5;
  border: 1px solid rgba(0, 0, 0, .06);
}
.avatar.small { width: 2rem; height: 2rem; font-size: .8rem; }
.thread { padding: 1rem 1.25rem .75rem; }
.thread-head { display: flex; align-items: center; gap: .75rem; }
.thread-who { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .4rem; font-size: .9375rem; }
.thread-who strong { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-time { flex: none; font-size: .875rem; color: #9a9393; }
.thread-title { margin: .875rem 0 .375rem; font-size: 1.0625rem; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
.thread-body { font-size: .9375rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.thread-stats { display: flex; align-items: center; gap: .3rem; margin-top: .875rem; font-size: .8125rem; color: #6f6868; }
.thread-stats svg { width: 1.15rem; height: 1.15rem; }

.thread-section-head {
  padding: .75rem 1.25rem; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec;
  font-size: .875rem; font-weight: 700; color: var(--text);
}
.thread-comments { list-style: none; margin: 0; padding: 0; }
.thread-comment { display: flex; gap: .75rem; padding: .875rem 1.25rem; border-bottom: 1px solid #ececec; }
.thread-comment-main { flex: 1; min-width: 0; }
.thread-comment-body { margin: .15rem 0 0; font-size: .9375rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-empty { padding: 1.5rem 1.25rem; font-size: .875rem; color: #9a9393; }

/* ⋯ 메뉴 */
.more { position: relative; flex: none; }
.more-btn {
  display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
  border: 0; border-radius: 50%; background: none; color: #9a9393; cursor: pointer;
}
.more-btn svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.more-btn:hover { background: rgba(0, 0, 0, .05); color: var(--text); }
.more-menu {
  position: absolute; right: 0; top: calc(100% + .25rem); z-index: 30; min-width: 7.5rem;
  padding: .375rem; background: #fff; border: 1px solid #e6e6e6; border-radius: .875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.more-menu button {
  display: block; width: 100%; padding: .6rem .75rem; border: 0; border-radius: .5rem;
  background: none; text-align: left; font-size: .9rem; font-weight: 600; color: var(--text); cursor: pointer;
}
.more-menu button:hover { background: #f5f5f5; }
.more-menu button.danger { color: var(--danger); }

/* 하단 답글 입력창: 화면 아래에 붙어 있는 둥근 입력 상자 */
.reply-bar {
  position: sticky; bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: flex; align-items: flex-end; gap: .625rem;
  margin: .75rem .75rem 0; padding: .5rem .5rem .5rem .625rem;
  background: #fff; border: 1px solid #e3e3e3; border-radius: 1.5rem;
  box-shadow: 0 -6px 16px rgba(255, 255, 255, .9);
}
.reply-bar .avatar { margin-bottom: .1rem; }
.reply-bar textarea {
  flex: 1; min-width: 0; min-height: 2.2rem; max-height: 10rem; padding: .45rem 0;
  border: 0; outline: none; resize: none; background: transparent;
  font: inherit; font-size: .9375rem; line-height: 1.4; color: var(--text);
}
.reply-bar textarea::placeholder { color: #a39c9c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-send {
  flex: none; min-height: 2.2rem; padding: 0 1rem; border: 0; border-radius: 99px;
  background: var(--primary); color: #fff; font-size: .875rem; font-weight: 700; cursor: pointer;
}
.reply-send:disabled { background: #e7e7e7; color: #a7a0a0; cursor: default; }

/* ---- 글쓰기 (게시판형 편집기): 제목 줄 / 본문 / 글자 수 를 한 상자에, 버튼은 오른쪽 아래 */
.write-page { padding-top: 1.25rem; padding-bottom: 2rem; }
.write-heading { margin: 0 0 .875rem; font-size: 1.125rem; font-weight: 800; letter-spacing: -.02em; }
.write-box { border: 1px solid #dcdcdc; border-radius: .75rem; background: #fff; overflow: hidden; }
.write-box:focus-within { border-color: var(--primary); }
.write-title {
  display: block; width: 100%; box-sizing: border-box; padding: .9rem 1rem;
  border: 0; border-bottom: 1px solid #ececec; outline: none; background: #fff;
  font: inherit; font-size: 1rem; font-weight: 700; color: var(--text);
}
.write-body {
  display: block; width: 100%; box-sizing: border-box; min-height: 18rem; padding: 1rem;
  border: 0; outline: none; resize: vertical; background: #fff;
  font: inherit; font-size: .9375rem; line-height: 1.7; color: var(--text);
}
.write-title::placeholder, .write-body::placeholder { color: #aaa3a3; font-weight: 500; }
.write-foot { display: flex; justify-content: flex-end; padding: .5rem 1rem; border-top: 1px solid #ececec; background: #fafafa; }
.write-count { font-size: .75rem; color: #9a9393; font-variant-numeric: tabular-nums; }
.write-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.ss-btn {
  min-width: 5rem; min-height: 2.75rem; padding: 0 1.25rem; border: 1px solid var(--primary); border-radius: .625rem;
  background: var(--primary); color: #fff; font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer;
}
.ss-btn:hover { background: var(--primary-hover); }
.ss-btn:disabled { opacity: .5; cursor: default; }
.ss-btn.secondary { background: #fff; color: var(--text); border-color: #dcdcdc; }
.ss-btn.secondary:hover { background: #f6f6f6; }

/* 데스크톱: 카드 안 스크롤이므로 답글창은 카드 바닥에 붙는다 */
@media (min-width: 768px) {
  .reply-bar { bottom: .75rem; }
}

/* ---- 하단 카테고리 내비게이션 (SNS 스타일) */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; z-index: 40;
  width: min(100%, 736px); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: .25rem .5rem calc(.25rem + env(safe-area-inset-bottom, 0px));
  background: rgba(252, 252, 252, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  min-height: 3.5rem; padding: .45rem 0 .3rem; border: 0; background: none;
  color: var(--muted); font-size: .6875rem; font-weight: 600; letter-spacing: -.01em; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav svg { width: 1.6rem; height: 1.6rem; transition: transform .15s; }
.bottom-nav button:active svg { transform: scale(.9); }
.bottom-nav button.active { color: var(--primary); }
.bottom-nav button.active svg path, .bottom-nav button.active svg rect, .bottom-nav button.active svg circle { stroke-width: 2.1; }
body.has-bottom-nav .app { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }
body.has-bottom-nav .toast { bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }

/* ---- 소개 (포스터 요소: 보라 강조 박스 + 시안 그림자, 슬레이트 보조색) */
.intro { padding-top: 1rem; padding-bottom: 2rem; }
.intro-poster { margin: 0 -.25rem 1.25rem; }
.intro-poster img { display: block; width: 100%; height: auto; }
.intro-lead { text-align: center; margin-bottom: 1.5rem; }
.intro-kicker { margin: 0 0 .5rem; font-size: 1.125rem; font-weight: 800; color: #4f4747; letter-spacing: -.02em; }
.intro-title { margin: 0; font-size: clamp(1.4rem, 6.4vw, 1.9rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.5; }
.intro-mark {
  display: inline; padding: .05em .35em .1em; color: #fff; background: #a060e0;
  box-shadow: .22em .22em 0 #b8e8f8;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.intro-text { font-size: .975rem; line-height: 1.8; color: var(--text); word-break: keep-all; }
.intro-text p { margin: 0 0 .75rem; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-topics { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.intro-topics li {
  padding: .3rem .75rem; border-radius: 99px; font-size: .875rem; font-weight: 700;
  color: #7f43bd; background: #f2ebfb;
}
.intro-topics li:last-child { color: #fff; background: #a060e0; }
.intro-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .5rem; font-size: .9rem; line-height: 1.65; }
.intro-steps strong { margin-right: .35rem; color: var(--primary); }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice { padding: .75rem 0; border-bottom: 1px dashed var(--line); }
.notice-list .comment-empty { padding: .75rem 0; color: var(--muted); font-size: .875rem; }
.notice-list .comment-date { color: var(--muted); font-size: .75rem; }
.notice-list .comment-body { margin: .25rem 0 0; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.intro-footer { margin: 2rem 0 0; text-align: center; font-size: .7rem; font-weight: 600; letter-spacing: .5em; color: #8090a0; }

/* ---- 스크롤바 자리 항상 확보: 탭마다 스크롤바가 생기고 사라져도 화면이 밀리지 않게
   (both-edges: 양쪽에 같은 폭을 비워 가운데 정렬 유지 · 모바일 오버레이 스크롤바에는 영향 없음) */
html { scrollbar-gutter: stable both-edges; }

/* ---- 데스크톱: Threads 문법 — 왼쪽 고정 아이콘 레일 + 가운데 카드 칼럼 */
@media (min-width: 768px) {
  body.has-bottom-nav { padding-inline: 5rem; }          /* 레일 폭만큼 양쪽을 비워 칼럼이 레일과 겹치지 않고 가운데 */
  /* Threads 처럼 페이지는 고정, 카드(칼럼) 안에서만 스크롤 → 페이지 스크롤바가 없어 밀림 자체가 없다 */
  html:has(body.has-bottom-nav) { overflow: hidden; scrollbar-gutter: auto; }
  body.has-bottom-nav .app {
    display: flex; flex-direction: column;
    height: calc(100dvh - .75rem); min-height: 0;
    margin-top: .75rem; padding-bottom: 0;
    border: 1px solid var(--line); border-bottom: 0;
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
  }
  body.has-bottom-nav .app > .topbar { flex: none; position: relative; }
  body.has-bottom-nav .app > main {
    flex: 1; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-gutter: stable;                          /* 칼럼 안에서도 내용 길이와 상관없이 폭 고정 */
    scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .22) transparent;
  }
  body.has-bottom-nav .app > main::-webkit-scrollbar { width: 12px; }
  body.has-bottom-nav .app > main::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .22); border-radius: 99px;
    border: 4px solid transparent; background-clip: padding-box;   /* 카드 안쪽으로 들어간 얇은 막대 */
  }
  body.has-bottom-nav .app > main::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 0, 0, .35); }
  body.has-bottom-nav .app > main::-webkit-scrollbar-track { background: transparent; }
  body.has-bottom-nav .toast { bottom: 1.5rem; }

  .bottom-nav {
    left: 0; top: 0; bottom: 0; width: 5rem; transform: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    padding: 0; background: transparent; border: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .bottom-nav::before {                                 /* 레일 맨 위 로고 (Threads 의 로고 자리) */
    content: ""; position: absolute; top: 1.25rem; left: 50%; transform: translateX(-50%);
    width: 3rem; aspect-ratio: 720 / 320;
    background: url("/img/salmon.svg") center / contain no-repeat;
  }
  .bottom-nav button {
    width: 3.75rem; height: 3.25rem; min-height: 0; padding: 0;
    justify-content: center; border-radius: .875rem;
  }
  .bottom-nav button:hover { background: rgba(0, 0, 0, .045); }
  .bottom-nav button span {                             /* 아이콘만 보이고 이름은 툴팁(title)·스크린리더로 */
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .bottom-nav svg { width: 1.75rem; height: 1.75rem; }
  .intro-poster { max-width: 30rem; margin-inline: auto; }
}

/* ---- 프로필 카드: 규격 고정 (내용 길이와 상관없이 모든 카드가 같은 크기)
   왼쪽: 첫 문장(작은 글씨, 최대 2줄) + 닉네임 / 오른쪽: 고른 카드 한 장 */
.member-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); align-items: start; }
.member-card.member-thought,
.member-card.my-empty { height: 8.5rem; min-height: 0; max-height: 8.5rem; box-sizing: border-box; overflow: hidden; }
.member-card.member-thought {
  display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem; grid-template-rows: minmax(0, 1fr) auto;
  column-gap: .875rem; row-gap: .5rem; padding: 1rem 1rem 1rem 1.1rem;
}
.member-card.member-thought .thought-text {
  grid-column: 1; grid-row: 1; align-self: start; flex: none;
  font-size: .875rem; font-weight: 600; line-height: 1.55; letter-spacing: -.02em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.member-card.member-thought .member-name { grid-column: 1; grid-row: 2; align-self: end; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card-art {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  width: 4.5rem; aspect-ratio: 3 / 4;
  background: #fff center / contain no-repeat;
  border: 1px solid var(--line); border-radius: 4px;
}
.member-card-art.empty { background: transparent; border-style: dashed; }

/* ---- 배경은 완전한 흰색 (#fff): 포스터 이미지의 흰 바탕과 이음새 없이 이어지게
   구분은 배경색 대신 테두리·점선으로 한다. 검색창·보조 버튼·주제 칩 같은 조작 요소의 옅은 색만 남긴다. */
:root {
  --bg: #fff; --surface: #fff; --surface-elevated: #fff; --surface-tint: #fff;
  --surface-glass: rgba(255, 255, 255, .94); --card-background: #fff;
}
html, body, .app, .topbar, .settings-panel,
.member-card.member-thought, .member-card.member-thought.is-mine, .member-card.my-empty,
.profile-detail, .auth-card, .survey-shell, #nicknameDialog,
.field input[type=text], .field input[type=password], .field textarea { background-color: #fff; }
.bottom-nav { background: rgba(255, 255, 255, .94); }

/* 원본의 전역 input/textarea 스타일(테두리·둥근 모서리·여백)이 글쓰기 상자 안에 겹치지 않게 */
.write-box .write-title, .write-box .write-body {
  margin: 0; border-radius: 0; box-shadow: none; background: #fff; height: auto; max-width: none;
}
.write-box .write-title { border: 0; border-bottom: 1px solid #ececec; min-height: 0; padding: .95rem 1rem; line-height: 1.4; }
.write-box .write-body { padding: 1rem; }
.write-box .write-body { border: 0; }
.write-box .write-title:focus, .write-box .write-body:focus { border-color: #ececec; box-shadow: none; outline: none; background: #fff; }
.write-box .write-body:focus { border: 0; }

/* 프로필 카드를 눌러 들어가는 상세 화면: 박스 테두리 없음 */
#detailView .profile-detail { border: none; }
