/* =====================================================================
   HOO 디자인 — 컨셉 "녹화 중" × 틱톡·유튜브
   - 유튜브처럼: 가운데 검색, 왼쪽 메뉴, 알약 탭, 카드 아래 프로필·제목 줄
   - 틱톡처럼: 세로 영상, 크게 보기에서 오른쪽 동그라미 버튼 줄, 휴대폰 아래 탭 줄
   - 들어오자마자 영상: 세로 카드가 화면에 보이면 소리 없이 저절로 재생된다
   - 카드를 누르면 쇼츠처럼 화면 가득 보고, 위아래로 넘긴다 (.reel)
   - 색: 흑백(종이 흰색 / 먹색) + 카메라 녹화 표시 같은 빨강 하나(--accent)
   - 글꼴: Pretendard 하나 (fonts/ 에서 직접 제공). 굵기로 위계: 로고 800 / 영상 제목 600 / 본문 400
   규칙: 그라데이션 금지 · 이모지 금지 · 색은 var(--이름)으로만
   ===================================================================== */

/* 글꼴 파일은 HTML 의 <link> 로 불러온다 (1단계 fonts/pretendard/, 2단계 app/fonts/pretendard/ 를 layout.js 에서 import) */

/* ----- 라이트 (기본) ----- */
:root {
  color-scheme: light;
  --bg: #fbf6ee;               /* 흰색 */
  --bg-elevated: #fffdf9;
  --surface: #f1e8da;
  --surface-hover: #e8dcc9;
  --text: #2a2019;             /* 먹색 */
  --text-2: #6e5f51;
  --text-3: #766553;           /* 흐린 글자: 기본 바탕에서 대비 5.2 (4.5 이상) */
  --line: #eadfce;
  --line-strong: #d6c8b3;
  --input-bg: #fffdf9;
  --thumb-bg: #eadfcd;
  --accent: #d9622b;           /* 녹화 빨강: 선택 표시·로고 점 */
  --accent-soft: rgba(217, 98, 43, 0.12);
  --danger: #cf3326;           /* 신고·삭제 */
  --danger-soft: rgba(207, 51, 38, 0.09);
  --ok: #1d7a49;               /* 촬영 원본 확인 */
  --ok-soft: rgba(29, 122, 73, 0.1);
  --warn: #a35f08;             /* 검토 중 */
  --warn-soft: rgba(163, 95, 8, 0.1);
  --shadow: 0 18px 50px rgba(90, 55, 20, 0.14);
  --backdrop: rgba(10, 10, 10, 0.55);
  /* 크게 보기(.reel): 테마와 상관없이 항상 어둡게 */
  --stage-bg: #050505;
  --stage-text: #f3f3f1;
  --stage-text-2: rgba(243, 243, 241, 0.64);
  --stage-line: rgba(243, 243, 241, 0.16);
  --stage-btn: rgba(243, 243, 241, 0.1);
  --badge-camera-bg: #1f6f43;   /* 촬영 인증 배지: 진한 초록 + 흰 글씨 (대비 6 이상) */
  --badge-camera-text: #ffffff;
  --stage-ok: #7fd9a0;          /* 검은 화면 위에서도 잘 보이는 연두 */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", monospace;
  --radius: 14px;             /* 썸네일 모서리 */
  --header-h: 72px;
}

