/* 토살프 — "야간 상황실"
   깊은 네이비 바탕 위에서 사용자가 누르는 것은 수사 블루, 골드는 배지(로고·포인트·Lv.5)에만 쓴다. */
:root {
  --bg: #0b1020;
  --bg-deep: #080c18;
  --surface: #121a2e;      /* 카드 */
  --surface-2: #18223a;    /* 카드 머리, 탭 바 */
  --surface-3: #212d4a;    /* 호버, 선택 */
  --field: #0d1426;        /* 입력창 */
  --line: rgba(140, 165, 220, .14);
  --line-soft: rgba(140, 165, 220, .08);
  --line-strong: rgba(140, 165, 220, .24);
  --text: #e8edf7;
  --muted: #8b97b1;
  --accent: #5b9bff;
  --accent-hi: #9cc3ff;
  --accent-wash: rgba(91, 155, 255, .12);
  --accent-line: rgba(91, 155, 255, .45);
  --accent-grad: linear-gradient(180deg, #5d97ff 0%, #4479ee 100%);
  --gold: #f2c14e;
  --gold-grad: linear-gradient(180deg, #ffe7a1 0%, #f2c14e 52%, #c8901c 100%);
  --danger: #ff5a6a;
  --danger-hi: #ff8a96;
  --ok: #2fd38a;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;
  --shadow: 0 10px 30px rgba(2, 6, 20, .45);

  --sans: 'Pretendard Variable', Pretendard, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 22px;
}

:root { color-scheme: dark; } /* 스크롤바·날짜 선택기 등 기본 컨트롤도 어둡게 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(64, 110, 240, .14), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans); font-size: var(--fs-md); line-height: 1.6;
  min-height: 100vh; overflow-x: hidden;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: #fff; }
.text-muted { color: var(--muted) !important; }
.text-danger { color: var(--danger-hi) !important; }
.text-success { color: var(--ok) !important; }
.min-w-0 { min-width: 0; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, h4, h5 { color: #fff; }

/* ===== SVG 아이콘 ({% icon %}) ===== */
.ico { display: inline-block; width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico-sm { width: 1em; height: 1em; vertical-align: -.15em; }
.ico-lg { width: 1.35em; height: 1.35em; }
.ico-fill { fill: currentColor; }
/* 버튼 안 아이콘: 글자와 붙여 정렬 */
.btn:has(> .ico), .btn-ico { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn > .ico { width: 15px; height: 15px; vertical-align: 0; stroke-width: 2.1; }
.btn-sm > .ico { width: 13px; height: 13px; }
.btn-lg > .ico { width: 18px; height: 18px; }

/* ===== 브랜드 ===== */
.emblem { width: 34px; height: 34px; flex: 0 0 auto; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 23px; letter-spacing: -.03em; white-space: nowrap; color: #fff; }
.brand span { color: #fff; }
.brand:hover { color: #fff; }

/* ===== 상단 알림줄 / 헤더 ===== */
.notice-bar { background: var(--bg-deep); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--muted); }
.notice-bar .inner { max-width: 1280px; margin: 0 auto; padding: 6px 20px; display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.notice-bar .nb-item { display: inline-flex; align-items: center; min-width: 0; }
.notice-bar .nb-link { display: inline-flex; align-items: center; color: inherit; transition: color .15s; }
.notice-bar .nb-link:hover { color: #fff; }
.notice-bar .nb-link:hover strong { color: var(--accent-hi); }
.notice-bar .ico { width: 13px; height: 13px; color: var(--accent); margin-right: 6px; vertical-align: 0; }
.notice-bar strong { color: #fff; font-weight: 600; margin-left: 4px; transition: color .15s; }

.site-header { background: rgba(11, 16, 32, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.site-header .bar { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-user { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-sm); }
.header-user .who { color: #fff; font-weight: 600; flex: 0 0 auto; white-space: nowrap; }
/* 링크라서 금색 대신 흰색 (금색은 배지 전용) */
.header-user .pts { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 4px 2px; border-radius: var(--r-sm); text-underline-offset: 3px; }
.header-user a.pts:hover { color: var(--accent-hi); text-decoration: underline; }
.site-header .header-user .who { min-height: 40px; }
.header-user .btn-sm { padding: 6px 12px; white-space: nowrap; }

/* ----- 회원 드롭다운 ----- */
.user-menu .dropdown-menu .dropdown-item { display: flex; align-items: center; gap: 10px; min-height: 38px; transition: background .15s, color .15s; }
.user-menu .dropdown-item:focus-visible { outline-offset: -2px; }
.user-menu .dropdown-item:active { background: var(--accent-wash); }
/* 로그아웃은 머리글 버튼이 숨는 화면에서만 메뉴에 보인다 */
.user-menu .show-md { display: none; }

/* ----- 데스크톱 2단 메뉴 ----- */
.main-nav { flex: 1; min-width: 0; margin-left: 28px; align-self: stretch; }
.mnav { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; gap: 4px; }
.mnav-item { position: relative; display: flex; align-items: center; }
.mnav-link { position: relative; display: flex; align-items: center; gap: 6px; color: #d9e1f2; font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: var(--r-md); white-space: nowrap; transition: color .2s, background .2s; }
.mnav-link .caret { width: 13px; height: 13px; vertical-align: 0; opacity: .6; transition: transform .25s, opacity .2s; }
.mnav-link .lock-ico { margin-left: -2px; }
.mnav-item:hover .caret, .mnav-item:focus-within .caret { opacity: 1; }
.mnav-item:hover > .mnav-link, .mnav-item:focus-within > .mnav-link { color: #fff; background: var(--surface-2); }
.mnav-item.active > .mnav-link { color: #fff; background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.mnav-item:hover .caret, .mnav-item:focus-within .caret { transform: rotate(180deg); }
.mnav-sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% - 6px); left: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 22px 44px rgba(2, 6, 20, .6); visibility: hidden; clip-path: inset(-10px -40px 100% -40px round 14px); transition: clip-path .28s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .28s; z-index: 120; }
.mnav-item:hover > .mnav-sub, .mnav-item:focus-within > .mnav-sub { visibility: visible; clip-path: inset(-10px -40px -60px -40px round 14px); transition-delay: 0s; }
.mnav-sub li { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }
.mnav-item:hover > .mnav-sub li, .mnav-item:focus-within > .mnav-sub li { opacity: 1; transform: none; }
.mnav-item:hover > .mnav-sub li:nth-child(2), .mnav-item:focus-within > .mnav-sub li:nth-child(2) { transition-delay: .04s; }
.mnav-item:hover > .mnav-sub li:nth-child(3), .mnav-item:focus-within > .mnav-sub li:nth-child(3) { transition-delay: .08s; }
.mnav-item:hover > .mnav-sub li:nth-child(4), .mnav-item:focus-within > .mnav-sub li:nth-child(4) { transition-delay: .12s; }
.mnav-sub a { display: block; padding: 10px 14px; color: #d9e1f2; font-size: var(--fs-md); font-weight: 500; border-radius: var(--r-md); white-space: nowrap; transition: background .15s, color .15s; }
.mnav-sub a:hover { background: var(--surface-3); color: #fff; }
.mnav-sub a:focus-visible { outline-offset: -2px; background: var(--surface-3); color: #fff; }
.mnav-sub a:active { background: var(--accent-wash); }
.mnav-sub a.current { color: var(--accent-hi); font-weight: 700; background: var(--accent-wash); }

/* ----- 햄버거 / 드로어 ----- */
.hamburger { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); background: var(--surface); color: #fff; border-radius: var(--r-md); flex: 0 0 auto; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.hamburger .ico { width: 20px; height: 20px; vertical-align: 0; }
.hamburger:hover, .hamburger[aria-expanded="true"] { border-color: var(--accent-line); color: var(--accent-hi); }
.hamburger:active { background: var(--surface-2); }
.drawer-overlay { position: fixed; inset: 0; background: rgba(3, 6, 16, .7); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; z-index: 190; }
.drawer-overlay.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); background: var(--bg); border-right: 1px solid var(--line-strong); display: flex; flex-direction: column; transform: translateX(-100%); visibility: hidden; transition: transform .32s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .32s; z-index: 200; box-shadow: 12px 0 40px rgba(2, 6, 20, .6); }
.drawer.open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-close { width: 44px; height: 44px; margin-right: -6px; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: var(--r-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .15s, background .15s; }
.drawer-close .ico { width: 22px; height: 22px; }
.drawer-close:hover, .drawer-close:focus-visible { color: #fff; background: var(--surface-2); }
.drawer-close:active { background: var(--surface-3); }
.drawer-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.drawer-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; }
.drawer-who > a { color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 0; }
.drawer-user .pts { color: var(--gold); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.drawer .drawer-user .drawer-my a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 2px; line-height: 1.2; transition: background .15s, color .15s; }
.drawer .drawer-user .drawer-my a.current { color: #fff; background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.drawer .drawer-user .drawer-my a:active { background: var(--surface-3); }
/* 서랍 전체가 한 번에 스크롤된다 (회원 카드도 같이 올라가 메뉴 칸이 좁아지지 않게). 맨 위 머리줄만 고정 */
.drawer { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.drawer-head { position: sticky; top: 0; z-index: 1; background: var(--bg); flex: none; }
.drawer-user { flex: none; }
.drawer-nav { flex: none; padding: 4px 12px 8px; }
.drawer-foot { margin-top: auto; flex: none; }
.d-link { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 13px 14px; background: transparent; border: 0; border-radius: var(--r-md); color: #e3e9f6; font-size: var(--fs-md); font-weight: 700; text-align: left; cursor: pointer; }
.acc-toggle { justify-content: space-between !important; }
.d-link:hover { background: var(--surface-2); color: #fff; }
.d-link:focus-visible { outline-offset: -2px; }
.d-link:active { background: var(--surface-3); }
.d-link.current { background: var(--accent-wash); color: #fff; }
.d-link .lock-ico { margin-left: -4px; }
.acc-toggle .caret { width: 16px; height: 16px; color: var(--muted); transition: transform .3s, color .2s; }
.acc.open .acc-toggle { color: #fff; background: var(--surface); }
.acc.open .acc-toggle .caret { transform: rotate(180deg); color: var(--accent-hi); }
.acc-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.acc.open .acc-wrap { grid-template-rows: 1fr; }
.acc-list { list-style: none; margin: 0; padding: 0; overflow: hidden; min-height: 0; }
.acc-list a { display: block; margin: 2px 0 2px 32px; padding: 10px 14px; color: #c4cee2; font-size: var(--fs-md); border-radius: var(--r-md); }
.acc-list a:hover { color: #fff; background: var(--surface-2); }
.acc-list a:focus-visible { outline-offset: -2px; }
.acc-list a:active { background: var(--surface-3); }
.acc-list a.current { color: var(--accent-hi); font-weight: 700; background: var(--accent-wash); }
.drawer-foot { display: grid; gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-foot .btn { min-height: 44px; }
body.drawer-lock { overflow: hidden; }

/* ===== 레이아웃 ===== */
.page { max-width: 1280px; margin: 0 auto; padding: 24px 20px 8px; }
.page-narrow { max-width: 760px; }
.main-content { min-height: 60vh; }

/* ===== 버튼 ===== */
.btn { border-radius: var(--r-md); font-weight: 700; font-size: var(--fs-sm); transition: filter .15s, transform .15s, background .15s, border-color .15s, color .15s; }
.btn:active { transform: translateY(1px); }
.btn-gold, .btn-danger, .btn-royal, .btn-warning { background: var(--accent-grad); border: 0; color: #fff; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .3); }
.btn-gold:hover, .btn-danger:hover, .btn-royal:hover, .btn-warning:hover,
.btn-gold:focus, .btn-danger:focus, .btn-royal:focus, .btn-warning:focus { background: var(--accent-grad); color: #fff; filter: brightness(1.1); }
.btn-royal { padding: 9px 18px; }
.btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; box-shadow: none; }
.btn > .ico-chevron-right:last-child { margin-right: -3px; }
.btn-more, .btn-outline-secondary { background: var(--surface-2); border: 1px solid var(--line-strong); color: #e3e9f6; font-weight: 700; }
.btn-more { padding: 7px 16px; }
.btn-more:hover, .btn-more:focus, .btn-outline-secondary:hover { background: var(--surface-3); border-color: var(--accent-line); color: #fff; }
.btn-outline-danger { color: var(--danger-hi); border: 1px solid rgba(255, 90, 106, .45); background: transparent; }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-outline-warning, .btn-outline-gold { color: var(--accent-hi); border: 1px solid var(--accent-line); background: var(--accent-wash); }
.btn-outline-warning:hover, .btn-outline-gold:hover { background: var(--accent-grad); color: #fff; border-color: transparent; }
/* 본문 버튼 크기: 기본 40px, 작은 버튼 36px, 큰 버튼 48px. 글자는 14px 이상 */
main .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 18px; font-size: 14px; line-height: 1.2; }
main .btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
main .btn-lg { min-height: 48px; padding: 0 26px; font-size: 16px; }
/* 본문 입력칸 높이 */
main .form-control:not(textarea):not(.form-control-sm):not([type=file]), main .form-select:not(.form-select-sm) { min-height: 44px; }
main textarea.form-control { padding: 12px 14px; line-height: 1.6; }

/* ===== 히어로 ===== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 36px 40px;
  border: 1px solid var(--line-strong); border-radius: 20px;
  background:
    radial-gradient(60% 90% at 86% 40%, rgba(91, 155, 255, .26), transparent 70%),
    linear-gradient(145deg, #172343 0%, #111a33 55%, #0d1428 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
  display: flex; flex-direction: column; justify-content: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 175, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 175, 255, .07) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(70% 90% at 82% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 90% at 82% 40%, #000 0%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  right: -40px; top: 50%; width: 420px; height: 420px; transform: translateY(-50%); border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 46px, rgba(120, 165, 255, .10) 47px 48px);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
}
.hero-emblem { position: absolute; right: 48px; top: 50%; width: 132px; height: 132px; transform: translateY(-50%); filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); pointer-events: none; }
.hero > *:not(.hero-emblem) { position: relative; z-index: 1; }
.hero-title { font-weight: 900; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -.04em; margin: 0 0 10px; max-width: calc(100% - 200px); color: #fff; }
.hero-lead { color: #b9c5de; font-size: 16px; max-width: min(30em, calc(100% - 200px)); margin: 0 0 20px; line-height: 1.65; }
.lookup { display: flex; max-width: 600px; background: rgba(8, 12, 24, .7); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; transition: border-color .2s, box-shadow .2s; }
.lookup:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(91, 155, 255, .15); }
.lookup > .ico { color: var(--muted); align-self: center; width: 18px; height: 18px; margin: 0 2px 0 12px; transition: color .2s; }
.lookup:focus-within > .ico { color: var(--accent-hi); }
.lookup input::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }
.lookup input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font-size: 16px; padding: 10px 8px; outline: none; }
.lookup input::placeholder { color: #66728d; }
.lookup button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: var(--r-md); background: var(--accent-grad); color: #fff; font-weight: 800; padding: 0 24px; font-size: var(--fs-md); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); transition: filter .15s, transform .15s; }
.lookup button > .ico { width: 16px; height: 16px; stroke-width: 2.2; vertical-align: 0; }
.lookup button:hover { filter: brightness(1.1); }
.lookup button:active { transform: translateY(1px); }

/* ===== 패널 / 내 정보 ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.me-card { padding: 18px; background: linear-gradient(160deg, #18223f, var(--surface) 70%); }
.me-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.me-name { font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-link { display: inline-flex; align-items: center; gap: 2px; padding: 2px 0; font-size: var(--fs-xs); color: var(--muted); transition: color .15s; }
.me-link > .ico { width: 12px; height: 12px; vertical-align: 0; transition: transform .15s; }
.me-link:hover { color: #fff; }
.me-link:hover > .ico { transform: translateX(2px); }
.me-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.me-nums > div { background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 12px; }
.me-nums span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.me-nums strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; color: #fff; }
.me-nums strong.num-gold { color: var(--gold); }
.me-hint { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #34446b, #222e4b); color: #a9b8d8; font-size: 12px; box-shadow: inset 0 0 0 1px rgba(156, 195, 255, .25); }
.avatar > .ico { width: 54%; height: 54%; vertical-align: 0; }
.avatar-lg { width: 46px; height: 46px; font-size: 19px; }
.avatar-lg > .ico { width: 48%; height: 48%; }

/* ===== 배너 ===== */
.banner-slot { display: block; aspect-ratio: 16 / 6; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; position: relative; }
.banner-slot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
a.banner-slot:hover img { transform: scale(1.03); }
a.banner-slot { transition: border-color .2s; }
a.banner-slot:hover { border-color: var(--accent-line); }
.banner-empty { display: flex; align-items: center; justify-content: center; gap: 6px; color: #56627e; font-size: var(--fs-xs); border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(140, 165, 220, .03) 10px 20px), var(--surface); }

/* ===== 탭 (세그먼트형) ===== */
.tabs { display: flex; gap: 4px; padding: 8px; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; background: transparent; border: 0; border-radius: var(--r-md); color: var(--muted); font-weight: 700; font-size: var(--fs-sm); padding: 9px 14px; white-space: nowrap; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s; text-align: center; }
.tab:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.tab:focus-visible, .cat-tabs a:focus-visible { outline-offset: -2px; }
.tab[aria-selected="true"] { color: #fff; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--accent-line), 0 4px 12px rgba(2, 6, 20, .3); }
.tab.is-static { color: #fff; cursor: default; flex: 0 1 auto; text-align: left; font-size: var(--fs-md); font-weight: 800; padding: 6px 8px; }
.tab-panel[hidden] { display: none; }
.cat-tabs { display: flex; gap: 4px; padding: 8px; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { flex: 1 0 auto; text-align: center; padding: 9px 16px; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; border-radius: var(--r-md); }
.cat-tabs a:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.cat-tabs a.active { color: #fff; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ===== 게시글 행 ===== */
.prows { list-style: none; margin: 0; padding: 0; }
.prows-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prows-2 .prow:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.prow { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); transition: background .15s; }
.prow:hover { background: rgba(91, 155, 255, .05); }
.prow-title::after { content: ""; position: absolute; inset: 0; } /* 줄 전체를 누를 수 있게 */
.prow:hover .prow-title { color: var(--accent-hi); }
.prow:has(.prow-title:focus-visible) { background: var(--accent-wash); }
.prow-title:focus-visible { outline-offset: 3px; }
.prow-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prow-line + .prow-line { margin-top: 7px; }
.prow-title { flex: 1; min-width: 0; color: #eef2fa; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-title:hover { color: var(--accent-hi); }
.prow-stat { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prow-stat { display: inline-flex; align-items: center; gap: 3px; }
.prow-stat > .ico { width: 14px; height: 14px; vertical-align: 0; }
.prow-meta { font-size: var(--fs-sm); }
.prow-meta .level-badge { margin-right: 0; }
.prow-nick { color: #cfd8ea; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-board { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.prow-meta .prow-stat { margin-left: auto; }
.prow-date { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel-foot { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 11px 16px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); transition: color .15s, background .15s; }
.panel-foot > .ico { width: 14px; height: 14px; vertical-align: 0; transition: transform .15s; }
.panel-foot:hover { color: #fff; background: var(--surface-2); }
.panel-foot:hover > .ico { transform: translateX(2px); }
.panel-foot:focus-visible { outline-offset: -2px; }
.tab-panel > .prows .prow:last-child, .prows-2 .prow:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

/* ===== 섹션 헤더 ===== */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin: 0; display: flex; align-items: center; gap: 10px; }
.sec-count { color: var(--muted); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sec-more { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; padding: 6px 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: color .15s; }
.sec-more > .ico { width: 14px; height: 14px; vertical-align: 0; transition: transform .15s; }
.sec-more:hover { color: #fff; }
.sec-more:hover > .ico { transform: translateX(2px); }

/* ===== 피해 사례 카드 ===== */
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.case-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.case-card:hover { border-color: var(--accent-line); }
.case-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(160deg, #1b2645, #121a2e); color: #46557a; font-size: 28px; overflow: hidden; }
.case-thumb > .ico { width: 34px; height: 34px; stroke-width: 1.5; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.case-card:hover .case-thumb img { transform: scale(1.03); }
.case-thumb .tag { position: absolute; left: 10px; top: 10px; }
.case-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.case-body h3 { font-size: var(--fs-md); font-weight: 700; margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-body h3 a { color: #fff; }
.case-body h3 a:hover { color: var(--accent-hi); }
.case-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: var(--fs-xs); }
.case-meta > span:first-child { color: #cfd8ea; font-weight: 700; font-size: var(--fs-sm); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-meta > span:last-child { flex: 0 0 auto; }
.case-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: var(--fs-sm); }
.case-stats { display: inline-flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.case-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.case-stats .ico { width: 14px; height: 14px; vertical-align: 0; }

/* ===== 바로가기 / 수칙 ===== */
.quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: #e3e9f6; font-weight: 700; font-size: var(--fs-sm); text-align: center; padding: 14px 6px; transition: border-color .2s, background .2s, transform .2s; }
.quick > .ico { width: 24px; height: 24px; stroke-width: 1.8; color: var(--accent-hi); transition: color .2s; }
.quick:hover { color: #fff; border-color: var(--accent-line); background: var(--surface-2); }
.quick:hover > .ico { color: #fff; }
.quick:active { background: var(--surface-3); }

/* ===== 제보 정보 원칙 ===== */

/* ===== 공통 패널 머리 ===== */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.panel-head .title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; font-size: var(--fs-md); color: #fff; }
.panel-head h1.title { font-size: var(--fs-xl); margin: 0; letter-spacing: -.03em; }
.panel-head h1.title .crumb { color: var(--muted); font-size: var(--fs-md); font-weight: 500; }
.panel-body { padding: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-head h2 { font-weight: 800; font-size: var(--fs-xl); margin: 0; letter-spacing: -.03em; }
.section-head a { font-size: var(--fs-sm); color: var(--muted); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.profile-grid { grid-template-columns: 320px minmax(0, 1fr); }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.info-row:last-child { border-bottom: none; }
.referral-code-box { background: var(--field); border: 1px dashed var(--accent-line); border-radius: var(--r-md); padding: 9px; text-align: center; font-weight: 800; font-size: var(--fs-lg); letter-spacing: .2em; color: #fff; cursor: pointer; }
.referral-code-box:hover { background: var(--accent-wash); }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state p { margin: 0 0 14px; }
.empty-state p:last-child { margin-bottom: 0; }
.empty-state > .empty-ico { display: block; width: 30px; height: 30px; margin: 0 auto 12px; color: #4a587a; stroke-width: 1.6; }
.level-progress { margin-top: 14px; padding: 12px 14px; background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--r-md); }

/* ===== 표 ===== */
.table-wrap { width: 100%; overflow-x: auto; overflow-y: hidden; } /* 줄임 처리된 제목 속 화면낭독용 글자가 세로 스크롤바를 만들지 않게 */
.post-table { width: 100%; margin: 0; border-collapse: collapse; }
.post-table th { color: var(--muted); font-weight: 600; font-size: var(--fs-xs); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.post-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: var(--fs-md); }
.post-table tbody tr:last-child td { border-bottom: 0; }
.post-table tbody tr:hover { background: rgba(91, 155, 255, .05); }
.post-table .t-title { width: 100%; min-width: 0; }
.post-table .t-author, .post-table .t-date, .post-table .t-num, .post-table .t-views { white-space: nowrap; font-size: var(--fs-sm); }
.post-table .t-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.post-table .t-date, .post-table .t-views { font-variant-numeric: tabular-nums; }
.post-title-link { color: #eef2fa; font-weight: 600; }
.post-title-link:hover { color: var(--accent-hi); }
.post-meta-sm { display: none; }

/* ===== 배지 ===== */
.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 0 8px; line-height: 20px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; white-space: nowrap; }
.tag-evidence { color: #fff; background: var(--danger); }
.tag-report { color: var(--accent-hi); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tag-ok { color: #04170e; background: var(--ok); }
.tag-board { color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
a.tag-board:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--accent-line); }
.num { font-variant-numeric: tabular-nums; }
.num-gold { color: var(--gold); font-variant-numeric: tabular-nums; }
.num-plus { color: var(--ok) !important; }
.num-minus { color: var(--danger-hi) !important; }
/* 레벨 배지는 level-badge.css */

/* ===== 게시글 상세 ===== */
.post-header { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.post-title { font-size: clamp(21px, 2.8vw, 27px); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; margin: 10px 0 0; }
.post-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.post-content { padding: 24px 22px; line-height: 1.85; min-height: 160px; border-bottom: 1px solid var(--line); font-size: 16px; color: #dde4f2; }
.post-text { max-width: 46em; overflow-wrap: anywhere; }
.post-text > :last-child { margin-bottom: 0; }
.post-text img { max-width: 100%; height: auto; border-radius: var(--r-sm); margin: 6px 0; }
.post-text a { color: var(--accent-hi); text-decoration: underline; }
.post-text h3, .post-text h4 { margin: 1.2em 0 .5em; font-weight: 700; color: var(--text); }
.post-text h3 { font-size: var(--fs-xl); } .post-text h4 { font-size: var(--fs-lg); }
.post-text blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); }
.post-text ul, .post-text ol { padding-left: 1.4em; }
.post-text hr { border-color: var(--line-strong); opacity: 1; }
.post-text table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.post-text th, .post-text td { border: 1px solid var(--line-strong); padding: 6px 10px; }

/* ===== 에디터 (Summernote lite, 어두운 테마) ===== */
.form-notice { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: var(--fs-sm); line-height: 1.65; color: var(--muted); word-break: keep-all; }
.note-editor.note-frame { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--field); overflow: hidden; }
.note-editor.note-frame.focus, .note-editor.note-frame:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-wash); }
.note-editor .note-toolbar { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 6px 6px 0; }
.note-editor .note-btn { background: var(--surface-3); border-color: var(--line); color: var(--text); }
.note-editor .note-btn:hover, .note-editor .note-btn:focus, .note-editor .note-btn.active { background: #2a3858; color: #fff; border-color: var(--line-strong); }
.note-editor .note-btn-group .note-btn .note-icon-caret::before { color: var(--muted); }
.note-editor .note-dropdown-menu { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); box-shadow: var(--shadow); }
.note-editor .note-dropdown-item:hover { background: var(--surface-3); }
.note-editor .note-dropdown-menu .note-dropdown-item, .note-editor .note-dropdown-menu .note-dropdown-item > * { color: var(--text); }
.note-editor .note-editing-area .note-editable { background: var(--field); color: var(--text); padding: 14px 16px; line-height: 1.8; font-size: var(--fs-md); font-family: var(--sans); }
.note-editor .note-placeholder { font-family: var(--sans); color: #66728d; padding: 14px 16px; }
.note-editor .note-editing-area .note-editable img { max-width: 100%; }
.note-editor .note-editing-area .note-editable a { color: var(--accent-hi); }
.note-editor .note-editing-area .note-editable blockquote { border-left: 3px solid var(--line-strong); padding-left: 12px; color: var(--muted); }
.note-editor .note-placeholder { color: #5f6b85; padding: 14px 16px; }
.note-editor .note-statusbar { background: var(--surface-2); border-top: 1px solid var(--line); }
.note-editor .note-statusbar .note-resizebar .note-icon-bar { border-top-color: var(--line-strong); }
.note-editor .note-color-palette .note-color-btn { border-color: var(--surface-2); }
.note-modal .note-modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.note-modal .note-modal-header { border-bottom: 1px solid var(--line); }
.note-modal .note-modal-title { color: var(--text); }
.note-modal .note-modal-header .close { color: var(--muted); opacity: 1; }
.note-modal .note-modal-footer { border-top: 1px solid var(--line); }
.note-modal .note-form-label { color: var(--muted); }
.note-modal .note-input, .note-modal .note-form-control { background: var(--field); border: 1px solid var(--line-strong); color: var(--text); border-radius: var(--r-sm); }
.note-modal .note-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.note-modal-backdrop { background: rgba(2, 6, 20, .7); opacity: 1; }
.note-popover .popover-content, .note-popover .note-popover-content { background: var(--surface-2); }
.note-popover .note-btn { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.post-images { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.post-img-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.post-nav { padding: 14px 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.comment-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.comment-content p { margin: 8px 0 0; }
.comment-del { color: var(--muted); font-size: var(--fs-xs); text-decoration: none; padding: 2px 8px; border-radius: 999px; }
.comment-del:hover { color: var(--danger-hi); background: rgba(255, 90, 106, .1); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 6, 16, .88); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: 88vh; border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: rgba(8, 12, 24, .8); color: #fff; font-size: 16px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-strong); display: inline-flex; align-items: center; justify-content: center; }
.lightbox-close > .ico { width: 20px; height: 20px; }
.lightbox-close:hover { background: var(--accent); }
.post-images a { display: block; cursor: zoom-in; }
.invite-box { display: flex; gap: 6px; }
.invite-box input { flex: 1; min-width: 0; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--muted); font-size: var(--fs-xs); padding: 6px 10px; }
button.referral-code-box { display: block; }
.locked-panel .locked-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 32px 20px; color: #b9c5de; }
.locked-panel .locked-body > .locked-ico { width: 26px; height: 26px; margin-bottom: 10px; color: var(--muted); stroke-width: 1.7; }
.locked-panel .locked-body p { margin: 0 0 6px; font-size: var(--fs-sm); }
.locked-panel .locked-body strong { color: #fff; font-size: var(--fs-md); }
.locked-panel .btn { margin-top: 8px; }
.lock-ico { width: 12px; height: 12px; color: var(--muted); margin-left: 5px; vertical-align: -1px; stroke-width: 2.1; }

/* ===== 폼 ===== */
.form-control, .form-select { background: var(--field) !important; border: 1px solid var(--line-strong) !important; color: #fff !important; border-radius: var(--r-md); font-size: 16px; }
.form-control:focus, .form-select:focus { border-color: var(--accent-line) !important; box-shadow: 0 0 0 4px rgba(91, 155, 255, .15) !important; }
.form-control::placeholder { color: #66728d; }
.form-label { color: #cfd8ea; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; }
.form-text, .helptext { color: var(--muted) !important; font-size: var(--fs-xs); }
.form-text ul, .helptext ul { padding-left: 18px; margin: 4px 0 0; }
.invalid-feedback, .errorlist { color: var(--danger-hi); }
input[type=file].form-control { font-size: 14px; }
/* 데스크톱은 작은 글씨, 모바일은 iOS 확대 방지로 16px 유지 */
@media (min-width: 768px) {
  .form-select { font-size: 14px; }
  .form-control-sm, .form-select-sm { font-size: 13px; }
}
/* 체크박스·라디오: 어두운 바탕에 맞춘 모양 */
input[type=checkbox]:not(.form-check-input), input[type=radio]:not(.form-check-input) { accent-color: var(--accent); }
.form-check-input, input[type=checkbox]:not(.form-check-input) {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: 0 0 auto; vertical-align: -4px; cursor: pointer;
  background: var(--field) center / 12px no-repeat; border: 1.5px solid var(--line-strong); border-radius: 5px; transition: background-color .15s, border-color .15s;
}
.form-check-input[type=radio] { border-radius: 50%; }
.form-check-input:hover, input[type=checkbox]:not(.form-check-input):hover { border-color: var(--accent-line); }
.form-check-input:checked, input[type=checkbox]:not(.form-check-input):checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
}
.form-check-input[type=radio]:checked { background-image: radial-gradient(circle, #fff 0 3px, transparent 3.5px); background-size: auto; }
.form-check-input:indeterminate, input[type=checkbox]:not(.form-check-input):indeterminate {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round'%3e%3cpath d='M6 12h12'/%3e%3c/svg%3e");
}
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(91, 155, 255, .18); border-color: var(--accent-line); }
.form-check-input:disabled, input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
.board-search { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.board-search input { flex: 1; min-width: 0; }

/* ===== 알림 ===== */
.alert { font-size: var(--fs-sm); border-radius: var(--r-md); }
.alert-warning { background: rgba(242, 193, 78, .08); border-color: rgba(242, 193, 78, .3); color: #ffd98a; }
.alert-info { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-hi); }
.alert-danger { background: rgba(255, 90, 106, .1); border-color: rgba(255, 90, 106, .4); color: var(--danger-hi); }
.alert-success { background: rgba(47, 211, 138, .1); border-color: rgba(47, 211, 138, .32); color: #7febb9; }
.btn-close { filter: invert(1); }
.alert > .ico:first-child { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; }
.page-messages { padding-top: 12px; }

/* ===== 페이지네이션 / 진행바 ===== */
.pagination { flex-wrap: wrap; justify-content: center; gap: 4px; }
.page-link { background: var(--surface-2); border-color: var(--line); color: var(--muted); border-radius: var(--r-sm) !important; }
.page-link:hover { background: var(--surface-3); border-color: var(--accent-line); color: #fff; }
.page-item.active .page-link { background: var(--accent-grad); border-color: transparent; color: #fff; }
.progress { background: var(--field); height: 6px; border-radius: 999px; }
.progress-bar { background: var(--accent-grad); border-radius: 999px; }

/* ===== 플로팅 버튼 / 공지 토스트 ===== */
.fab-stack { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; gap: 12px; z-index: 90; }
.fab-btn { position: relative; width: 52px; height: 52px; padding: 0; border-radius: 16px; border: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-grad); color: #fff; font-size: 20px; box-shadow: 0 6px 16px rgba(2, 6, 20, .5), inset 0 1px 0 rgba(255, 255, 255, .16); cursor: pointer; transition: transform .25s cubic-bezier(.22, .8, .24, 1), opacity .25s, visibility .25s, filter .15s; }
.fab-btn:hover { color: #fff; transform: translateY(-3px); filter: brightness(1.1); }
.fab-btn:active { transform: scale(.92); }
.fab-btn > .ico { width: 22px; height: 22px; stroke-width: 2; }
.fab-btn:focus-visible { outline-offset: 3px; }
.fab-top { opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9); background: var(--surface-3); box-shadow: 0 10px 26px rgba(2, 6, 20, .55), inset 0 0 0 1px var(--line-strong); }
.fab-top.show { opacity: 1; visibility: visible; transform: none; }
/* 본문 버튼과 겹칠 때는 비켜 준다 (main.js) */
.fab-stack.is-tucked .fab-btn { opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9); pointer-events: none; transition-duration: .12s; }
.fab-top.show:hover { transform: translateY(-3px); background: var(--accent-grad); }
.fab-top > .ico { transition: transform .3s; }
.fab-top:hover > .ico { transform: translateY(-2px); }
.fab-top.pulse { animation: fab-press .45s cubic-bezier(.22, .8, .24, 1); }
.fab-top.pulse::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(91, 155, 255, .6); animation: fab-ring .6s ease-out; }
@keyframes fab-press { 0% { transform: scale(1); } 35% { transform: scale(.88); } 100% { transform: scale(1); } }
@keyframes fab-ring { to { box-shadow: 0 0 0 16px rgba(91, 155, 255, 0); } }
.toast-notice { position: fixed; top: 86px; right: 20px; z-index: 95; width: min(380px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: 12px; padding: 14px 40px 14px 14px; background: rgba(18, 26, 46, .95); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 16px 40px rgba(2, 6, 20, .6); opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
.toast-notice.show { opacity: 1; transform: none; }
.toast-icon { flex: 0 0 auto; display: flex; padding-top: 2px; color: var(--accent-hi); }
.toast-icon > .ico { width: 20px; height: 20px; }
.toast-notice strong { color: #fff; font-size: var(--fs-md); }
.toast-notice p { margin: 2px 0 0; color: #b9c5de; font-size: var(--fs-sm); line-height: 1.5; }
.toast-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .15s, background .15s; }
.toast-close::before { content: ''; position: absolute; inset: -8px; }
.toast-close > .ico { width: 14px; height: 14px; stroke-width: 2.2; }
.toast-close:hover, .toast-close:focus-visible { color: #fff; background: #2a3858; }
.toast-close:active { transform: scale(.94); }

/* ===== 푸터 ===== */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 44px 20px 0; margin-top: 56px; color: var(--muted); }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-bottom: 28px; }
.footer-brand { max-width: 600px; display: flex; flex-direction: column; align-items: center; }
.footer-title { color: #fff; font-weight: 900; font-size: var(--fs-xl); letter-spacing: -.03em; margin: 0 0 12px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.footer-desc { font-size: var(--fs-sm); line-height: 1.85; margin: 0; color: #a9b6d0; }
.footer-desc strong { color: #fff; font-weight: 700; }
.footer-sign { color: var(--gold); font-weight: 800; margin: 12px 0 0; }
.footer-social { display: flex; gap: 14px; flex: 0 0 auto; }
.footer-social a { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.footer-social a > .ico { width: 20px; height: 20px; }
.footer-social a:hover { background: var(--accent-grad); color: #fff; }
.footer-copy { max-width: 1280px; margin: 0 auto; border-top: 1px solid var(--line-soft); padding: 18px 0 24px; text-align: center; font-size: var(--fs-sm); color: #a9b6d0; }
.footer-copy strong { color: #fff; }
.footer-copy .gold-text { background: none; color: #fff; }
.footer-copy .sep { display: inline-block; width: 1px; height: 10px; background: var(--line-strong); margin: 0 10px; }

/* ===== 로그인 / 가입 ===== */
.auth-body { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo .emblem { width: 64px; height: 64px; margin-bottom: 12px; }
.auth-logo h1 { font-weight: 900; font-size: 36px; margin: 0; letter-spacing: -.04em; color: #fff; }
.auth-logo p { color: var(--muted); font-size: var(--fs-sm); margin: 6px 0 0; }
.auth-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 28px 24px; box-shadow: 0 20px 50px rgba(2, 6, 20, .5); }
.auth-card .btn-gold { padding: 12px; font-size: var(--fs-md); }
.auth-sub { text-align: center; margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); }
.auth-sub a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; font-weight: 700; vertical-align: middle; }

/* ===== 스크롤바 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #26324f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== 홈: 본문 + 사이드바 2단 ===== */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.home-main, .home-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.home-aside { gap: 16px; }
.home-layout .panel { display: flex; flex-direction: column; }
.home-layout .tab-panel:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
.home-layout .tab-panel > .panel-foot { margin-top: auto; border-top: 1px solid var(--line-soft); }
.home-layout .tab-panel > .empty-state { padding: 28px 16px; }
.home-layout .tab-panel > .empty-state p { margin-bottom: 10px; font-size: var(--fs-sm); }
.report-note { display: flex; gap: 8px; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; word-break: keep-all; }
.report-note strong { color: #cfd8ea; font-weight: 700; margin-right: 4px; }
.report-panel > .panel-foot { margin-top: auto; border-top: 1px solid var(--line-soft); }
.pair-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.quick-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.banner-stack { display: grid; gap: 12px; }
.banner-stack .banner-slot { aspect-ratio: 16 / 6; }
.addr-card { padding: 6px; }
.addr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #fff; border-radius: var(--r-md); transition: background .15s; }
.addr-row > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.addr-row .k { color: var(--muted); font-size: var(--fs-xs); }
.addr-row .v { font-weight: 800; word-break: break-all; }
.addr-row .v.leaf { color: var(--gold); }
.addr-row > .go { width: 15px; height: 15px; color: var(--muted); transition: transform .15s, color .15s; }
a.addr-row:hover { background: var(--surface-2); color: #fff; }
a.addr-row:hover > .go { color: #fff; transform: translateX(2px); }
a.addr-row:focus-visible { outline-offset: -2px; }

/* ----- 현황 패널 ----- */
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.stats-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.stats-time { color: var(--muted); font-size: var(--fs-xs); display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.stat-item { padding: 18px; min-width: 0; }
.stat-item + .stat-item { border-left: 1px solid var(--line-soft); }
.stat-item dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stat-item dd { margin: 0; }
.stat-num { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-unit { margin-left: 3px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.stat-item:last-child .stat-num { color: var(--gold); }
.stat-delta { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.stat-delta.up { color: var(--ok); font-weight: 700; }

/* ===== 반응형 ===== */
@media (min-width: 992px) and (hover: hover) {
  .drawer, .drawer-overlay { display: none; }
}
@media (min-width: 992px) and (hover: none) {
  .main-nav, .hide-md { display: none !important; }
  .user-menu .show-md { display: list-item; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .bar { justify-content: flex-start; }
  .site-header .brand { margin-right: auto; }
}
@media (max-width: 1199.98px) {
  .home-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .quick-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-main .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-main .case-grid .case-card:nth-child(3) { display: none; }
  .hero-emblem { width: 140px; height: 140px; right: 36px; opacity: .7; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item:nth-child(3) { border-left: 0; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 991.98px) {
  .main-nav, .hide-md { display: none !important; }
  .user-menu .show-md { display: list-item; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .bar { justify-content: flex-start; height: 62px; }
  .site-header .brand { margin-right: auto; }
  .site-footer { padding-bottom: 76px; }
  .home-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .home-layout { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .home-main, .home-aside { display: contents; }
  .o-hero { order: 1; } .o-me { order: 2; } .o-quick { order: 3; } .o-reports { order: 4; } .o-notice { order: 5; }
  .o-sinsang { order: 6; } .o-evidence { order: 7; } .o-banner1 { order: 8; } .o-groups { order: 9; }
  .o-recent { order: 10; } .o-addr { order: 11; } .o-banner2 { order: 12; } .o-stats { order: 13; }
  .banner-stack { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-item:nth-child(3) { border-left: 1px solid var(--line-soft); }
  .stat-item:nth-child(n+3) { border-top: 0; }
}
@media (max-width: 767.98px) {
  .page { padding: 16px 14px 4px; }
  .site-header .bar { padding: 0 14px; height: 58px; }
  .brand { font-size: 20px; }
  .notice-bar .inner { padding: 6px 14px; font-size: 12px; }
  .hero { padding: 28px 18px 22px; border-radius: 18px; }
  .hero::after { width: 260px; height: 260px; right: -90px; top: 90px; }
  .hero-emblem { width: 96px; height: 96px; right: -10px; top: 22px; transform: none; opacity: .3; }
  .hero-title, .hero-lead { max-width: none; }
  .hero-title { padding-right: 56px; }
  .hero-lead { font-size: var(--fs-md); margin-bottom: 18px; }
  .lookup button { padding: 0 16px; }
  .prows-2 { grid-template-columns: minmax(0, 1fr); }
  .prows-2 .prow:nth-child(odd) { border-right: 0; }
  .prow { padding: 11px 14px; }
  .case-grid { gap: 12px; }
  .quick-row { gap: 8px; }
  .quick { padding: 12px 4px; font-size: var(--fs-xs); }
  .quick > .ico { width: 22px; height: 22px; }
  .quick { min-height: 76px; }
  .pair-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-main .case-grid .case-card:nth-child(3) { display: flex; }
  .home-main .case-grid { grid-template-columns: minmax(0, 1fr); }
  .banner-stack { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item { padding: 14px 16px; }
  .stat-item:nth-child(3) { border-left: 0; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .stat-num { font-size: 22px; }
  .sec-head h2 { font-size: var(--fs-lg); }
  .panel-head { padding: 12px 14px; }
  .panel-body { padding: 16px 14px; }
  .tabs, .cat-tabs { padding: 6px; }
  .tab { padding: 8px 12px; }
  .post-table .d-sm-only-cell { display: none; }
  .post-table td, .post-table th { padding: 11px 10px; }
  .post-meta-sm { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 3px; }
  .post-header, .post-content, .post-images, .post-nav { padding-left: 14px; padding-right: 14px; }
  .post-content { font-size: var(--fs-md); }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .fab-stack { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .fab-btn { width: 46px; height: 46px; border-radius: 14px; font-size: 18px; }
  .fab-btn > .ico { width: 20px; height: 20px; }
  .fab-stack > .fab-btn:not(.fab-top) { display: none; }
  .toast-notice { top: 70px; right: 16px; }
  /* 손가락 탭 영역 44px */
  .site-header .header-user .who { min-height: 44px; }
  .tab { min-height: 44px; }
  .sec-more { min-height: 44px; padding: 0; }
  .me-link { min-height: 32px; }
  .report-panel .panel-head .btn, .me-card .btn, .empty-state .btn, .case-foot .btn, .locked-panel .btn { min-height: 44px; }
  .lookup > .ico { margin-left: 8px; }
}
/* 가로로 눕힌 휴대폰: 화면 높이가 낮으니 머리를 따라다니지 않게 */
@media (max-height: 480px) and (orientation: landscape) {
  .site-header { position: relative; }
}
@media (max-width: 420px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: 24px 18px; }
  .lookup button { padding: 0 14px; }
}
@media (max-width: 359.98px) {
  .lookup > .ico { display: none; }
  .lookup button > .ico { display: none; }
}
/* 애니메이션 줄이기: 부가 효과만 끈다 (메뉴 슬라이드, 맨 위로 스크롤은 유지) */
@media (prefers-reduced-motion: reduce) {
  .banner-slot img, .case-thumb img, .quick, .case-card, .toast-notice, .fab-btn > .ico,
  .panel-foot > .ico, .sec-more > .ico, .me-link > .ico, a.addr-row > .go, .btn { transition: none; }
  a.banner-slot:hover img, .case-card:hover .case-thumb img, .fab-btn:hover, .fab-top.show:hover, .fab-top:hover > .ico,
  .panel-foot:hover > .ico, .sec-more:hover > .ico, .me-link:hover > .ico, a.addr-row:hover > .go { transform: none; }
  .fab-top.pulse, .fab-top.pulse::after { animation: none; }
}

/* 공지/비밀글 태그 (목록, 글 보기 공용) */
.tag-notice { color: #fff; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tag-secret { color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* 모바일 터치 영역: 본문 버튼 최소 높이 */
@media (max-width: 575.98px) {
  main .btn { min-height: 40px; }
  main .btn:not(.btn-sm) { min-height: 44px; }
}

/* 아이폰은 글자가 16px 보다 작은 입력칸(선택칸, 댓글, 에디터 포함)을 누르면 화면을 저절로 확대해 버린다.
   손가락으로 쓰는 기기에서만 입력 글자를 16px 로 맞춘다 (PC 화면은 그대로) */
@media (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
  select, textarea, .form-control, .form-select, .note-editable { font-size: 16px !important; }
}
