/* ==========================================================================
   BXG Jiu-Jitsu — Design System v2
   - Light / Dark (follows OS, manual override via [data-theme])
   - Brand: red #dc2626 on warm neutrals, Pretendard
   - Signature motif: the "belt rule" (black-belt strap with a red rank bar)
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  color-scheme: light;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', 'Hiragino Sans', 'Yu Gothic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #efedea;
  --surface-3: #e4e1dc;
  --line: #e2dfda;
  --line-strong: #c9c4bc;

  --ink: #161412;
  --ink-2: #48433d;
  --ink-3: #6b665e;

  --brand: #dc2626;
  --brand-strong: #b91c1c;
  --brand-text: #c81e1e;
  --brand-soft: rgba(220, 38, 38, .09);
  --on-brand: #ffffff;

  --ok: #15803d;
  --ok-soft: rgba(21, 128, 61, .10);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, .10);

  --belt-body: #1b1917;
  --hdr-bg: rgba(246, 245, 243, .84);
  --overlay: rgba(12, 10, 9, .55);
  --foot-bg: #161412;
  --foot-ink: #a9a39a;

  --shadow-sm: 0 1px 2px rgba(23, 20, 17, .06);
  --shadow: 0 12px 32px -14px rgba(23, 20, 17, .22), 0 2px 6px rgba(23, 20, 17, .05);
  --shadow-lg: 0 28px 64px -24px rgba(23, 20, 17, .35);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-btn: 10px;

  --gutter: clamp(16px, 4vw, 32px);
  --wrap: 1200px;
  --sec: clamp(48px, 7vw, 88px);
  --hdr-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0c0b;
    --surface: #161514;
    --surface-2: #1f1d1b;
    --surface-3: #2a2724;
    --line: #2b2825;
    --line-strong: #3f3b36;
    --ink: #f5f3f0;
    --ink-2: #bab4ab;
    --ink-3: #8c867d;
    --brand-strong: #ef4444;
    --brand-text: #f87171;
    --brand-soft: rgba(248, 113, 113, .13);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, .12);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .12);
    --belt-body: #4b4741;
    --hdr-bg: rgba(13, 12, 11, .80);
    --overlay: rgba(0, 0, 0, .70);
    --foot-bg: #080706;
    --shadow-sm: none;
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0c0b;
  --surface: #161514;
  --surface-2: #1f1d1b;
  --surface-3: #2a2724;
  --line: #2b2825;
  --line-strong: #3f3b36;
  --ink: #f5f3f0;
  --ink-2: #bab4ab;
  --ink-3: #8c867d;
  --brand-strong: #ef4444;
  --brand-text: #f87171;
  --brand-soft: rgba(248, 113, 113, .13);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --belt-body: #4b4741;
  --hdr-bg: rgba(13, 12, 11, .80);
  --overlay: rgba(0, 0, 0, .70);
  --foot-bg: #080706;
  --shadow-sm: none;
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85);
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  word-break: keep-all; overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
img, svg, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand); color: #fff; }

.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -.2em; }
.i-fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - (var(--gutter) * 2)); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - (var(--gutter) * 2)); margin-inline: auto; }
.section { padding-block: var(--sec) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; padding: 10px 16px; border-radius: var(--r-btn); background: var(--ink); color: var(--bg); font-weight: 700; transition: top .15s; }
.skip-link:focus { top: 12px; }

.muted { color: var(--ink-3); }
.text-brand { color: var(--brand-text); }
.stack { display: grid; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.hide-sm { display: initial; }

/* ---------- 3. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-btn);
  border: 1px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, color .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { opacity: .88; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { color: var(--brand-text); border-color: var(--line-strong); background: transparent; }
.btn-danger:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-light { background: #fff; color: #111; }
.btn-light:hover { background: #f1efec; }
.btn-outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .16); }
.btn-sm { height: 34px; padding: 0 14px; font-size: .85rem; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px;
  color: var(--ink-2); transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }

/* ---------- 4. Forms ----------------------------------------------------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-btn);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .75; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input[readonly], .input[disabled] { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.hint { font-size: .78rem; color: var(--ink-3); }
.input-affix { position: relative; }
.input-affix .input { padding-right: 46px; }
.input-affix .affix { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.input-affix .affix:hover { color: var(--ink); background: var(--surface-2); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-btn); font-size: .9rem; font-weight: 600; border: 1px solid transparent; margin-bottom: 18px; }
.alert .i { margin-top: 2px; }
.alert-error { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-soft); }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-soft); }
.alert-info { background: var(--surface-2); color: var(--ink-2); }

/* ---------- 5. Cards / chips / motifs ----------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: clamp(18px, 3vw, 28px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip-brand { background: var(--brand-soft); color: var(--brand-text); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-dark { background: var(--ink); color: var(--bg); }

.belt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); flex: none; display: inline-block; }
.belt-dot.white { background: #fafafa; box-shadow: inset 0 0 0 1px #b7b2a9; }
.belt-dot.blue { background: #2563eb; }
.belt-dot.purple { background: #7e22ce; }
.belt-dot.brown { background: #78350f; }
.belt-dot.black { background: #111; box-shadow: inset 0 0 0 1px #5a5650; }

/* The belt rule: black-belt strap with a red rank bar near the end */
.belt {
  flex: 1; min-width: 24px; height: 5px; border-radius: 2px; position: relative;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 7px), var(--belt-body);
}
.belt::after { content: ""; position: absolute; top: 0; bottom: 0; right: 14%; width: 12px; background: var(--brand); }
.belt-solo { display: block; width: 100%; flex: none; }