/* ----- 다크 ----- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1512;
  --bg-elevated: #251d18;
  --surface: #2b221c;
  --surface-hover: #362b23;
  --text: #f5ebdc;
  --text-2: #b9a998;
  --text-3: #a3948a;
  --line: #32281f;
  --line-strong: #4a3d31;
  --input-bg: #211a15;
  --thumb-bg: #2a211b;
  --accent: #f08a4b;
  --accent-soft: rgba(240, 138, 75, 0.16);
  --danger: #ff5a4b;
  --danger-soft: rgba(255, 90, 75, 0.13);
  --ok: #6fcf97;
  --ok-soft: rgba(111, 207, 151, 0.13);
  --warn: #f0a840;
  --warn-soft: rgba(240, 168, 64, 0.13);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  --backdrop: rgba(0, 0, 0, 0.72);
}

/* ----- 기기 설정 따르기 (테마를 고르지 않았고 기기가 다크일 때) ----- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #1b1512;
    --bg-elevated: #251d18;
    --surface: #2b221c;
    --surface-hover: #362b23;
    --text: #f5ebdc;
    --text-2: #b9a998;
    --text-3: #a3948a;
    --line: #32281f;
    --line-strong: #4a3d31;
    --input-bg: #211a15;
    --thumb-bg: #2a211b;
    --accent: #f08a4b;
    --accent-soft: rgba(240, 138, 75, 0.16);
    --danger: #ff5a4b;
    --danger-soft: rgba(255, 90, 75, 0.13);
    --ok: #6fcf97;
    --ok-soft: rgba(111, 207, 151, 0.13);
    --warn: #f0a840;
    --warn-soft: rgba(240, 168, 64, 0.13);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
    --backdrop: rgba(0, 0, 0, 0.72);
  }
}

/* ===================================================================== 기본 */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background 0.3s, color 0.3s;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
svg {
  display: block;
  flex-shrink: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: var(--text);
  color: var(--bg);
}
.mono {
  font-variant-numeric: tabular-nums;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 가운데 정렬 상자 */
.container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 40px;
}
.page {
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ===================================================================== 버튼 */
/* 기본: 테두리만 있는 알약 (레퍼런스의 "회원가입" 버튼) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover {
  border-color: var(--text);
}
/* 주 버튼: 글자색으로 꽉 채움 (다크=크림, 라이트=짙은 갈색) */
.btn.primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.btn.primary:hover {
  opacity: 0.86;
}
.btn.ghost {
  border-color: transparent;
}
.btn.ghost:hover {
  background: var(--surface);
}
.btn:disabled,
.btn.primary:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--text-3);
  opacity: 1;
  cursor: not-allowed;
}
.btn.small {
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: var(--surface);
}

/* ===================================================================== 상단 바 (유튜브처럼: 로고 | 가운데 검색 | 오른쪽 버튼) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 232px;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
  padding: 0 28px;
  background: var(--bg);
  transition: background 0.3s;
}
/* 로고: 녹화 중 빨간 점 + 세리프 글씨 (이탤릭 금지) */
.brand {
  display: flex;
  align-items: center;
  padding-left: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 26px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}
.logo::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: rec 2s ease-in-out infinite;
}
@keyframes rec {
  50% { opacity: 0.25; }
}
.header-search {
  justify-self: center;
  width: min(600px, 100%);
}
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.header-actions .btn {
  height: 38px;
  padding: 0 18px;
}

/* ===================================================================== 화면 뼈대: 왼쪽 메뉴 + 본문 */
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.shell-main {
  min-width: 0;
  padding: 0 48px 120px;
}
.shell-main.page {
  padding-top: 40px;
}

/* 왼쪽 메뉴 (유튜브처럼). 휴대폰에선 아래 탭 줄(틱톡처럼)이 된다 */
.side-nav {
  position: sticky;
  top: var(--header-h);
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100dvh - var(--header-h));
  padding: 16px 16px 32px;
  overflow-y: auto;
  scrollbar-width: none;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.side-link:hover {
  background: var(--surface);
}
.side-link[aria-current="page"] {
  background: var(--surface);
  font-weight: 800;
}
.side-link svg {
  width: 22px;
  height: 22px;
}
.side-ico {
  display: inline-flex;
}
.side-link.mine-tab {
  display: none;   /* 휴대폰 탭 줄에서만 보임(아래 760px 이하 규칙) */
}
.side-rules {
  margin-top: auto;
  padding: 18px 14px 0;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.65;
}
.side-rules b {
  display: block;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 13px;
}
.side-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.side-rules li + li {
  margin-top: 6px;
}