.sec-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.sec-head .belt { margin-bottom: 9px; }
.sec-title { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 900; letter-spacing: .01em; text-transform: uppercase; }
.sec-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--brand-text); text-transform: none; }
.sec-more { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 4px; font-size: .86rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; transition: color .15s; }
.sec-more:hover { color: var(--brand-text); }

.avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; background: var(--surface-3); color: var(--ink-2); font-weight: 800; font-size: .85rem; }
.avatar img, .my-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar img.is-broken, .my-avatar img.is-broken { display: none; }
.avatar-brand { background: var(--brand); color: #fff; }

.empty { text-align: center; padding: 56px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--ink-3); }
.empty .i { width: 34px; height: 34px; margin: 0 auto 12px; opacity: .6; }
.empty p { margin-bottom: 18px; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- 6. Header / navigation -------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--hdr-h);
  background: var(--hdr-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 8px; }
.hdr-in > nav { height: 100%; }
.brand { display: inline-flex; align-items: center; margin-right: 10px; flex: none; }
.brand img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 2px; height: 100%; }
.nav > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 13px; border-radius: 999px;
  font-weight: 650; font-size: .94rem; color: var(--ink-2); transition: background .15s, color .15s;
}
.nav-link .i { width: 14px; height: 14px; opacity: .55; }
.nav-link:hover, .nav > li:focus-within > .nav-link, .nav-link.is-active { background: var(--surface-2); color: var(--ink); }

.dropdown {
  position: absolute; top: calc(100% - 8px); left: 50%; transform: translate(-50%, 6px);
  min-width: 220px; padding: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .16s, transform .16s var(--ease), visibility 0s .16s;
}
.nav > li:hover > .dropdown, .nav > li:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.dropdown.mega { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 0 18px; min-width: 400px; padding: 14px; }
.dd-label { padding: 6px 10px 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); }
.dd-link { display: block; padding: 8px 10px; border-radius: var(--r-sm); font-size: .92rem; font-weight: 550; color: var(--ink-2); transition: background .12s, color .12s; }
.dd-link:hover { background: var(--surface-2); color: var(--ink); }

.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hdr-search { position: relative; }
.hdr-search input {
  width: 190px; height: 38px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-2); font-size: .9rem; transition: width .2s var(--ease), background .15s, border-color .15s;
}
.hdr-search input:focus { outline: none; width: 250px; background: var(--surface); border-color: var(--brand); }
.hdr-search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }

.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 4px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .88rem; transition: background .15s; }
.me-chip:hover { background: var(--surface-3); }
.me-chip .avatar { width: 32px; height: 32px; }
.menu-btn { display: none; }