/* ===================================================================== 테마 메뉴 */
.menu-wrap {
  position: relative;
}
.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}
.menu-title {
  margin: 0;
  padding: 8px 10px 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover {
  background: var(--surface);
}
a.menu-item {
  color: inherit;
  text-decoration: none;
}
.menu-item .check {
  width: 18px;
  color: var(--accent);
  visibility: hidden;
}
.menu-item[aria-checked="true"] {
  font-weight: 700;
}
.menu-item[aria-checked="true"] .check {
  visibility: visible;
}

/* ===================================================================== 목록 위 줄: 정렬 탭 + 쇼츠로 보기 */
/* 스크롤해도 상단 바 밑에 붙어 있다 */
.feed-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0 -48px 32px;
  padding: 16px 48px 20px;
  background: var(--bg);
  transition: background 0.3s;
}
.feed-bar .chips {
  margin: 0;
}
.feed-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
}
.feed-count {
  color: var(--text-3);
  font-size: 13px;
}
.feed-count b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ===================================================================== 제목 공통 */
.page-title {
  margin: 0 0 20px;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* 검색칸: 옅은 바탕의 알약 */
.search-box {
  position: relative;
  width: min(320px, 100%);
}
.header-search.search-box {
  width: min(600px, 100%);
}
.search {
  width: 100%;
  height: 42px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--input-bg);
  font-size: 15px;
  transition: border-color 0.2s;
}
.search::placeholder {
  color: var(--text-3);
}
.search:focus {
  outline: none;
  border-color: var(--text);
}
.search-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search-icon svg {
  width: 18px;
  height: 18px;
}

/* 정렬 탭 (유튜브처럼): 옅은 알약, 고른 것은 글자색으로 꽉 채움 */
.chips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip {
  flex-shrink: 0;
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chip:hover {
  background: var(--surface-hover);
}
.chip.active {
  background: var(--text);
  color: var(--bg);
}
.chip-divider {
  flex-shrink: 0;
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line-strong);
}

/* ===================================================================== 영상 카드: 세로 썸네일(틱톡) + 프로필·제목 줄(유튜브) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 64px 32px;
}
.thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--radius);
  background: var(--thumb-bg);
  cursor: pointer;
}
.thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: transparent;
  transition: transform 0.5s;
}
.thumb-wrap:hover .thumb {
  transform: scale(1.03);
}
/* 영상이 아직 없을 때 보이는 자리표시 */
.thumb-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}
.thumb-ph svg {
  width: 30px;
  height: 30px;
  opacity: 0.45;
}
/* 썸네일 위 글자: 그림자로 읽기 쉽게 (그라데이션 대신) */
.duration {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-weight: 700;
}
.duration {
  right: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 12px;
  text-shadow: none;
  font-variant-numeric: tabular-nums;
}
/* 썸네일 왼쪽 위: 상태 이름표(확인 중 등) */
.thumb-tags {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}


/* 썸네일 아래: [제목 / 조회수 · 올린 때] (창작자 줄은 썸네일 위. 신고 깃발은 없앴다 — 신고는 크게 보기 안에서) */
.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-top: 16px;
}
.card-body .owner-notice {
  grid-column: 1 / -1;
}
.title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

/* 채널 줄 (상세 페이지 등) */
/* ===== 배지 ===== */
.badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.badge svg {
  width: 14px;
  height: 14px;
}
/* 촬영 인증: 글자 없이 체크 아이콘만. 진한 초록 동그라미 (일반 업로드는 배지 자체가 없다) */
.badge-camera {
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--badge-camera-bg);
  color: var(--badge-camera-text);
}
/* 눌러서 설명을 보는 아이콘(button): 기본 버튼 모양을 없애고, 눌리는 영역만 사방 9px 넓혀 44px 로 만든다 */
button.badge-camera {
  position: relative;
  padding: 0;
  border: none;
  font: inherit;
  cursor: pointer;
}
button.badge-camera::before {
  content: "";
  position: absolute;
  inset: -9px;
}
button.badge-camera:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.badge-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
/* 설명 말풍선: 아이콘 아래 오른쪽 맞춤(카드). 좁은 카드에서도 화면 밖으로 안 나가게 폭 제한 */
.badge-note {
  position: absolute;
  z-index: 6;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  max-width: 164px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-shadow: none;
  white-space: normal;
}
.badge-note[hidden] {
  display: none;
}
/* 크게 보기: 아이콘 위쪽, 왼쪽 맞춤. 검은 화면 위라 --stage 색을 쓴다 */
.badge-wrap.on-reel .badge-note {
  top: auto;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
  background: var(--stage-text);
  color: var(--stage-bg);
}
/* 운영자 표처럼 글자로 구분해야 하는 곳(.labeled) */
.badge.labeled {
  width: auto;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.badge-camera.labeled {
  height: 26px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
}
.badge-upload {
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

/* ===== 창작자 줄: 카드 맨 위. 프로필 + 이름(길면 …) + (촬영 인증 아이콘) ===== */
.creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}
.creator-row .avatar {
  width: 48px;
  height: 48px;
  font-size: 19px;
}
.creator-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;   /* 이름이 길면 한 줄에서 … 으로 자른다 */
  white-space: nowrap;
}
.byline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
}
.byline .channel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.verified {
  display: inline-flex;
  color: var(--ok);
}
.stats {
  margin: 2px 0 0;
  color: var(--text-3);
  font-size: 13px;
}
.meta {
  margin: 0;
  color: var(--text-2);
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.avatar.large {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

/* 상태 이름표 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tags:empty {
  display: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}
.thumb-stamp.tag {
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
}
.tag.warn {
  color: var(--warn);
  background: var(--warn-soft);
}
.thumb-stamp.tag.warn {
  color: #ffc067;
  background: rgba(0, 0, 0, 0.66);
}
.tag.danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.tag.ok,
.tag.verified-tag {
  color: var(--ok);
  background: var(--ok-soft);
}

/* 내 영상 안내 */
.owner-notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}
.owner-notice p {
  margin: 0 0 10px;
}
.owner-notice p:last-child {
  margin-bottom: 0;
}

.empty {
  padding: 80px 0;
  color: var(--text-2);
  text-align: center;
}
/* 검색 결과가 없을 때 "검색어 지우기" 버튼 줄. 안내 글자와 가깝게 붙인다 */
.empty:has(+ .empty-actions:not([hidden])) {
  padding-bottom: 24px;
}
.empty-actions {
  padding-bottom: 80px;
  text-align: center;
}
.empty-actions[hidden] {
  display: none;
}
.empty a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===================================================================== 아래쪽 운영 원칙 (왼쪽 메뉴가 좁아지는 화면에서만) */
.site-footer {
  display: none;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13px;
}
.site-footer b {
  color: var(--text-2);
}
.site-footer ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

/* ===================================================================== 양식 공통 */
.dialog h2,
.modal h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.form fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: none;
}
.form legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--text-2);
  font-size: 14px;
}
.form .radio {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.form .radio:hover {
  border-color: var(--line-strong);
}
.form .radio:has(input:checked) {
  border-color: var(--text);
  background: var(--surface);
}
.form .check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form input[type="checkbox"],
.form input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--text);
}
.hint {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 13px;
}
.form-error {
  min-height: 1.5em;
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}
.buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===================================================================== 창(dialog) */
.dialog {
  width: min(500px, 92vw);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop {
  background: var(--backdrop);
}
.dialog-sub {
  margin: 0 0 24px;
  color: var(--text-2);
}
.dialog.detail {
  width: min(1080px, 94vw);
  padding: 0 0 28px;
  overflow: hidden;
}
.dialog.detail video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: #000;
}
.dialog.detail h2 {
  margin: 24px 32px 8px;
  font-size: 28px;
}
.dialog.detail .dialog-sub,
.dialog.detail .detail-desc,
.dialog.detail .buttons {
  margin-left: 32px;
  margin-right: 32px;
}
.detail-desc {
  margin: 0 0 16px;
  white-space: pre-wrap;
}