/* drawer (mobile) */
.drawer { position: fixed; inset: 0; z-index: 200; pointer-events: none; visibility: hidden; transition: visibility 0s .3s; }
.drawer.is-open { pointer-events: auto; visibility: visible; transition-delay: 0s; }
.drawer-scrim { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .28s; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); background: var(--surface);
  display: flex; flex-direction: column; overflow-y: auto; padding: 14px 20px calc(28px + env(safe-area-inset-bottom));
  transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
}
.drawer.is-open .drawer-panel { transform: none; }
.dr-head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 8px; }
.dr-group { padding: 14px 0; border-top: 1px solid var(--line); }
.dr-label { margin-bottom: 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); }
.dr-link { display: flex; align-items: center; justify-content: space-between; min-height: 46px; font-weight: 650; color: var(--ink); }
.dr-link.sub { min-height: 40px; font-weight: 550; color: var(--ink-2); font-size: .94rem; }
.dr-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }

/* bottom tab bar (mobile) */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--hdr-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; font-size: .68rem; font-weight: 700; color: var(--ink-3); transition: color .15s; }
.tab .i { width: 22px; height: 22px; }
.tab.is-active { color: var(--brand-text); }

/* ---------- 7. Footer ---------------------------------------------------- */
.site-footer { margin-top: var(--sec); background: var(--foot-bg); color: var(--foot-ink); }
.site-footer .belt { display: block; height: 6px; border-radius: 0; --belt-body: #2a2622; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 44px 28px; }
.foot-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.foot-brand p { font-size: .9rem; max-width: 30ch; color: #8d877e; }
.foot-h { margin-bottom: 12px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #f5f3f0; }
.foot-links { display: grid; gap: 8px; font-size: .9rem; }
.foot-links a { transition: color .15s; }
.foot-links a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid #26231f; padding-block: 18px; font-size: .8rem; color: #6f6a62; }

/* ---------- 8. Modals ---------------------------------------------------- */
dialog.dlg { border: 0; padding: 0; background: transparent; width: 100%; max-width: min(420px, 92vw); color: var(--ink); overflow: visible; }
dialog.dlg::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px 26px 24px; text-align: center; box-shadow: var(--shadow-lg); animation: dlg-pop .24s var(--ease); }
.dlg-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.dlg-ic .i { width: 26px; height: 26px; }
.dlg-title { font-size: 1.2rem; margin-bottom: 8px; }
.dlg-desc { font-size: .92rem; color: var(--ink-3); line-height: 1.7; white-space: pre-line; }
.dlg-actions { display: flex; gap: 10px; margin-top: 22px; }
.dlg-actions .btn { flex: 1; }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- 9. Video cards ---------------------------------------------- */
.vgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; }
.vcard { display: block; position: relative; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); opacity: .55; z-index: -1; }
.thumb-ph .i { width: 34px; height: 34px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.thumb img.is-broken { display: none; }
.vcard:hover .thumb img { transform: scale(1.05); }
.thumb .play {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #111;
  transform: scale(.7); opacity: 0; transition: transform .25s var(--ease), opacity .25s; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.thumb .play .i { width: 20px; height: 20px; margin-left: 2px; }
.vcard:hover .thumb .play, .vcard:focus-visible .thumb .play { transform: none; opacity: 1; }
.thumb .tag, .thumb .tag-own {
  position: absolute; top: 8px; height: 22px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; z-index: 2;
}
.thumb .tag { left: 8px; background: var(--brand); color: #fff; }
.thumb .tag-own { right: 8px; background: rgba(12, 10, 9, .72); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.thumb .tag-own .i { width: 12px; height: 12px; }
.lock { display: none; position: absolute; inset: 0; z-index: 3; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(12, 10, 9, .66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); color: #fff; text-align: center; font-size: .82rem; font-weight: 700; line-height: 1.4; }
.lock .i { width: 26px; height: 26px; }
.vcard.is-locked { cursor: default; }
.vcard.is-locked .lock { display: flex; }
.vcard.is-locked:hover .thumb img { transform: none; }
.vcard.is-locked:hover .thumb .play { opacity: 0; }
.vinfo { padding: 12px 2px 0; }
.vtitle { font-size: .98rem; font-weight: 750; line-height: 1.4; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; transition: color .15s; }
.vcard:hover .vtitle { color: var(--brand-text); }
.vmeta { margin-top: 6px; display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink-3); min-width: 0; }
.vmeta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmeta .sep { opacity: .5; }

/* ---------- 10. Home ----------------------------------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0a0908; color: #fff; }
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: transform 8s ease-out; }
.hero-slide.is-active img { transform: scale(1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 9, 8, .35) 0%, rgba(10, 9, 8, .1) 35%, rgba(10, 9, 8, .82) 100%), linear-gradient(90deg, rgba(10, 9, 8, .55) 0%, transparent 65%); }
.hero-in { position: relative; height: clamp(460px, 74vh, 720px); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(64px, 9vw, 104px); }
.hero-copy { display: grid; }
.hero-text { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s var(--ease); pointer-events: none; }
.hero-text.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: .78rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.hero-kicker::before { content: ""; width: 56px; height: 5px; background: linear-gradient(90deg, #f5f3f0 0 66%, transparent 66% 72%, var(--brand) 72% 90%, #f5f3f0 90%); }
.hero-title { font-size: clamp(2.8rem, 9vw, 6.4rem); font-weight: 900; letter-spacing: .01em; line-height: .98; text-transform: uppercase; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.hero-sub { margin-top: 16px; font-size: clamp(1rem, 2vw, 1.25rem); color: rgba(255, 255, 255, .88); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-ctrl { position: absolute; right: 0; bottom: clamp(64px, 9vw, 104px); display: flex; align-items: center; gap: 14px; }
.hero-dots { display: flex; gap: 6px; }
.hero-dot { width: 34px; height: 24px; display: grid; place-items: center; }
.hero-dot::before { content: ""; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); transition: background .2s; }
.hero-dot.is-active::before { background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255, 255, 255, .35) var(--p, 0%)); }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrows button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); color: #fff; display: grid; place-items: center; background: rgba(255, 255, 255, .06); transition: background .15s; }
.hero-arrows button:hover { background: var(--brand); border-color: var(--brand); }

.stats { position: relative; z-index: 3; margin-top: -38px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.stat { padding: 18px 24px; display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-n { font-size: clamp(1.55rem, 3.2vw, 2.2rem); font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-n em { font-style: normal; color: var(--brand-text); }
.stat-l { font-size: .8rem; font-weight: 650; color: var(--ink-3); }

.band { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.daily { display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .28s var(--ease), box-shadow .28s; }
.daily:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.daily .thumb { border-radius: 0; }
.daily.is-locked { cursor: default; }
.daily.is-locked .lock { display: flex; }
.daily.is-locked:hover { transform: none; }
.daily-body { padding: clamp(18px, 2.6vw, 28px); }
.daily-title { margin: 10px 0 8px; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 850; line-height: 1.3; }
.daily-desc { margin-top: 12px; color: var(--ink-2); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.nlist { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.nrow { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .15s; }
.nrow:last-child { border-bottom: 0; }
.nrow:hover { background: var(--surface-2); }
.nrow-t { flex: 1; min-width: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow-d { flex: none; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nrow .i { width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s, color .15s; }
.nrow:hover .i { color: var(--brand-text); transform: translateX(2px); }
.nrow-new { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.gym { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); overflow: hidden; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--hdr-h) + 20px); }
.gym + .gym { margin-top: 22px; }
.gym:nth-child(even) .gym-map { order: -1; }
.gym-info { padding: clamp(22px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.gym-name { font-size: 1.55rem; font-weight: 900; }
.gym-desc { color: var(--ink-2); font-size: .95rem; white-space: pre-line; }
.gym-addr { display: flex; gap: 10px; font-size: .92rem; font-weight: 600; }
.gym-addr .i { margin-top: 3px; color: var(--brand-text); }
.gym-addr small { display: block; font-weight: 500; color: var(--ink-3); font-size: .82rem; }
.gym-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gym-map { width: 100%; height: 100%; min-height: 320px; border: 0; background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gym-map { filter: grayscale(.25) brightness(.82) contrast(1.05); } }
:root[data-theme="dark"] .gym-map { filter: grayscale(.25) brightness(.82) contrast(1.05); }
.gym-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px 18px; }
.icard { display: block; }
.icard-img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); font-size: 3rem; font-weight: 900; }
.icard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.icard-img img.is-broken { display: none; }
.icard:hover .icard-img img { transform: scale(1.05); }
.icard-belt { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgba(12, 10, 9, .72); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.icard-name { margin-top: 12px; font-weight: 850; font-size: 1.02rem; }
.icard:hover .icard-name { color: var(--brand-text); }
.icard-aff { font-size: .84rem; color: var(--ink-3); }

/* ---------- 11. Inner-page headers / toolbars --------------------------- */
.page-head { padding-block: clamp(28px, 5vw, 52px) 0; }
.page-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 6px; }
.page-title { font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 900; letter-spacing: -.03em; }
.page-sub { margin-top: 8px; color: var(--ink-3); }
.page-head .belt { margin-top: 22px; height: 5px; }

.searchbox { position: relative; max-width: 620px; }
.searchbox .input { height: 54px; padding-left: 48px; padding-right: 108px; border-radius: 14px; font-size: 1rem; }
.searchbox > .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.searchbox .btn { position: absolute; right: 6px; top: 6px; height: 42px; }

.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.seg a { flex: none; padding: 8px 16px; border-radius: 9px; font-size: .9rem; font-weight: 700; color: var(--ink-2); transition: background .15s, color .15s; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .seg a.is-active { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg a.is-active { background: var(--surface-3); } }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.pill { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .86rem; font-weight: 700; color: var(--ink-2); transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.result-count { font-size: .88rem; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }

/* ---------- 12. Watch ---------------------------------------------------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; padding-block: 22px 0; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.watch-info { margin-top: 20px; display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.watch-title { font-size: clamp(1.3rem, 2.8vw, 1.85rem); font-weight: 850; letter-spacing: -.025em; line-height: 1.3; }
.watch-meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .92rem; color: var(--ink-3); }
.watch-meta b { color: var(--ink); font-weight: 750; }
.zzim-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 700; font-size: .92rem; background: var(--surface); transition: all .15s; }
.zzim-btn:hover { border-color: var(--brand); color: var(--brand-text); }
.zzim-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.zzim-btn .i { width: 18px; height: 18px; }
.zzim-btn.active .i { fill: currentColor; }
.desc-box { margin-top: 20px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink-2); line-height: 1.8; }
.desc-box h3 { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.rel { position: sticky; top: calc(var(--hdr-h) + 20px); }
.rel-list { display: grid; gap: 16px; }
.rel-item { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; }
.rel-item .thumb { border-radius: 10px; }
.rel-item .vtitle { font-size: .9rem; min-height: 0; -webkit-line-clamp: 2; }
.rel-item:hover .vtitle { color: var(--brand-text); }

.cmts { margin-top: 44px; }
.cmts-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; font-size: 1.2rem; font-weight: 850; }
.cmts-head span { color: var(--brand-text); }
.cmt-form { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 8px; }
.cmt { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.cmt-top { display: flex; align-items: center; gap: 10px; }
.cmt-name { font-weight: 800; font-size: .92rem; }
.cmt-date { font-size: .78rem; color: var(--ink-3); }
.cmt-body { margin-top: 4px; color: var(--ink-2); font-size: .95rem; line-height: 1.7; }
.cmt-act { margin-top: 8px; display: flex; gap: 14px; font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.cmt-act button:hover { color: var(--ink); }
.cmt-act .del:hover { color: var(--brand-text); }
.replies { margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.reply { font-size: .9rem; }
.reply b { font-weight: 800; margin-right: 6px; }
.reply small { color: var(--ink-3); }
.reply p { color: var(--ink-2); margin-top: 2px; }
.reply-form { display: flex; gap: 8px; margin-top: 4px; }
.reply-form .input { height: 40px; font-size: .9rem; }
.reply-box[hidden] { display: none; }

/* ---------- 13. Auth ----------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { position: relative; isolation: isolate; overflow: hidden; background: #0a0908 center / cover no-repeat; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 56px); }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 9, 8, .55), rgba(10, 9, 8, .25) 40%, rgba(10, 9, 8, .88)); }
.auth-art .brand img { height: 44px; }
.auth-quote { font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; text-transform: uppercase; }
.auth-quote small { display: block; margin-top: 14px; font-size: .95rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .78); }
.auth-art .belt { margin-top: 26px; --belt-body: rgba(255, 255, 255, .85); max-width: 220px; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px var(--gutter); }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo-m { display: none; margin-bottom: 26px; }
.auth-logo-m img { height: 44px; width: auto; }
.auth-title { font-size: 1.9rem; font-weight: 900; letter-spacing: -.03em; }
.auth-desc { margin: 8px 0 26px; color: var(--ink-3); font-size: .95rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 18px; }
.auth-row a { font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.auth-row a:hover { color: var(--brand-text); }
.auth-foot { margin-top: 22px; text-align: center; font-size: .92rem; color: var(--ink-3); }
.auth-foot a { color: var(--brand-text); font-weight: 750; }
.auth-back { margin-top: 28px; display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-3); }
.auth-back:hover { color: var(--ink); }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sso a { height: 48px; border-radius: var(--r-btn); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .86rem; font-weight: 750; transition: transform .15s var(--ease), filter .15s; }
.sso a:hover { transform: translateY(-1px); filter: brightness(.96); }
.sso .kakao { background: #fee500; color: #191919; }
.sso .naver { background: #03c75a; color: #fff; }
.sso .google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.profile-pick { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.profile-pick .avatar { width: 52px; height: 52px; font-size: 1.1rem; }
.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .25s; }
.pw-meter-text { font-size: .78rem; color: var(--ink-3); min-height: 1.2em; margin-top: 4px; }
.success-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px; background: var(--ok-soft); color: var(--ok); }
.success-ic .i { width: 30px; height: 30px; }

/* ---------- 14. My page -------------------------------------------------- */
.my-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 32px); padding-top: calc(clamp(20px, 3vw, 32px) + 6px); }
.my-hero > .belt { position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 0; }
.my-avatar { position: relative; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 2.2rem; font-weight: 900; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--line); }
.my-avatar img { width: 100%; height: 100%; object-fit: cover; }
.my-name { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; letter-spacing: -.03em; }
.my-id { color: var(--ink-3); font-size: .92rem; font-weight: 600; }
.my-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.my-facts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .86rem; color: var(--ink-3); }
.my-facts span { display: inline-flex; align-items: center; gap: 6px; }
.my-stats { display: flex; gap: 10px; }
.my-stat { min-width: 92px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); text-align: center; transition: background .15s; }
a.my-stat:hover { background: var(--surface-3); }
.my-stat b { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.my-stat span { font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.my-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.my-nav { position: sticky; top: calc(var(--hdr-h) + 20px); padding: 8px; display: grid; gap: 2px; }
.my-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-weight: 700; font-size: .93rem; color: var(--ink-2); transition: background .15s, color .15s; }
.my-nav a:hover { background: var(--surface-2); color: var(--ink); }
.my-nav a.is-active { background: var(--ink); color: var(--bg); }
.my-nav a .count { margin-left: auto; font-size: .74rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.my-nav a.is-active .count { background: rgba(255, 255, 255, .18); color: inherit; }
.my-nav hr { margin: 6px 4px; }
.panel { display: grid; gap: 20px; }
.panel-title { font-size: 1.2rem; font-weight: 850; }
.panel-desc { margin-top: 4px; font-size: .9rem; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-row h3 { font-size: .95rem; }
.setting-row p { font-size: .84rem; color: var(--ink-3); margin-top: 2px; }
.danger { border: 1px solid var(--brand-soft); background: var(--brand-soft); border-radius: var(--r-lg); padding: 20px 22px; }
.danger h3 { color: var(--brand-text); font-size: 1rem; }
.danger p { font-size: .88rem; color: var(--ink-2); margin: 6px 0 16px; }
.hist { display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border-radius: var(--r); transition: background .15s; }
.hist:hover { background: var(--surface-2); }
.hist .thumb { border-radius: 10px; }
.hist-title { font-weight: 750; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-meta { margin-top: 4px; font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.hist-list { display: grid; }
.fav { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, transform .2s var(--ease); }
.fav:hover { border-color: var(--line-strong); transform: translateX(3px); }
.fav .thumb { border-radius: 10px; }

/* ---------- 15. Notices / board / pagination ---------------------------- */
.ntable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.ntable-head, .ntable-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 120px 110px; gap: 12px; align-items: center; padding: 15px 22px; }
.ntable-head { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.ntable-row { border-top: 1px solid var(--line); transition: background .15s; }
.ntable-row:hover { background: var(--surface-2); }
.ntable-row .c-no { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .88rem; }
.ntable-row .c-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntable-row .c-author { font-size: .88rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntable-row .c-date { text-align: right; font-size: .84rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ntable-head .c-date { text-align: right; }
.hl { background: var(--brand-soft); color: var(--brand-text); border-radius: 3px; padding: 0 2px; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pg { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: all .15s; }
a.pg:hover { border-color: var(--ink-3); color: var(--ink); }
.pg.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pg.is-disabled { opacity: .4; pointer-events: none; }
.pg-dots { display: inline-grid; place-items: center; min-width: 24px; color: var(--ink-3); }
.info-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .9rem; color: var(--ink-2); }
.info-line a { color: var(--brand-text); font-weight: 700; }

.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden; }
.article-head { padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 44px) 24px; border-bottom: 1px solid var(--line); }
.article-title { margin-top: 12px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.3; }
.article-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--ink-3); }
.article-meta b { color: var(--ink); font-weight: 750; margin-right: 4px; }
.article-body { padding: clamp(24px, 4vw, 44px); min-height: 240px; font-size: 1.04rem; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.article-files { padding: 18px clamp(20px, 4vw, 44px); border-top: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adj { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.adj a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 15px 22px; font-size: .92rem; transition: background .15s; }
.adj a + a { border-top: 1px solid var(--line); }
.adj a:hover { background: var(--surface-2); }
.adj em { font-style: normal; font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.adj span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.article-actions { margin-top: 26px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; padding: 14px 20px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 15px 20px; border-top: 1px solid var(--line); }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { width: 72px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tbl .ttl { font-weight: 650; }

/* ---------- 16. Standalone (waiting) ------------------------------------ */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.solo-card { width: 100%; max-width: 440px; padding: 40px 32px; text-align: center; }
.solo-ic { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.solo-ic .i { width: 30px; height: 30px; }
.solo-card h1 { font-size: 1.5rem; margin-bottom: 10px; }
.solo-card .count { margin: 20px 0 14px; font-size: .88rem; font-weight: 800; color: var(--brand-text); }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 26px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 2px; animation: meter 30s linear forwards; }
@keyframes meter { from { width: 100%; } to { width: 0; } }

/* ---------- 17. Responsive ---------------------------------------------- */
@media (max-width: 1080px) {
  .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .watch { grid-template-columns: minmax(0, 1fr); }
  .rel { position: static; }
  .rel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdr-search input:focus { width: 200px; }
}
@media (max-width: 960px) {
  .nav, .hdr-search, .hdr-auth { display: none; }
  .menu-btn { display: inline-grid; }
  .band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-logo-m { display: block; }
  .auth-main { justify-content: flex-start; padding-top: 44px; align-items: stretch; }
  .auth-card { margin-inline: auto; }
  .gym { grid-template-columns: minmax(0, 1fr); }
  .gym:nth-child(even) .gym-map { order: 0; }
  .gym-map { min-height: 260px; }
}
@media (max-width: 860px) {
  .my-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .my-nav { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 6px; scrollbar-width: none; }
  .my-nav::-webkit-scrollbar { display: none; }
  .my-nav a { flex: none; white-space: nowrap; border-radius: 999px; }
  .my-nav hr { display: none; }
}
@media (max-width: 820px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); }
  body.has-tabbar { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .site-footer { margin-top: 56px; }
}
@media (max-width: 720px) {
  :root { --hdr-h: 58px; }
  .brand img { height: 34px; }
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .vgrid.rail-sm { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 66%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 4px; scrollbar-width: none; }
  .vgrid.rail-sm::-webkit-scrollbar { display: none; }
  .vgrid.rail-sm > * { scroll-snap-align: start; }
  .hero-ctrl { left: 0; right: auto; bottom: 26px; }
  .hero-arrows { display: none; }
  .hero-in { padding-bottom: 76px; }
  .stats { margin-top: -30px; }
  .stat { padding: 14px 14px; }
  .sec-head { margin-bottom: 18px; }
  .sec-title { white-space: normal; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .my-hero { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .my-hero .my-stats { grid-column: 1 / -1; }
  .my-avatar { width: 68px; height: 68px; font-size: 1.7rem; }
  .my-stat { flex: 1; min-width: 0; }
  .hist { grid-template-columns: 112px minmax(0, 1fr); }
  .hist > :last-child { grid-column: 1 / -1; }
  .fav { grid-template-columns: 112px minmax(0, 1fr); }
  .fav > :last-child { grid-column: 1 / -1; }
  .ntable-head { display: none; }
  .ntable-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 18px; }
  .ntable-row .c-no { display: none; }
  .ntable-row .c-title { grid-column: 1 / -1; white-space: normal; }
  .ntable-row .c-author { font-size: .8rem; color: var(--ink-3); }
  .rel-list { grid-template-columns: minmax(0, 1fr); }
  .rel-item { grid-template-columns: 120px minmax(0, 1fr); }
  .player { border-radius: 0; margin-inline: calc(var(--gutter) * -1); box-shadow: none; }
  .watch { padding-top: 0; gap: 24px; }
  .watch-info { flex-direction: column; gap: 14px; }
  .zzim-btn { width: 100%; justify-content: center; }
  .cmt-form { grid-template-columns: minmax(0, 1fr) auto; }
  .cmt-form .avatar { display: none; }
  .foot-in { grid-template-columns: 1fr; gap: 26px; padding-block: 34px 22px; }
  .hide-sm { display: none; }
  .searchbox .input { padding-right: 96px; }
  .tbl th, .tbl td { padding: 12px 14px; }
  .input, .select, .textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  .sso a span { display: none; }
  .stat-l { font-size: .72rem; }
  .igrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg-actions { flex-direction: column-reverse; }
}

/* ---------- 검색어 강조 ---------- */
mark.hl { background: var(--brand-soft); color: var(--brand-text); border-radius: 3px; padding: 0 2px; }
.fav .thumb, .hist .thumb { display: block; }
.fav form { margin: 0; }

/* ---------- 마이페이지: 회원 상태 / 3열 카드 그리드 ---------- */
.vgrid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mstatus { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 14px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mstatus > div { background: var(--surface); padding: 14px 16px; min-width: 0; }
.mstatus dt { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.mstatus dd { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 750; font-size: .95rem; }
.mstatus-note { margin-top: 12px; font-size: .86rem; color: var(--ink-3); }
@media (max-width: 720px) {
  .vgrid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mstatus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 공유 버튼 / 토스트 */
.watch-actions { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 700; font-size: .92rem; background: var(--surface); transition: all .15s; }
.share-btn:hover { border-color: var(--brand); color: var(--brand-text); }
.share-btn .i { width: 18px; height: 18px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 16px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .9rem; box-shadow: 0 8px 28px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) {
  .watch-actions { width: 100%; }
  .watch-actions .share-btn, .watch-actions .zzim-btn { flex: 1; justify-content: center; width: auto; }
}

/* ==========================================================================
   i18n — language switcher, CJK typography
   ========================================================================== */
:lang(ja), :lang(zh-Hans) { word-break: normal; line-break: strict; }
:lang(en) { word-break: normal; }

.nav-link, .dr-link, .tab { white-space: nowrap; }
.tab { padding: 0 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dropdown.mega { min-width: 400px; }
.dropdown .dd-link { white-space: normal; }
:lang(en) .nav-link { padding: 0 10px; font-size: .9rem; }
@media (max-width: 1180px) { .nav-link { padding: 0 9px; } .hdr-search input { width: 150px; } }

.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; width: auto; min-width: 40px; padding: 0 10px; gap: 4px; display: inline-flex; align-items: center; justify-content: center; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-cur { font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.lang-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 120; min-width: 140px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.lang-pop a { display: block; padding: 9px 12px; border-radius: var(--r-sm); font-size: .92rem; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.lang-pop a:hover { background: var(--surface-2); color: var(--ink); }
.lang-pop a[aria-current="true"], .lang-inline a[aria-current="true"] { color: var(--brand-text); font-weight: 800; }
.lang-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-inline a { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.lang-inline a:hover { background: var(--surface-3); color: var(--ink); }
.lang-inline a[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--brand); }
.foot-lang { margin: 8px 0 14px; }
@media (max-width: 720px) {
  .lang-menu > summary { min-width: 38px; padding: 0 8px; }
  .lang-pop { right: -4px; }
}