/* ===================================================================== 업로드 */
.upload {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
}
.upload-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 22px 22px 32px;
  border-bottom: 1px solid var(--line);
}
.upload-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.upload-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  padding: 32px;
}
.upload-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  border-top: 1px solid var(--line);
}
.upload-foot .hint {
  margin: 0;
}
.section-label {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

/* 게시 위 "남은 것" 안내: 회색 안내 말투 (오류가 아니니 빨간색 안 씀). 다 채우면 빈 글이라 자리도 안 차지한다 */
.upload-foot-info {
  min-width: 0;
}
.upload-missing {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}
.upload-missing:empty {
  display: none;
}
/* 키보드가 올라와 입력칸으로 스크롤될 때 아래에 고정된 버튼 줄(약 120px)에 가리지 않게 여유를 둔다 */
.upload-dialog {
  scroll-padding-bottom: 140px;
}
.upload-body input,
.upload-body textarea {
  scroll-margin-bottom: 140px;
}

/* 끌어다 놓는 곳. 문구는 마우스 화면 "끌어다 놓으세요" / 터치 화면 "눌러서 영상 고르기" */
.dz-touch {
  display: none;
}
@media (pointer: coarse) {
  .dz-mouse {
    display: none;
  }
  .dz-touch {
    display: inline;
  }
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 16 / 10;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover,
.dropzone.dragging {
  border-color: var(--text);
  background: var(--surface);
}
.dropzone .vf {
  display: none;
}
.dropzone-icon {
  margin-bottom: 10px;
  color: var(--text-2);
}
.dropzone strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.dropzone .meta {
  color: var(--text-3);
  font-size: 13px;
}
.dropzone .btn {
  margin-top: 18px;
}

/* 고른 영상 미리보기 */
.preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.preview video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.preview-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.preview-name {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-info .meta {
  font-size: 13px;
}

/* 입력칸: 밑줄 방식 + 이름표 + 글자 수 */
.field {
  display: block;
  margin-bottom: 22px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line-strong);
  cursor: text;
  transition: border-color 0.2s;
}
.field:focus-within {
  border-bottom-color: var(--text);
}
/* 신고 창의 "기타" 사유 칸: hidden 일 땐 .field 의 display:block 에 지지 않게 */
.report-detail[hidden] {
  display: none;
}
.report-detail {
  margin-top: 4px;
}
.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 4px 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  resize: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}
.field textarea {
  min-height: 90px;
}
.field-count {
  display: block;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

/* HOO 서약 */
.pledge {
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.pledge-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pledge-head svg {
  color: var(--accent);
}
.pledge p {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 13px;
}
.pledge .check {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}
.upload-error {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}
.upload-error.checking {
  color: var(--text-2);
}
.dialog.upload-dialog {
  width: min(1040px, 94vw);
  max-height: 92vh;
  padding: 0;
  overflow-y: auto;
}

/* ===================================================================== 운영자 */
.notice-box {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-2);
}
.notice-box.warn {
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.notice-box b {
  color: var(--text);
}
.notice-box + .chips {
  margin-top: 40px;
}
.table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th,
.admin-table td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.admin-table th {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}
.admin-kind {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.admin-kind small {
  color: var(--text-3);
  font-size: 12px;
}
.admin-table td.num {
  font-variant-numeric: tabular-nums;
}
.admin-video {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-video video {
  width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--thumb-bg);
}
.admin-video b {
  font-weight: 700;
}
.score-high {
  color: var(--danger);
  font-weight: 700;
}
.admin-buttons {
  display: flex;
  gap: 6px;
}
.admin-buttons .btn {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}
.admin-buttons .btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.admin-buttons .btn.danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ===================================================================== 크게 보기 (틱톡처럼 위아래로 넘기기) */
/* 화면 전체를 덮는 검은 판. 안의 .reel-track 이 한 화면씩 딱딱 끊어서 스크롤된다 */
.reel {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--stage-bg);
  color: var(--stage-text);
}
.reel::backdrop {
  background: var(--stage-bg);
}
/* 크게 보는 동안 뒤 페이지는 스크롤되지 않게 */
body:has(.reel[open]),
body.reel-open {
  overflow: hidden;
}
.reel-track {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.reel-track::-webkit-scrollbar {
  display: none;
}
/* 한 칸: [영상] [오른쪽 동그라미 버튼 줄] 을 가운데에 */
.reel-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  height: 100dvh;
  padding: 20px 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* 영상 틀: 기본은 세로(9:16). 영상을 불러오면 그 영상 비율로 바뀐다 */
.reel-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 280px);
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  cursor: pointer;
  touch-action: pan-y;          /* 손가락 위아래 쓸기는 브라우저가 스크롤로 처리 (그때 pointercancel) */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;  /* 길게 누를 때 iOS 메뉴 막기 */
}
.reel-frame video {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* 세로 영상: 틀을 가득 채운다 */
}
/* 가로·정사각형 영상: 잘리지 않게 전체를 가운데에, 위아래(정사각형은 좌우도) 빈 곳엔 같은 영상을 크게 확대·흐리게 */
.reel-frame.is-wide video {
  object-fit: contain;
}
.reel-blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  filter: blur(14px) brightness(0.72);
  transform: scale(1.18);       /* 흐리게 하면 가장자리가 비치므로 살짝 키워 가린다 */
  pointer-events: none;
}
.reel-blur[hidden] {
  display: none;
}
/* 아래쪽을 어둡게: 안쪽 그림자 (그라데이션 대신). 글자가 잘 읽히게 */
.reel-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  box-shadow: inset 0 -200px 110px -70px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
/* 소리를 켜고 끌 때 영상 가운데에 잠깐 떴다 사라지는 아이콘 */
.reel-flash {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--stage-text);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.85);
}
.reel-flash svg {
  width: 32px;
  height: 32px;
}
.reel-flash.show {
  animation: flash 0.9s ease-out;
}
@keyframes flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.06); }
}
/* 길게 누르는 동안(.holding) 글자·버튼은 잠깐 숨긴다 */
.reel-info,
.reel-actions,
.reel-close,
.reel-nav,
.reel-count,
.reel-hint,
.reel-frame::after {
  transition: opacity 0.15s;
}
.reel.holding .reel-info,
.reel.holding .reel-actions,
.reel.holding .reel-close,
.reel.holding .reel-nav,
.reel.holding .reel-count,
.reel.holding .reel-hint,
.reel.holding .reel-frame::after {
  opacity: 0;
  pointer-events: none;
}
.reel-missing,
.reel-paused-icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--stage-text-2);
  font-size: 14px;
  pointer-events: none;
}
.reel-frame.missing .reel-missing,
.reel-frame.paused .reel-paused-icon {
  display: flex;
}
.reel-frame.missing .reel-paused-icon {
  display: none;
}
.reel-paused-icon svg {
  width: 64px;
  height: 64px;
  padding: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--stage-text);
}

/* 영상 위 왼쪽 아래: 채널 · 제목 · 설명 · 조회 */
.reel-info {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 18px 20px;
  color: var(--stage-text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.reel-info a,
.reel-info button {
  pointer-events: auto;
}
.reel-creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.reel-creator .avatar {
  width: 52px;
  height: 52px;
  font-size: 21px;
  box-shadow: 0 0 0 2px var(--stage-text);
}
.reel-name {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.reel-desc {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--stage-text-2);
  font-size: 14px;
  white-space: pre-wrap;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.reel-stats {
  margin: 0;
  color: var(--stage-text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* 영상 오른쪽: 동그라미 버튼 + 아래 작은 글자 (틱톡처럼) */
.reel-actions {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 6px;
}
.reel-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--stage-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.reel-act .circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--stage-btn);
  transition: background 0.2s;
}
.reel-act:hover .circle {
  background: rgba(243, 243, 241, 0.2);
}
.reel-act svg {
  width: 22px;
  height: 22px;
}
.reel-act.reported .circle {
  background: var(--danger);
  color: #fff;
}

/* 고정 버튼: 왼쪽 위 닫기, 오른쪽 가운데 위/아래 */
.reel-close,
.reel-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--stage-btn);
  color: var(--stage-text);
  cursor: pointer;
  transition: background 0.2s;
}
.reel-close:hover,
.reel-nav button:hover {
  background: rgba(243, 243, 241, 0.2);
}
.reel-nav button:disabled {
  opacity: 0.3;
  cursor: default;
}
.reel-close {
  position: absolute;
  z-index: 3;
  left: 24px;
  top: 24px;
}
.reel-nav {
  position: absolute;
  z-index: 3;
  right: 32px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}
.reel-count {
  position: absolute;
  z-index: 3;
  right: 40px;
  top: 36px;
  margin: 0;
  color: var(--stage-text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.reel-hint {
  position: absolute;
  z-index: 3;
  left: 24px;
  bottom: 24px;
  margin: 0;
  color: var(--stage-text-2);
  font-size: 12px;
}

/* ===================================================================== 좁은 화면 */
/* 1100px 이하: 왼쪽 메뉴가 아이콘 줄로 좁아진다 */
@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .side-nav {
    padding: 8px 4px;
  }
  .side-link {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    height: 70px;
    padding: 0;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
  }
  .side-link[aria-current="page"] {
    font-weight: 800;
  }
  .side-rules {
    display: none;
  }
  .site-footer {
    display: block;
  }
  .reel-hint {
    display: none;
  }
}
/* 760px 이하(휴대폰): 왼쪽 메뉴가 아래 탭 줄로, 크게 보기는 화면 가득 */
@media (max-width: 760px) {
  :root {
    --header-h: 56px;
  }
  body {
    padding-bottom: 60px;
  }
  .site-header {
    gap: 12px;
    padding: 0 12px;
  }
  .brand {
    padding-left: 4px;
  }
  .logo {
    font-size: 24px;
  }
  .header-actions .btn {
    display: none;
  }
  .search {
    height: 38px;
    padding-left: 40px;
    font-size: 14px;
  }
  .search-icon {
    left: 14px;
  }
  .shell {
    display: block;
  }
  .shell-main {
    padding: 0 16px 48px;
  }
  .side-nav {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    flex-direction: row;
    justify-content: space-around;
    height: 60px;
    padding: 0 8px;
    border-top: 1px solid var(--line);
    background: var(--bg);
  }
  .side-link {
    width: auto;
    height: 100%;
    padding: 0 12px;
    gap: 3px;
    border-radius: 0;
  }
  .side-link:hover,
  .side-link[aria-current="page"] {
    background: transparent;
  }
  .side-link:not([aria-current="page"]) {
    color: var(--text-2);
  }
  /* 세 번째 칸 "내 영상": 휴대폰 탭 줄에서만 보인다. 내 영상을 보는 중이면 홈은 선택 해제 */
  .side-link.mine-tab {
    display: flex;
  }
  .side-nav.is-mine .side-link.home-tab[aria-current="page"] {
    color: var(--text-2);
    font-weight: 600;
  }
  /* 가운데 올리기: 틱톡처럼 꽉 찬 + 버튼 */
  .side-link.create {
    font-size: 0;
  }
  .side-link.create .side-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
  }
  /* 점검 C: 휴대폰에선 [최신][인기] ········ [▶ 쇼츠로 보기] 한 줄. "영상 N개"는 없앴다 (붙어 있는 줄이 화면의 3분의 1을 먹었다) */
  .feed-bar {
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0 -16px 24px;
    padding: 10px 16px 12px;
  }
  .feed-bar .chips {
    flex: 1 1 auto;
    min-width: 0;
  }
  .feed-tools {
    width: auto;
  }
  .feed-count {
    display: none;
  }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 14px;
  }
  .card-body {
    padding-top: 12px;
  }
  .creator-row {
    gap: 10px;
    margin-bottom: 12px;
  }
  .creator-row .avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .creator-name {
    font-size: 16px;
  }
  .title {
    margin-bottom: 6px;
    font-size: 15px;
  }
  .upload-body {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 20px;
  }
  /* 점검 C: 버튼 줄을 창 아래에 고정 (스크롤해도 "게시"가 보인다). 안내 줄이 버튼 위에 놓인다 */
  .dialog.upload-dialog {
    max-height: 92dvh;
  }
  .upload-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-elevated);
  }
  .upload-foot .buttons {
    justify-content: flex-end;
  }
  .upload-foot .hint {
    display: none;
  }
  /* 크게 보기: 영상이 화면 가득, 버튼 줄은 영상 위 오른쪽 아래에 */
  .reel-slide {
    position: relative;
    display: block;
    padding: 0;
  }
  .reel-frame {
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto !important;
    border-radius: 0;
  }
  /* 휴대폰에선 화면을 꽉 채운다 (세로 영상만 받으니 잘리는 부분이 거의 없다) */
  .reel-frame video {
    object-fit: cover;
  }
  .reel-info {
    right: 72px;
    padding: 0 16px 24px;
  }
  .reel-actions {
    position: absolute;
    z-index: 2;
    right: 10px;
    bottom: 24px;
    padding: 0;
  }
  .reel-act .circle {
    background: rgba(0, 0, 0, 0.35);
  }
  .reel-nav {
    display: none;
  }
  .reel-close {
    left: 12px;
    top: 12px;
  }
  .reel-count {
    right: 18px;
    top: 26px;
  }
}

/* ===================================================================== 터치 영역 최소 44px (휴대폰·터치 화면) */
@media (max-width: 760px), (pointer: coarse) {
  .btn,
  .btn.small,
  .chip,
  .search {
    min-height: 44px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .menu-item {
    min-height: 44px;
  }
  .brand {
    min-height: 44px;
  }
}

/* ===================================================================== 프로필 메뉴 · 내 영상 안내 줄 · 업로드 경고 */
.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.profile-btn:hover {
  background: var(--surface);
}
.profile-btn .avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}
.menu-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.menu-profile b {
  font-size: 15px;
  font-weight: 700;
}
.mine-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  padding: 12px 16px 12px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}
.mine-banner[hidden] {
  display: none;
}
/* 업로드 서약 아래 경고: 글자는 짙은 갈색(대비 확보), 빨강은 왼쪽 선과 아이콘에만 */
.pledge .pledge-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--danger-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.pledge .pledge-warn svg {
  margin-top: 1px;
  color: var(--danger);
}
.pledge .pledge-warn b {
  font-weight: 800;
}

/* ===================================================================== 상자 속 글자 정렬 */
/* 줄 높이가 크면(본문 1.6) 글꼴 칸이 반올림되면서 글자가 상자 위쪽으로 0.5~2px 쏠린다.
   높이가 정해진 한 줄짜리 상자(버튼·탭·이름표·배지·프로필·길이 표시)는 줄 높이를 1로 두어 글자가 정확히 가운데 오게 한다.
   (확인: scratchpad 의 audit.mjs 로 글자가 칠해진 위치와 상자 가운데의 차이를 잰다) */
.btn,
.chip,
.tag,
.badge,
.avatar,
.duration,
.menu-item,
.field-count {
  line-height: 1;
}

/* 아이콘이 맨 앞에 있는 버튼(+ 업로드, ▶ 쇼츠로 보기): 아이콘 그림 자체에 안쪽 여백이 있어서
   그대로 두면 아이콘+글자 묶음이 오른쪽으로 쏠린다. 왼쪽 여백을 그만큼 줄여 좌우를 맞춘다. */
.btn:has(> svg:first-child) {
  padding-left: 18px;
}
.header-actions .btn:has(> svg:first-child) {
  padding-left: 14px;
}
.btn.small:has(> svg:first-child) {
  padding-left: 11px;
}
/* 버튼 옆에 나란히 놓인 안내 글자는 줄 높이 1: 글자가 버튼과 같은 가운데 높이에 오게 */
.upload-foot .hint {
  line-height: 1;
}

/* 업로드 화면 한 줄 안내: 가로 영상도 막지 않고 안내만 한다 */
.upload-tip {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 13px;
}
