/* Istream 아이스트림: 개발 방송 시뮬레이터. 치지직, 트위치, SOOP 계열의 다크 스트리밍 스튜디오 테마. */
:root {
  /* 색상 토큰 */
  --bg: #0d0e12;
  --bg-2: #13151b;
  --bg-3: #1a1d24;
  --bg-hover: #222630;
  --bg-active: #292e3b;
  --line: rgba(255, 255, 255, 0.08);
  --line-subtle: rgba(255, 255, 255, 0.04);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-bright: #ffffff;
  --muted: #9ca3af;
  --dim: #6b7280;

  /* 브랜드 악센트: 민트 */
  /* 테마 색: 기본 소다 스카이(파랑). html[data-accent] 로 딸기우유 코랄·망고 선셋을 고른다. 치지직 형광 초록과 겹치지 않게 */
  --accent-rgb: 0, 210, 255;
  --accent: #00d2ff;
  --accent-hover: #29dcff;
  --accent-dim: rgba(var(--accent-rgb), 0.12);
  --accent-border: rgba(var(--accent-rgb), 0.28);
  --accent-glow: 0 0 16px rgba(var(--accent-rgb), 0.35);
  --gate-scene-sprite: url("/istream/pixel-stream-soda-sprite.png?v=1");

  /* 상태 색상 */
  --live: #ff334b;
  --live-glow: 0 0 14px rgba(255, 51, 75, 0.5);
  --gold: #ffc542;
  --gold-dim: rgba(255, 197, 66, 0.12);
  --gold-glow: 0 0 16px rgba(255, 197, 66, 0.3);
  --heart: #ff4d79;
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.14);

  /* 라운딩 및 그림자 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px -8px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }

/* 한국어는 단어(어절) 단위로 줄바꿈 유지 */
/* 한국어 줄바꿈(사장님 지적 2026-09-16: 단어가 한가운데서 갈라짐). anywhere 는 줄을 맞추는 데 도움이 되면
   한글 단어 안에서도 끊어서 keep-all 을 무력화한다. break-word 는 단어가 통째로 안 들어갈 때만 쪼갠다 */
body { word-break: keep-all; overflow-wrap: break-word; }
/* 문장 덩어리(sentence). 마침표에서 끊기게 한 문장을 한 덩어리로 묶는다(사장님 지적 2026-09-16:
   "마침표에서 개행해야지", 문장 중간 띄어쓰기에서 갈라지던 것). 자리가 넉넉하면 한 줄에 같이 붙는다 */
s-n { display: inline-block; }
p, .lbl, .mirror-note span, .gate-note, .msg.system { text-wrap: pretty; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

b { font-weight: 700; }
[hidden] { display: none !important; }
.lbl { font-size: 11px; color: var(--muted); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .milestone-confetti { display: none; }
}

/* ── 마일스톤 세리머니 ─────────────────────────────────── */
.milestone-ceremony {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  overflow: hidden;
  text-align: center;
  word-break: keep-all;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.24), rgba(8, 10, 13, 0.78) 58%, rgba(8, 10, 13, 0.9));
  animation: milestone-in 0.3s ease-out both;
}
.milestone-kicker {
  color: var(--accent);
  font-size: clamp(10px, 1.4vw, 13px);
  font-weight: 900;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.milestone-title {
  max-width: 92%;
  color: #fff;
  font-size: clamp(23px, 4.2vw, 48px);
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.4);
}
.milestone-detail {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(12px, 1.7vw, 16px);
  font-weight: 700;
}
.milestone-confetti { position: absolute; inset: 0; }
.milestone-confetti i {
  position: absolute;
  top: -12%;
  left: var(--x);
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
  animation: milestone-fall 1.6s var(--delay) ease-in infinite;
  transform: rotate(var(--turn));
}
.milestone-confetti i:nth-child(3n + 2) { background: #ffc542; }
.milestone-confetti i:nth-child(3n) { background: #ff5f8f; }
@keyframes milestone-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes milestone-fall { to { top: 112%; transform: translateX(35px) rotate(calc(var(--turn) + 280deg)); } }

/* 스크롤바 정돈 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }
/* scrollbar-width 를 준 칸은 크롬이 위 ::-webkit-scrollbar 를 무시하고 표준 스크롤바를 그린다. 색을 안 주면 밝은 회색 막대가
   흰 줄처럼 보였다(방송 화면과 채팅 사이, 사장님 지적 2026-09-30). 그런 칸도 어두운 얇은 막대로 */
#view-studio .video-col, .summary-hl-section .summary-hl-strip, .studio-streams, .fans-board .fans-rest-list { scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }

/* ── 브랜드 로고 ────────────────────────────────── */
.logo-mark {
  display: inline-block;
  flex: none;
  width: 32px;
  height: 32px;
  background: url(/istream/istream.svg) center / contain no-repeat;
  filter: drop-shadow(0 2px 8px rgba(var(--accent-rgb), 0.2));
}
.logo-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-bright);
}
.logo-ko {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin-left: 4px;
}
.brand, .gate-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.side .brand {
  container-type: inline-size;
  gap: 10px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--line);
}
.side .logo-mark { width: 30px; height: 30px; }
.side .logo-name { font-size: clamp(13px, 8.5cqi, 17px); }

/* ── 게이트 (첫 화면): MoToo 로그인 뼈대. 왼쪽 어두운 히어로 + 오른쪽 흰 패널 ── */
.gate {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.gate-hero {
  grid-column: 1; grid-row: 1;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 48px clamp(28px, 5vw, 72px) 28px;
  background: #0d0f14; color: #eef1f5;
}
.gate-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(125% 95% at 28% 42%, #000 52%, transparent 100%);
  mask-image: radial-gradient(125% 95% at 28% 42%, #000 52%, transparent 100%);
}
.gate-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 20%;
  right: 8%;
  width: 7px;
  height: 7px;
  pointer-events: none;
  background: rgba(var(--accent-rgb), .5);
  box-shadow: 28px 18px 0 rgba(143, 128, 255, .38), -42px 58px 0 rgba(var(--accent-rgb), .28), 58px 98px 0 rgba(var(--accent-rgb), .32), -24px 156px 0 rgba(143, 128, 255, .2), 44px 216px 0 rgba(var(--accent-rgb), .24), -76px 266px 0 rgba(143, 128, 255, .16);
}
.gate-hero > * { position: relative; z-index: 1; }
.gate-hero-body { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 920px; margin-block: auto; }
.gate-hero-intro { display: block; }
.gate-hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.gate-flow, .gate-chips, .gate-trust { position: relative; z-index: 2; }
.gate-pixel-scene {
  position: absolute;
  z-index: 0;
  right: -5%;
  bottom: 4%;
  width: 108%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease-out;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .3) 15%, #000 38%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .3) 15%, #000 38%, #000 100%);
}
.gate-pixel-scene.is-ready { opacity: .6; }
.gate-pixel-sprite {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background-image: var(--gate-scene-sprite);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0 0;
  image-rendering: pixelated;
  animation: gate-streamer-sprite 0.9s steps(1, end) infinite;
}
.gate-pixel-sprite::after {
  content: "";
  position: absolute;
  left: 59.5%;
  top: 34%;
  width: 17%;
  height: 28%;
  pointer-events: none;
  background: radial-gradient(ellipse at 0 50%, rgba(255, 255, 255, .5), rgba(var(--accent-rgb), .28) 38%, transparent 72%);
  mix-blend-mode: screen;
  animation: gate-monitor-flicker 0.9s steps(2, end) infinite;
}
.gate-pixel-cat {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background-image: var(--gate-scene-sprite);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0 0;
  image-rendering: pixelated;
  clip-path: polygon(54.4% 23.3%, 55.5% 21.2%, 56.9% 23%, 58.2% 23%, 59.3% 21.2%, 60.3% 23.5%, 60.4% 27.8%, 59.3% 29.2%, 55.3% 29.2%, 54.1% 27.5%);
  animation: gate-cat-bounce 0.9s steps(1, end) infinite;
}
.gate-pixel-scene::after {
  content: "";
  position: absolute;
  inset: 13% -2% 0 34%;
  pointer-events: none;
  background: radial-gradient(circle at 70% 48%, rgba(var(--accent-rgb), .22), transparent 46%);
  mix-blend-mode: screen;
  animation: gate-room-light 4s ease-in-out infinite;
}
@keyframes gate-streamer-sprite {
  0%, 49.99% { background-position: 0 0; }
  50%, 100% { background-position: 100% 0; }
}
@keyframes gate-monitor-flicker {
  0%, 44%, 100% { opacity: .1; }
  50%, 92% { opacity: .76; }
}
@keyframes gate-cat-bounce {
  0%, 49.99% { background-position: 0 0; transform: translateY(0); }
  50%, 100% { background-position: 100% 0; transform: translateY(-3px); }
}
@keyframes gate-room-light {
  0%, 100% { opacity: .22; transform: translate3d(-1.5%, 0, 0) scale(.98); }
  48% { opacity: .58; transform: translate3d(1.5%, -1%, 0) scale(1.03); }
}
.gate-title {
  margin: 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.16; letter-spacing: -0.035em;
  position: relative; z-index: 2; color: #fff; text-wrap: balance;
  text-shadow: 3px 3px 0 rgba(46, 39, 102, .42);
}
.gate-title b {
  font-weight: 800; background: linear-gradient(90deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-note { margin: 0; color: #97a1ad; font-size: 15px; line-height: 1.7; max-width: 36em; }
.gate-note b { color: var(--accent); }
.gate-steps { display: flex; flex-direction: column; gap: 10px; }
.gate-steps div {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 13.5px; color: #aab2bd; line-height: 1.55;
}
.gate-steps b {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-content: center;
  background: var(--accent); color: #080a0c; font-size: 12px; font-weight: 800;
}
.gate-steps strong { color: #fff; font-weight: 600; }
.gate-safe { margin: 0; padding: 18px 0 0; list-style: none; display: flex; flex-direction: column; gap: 9px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.gate-safe li { font-size: 13px; color: #8b95a1; line-height: 1.6; }
.gate-safe b { color: #dfe3e8; font-weight: 600; }
.gate-safe a { color: var(--accent); text-decoration: none; }
.gate-safe a:hover { text-decoration: underline; }
.gate-hero .app-footer { border-top-color: rgba(255, 255, 255, 0.08); color: #6b7480; }

/* 오른쪽 흰 패널 */
.gate-panel {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: safe center; justify-content: center;
  padding: clamp(24px, 5vw, 40px) clamp(16px, 4vw, 24px); background: #fff; color: #191f28;
}
.gate-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; margin-block: auto; }
.gate-logo { justify-content: center; gap: 10px; }
.gate-logo .logo-mark { width: 36px; height: 36px; filter: none; }
.gate-logo .logo-name { font-size: 28px; color: #14161a; overflow: visible; }
.gate-logo .logo-ko { font-size: 17px; color: #8b95a1; }
.gate-sub { margin: -6px 0 14px; text-align: center; font-size: 13.5px; color: #8b95a1; line-height: 1.55; }
.gate-sub-hl { color: #00a6cc; font-weight: 600; }
.gate .gate-go {
  width: 100%; height: 54px; border: 0; border-radius: 14px; background: #14161a; color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.gate .gate-go:hover { background: #2a2f37; }
.gate .gate-go:active { transform: translateY(1px); }
.gate .gate-go:disabled { opacity: 0.55; cursor: progress; }
.gate-error { margin: 0; color: #e5383b; font-size: 13px; font-weight: 600; line-height: 1.5; }
.gate-or { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: #8b95a1; font-size: 12px; white-space: nowrap; }
.gate-or::before, .gate-or::after { content: ""; flex: 1; height: 1px; background: #e5e8eb; }
.gate-or:has(+ .gate-google[hidden]) { display: none; }
.gate .gate-google { height: 50px; border-radius: 12px; border-color: #e5e8eb; font-size: 15px; }
.gate .gate-google:hover { background: #f5f6f7; box-shadow: none; }
.gate-login { margin: 0; text-align: center; font-size: 13.5px; color: #6b7684; word-break: keep-all; }
.gate-login .link-btn { color: #14161a; }
.gate-fine { margin: 6px 0 0; padding-top: 14px; border-top: 1px solid #f2f4f6; text-align: center; font-size: 12px; line-height: 1.55; color: #8b95a1; }

@media (max-width: 960px) {
  .gate { grid-template-columns: minmax(0, 1fr); }
  /* 좁은 화면: 소개(히어로)가 먼저, 로그인은 그 아래(사장님 요청 2026-09-15) */
  /* 위에서부터 글자가 빽빽하게 붙지 않게 위 여백과 줄 사이를 넉넉히(사장님 요청 2026-09-15) */
  .gate-hero { grid-column: 1; grid-row: 1; padding: calc(env(safe-area-inset-top, 0px) + clamp(56px, 12vw, 88px)) 20px 32px; gap: 40px; }
  .gate-panel { grid-column: 1; grid-row: 2; padding: clamp(24px, 5vw, 36px) clamp(16px, 4vw, 20px); }
  /* 글을 가운데로 모으고 한 단계 작게, 안심 칩과 겹치는 마지막 문단은 뺀다(사장님 요청 2026-09-15: 들어오자마자 글자가 많고 왼쪽에 치우침) */
  .gate-hero-body { margin-block: 0; margin-inline: auto; gap: 24px; align-items: center; text-align: center; }
  /* #gate 를 붙이는 이유: 아래쪽(5350대)의 .gate-hero-short .gate-title 같은 규칙이 뒤에 와서 이긴다 */
  #gate .gate-title { font-size: clamp(20px, 5.4vw, 26px); line-height: 1.3; }
  #gate .gate-lead { font-size: 13.5px; line-height: 1.7; }
  /* 단계 1·2·3은 왼쪽 세로, 안심 문구 넷은 오른쪽 세로로 나란히(사장님 요청 2026-09-15) */
  .gate-hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 12px; justify-items: stretch; }
  .gate-hero-intro { display: block; }
  .gate-hero-copy { display: flex; flex-direction: column; gap: 24px; }
  .gate-pixel-scene { display: none; }
  .gate-hero-body > * { grid-column: 1 / -1; }
  /* 두 열의 위아래 길이를 맞춘다(사장님 요청 2026-09-15): 두 목록을 같은 높이로 늘리고, 칸은 그 높이를 똑같이 나눠 가진다. 3칸인 왼쪽은 더 크고 4칸인 오른쪽은 더 얇다 */
  .gate-hero-body .gate-flow { grid-column: 1; align-self: stretch; }
  .gate-hero-body .gate-chips { grid-column: 2; align-self: stretch; }
  .gate-flow, .gate-chips { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 8px; }
  #gate .gate-flow li, #gate .gate-chips li { flex: 1 1 0; font-size: 12px; min-height: 34px; padding: 6px 10px; box-sizing: border-box; white-space: normal; word-break: keep-all; border-radius: 12px; }
  #gate .gate-flow li { font-weight: 600; gap: 8px; }
  #gate .gate-flow li::before { width: 20px; height: 20px; font-size: 11px; flex: none; }
  .gate-trust { display: block; grid-column: 1 / -1; text-align: left; }
  .gate-hero .app-footer { justify-content: center; text-align: center; }
  /* 좁은 화면 바닥글: 링크 줄이 위, 얇은 선, 저작권이 아래(사장님 요청 2026-09-15) */
  .gate-hero .app-footer { flex-direction: column; gap: 10px; border-top: 0; padding-top: 0; }
  .gate-hero .app-footer nav { order: -1; justify-content: center; width: 100%; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
}

@media (min-width: 961px) and (max-width: 1199px) {
  .gate-hero-body { max-width: 640px; }
  .gate-hero-intro { display: block; }
  .gate-hero-copy { display: flex; flex-direction: column; gap: 28px; }
  .gate-pixel-scene { display: none; }
}

@media (min-width: 1200px) and (max-width: 1599px) {
  .gate-hero-body { max-width: none; }
  .gate-pixel-scene { right: -5%; bottom: 4%; width: 108%; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-pixel-sprite, .gate-pixel-sprite::after, .gate-pixel-cat, .gate-pixel-scene::after, .gate-hero::after { animation: none; }
}

.safe-note {
  margin: -4px 0 4px;
  font-size: 12px;
  color: color-mix(in srgb, var(--accent) 35%, #fff);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.55;
}

/* ── 뼈대: 메인 스튜디오 데스크 ─────────────────── */
.desk {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}
/* 방송하기만 화면 높이에 고정한다. 페이지가 세로로 밀리지 않고, 왼쪽 칸에서 넘치는 설명만 안쪽에서 스크롤(사장님 요청 2026-09-20).
   960px 이하에서는 무대가 한 칸으로 쌓이므로 적용하지 않는다(스크롤이 막히면 아래 내용이 안 보임) */
@media (min-width: 961px) {
  #view-studio:not([hidden]) { height: 100dvh; }
  #view-studio .stage { height: 100%; min-height: 0; overflow: hidden; }
  #view-studio .video-col { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  /* 자식이 줄어들면 영상이 1px까지 찌그러진다. 제 크기를 지키고 넘치면 칸이 스크롤되게 */
  #view-studio .video-col > * { flex: none; }
  #view-studio .video-wrap { max-height: 56vh; }
}
/* 프로필 사진 위치(사장님 지정 2026-09-20): 채널칸 안쪽 여백 20px + 16px = 왼쪽 끝에서 36px.
   2026-09-30 부터 .channel-left 가 display: contents 라 16px 은 아바타 왼쪽 여백으로 준다(파일 끝 "채널 정보: 촘촘한 격자") */

/* ── 왼쪽 사이드바 (스튜디오 컨트롤 센터) ───────── */
.side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
}

/* 메뉴 네비게이션 */
.menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: none;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 6px 12px;
  border-radius: var(--r-md);
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.menu-item i {
  font-style: normal;
  width: 20px;
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
}
.menu-item:hover {
  background: var(--bg-3);
  color: var(--text-bright);
}
.menu-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
.menu-item.active i {
  opacity: 1;
}

/* 알림 뱃지 */
.noti-badge {
  margin-left: auto;
  background: var(--live);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--r-full);
  padding: 1px 7px;
  box-shadow: 0 0 8px rgba(255, 51, 75, 0.4);
}

/* 사이드바 채널 카드 */
.side-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12px;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.side-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.side-title::after {
  content: "CH";
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--dim);
}
.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.side-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.side-row b {
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* 사이드 팁 카드 */
.side-card.tip {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  background: rgba(var(--accent-rgb), 0.04);
  border-color: rgba(var(--accent-rgb), 0.15);
  position: relative;
  padding-left: 12px;
}
.side-card.tip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* 사이드 랭킹 카드 */
.rank-card {
  padding: 12px 14px;
}
.rank-top {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rank-top li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.rank-top .medal {
  width: 18px;
  flex: none;
  text-align: center;
  font-size: 13px;
}
.rank-top .rn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.rank-top li.me .rn {
  color: var(--accent);
  font-weight: 700;
}
.rank-top b {
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  font-size: 12px;
}
.rank-me {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.rank-me b { color: var(--accent); }

/* 사이드바 하단 스튜디오 도구 버튼 (기존 .side-logout 클래스 활용) */
.side-logout {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.side-logout:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
  color: var(--text-bright);
  transform: translateY(-1px);
}
.side-logout:active {
  transform: scale(0.98);
}
/* 하단 버튼 묶음을 사이드바 맨 아래에 고정한다(사장님 지적 2026-09-22: 내 채널 카드를 여닫을 때 방송 예고·휴방 공지 버튼이 위아래로 움직임).
   남는 높이를 버튼 위 여백으로 먹여 카드가 접혀도 버튼 자리가 안 변한다. 960px 이하 가로 배치에서는 0으로 되돌린다 */
#schedBtn {
  margin-top: auto;
}
#aiBtn {
  border-color: rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.05);
  color: color-mix(in srgb, var(--accent) 35%, #fff);
}
#aiBtn:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* 사이드바 하단 프로필 / 모드 표시기 */
.side-user {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.6;
  min-height: 24px;
  flex: none;
  padding: 6px 4px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-user::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.side-user + .side-logout {
  margin-top: 0;
}

/* 뷰 헤더 (대시보드, 시청자들, 랭킹, 알림 등) */
.view { min-width: 0; }
.view-head {
  padding: 24px 28px 12px;
}
.view-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}
.view-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── 방송하기 (스튜디오 메인 스테이지) ───────────── */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  min-height: 100vh;
}
.video-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 모니터 / 비디오 래퍼 */
.video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: 64vh;
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8);
}
.still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
/* "N초 전 내 화면": 화면 왼쪽 위 모서리에 작게 겹친다(사장님 요청 2026-09-30, 전에는 윗줄 밑에 한 줄을 따로 차지했다) */
.still-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4; /* 찍어 둔 사진(.still z-index 1) 위 */
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: help;
}
.videos {
  display: flex;
  width: 100%;
  height: 100%;
}
.videos video {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: contain;
  display: block;
}
.video-wrap video.off {
  visibility: hidden;
}

/* 방송 꺼짐 대기 화면 */
.video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  background: radial-gradient(ellipse at 50% 45%, #181c24 0%, #0a0b0f 75%);
  padding: 56px 20px 24px;
}
.video-empty-mark {
  width: clamp(56px, 8vw, 96px);
  height: clamp(56px, 8vw, 96px);
  margin: 0 auto 16px;
  background: url(/istream/istream.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 24px rgba(var(--accent-rgb), 0.28));
  animation: logo-breathe 3.5s ease-in-out infinite;
}
@keyframes logo-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(var(--accent-rgb), 0.2)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 32px rgba(var(--accent-rgb), 0.45)); }
}
.video-empty p {
  margin: 0;
  color: var(--text-bright);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.video-empty small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.video-empty small b {
  color: var(--accent);
}

/* 모니터 상단 오버레이 바 */
/* 공유 화면을 덮지 않게 화면 위(바깥)에 둔다(사장님 지적 2026-09-16). 전에는 .video-wrap 안에 겹쳐 떠서 화면을 가렸다 */
.overlay-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 0;
  z-index: 3; /* .video-col 의 flex 자식이라 position 이 없어도 쌓임 순서에 쓰인다 */
}
.overlay-top > span {
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.live-tag {
  color: #8a8d94;
  letter-spacing: 0.06em;
  font-size: 11px !important;
}
.live-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5a5d64;
  margin-right: 6px;
}
.live-tag.on {
  background: var(--live) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: var(--live-glow) !important;
}
.live-tag.on::before {
  background: #fff;
  box-shadow: 0 0 6px #fff;
  animation: live-pulse 1.2s infinite;
}
@keyframes live-pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.viewer-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}
.viewer-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
}
.viewer-tag b {
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
}
.time-tag {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #e5e7eb !important;
}
.overlay-top .safe-tag {
  color: #4ade80 !important;
  font-weight: 600 !important;
  border-color: rgba(74, 222, 128, 0.25) !important;
  cursor: help;
}
/* 방송 중 공유 화면 바꾸기: 배지와 같은 유리 느낌에 강조색 테두리, 누르면 살짝 떠오름 */
.overlay-top .swap-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
  color: var(--accent); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(10, 12, 16, 0.82));
  backdrop-filter: blur(8px); border: 1px solid rgba(var(--accent-rgb), 0.45); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.overlay-top .swap-tag .ico { width: 13px; height: 13px; }
.overlay-top .swap-tag:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.28); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(10, 12, 16, 0.82)); }
.overlay-top .swap-tag:disabled { opacity: .6; cursor: progress; transform: none; }
.overlay-top .perf-btn { color: var(--muted); border-color: rgba(255, 255, 255, .16); background: rgba(10, 12, 16, .82); }
.overlay-top .perf-btn.on { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
/* 성능 표시: 왼쪽 아래 고정, 1초마다 갱신. 기준을 넘으면 빨갛게 */
.perf-hud { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; /* 모달(50) 아래 */ display: grid; grid-template-columns: repeat(2, auto); gap: 4px 14px; padding: 10px 12px; border-radius: 10px; background: rgba(8, 9, 12, .9); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; pointer-events: none; }
.perf-hud span { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; white-space: nowrap; }
.perf-hud small { color: var(--dim); font-size: 11px; }
.perf-hud b { color: #4ade80; font-weight: 700; font-variant-numeric: tabular-nums; }
.perf-hud .warn b { color: #ff6b86; }
/* 사이드바(로그아웃 버튼)를 가리지 않게 사이드바 오른쪽에서 시작. 좁은 화면은 사이드바가 위로 가서 왼쪽 끝 */
.perf-hud { left: calc(240px + 12px); }
@media (max-width: 1280px) { .perf-hud { left: calc(220px + 12px); } }
@media (max-width: 1024px) { .perf-hud { left: calc(200px + 12px); } }
@media (max-width: 960px) { .perf-hud { left: 12px; } }

/* 이벤트 배너 */
.overlay-event {
  position: absolute;
  /* 오른쪽 위에 붙이면 미리보기 끄기 버튼에 가리고 긴 이름은 화면 밖으로 잘렸다(사장님 지적 2026-09-15). 위 줄 아래 가운데에, 넘치면 줄바꿈 */
  top: 64px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: calc(100% - 28px);
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word; /* anywhere 는 한글 단어 한가운데를 끊는다(2026-09-17 전역 규칙과 함께 정리) */
  z-index: 3;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffc542, #ff8c00);
  color: #0d0e11;
  box-shadow: 0 4px 20px rgba(255, 197, 66, 0.4);
  animation: slidein 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 시청자 시점 자막 */
.overlay-scene {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 10px 14px;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.5;
}
.overlay-scene::before {
  content: "시청자 시점: ";
  color: var(--accent);
  font-weight: 700;
}

/* 미리보기 끄기 오버레이 버튼 */
/* 막대 안으로 들어왔다(사장님 지적 2026-09-16). 전에는 화면 오른쪽 위에 겹쳐 떠서 공유 화면을 가렸다 */
.preview-off {
  margin-left: auto; /* 막대 오른쪽 끝에 붙는다 */
  z-index: 5; /* .overlay-top 의 flex 자식이라 position 이 없어도 쌓임 순서에 쓰인다 */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.preview-off:hover {
  background: rgba(26, 29, 36, 0.95);
  border-color: var(--accent);
}

/* 거울 모드 안내 오버레이 */
.mirror-note {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 45%, #181c24 0%, #0a0b0f 80%);
}
.mirror-note b {
  font-size: 17px;
  color: var(--text-bright);
}
.mirror-note span {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
}

/* 하트 이펙트 */
.hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}
.heart {
  position: absolute;
  bottom: 40px;
  font-size: 24px;
  filter: drop-shadow(0 2px 8px rgba(255, 77, 121, 0.6));
  animation: float 2.2s ease-out forwards;
}
@keyframes float {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  15% { opacity: 1; transform: translate(0, -30px) scale(1.1); }
  100% { transform: translate(var(--dx), -240px) scale(1.3); opacity: 0; }
}
@keyframes slidein {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* 채널 컨트롤 헤더 (.channel): 치지직 스타일 */
.channel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-subtle);
  word-break: keep-all;
}
/* 1행: 방송 제목 및 바로 아래 독립된 방송 상태 줄 (카테고리 칩 + 시청자 수·시간) */
.channel-top {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  word-break: keep-all;
}
.channel-title {
  width: 100%;
  min-width: 0;
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.35;
}
/* 방송 제목 바로 아래 독립된 방송 상태 줄: 치지직 스타일 (카테고리 칩 + 시청자 수·시간) */
.channel-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
  flex-wrap: wrap;
  line-height: 1.4;
  word-break: keep-all;
}
.channel-live #catShow {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  box-sizing: border-box;
}
.channel-live #catSep {
  display: none !important;
}
.ch-live-stats {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  line-height: 1.4;
  word-break: keep-all;
}
.ch-live-stats b {
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* 1행 겸 전체: 왼쪽 아바타+제목·공지 / 오른쪽 닉네임·팔로워 + 알약·방송시작.
   무대 폭이 좁아지면(뷰포트 말고 이 칸 기준) 두 줄로 감싼다 */
.channel {
  container-type: inline-size;
  container-name: ch;
}
.channel-body {
  display: flex;
  align-items: stretch; /* 오른쪽 칸이 왼쪽 높이를 채우게 → 버튼을 아래로(space-between) */
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}
.channel-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 0;
  padding-bottom: 0;
}
.channel-titlebox {
  min-width: 0;
  flex: 1 1 auto;
}
/* 아바타 아래 한 줄: 장착 세트 칩 + 방송 상태. 아바타 왼쪽에 맞춰 왼쪽부터, 좁으면 줄바꿈 */
.channel-under {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
/* 화려한 테두리 효과가 글자 위로 번져서 아바타 둘레에 여유를 둔다 */
.channel-left .avatar-wrap {
  margin: 10px 8px 10px 0;
}
/* 장착 세트 효과 칩: 아바타 아래 흐름 배치. 없으면 숨김.
   테두리 효과(.avatar-frame z-index 2, .frame-fx-canvas z-index 3)가 아바타보다 크게 번져서
   칩 아래쪽을 덮었다(사장님 지적). 칩을 그 위에 그린다 */
.channel-setfx {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 4px;
  min-height: 0;
  pointer-events: none;
}
.channel-setfx[hidden] {
  display: none;
}
.channel-setfx .tryon-set-fx {
  font-size: 10px;
  padding: 2px 6px;
}
.channel-setfx .tryon-set-fx .ico {
  width: 9px;
  height: 9px;
}
/* 오른쪽: 닉네임·팔로워 줄 위, 알약·버튼 줄 아래(space-between 으로 버튼을 아래로 내림) */
.channel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}
.channel-right .meta {
  text-align: right;
  max-width: 100%;
}
/* 방송 중 아바타 아래 LIVE 빨간 알약(치직처럼). .live 는 방송 시작·종료 때 JS 가 붙였다 뗀다 */
.channel.live .channel-left .avatar-wrap::after {
  content: "LIVE";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  z-index: 3;
  background: var(--live);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 8px 2px;
  border-radius: var(--r-full);
  pointer-events: none;
  white-space: nowrap;
}
.avatar-me {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-content: center;
  font-weight: 800;
  font-size: 20px;
  background: var(--bg-3);
  color: var(--text-bright);
  border: 2px solid var(--line);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.channel.live .avatar-me {
  border-color: var(--live);
  box-shadow: var(--live-glow);
}
.avatar-me:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='13.5' r='3.5'/%3E%3C/svg%3E"), rgba(0, 0, 0, 0.6);
}
.avatar-me.pic {
  background-size: cover;
  background-position: center;
}
.meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  word-break: keep-all;
}
.title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0;
}
/* 방송인 줄: 별명 + 방 이름 */
.channel-who {
  font-size: 14.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 줄이 넓어져도 오른쪽 정렬 유지(좁은 무대에서 왼쪽으로 붙던 것) */
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.channel-who b {
  color: var(--text-bright);
  font-weight: 800;
  font-size: 15px;
}
.channel-who #chWhoRoom {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
/* 팔로워 정보줄 */
.channel-who-sub {
  font-size: 12.5px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.35;
  word-break: keep-all;
}
.channel-who-sub #chWhoStats {
  white-space: nowrap;
  color: var(--dim);
}
/* 아바타 아래 줄의 방송 상태(카테고리·시청자 수·경과 시간) */
.channel-under .channel-live {
  gap: 6px;
  font-size: 12.5px;
  color: var(--dim);
}
.channel-under .ch-live-stats {
  color: var(--dim);
}
.channel-under .ch-live-stats b {
  color: var(--text-bright);
}
.channel-notice {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.3;
}
.notice-inline {
  color: var(--dim);
}
/* 좁은 무대(컨테이너 = .channel 자신의 폭)에서는 채널줄을 두 줄로 감싼다.
   ★위치 주의: 이 블록은 반드시 .channel-left·.channel-right 기본 규칙 **뒤**에 와야 이긴다.
   같은 선택자라 앞에 두면 뒤의 기본 규칙이 이겨서 컨테이너 쿼리가 먹지 않는다(2026-09-20 고침).
   미디어 쿼리(@media 560px)보다는 앞이라 폰에서는 그쪽이 이긴다 */
@container ch (max-width: 720px) {
  .channel-left {
    flex: 1 1 100%;
  }
  .channel-right {
    flex: 1 1 100%;
  }
}

/* 채널 액션 버튼군 (오른쪽 정렬) */
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: wrap;
}
.likes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  cursor: default;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}
.likes:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}
.likes i {
  font-style: normal;
  color: var(--heart);
  font-size: 15px;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.likes:hover i {
  transform: scale(1.15);
}
.likes b {
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 이번 방송 증가분 알약(좋아요 옆 팔로우·구독). 총합이 아니라 는 것만 보여준다 */
.likes.gain i {
  color: var(--muted);
}
/* 알약 설명 말풍선: 브라우저 기본 title 은 span 에서 간헐적으로 안 떠서 직접 그린다 */
.likes[data-tip] {
  position: relative;
}
.likes[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  word-break: keep-all;
  z-index: 50;
  pointer-events: none;
}
/* 좋아요는 불(핑크), 팔로워는 파랑, 구독은 초록 */
.likes.gain-follow i {
  color: #5aa9ff;
}
.likes.gain-sub i {
  color: #3ddc84;
}

/* 공통 버튼 스타일 */
.btn {
  border: 0;
  border-radius: var(--r-md);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s, filter 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn.go {
  background: var(--accent);
  color: #080a0c;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.25);
}
.btn.go:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
}
.btn.end {
  background: var(--live);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 51, 75, 0.3);
}
.btn.end:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(255, 51, 75, 0.45);
}
.btn.ghost {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.ghost:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
  color: var(--text-bright);
}
.btn.small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

/* 방송 시작/종료 버튼 특수 하이라이트 */
#startBtn {
  font-size: 14px;
  padding: 10px 18px;
  letter-spacing: -0.01em;
}

/* ── 스튜디오 텔레메트리 바 (.strip) ─────────────── */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 20px 14px;
}
.cell {
  flex: 1 1 85px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s, background 0.15s;
}
.cell:hover {
  background: var(--bg-3);
  border-color: var(--line-strong);
}
.cell .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.cell b {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
#stCheese { color: var(--gold); }

.cell.ctl {
  flex: 1 0 auto;
  min-width: 125px;
  justify-content: space-between;
}
.cell.ctl select {
  appearance: none;
  background: var(--bg-3) url('data:image/svg+xml;utf8,<svg fill="%239ca3af" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 6px center / 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 24px 4px 8px;
  margin-top: 2px;
  height: 28px;
  font-size: 12px;
  color: var(--text-bright);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.cell.ctl select:focus {
  border-color: var(--accent);
}
.cell.ctl button {
  height: 28px;
  font-size: 12px;
  padding: 0 10px;
  margin-top: 2px;
  white-space: nowrap;
}

/* ── 방에 있는 시청자 칩 바 (.present) ─────────────── */
.present {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 20px;
}
.present .lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.present .lbl b {
  color: var(--accent);
}
/* 대본: 마이크로 한 말이 줄줄이 쌓이고 칸 안에서 스크롤 */
.present .script-note { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--dim); }
.speech-script { margin: 0; padding: 10px 12px; list-style: none; display: flex; flex-direction: column; gap: 3px; height: 170px; box-sizing: border-box; overflow-y: auto; /* 높이 고정, 넘치면 칸 안에서 스크롤(사장님 요청 2026-09-15: 아래로 계속 길어짐) */ overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--r-md); background: #0a0b0e; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.speech-script li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.6; color: var(--text); word-break: keep-all; overflow-wrap: break-word; }
.speech-script time { flex: none; color: var(--accent); opacity: 0.8; font-variant-numeric: tabular-nums; }
.speech-script .script-empty { color: var(--dim); font-size: 13px; }
/* 채팅창 아래 시청자 수 */
.present-pill { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }
.present-pill .ico { width: 14px; height: 14px; }
.present-pill b { color: var(--text-bright); }
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 3px 10px 3px 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  animation: slidein 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition: border-color 0.15s, transform 0.15s;
}
.chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.chip i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #0b0d11;
}
.chip.mgr {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}
.chip.reg {
  border-color: rgba(var(--accent-rgb), 0.45);
}
.chip.lurk {
  color: var(--dim);
  border-color: var(--line-subtle);
  background: rgba(255, 255, 255, 0.02);
}

/* ── 스튜디오 채팅 패널 (.chat) ─────────────────── */
.chat {
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* 채팅 헤더 */
/* 채팅창 맨 위 안내: 여기 올라오는 말은 전부 AI 가 지어낸 가상 채팅이다(사장님 요청 2026-09-16) */
.chat-ai-note { padding: 5px 10px; border-bottom: 1px solid var(--line); background: var(--bg-2); color: var(--dim); font-size: 11.5px; font-weight: 700; text-align: center; word-break: keep-all; }
body.pip .chat-ai-note { font-size: 11px; padding: 4px 8px; }
.chat-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  min-width: 0;
  background: var(--bg-2);
}
.chat-head > span {
  flex: 1;
  min-width: 32px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-bright);
  white-space: nowrap;
}
.chat-head button {
  flex: none;
  white-space: nowrap;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chat-head button:hover {
  background: var(--bg-hover);
  color: var(--text-bright);
  border-color: var(--line-strong);
}
.chat-head .tts { font-size: 11px; }
/* TTS 목소리 목록: 채팅 헤더 바로 밑에 뜬다 */
.chat-head { position: relative; }
.tts-menu { position: absolute; top: calc(100% + 2px); left: 8px; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; width: min(300px, calc(100% - 16px));
  background: var(--bg-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-weight: 500; }
.tts-menu p { grid-column: 1 / -1; margin: 0; font-size: 11.5px; color: var(--muted); word-break: keep-all; }
.tts-menu-head b { color: var(--accent); }
.tts-row { display: flex; gap: 2px; min-width: 0; }
.tts-menu button { white-space: nowrap; font-size: 12px; padding: 5px 7px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; }
.tts-menu .tts-allow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.tts-menu .tts-allow.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tts-menu .tts-allow.locked { color: var(--gold); border-color: rgba(255, 197, 66, 0.35); }
.tts-menu .tts-try { flex: none; padding: 5px 6px; }
.tts-menu .tts-power { grid-column: 1 / -1; }
.tts-menu button:hover { border-color: var(--line-strong); color: var(--text-bright); }

/* ── 고음질 AI 목소리 설정 ─────────────────────────────── */
.tts-quality-head { padding-top: 5px; border-top: 1px solid var(--line); }
.tts-menu .tts-quality,
.tts-menu .tts-install { grid-column: 1 / -1; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tts-menu .tts-quality.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tts-menu .tts-install { color: #080a0c; background: var(--accent); border-color: var(--accent); font-weight: 800; }
.tts-ai-disclosure { color: #bbf7d0 !important; }
.tts-bridge-hint code { white-space: nowrap; color: var(--text); font-size: 10.5px; }
.tts-bridge-ready { color: var(--accent) !important; }
.tts-progress { grid-column: 1 / -1; width: 100%; height: 7px; accent-color: var(--accent); }

.chat-head .pop { font-size: 11px; }
/* 띄운 창에서는 화면 위 막대가 안 보이니 제목줄에 방송 시간을 같이 보여 준다(사장님 요청 2026-09-16) */
.chat-head-time { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; }
/* 창을 닫기 전에 미리 보이는 경고(사장님 2026-09-16: 탭을 잘못 닫아 방송이 통째로 날아감).
   브라우저가 창 닫기 확인창의 글을 못 바꾸게 막아 둬서, 대신 화면에 상시로 띄워 둔다 */
.end-warn { flex: 1 1 100%; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: #fda4a4; text-align: right; word-break: keep-all; }
.chat-head .mic.on {
  color: #fff;
  background: var(--live);
  border-color: var(--live);
  box-shadow: 0 0 10px rgba(255, 51, 75, 0.4);
  animation: live-pulse 1.4s infinite;
}
#clearBtn {
  padding: 4px 6px;
  font-size: 12px;
}

/* 고정 공지 바 */
.pinned {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(var(--accent-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
  border-left: 3px solid var(--accent);
  font-size: 12.5px;
  color: var(--text-bright);
}
.pinned i { font-style: normal; font-size: 14px; }
.pinned span { flex: 1; min-width: 0; }

/* 메시지 스트림 */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg {
  padding: 5px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.5;
  animation: slidein 0.15s ease-out;
  word-break: break-word;
  color: #e5e7eb;
  transition: background 0.12s;
}
.msg:hover {
  background: rgba(255, 255, 255, 0.04);
}
.msg time {
  font-size: 11px;
  color: var(--dim);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Menlo, monospace;
}
.msg .badge {
  display: inline-block;
  margin-right: 4px;
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}
.msg .who {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.msg .who::after {
  content: ": ";
  color: var(--dim);
  font-weight: 400;
}
.msg .txt {
  color: #f3f4f6;
}

/* 내 채팅 */
.msg.me {
  background: rgba(var(--accent-rgb), 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.msg.me .who {
  color: var(--accent) !important;
}

/* 스쿱 후원 카드 (화려하고 주목도 높은 도네이션 스타일) */
.msg.cheese {
  background: linear-gradient(135deg, rgba(255, 197, 66, 0.18) 0%, rgba(255, 140, 0, 0.08) 100%);
  border: 1px solid rgba(255, 197, 66, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-md);
  margin: 6px 0;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(255, 197, 66, 0.12);
}
.msg.cheese .amt {
  display: block;
  color: #ffe082;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.msg.cheese .txt {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

/* 삭제된 메시지 */
.msg.deleted {
  color: var(--dim);
  font-style: italic;
}
.msg.deleted .who {
  color: var(--dim) !important;
}

/* 시스템 메시지 */
.msg.system {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  word-break: keep-all; /* 한국어가 단어 중간에서 끊기던 것(사장님 지적 2026-09-16: 성능 / 표시의 처럼 갈라짐) */
  margin: 4px 0;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--r-sm);
  line-height: 1.4;
}
.msg.system.join {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.16);
}
.msg.system.follow {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.09);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  font-weight: 600;
}
.msg.system.sub {
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  font-weight: 700;
}
.msg.system.event {
  color: #ffedd5;
  background: rgba(255, 197, 66, 0.12);
  border: 1px solid rgba(255, 197, 66, 0.3);
  font-weight: 700;
}

/* 채팅 입력창 */
.composer {
  position: relative;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer input {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.composer input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cheese-total {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cheese-total b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.composer-row .btn {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── 띄운 채팅 창 (PIP 및 미니 버블 모드 규칙) ─────── */
body.pip {
  margin: 0;
  background: var(--bg-2);
  overflow: hidden;
}
body.pip #gate,
body.pip .side,
body.pip .video-col {
  display: none !important;
}
body.pip .stage {
  display: block;
  min-height: 100vh;
}
body.pip .chat {
  display: flex !important;
  height: 100vh;
  width: 100%;
  position: static;
  border-left: 0;
  border-top: 0;
}
body.pip .chat-head {
  padding: 8px 42px 8px 10px;
}
body.pip .chat-head .tts:not(.mic),
body.pip #clearBtn {
  display: none;
}
body.pip .chat-head .pop {
  color: var(--accent);
  order: -1;
}
/* 띄운 채팅 창: 입력줄 위, 버튼줄 아래로 쌓는다(가로로 두면 좁은 창에서 입력칸이 사라지고 봇 검색이 잘림) */
body.pip .composer {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
}
body.pip .composer-input-row,
body.pip .composer input {
  min-width: 0;
  width: 100%;
}
body.pip .composer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* 띄운 창 아래 줄은 안 띄운 채팅창과 똑같이: 스쿱·시청자 왼쪽, 투표가 빈칸을 밀고, 봇 검색은 130px(사장님 요청 2026-09-16) */
body.pip .composer-row .bot-search-wrap {
  flex: 0 1 130px;
  min-width: 0;
}
body.pip .composer-row .bot-search {
  width: 100%;
  min-width: 0;
}

.pip-fold {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-3);
  color: var(--text-bright);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.pip-fold:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}

.pip-bubble { display: none; }
body.pip.mini {
  background: #141517 !important;
}
body.pip.mini .chat,
body.pip.mini .pip-fold,
body.pip.mini #desk {
  display: none !important;
}
body.pip.mini .pip-bubble {
  display: grid !important;
  place-content: center;
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 999;
}
body.pip.mini .pip-bubble span {
  position: relative;
  display: grid;
  place-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #252830;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-size: 0;
}
body.pip.mini .pip-bubble span::before {
  content: "";
  width: 26px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.pip.mini .pip-bubble:hover span {
  border-color: var(--accent);
}
.pip-bubble b {
  position: absolute;
  top: calc(50% - 32px);
  left: calc(50% + 14px);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--live);
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 8px rgba(255, 51, 75, 0.6);
}

/* ── 대시보드 뷰 ────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 12px 28px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.card:hover {
  border-color: var(--line-strong);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.card .lbl {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.card b {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
}
.card small {
  display: block;
  color: var(--dim);
  font-size: 11.5px;
  margin-top: 4px;
}

.panel {
  margin: 16px 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-bright);
}

/* ── 명예의 전당 ───────────────────────────────────────── */
.hall-panel { overflow: hidden; }
.hall-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.hall-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  word-break: keep-all;
}
.hall-item > div { min-width: 0; }
.hall-item b, .hall-item small { display: block; }
.hall-item b { color: var(--text-bright); font-size: 13px; line-height: 1.35; }
.hall-item small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.hall-mark { flex: none; color: var(--dim); font-size: 18px; }
.hall-item.achieved { border-color: rgba(255, 197, 66, 0.28); background: rgba(255, 197, 66, 0.055); }
.hall-item.achieved .hall-mark { color: #ffc542; }
.hall-item.locked { opacity: 0.56; filter: grayscale(0.55); }

/* 차트 */
.chart svg {
  width: 100%;
  height: 200px;
  display: block;
}
.chart .bar {
  fill: var(--accent);
  opacity: 0.85;
  transition: opacity 0.15s, fill 0.15s;
  rx: 3px;
}
.chart .bar:hover {
  opacity: 1;
  fill: var(--accent-hover);
}
.chart .dot {
  fill: var(--gold);
}
.chart .axis {
  fill: var(--dim);
  font-size: 10px;
  font-family: ui-monospace, Menlo, monospace;
}
.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.chart-empty {
  color: var(--dim);
  font-size: 13.5px;
  padding: 40px;
  text-align: center;
}

/* 방송 기록 테이블 */
.table-wrap {
  overflow-x: auto;
}
.streams {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.streams th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 11.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  letter-spacing: 0.02em;
}
.streams td {
  padding: 10px;
  border-bottom: 1px solid var(--line-subtle);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}
.streams td.t {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--text-bright);
}
.streams tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
.streams tbody tr:hover {
  background: var(--bg-3);
}

/* 세부 방송 내역 (.detail) */
.detail {
  margin: 16px 28px 32px;
  background: var(--bg-2);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.08);
}
.detail h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-bright);
}
.detail .when {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.detail .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.detail .grid div {
  background: var(--bg-3);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.detail .grid b {
  display: block;
  font-size: 20px;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.detail .events {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.detail .notice {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-bright);
}

/* 다시보기 댓글 */
.comments { margin-top: 18px; }
.comments h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
}
.comment {
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.comment .who {
  font-weight: 700;
  margin-right: 8px;
}

/* ── 랭킹 뷰 ────────────────────────────────────── */
.name-form {
  display: flex;
  gap: 10px;
}
.name-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-bright);
  outline: none;
}
.name-form input:focus {
  border-color: var(--accent);
}
.rank-table tr.me td {
  color: var(--accent);
  font-weight: 700;
  background: rgba(var(--accent-rgb), 0.05);
}

/* ── 알림 뷰 ────────────────────────────────────── */
.noti-list {
  padding: 12px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}
.noti {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.15s;
}
.noti:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.noti .ic {
  font-size: 20px;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: var(--bg-3);
}
.noti .tx {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.noti .tm {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.noti.sub {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06) 0%, var(--bg-2) 100%);
}
.noti.cheese {
  border-color: rgba(255, 197, 66, 0.35);
  background: linear-gradient(135deg, rgba(255, 197, 66, 0.08) 0%, var(--bg-2) 100%);
}
.chart-empty.noti-empty { padding: 48px; }
/* 알림 칸·지우기·AI봇 반응(2026-09-15) */
.noti-tabs { padding: 4px 28px 0; max-width: 760px; box-sizing: border-box; }
.noti { position: relative; }
.noti .noti-del { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: -4px -6px 0 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, border-color .15s; }
.noti .noti-del .ico { width: 14px; height: 14px; }
.noti:hover .noti-del, .noti .noti-del:focus-visible { opacity: 1; }
.noti .noti-del:hover { color: #ff8a98; border-color: rgba(255, 51, 75, .4); }
@media (hover: none) { .noti .noti-del { opacity: 1; } }
.noti-react { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.noti-likes { display: inline-flex; align-items: center; gap: 4px; color: #ff6b86; font-weight: 700; }
.noti-likes .ico { width: 13px; height: 13px; }
.noti-comments { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.noti-comments li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; word-break: keep-all; animation: notiIn .3s ease-out; }
.noti-comments .av { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; font-size: 11px; position: relative; }
.noti-comments .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.noti-comments b { flex: none; color: var(--text-bright); font-weight: 700; white-space: nowrap; }
.noti-comments span { color: var(--text); min-width: 0; }
@keyframes notiIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) { .noti-tabs { padding: 4px 16px 0; } }

/* ── 시청자들 뷰 ──────────────────────────────────── */
.hire {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hire-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.hire-row.on {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.hire-row .av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-content: center;
  font-weight: 800;
  color: #0b0d11;
  font-size: 15px;
}
.hire-who {
  flex: 1;
  min-width: 0;
}
.hire-who .nm {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-bright);
}
.hire-who .rl {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.pill-sub {
  font-size: 10.5px;
  color: var(--gold);
  border: 1px solid rgba(255, 197, 66, 0.4);
  background: rgba(255, 197, 66, 0.1);
  border-radius: var(--r-full);
  padding: 1px 7px;
  margin-left: 6px;
  font-weight: 600;
}

/* 시청자 카드 그리드 */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 12px 28px 36px;
}
.person {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  gap: 14px;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.person:hover {
  border-color: var(--accent);
  background: var(--bg-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.person:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.person .av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-content: center;
  font-weight: 800;
  color: #0b0d11;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.person .nm {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text-bright);
}
.person .rl {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}
.person .ds {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person .st {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.person .av, .pd-av, .hire-row .av {
  position: relative;
  overflow: hidden;
}
.person .av img, .pd-av img, .hire-row .av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 시청자 상세 모달 */
.person-box {
  width: min(580px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}
.pd-head {
  display: flex;
  gap: 18px;
  align-items: center;
}
.pd-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
}
.pd-av {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex: none;
  display: grid;
  place-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #0b0d11;
  box-shadow: var(--shadow-md);
}
.pd-text {
  margin: 8px 0 0;
  line-height: 1.7;
  color: #f3f4f6;
  font-size: 13.5px;
}
.person-box h4 {
  margin: 16px 0 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pd-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pd-chat {
  background: var(--bg-3);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.pd-chat b {
  margin-right: 8px;
  font-weight: 700;
}

/* ── 모달 및 다이얼로그 ─────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  place-content: center;
  z-index: 50;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: min(580px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #181b22;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-box h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-bright);
}
.modal-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.modal-box label small {
  color: var(--dim);
  font-weight: 400;
}
.modal-box input,
.modal-box select,
.modal-box textarea {
  background: #121419;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  outline: none;
  resize: vertical;
  height: 42px;
  font-size: 14px;
  color: var(--text-bright);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-box textarea {
  height: auto;
  min-height: 84px;
  line-height: 1.55;
}
.modal-box select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%239ca3af" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}
.modal-box input:focus,
.modal-box textarea:focus,
.modal-box select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

/* 방송 예고 리스트 */
.sched-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
}
.sched-row b {
  font-variant-numeric: tabular-nums;
  flex: none;
  color: var(--accent);
}
.sched-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

/* 브릿지 연동 상자 */
.bridge {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.bridge-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bridge-status.on {
  color: var(--accent);
}
.bridge-status.on::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.bridge-status.off {
  color: var(--gold);
}
.bridge-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.bridge-steps b { color: var(--text-bright); }
.bridge-cmd {
  margin: 8px 0;
  padding: 10px 12px;
  background: #080a0d;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #4ade80;
  white-space: pre;
  overflow-x: auto;
}

/* 휴방 날짜 체크박스 그리드 */
.rest-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.rest-day {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 10px;
  color: var(--text) !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rest-day:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}
.rest-day input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}

/* 모달 하단 버튼군 */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.modal-actions .btn,
.modal-actions button {
  min-height: 40px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* 방송 종료 요약 모달 (.summary) */
.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.summary div {
  background: var(--bg-3);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.summary b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.summary .wide {
  grid-column: 1 / -1;
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

/* 토스트 메시지 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #271a0c;
  color: #ffde9e;
  border: 1px solid rgba(255, 197, 66, 0.4);
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 60;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  animation: slidein 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 반응형 미디어 쿼리 ─────────────────────────── */

/* 1280px 이하: 데스크탑 여백 정돈 */
@media (max-width: 1280px) {
  .desk { grid-template-columns: 220px minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr) 330px; }
  .strip { margin: 10px 16px 12px; }
  .present { padding: 0 16px 16px; }
  .channel { padding: 14px 16px 10px; }
  .view-head, .cards, .people, .noti-list { padding-left: 20px; padding-right: 20px; }
  .panel, .detail { margin-left: 20px; margin-right: 20px; }
  .view { --view-gutter: 20px; }
}

/* 1024px 이하: 3열 너비 조정 및 버튼 크기 조율 */
@media (max-width: 1024px) {
  .desk { grid-template-columns: 200px minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr) 325px; }
  .side { padding: 14px 10px; }
  .cell { flex: 1 1 70px; padding: 8px 10px; }
  .cell b { font-size: 16px; }
  .chat-head { gap: 2px; padding: 8px 6px; }
  .chat-head button { padding: 4px 5px; font-size: 11px; }
  .chat-head > span { font-size: 13px; }
}

/* 960px 이하: 사이드바 상단 바 배치 및 무대/채팅 스택 */
@media (max-width: 960px) {
  .desk { grid-template-columns: 1fr; }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
  }
  .side .brand {
    container-type: normal;
    flex: 1 1 auto;
    border-bottom: 0;
    padding: 0;
  }
  .side .logo-name { font-size: 17px; }
  .menu {
    flex-direction: row;
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding: 4px 0;
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu-item {
    flex: none;
    white-space: nowrap;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
  }
  .menu-item.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }
  .side-card { display: none; }
  .side-logout {
    margin-left: 0;
    margin-top: 0;
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    min-width: 0;
    box-sizing: border-box;
  }
  #schedBtn { margin-top: 0; }
  .side-user { display: none; }

  .stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .chat {
    height: 65vh;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* 768px 이하 */
@media (max-width: 768px) {
  .view-head, .cards, .people, .noti-list { padding-left: 16px; padding-right: 16px; }
  .panel, .detail { margin-left: 16px; margin-right: 16px; padding: 16px; }
  .view { --view-gutter: 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: 1fr; }
}

/* 560px 이하: 모바일 최적화 */
@media (max-width: 560px) {
  .channel {
    padding: 12px 14px 10px;
    gap: 10px;
  }
  .channel-body {
    flex-wrap: wrap;
    gap: 12px;
  }
  .channel-left {
    flex: 1 1 100%;
  }
  .channel-right {
    flex: 1 1 100%;
    align-items: flex-end;
  }
  .actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  .overlay-top {
    padding: 8px 10px 0;
    gap: 5px;
    flex-wrap: wrap;
  }
  .overlay-top > span {
    padding: 3px 8px;
    font-size: 11px;
  }
  .strip {
    margin: 8px 14px 12px;
    gap: 6px;
  }
  .cell {
    flex: 1 1 70px;
    padding: 8px 10px;
  }
  .cell.ctl {
    min-width: 110px;
  }
  .present { padding: 0 14px 16px; }
  .cards { grid-template-columns: 1fr; }
  .hall-list { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-box { padding: 20px 18px; }
  .modal-actions .btn,
  .modal-actions button { flex: 1 1 auto; }
  .rest-days { grid-template-columns: repeat(3, 1fr); }
  .menu {
    gap: 4px;
    padding: 2px 0;
  }
  .menu-item {
    padding: 8px 10px;
    font-size: 12.5px;
    gap: 6px;
    min-height: 40px;
    box-sizing: border-box;
  }
}

/* 400px 이하 및 초소형 화면 */
@media (max-width: 400px) {
  .side .logo-name { font-size: 15px; }
  .side-logout { font-size: 12px; padding: 8px 10px; min-height: 40px; box-sizing: border-box; }
  .channel { padding: 10px 12px 8px; gap: 8px; }
  .channel-title { font-size: 16px; }
  .channel-live { font-size: 12px; gap: 6px; }
  .channel-live #catShow { font-size: 11px; padding: 1px 6px; max-width: 120px; }
  .ch-live-stats { font-size: 12px; }
  .avatar-wrap { width: 48px; height: 48px; }
  .avatar-me { width: 48px; height: 48px; font-size: 17px; }
  .title { font-size: 16px; }
  .btn { padding: 8px 12px; font-size: 13px; min-height: 40px; box-sizing: border-box; }
  #startBtn { padding: 9px 14px; font-size: 13.5px; min-height: 42px; box-sizing: border-box; }
  .strip { margin: 8px 12px 10px; }
  .cell b { font-size: 16px; }
  .cell.ctl select, .cell.ctl button { height: 40px; min-height: 40px; font-size: 13px; box-sizing: border-box; }
  .present { padding: 0 12px 14px; }
  .chat-head button { font-size: 11px; padding: 6px 7px; min-height: 38px; box-sizing: border-box; }
  .composer { padding: 8px 10px; }
  .modal-box { padding: 18px 14px; }
}

/* 창 높이가 낮을 때 (~700px 이하) 사이드바 스크롤 보장 */
@media (max-height: 720px) {
  .side {
    gap: 8px;
    padding: 12px 10px;
  }
  .side-card { padding: 8px 10px; }
  .side-row { padding: 2px 0; }
  .side-card.tip { display: none; }
  .menu-item { padding: 7px 10px; }
  .side-logout { padding: 6px 10px; }
}

/* ── 푸터 · 약관 링크 · 방송 일차 · 채널 삭제 ─────────────────── */
.app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.app-footer nav, .side-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.app-footer a, .side-legal a { color: var(--muted); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; padding: 4px 6px; box-sizing: border-box; }
.app-footer a:hover, .side-legal a:hover { color: var(--text); text-decoration: underline; }
.side-legal { font-size: 11px; padding: 2px 4px 0; }
.overlay-top > .day-tag { color: var(--accent); font-weight: 700; white-space: nowrap; }
.btn.danger { background: transparent; color: var(--live); border: 1px solid rgba(255, 51, 75, 0.45); white-space: nowrap; }
.btn.danger:hover { background: rgba(255, 51, 75, 0.12); }
/* 960px 이하: 사이드바가 위쪽 바로 접히면 약관 줄은 메뉴 밑이 아니라 화면 맨 아래(desk-legal)로 */
.desk-legal { display: none; }
@media (max-width: 960px) {
  .side-legal { display: none; }
  .desk-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-top: auto; padding: 8px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; }
  .desk-legal a { color: var(--muted); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; padding: 4px 6px; box-sizing: border-box; }
  .desk-legal a:hover { color: var(--text); text-decoration: underline; }
}

/* ── 첫 화면 방송 닉네임 ─────────────────────────── */
.gate-nick { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #333d4b; }
.gate-nick small { font-weight: 400; color: #8b95a1; margin-left: 6px; }
.gate-nick input { height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid #e5e8eb; background: #fff; color: #191f28; font-size: 15px; outline: none; transition: border-color 0.15s; }
.gate-nick input::placeholder { color: #b0b8c1; }
.gate-nick input:focus { border-color: #14161a; box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.08); }

/* 캡처 주기 설명 */
.cell.ctl .cell-help { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45; color: var(--dim); white-space: normal; }

/* 마이크 전사: 채팅 입력칸 위 자막 */
.mic-caption { display: flex; gap: 8px; align-items: baseline; margin: 0 10px 8px; padding: 8px 12px; border-radius: var(--r-md);
  background: var(--accent-dim); border: 1px solid var(--accent-border); font-size: 13px; line-height: 1.5; color: var(--text); }
.mic-caption b { flex: none; font-size: 11.5px; color: var(--accent); white-space: nowrap; }
.mic-caption span { min-width: 0; overflow-wrap: break-word; }
.mic-caption span.interim { color: var(--muted); }

/* 방송 예고: 브라우저 기본 달력 대신 날짜 칩 + 시·분 */
.sched-pick { display: flex; flex-direction: column; gap: 8px; }
.sched-pick-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.sched-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sched-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; font: inherit; line-height: 1.2; min-width: 0; }
.sched-day small { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.sched-day b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sched-day:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.sched-day.weekend small { color: var(--heart); }
.sched-day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.sched-day[aria-pressed="true"] small { color: var(--accent); }
.sched-time { display: flex; align-items: center; gap: 6px; }
.sched-time select { width: auto; min-width: 84px; }
.sched-time span { color: var(--muted); font-size: 13px; }
.sched-when { margin: 0; font-size: 13px; color: var(--accent); }
.sched-when.warn { color: var(--gold); }
@media (max-width: 420px) { .sched-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* 모달 상자가 화면 밖으로 넘치지 않게 */
.modal {
  padding: clamp(10px, 2.5vw, 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-box {
  width: min(560px, calc(100vw - 24px));
  max-width: 100%;
  max-height: min(92dvh, calc(100dvh - 24px));
  overflow-y: auto;
  min-width: 0;
  box-sizing: border-box;
}
.modal-box * { min-width: 0; }


/* ── 프로필 테두리 ───────────────────────────────── */
.avatar-wrap {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  animation: frame-pulse 3s ease-in-out infinite;
}
@keyframes frame-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.25)); }
  50% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.5)); }
}
.frame-fx-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
/* 링(webp) 대비 와이드 캔버스 비율: 156/218 (약 0.7156, frame-fx.js WIDE_RING_RATIO 와 일치) */
.frame-fx-canvas.fx-wide {
  width: 210%;
  height: 210%;
}
.item-thumb-box .frame-fx-canvas {
  width: 100%;
  height: 100%;
}
.item-thumb-box .frame-fx-canvas.fx-wide {
  width: 140%;
  height: 140%;
}
/* 방송실 56px 아바타: 테두리 그림 안쪽 투명 원(지름의 66.5%)이 얼굴(반지름 28px)보다 1px 크게 156% */
.avatar-wrap .avatar-frame,
.avatar-wrap .frame-fx-canvas {
  width: 156%;
  height: 156%;
}
.avatar-wrap .frame-fx-canvas.fx-wide {
  width: 218%;
  height: 218%;
}


/* ── 채팅 뱃지 및 열혈 뱃지 ─────────────────────── */
.chip-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  margin-right: 5px;
  vertical-align: middle;
  line-height: 1.3;
  white-space: nowrap;
}
.chip-badge.chip-fan {
  background: rgba(255, 197, 66, 0.18);
  color: var(--gold);
  border: 1px solid rgba(255, 197, 66, 0.4);
}
.chip-badge.chip-fan-top {
  background: linear-gradient(135deg, rgba(255, 197, 66, 0.35), rgba(255, 138, 61, 0.3));
  border-color: rgba(255, 197, 66, 0.75);
  color: #ffe08a;
}
.chip-badge.chip-sub {
  background: rgba(177, 151, 252, 0.16);
  color: #c9b6ff;
  border: 1px solid rgba(177, 151, 252, 0.45);
}
.chip-badge.chip-sub .ico { width: 10px; height: 10px; vertical-align: -1px; }
.sub-months { font-size: 11px; color: #c9b6ff; margin-right: 5px; vertical-align: middle; white-space: nowrap; }
.chip-badge.chip-host {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}
.msg.system.fan {
  color: var(--gold);
  font-weight: 600;
}

/* ── 채널 이모티콘 ───────────────────────────────── */
.emote {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  margin: 0 2px;
  display: inline-block;
  object-fit: contain;
}
.emote.emote-big, .txt-emote-only .emote {
  width: 28px;
  height: 28px;
  vertical-align: -6px;
}
.txt-emote-only {
  font-size: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.composer-input-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
/* 입력칸+이모티콘을 한 덩어리로, 보내기 버튼은 그 오른쪽 */
.composer-input-wrap { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.composer-input-row > .composer-send { flex: none; padding: 0 16px; font-size: 13px; white-space: nowrap; }
.composer-row .poll-btn { white-space: nowrap; gap: 4px; }
.composer-input-row input {
  width: 100%;
  padding-right: 38px;
}
.emote-toggle-btn {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  line-height: 1;
  transition: transform 0.15s;
}
.emote-toggle-btn:hover {
  transform: scale(1.15);
}
.emote-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 12px;
  width: 290px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.emote-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-bright);
}
.emote-picker-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
}
.emote-picker-close:hover {
  color: var(--text-bright);
}
.emote-picker-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
  max-height: 220px;
}
.emote-pick-btn {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.emote-pick-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.emote-pick-btn img {
  width: 30px;
  height: 30px;
  pointer-events: none;
}
.emote-pick-name {
  font-size: 10px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emote-sub-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8.5px;
  font-weight: 700;
  background: var(--purple);
  color: #fff;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.2;
}

/* ── 열혈시청자 패널 ───────────────────────────────── */
.fans-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fans-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fan-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s;
}
.fan-row:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}
.fan-rank {
  flex: none;
  font-weight: 800;
  font-size: 15px;
  width: 28px;
  text-align: center;
}
.fan-row.rank-1 .fan-rank { color: var(--gold); }
.fan-row.rank-1 { border-color: rgba(255, 197, 66, 0.4); background: rgba(255, 197, 66, 0.05); }
.fan-row.rank-2 .fan-rank { color: #d0d7de; }
.fan-row.rank-2 { border-color: rgba(208, 215, 222, 0.35); }
.fan-row.rank-3 .fan-rank { color: #cd7f32; }
.fan-row.rank-3 { border-color: rgba(205, 127, 50, 0.3); }
.fan-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fan-who .nm {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-bright);
}
.fan-who .rl {
  font-size: 12px;
  color: var(--muted);
}
.fan-stats {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.fan-stats b {
  color: var(--text-bright);
}
.fan-cheese {
  color: var(--gold) !important;
  font-weight: 700;
}

/* ── 꾸미기 뷰 ───────────────────────────────────── */
.items-view-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  margin-top: 16px;
}
.items-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.items-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.items-cat-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.items-cat-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--line-strong);
}
.items-cat-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 700;
}
.items-wallet-card {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wallet-balance-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
}
.wallet-balance-row small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.items-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.15s;
}
.item-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}
.item-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25);
}
.item-card.equipped-active {
  border-color: var(--gold);
}

.item-thumb-box {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.item-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.item-color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
}
.item-badge-chip {
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.item-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.item-card-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
  line-height: 1.2;
}
.item-card-status.equipped {
  background: rgba(255, 197, 66, 0.2);
  color: var(--gold);
}
.item-card-status.owned {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}
.item-card-status.locked {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.item-rarity-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.rarity-일반 { background: #373a40; color: #ced4da; }
.rarity-희귀 { background: #1971c2; color: #a5d8ff; }
.rarity-영웅 { background: #6741d9; color: #d0bfff; }
.rarity-전설 { background: #d97706; color: #fff3bf; }

.badge-rarity-일반 {
  background: rgba(var(--accent-rgb), 0.1);
  color: color-mix(in srgb, var(--accent) 72%, var(--text-bright));
  border-color: rgba(var(--accent-rgb), 0.26);
}
.badge-rarity-희귀 {
  background: rgba(68, 156, 255, 0.18);
  color: #a9d5ff;
  border-color: rgba(91, 173, 255, 0.5);
}
.badge-rarity-영웅 {
  background: rgba(157, 99, 255, 0.2);
  color: #d8c2ff;
  border-color: rgba(177, 128, 255, 0.52);
}
.badge-rarity-전설 {
  color: #ffe08a;
  border-color: rgba(255, 197, 66, 0.62);
  background: linear-gradient(105deg, rgba(255, 183, 38, 0.15) 20%, rgba(255, 234, 166, 0.34) 45%, rgba(255, 183, 38, 0.15) 70%);
  background-size: 220% 100%;
  animation: badge-legend-shine 4s ease-in-out infinite;
}
.chip-badge.badge-rarity-희귀 { background: rgba(68, 156, 255, 0.18); color: #a9d5ff; border-color: rgba(91, 173, 255, 0.5); }
.chip-badge.badge-rarity-영웅 { background: rgba(157, 99, 255, 0.2); color: #d8c2ff; border-color: rgba(177, 128, 255, 0.52); }
.chip-badge.badge-rarity-전설 {
  color: #ffe08a;
  border-color: rgba(255, 197, 66, 0.62);
  background: linear-gradient(105deg, rgba(255, 183, 38, 0.15) 20%, rgba(255, 234, 166, 0.34) 45%, rgba(255, 183, 38, 0.15) 70%);
  background-size: 220% 100%;
}
@keyframes badge-legend-shine {
  0%, 65%, 100% { background-position: 100% 0; box-shadow: none; }
  78% { background-position: 0 0; box-shadow: 0 0 6px rgba(255, 197, 66, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .badge-rarity-전설 { animation: none; }
}

/* 아이템 fx는 채팅, 상점 칩, 미리보기에서 같은 클래스를 쓴다. JS 반복 없이 합성 싼 애니메이션만 사용한다. */
.item-badge-chip,
.preview-badge,
.chip-badge {
  --badge-a: #8df7d1;
  --badge-b: #35d6ff;
  --badge-glow: rgba(83, 235, 202, .5);
  position: relative;
  isolation: isolate;
  white-space: nowrap;
  max-width: 100%;
}
.item-badge-chip::before,
.item-badge-chip::after,
.preview-badge::before,
.preview-badge::after,
.chip-badge::before,
.chip-badge::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}
.item-badge-chip::before,
.preview-badge::before,
.chip-badge::before { inset: -2px; z-index: -1; }
.item-badge-chip::after,
.preview-badge::after,
.chip-badge::after { z-index: -1; }
/* 장식 레이어는 모두 글자 뒤(z-index -1, isolation 안). 칩 안쪽을 채우는 효과는 테두리 고리와 바깥으로만 보이게 가운데를 마스크로 뺀다. */

/* 일반: 테마별 색만 다른 부드러운 발광 */
.badge-fx-soft-pulse { --badge-a: #75e8c3; animation: badge-soft-pulse 3.4s ease-in-out infinite; }
.badge-fx-soft-grow { --badge-a: #8ee87a; --badge-glow: rgba(105, 220, 101, .44); animation: badge-soft-grow 3.8s ease-in-out infinite; }
.badge-fx-soft-moon { --badge-a: #a9b7ff; --badge-glow: rgba(127, 145, 255, .42); animation: badge-soft-moon 4.2s ease-in-out infinite; }
.badge-fx-fire { --badge-a: #ff9b42; --badge-b: #ffd166; --badge-glow: rgba(255, 111, 32, .48); animation: badge-soft-fire 3s ease-in-out infinite; }
@keyframes badge-soft-pulse { 50% { box-shadow: 0 0 7px var(--badge-glow); } }
@keyframes badge-soft-grow { 50% { box-shadow: 0 0 8px var(--badge-glow); transform: translateY(-.5px); } }
@keyframes badge-soft-moon { 42% { box-shadow: 0 0 8px var(--badge-glow); opacity: .9; } }
@keyframes badge-soft-fire { 48% { box-shadow: 0 -2px 8px var(--badge-glow); } }

/* 희귀: 스위프, 색 호흡, 작은 테마 실루엣 */
.badge-fx-code-breathe { --badge-a: #55e6c1; --badge-b: #39a8ff; animation: badge-breathe 3.2s ease-in-out infinite; }
.badge-fx-pixel-glitch { --badge-a: #6df7e7; --badge-b: #ff5bd6; animation: badge-pixel-flicker 2.8s steps(6, end) infinite; }
.badge-fx-steam { --badge-a: #e6d1b2; --badge-b: #8bd7ff; animation: badge-breathe 3.8s ease-in-out infinite; }
.badge-fx-steam::after { content: '≋'; left: 50%; top: -8px; color: #d9f4ff; font-size: 8px; opacity: .65; animation: badge-steam 2.6s ease-out infinite; }
.badge-fx-rainbow-glitch { --badge-a: #ff75c8; --badge-b: #70e8ff; background-image: linear-gradient(105deg, rgba(255,81,190,.2), rgba(64,228,255,.2), rgba(255,225,88,.16)); background-size: 220% 100%; animation: badge-rainbow-glitch 3.1s steps(8, end) infinite; }
.badge-fx-confetti { --badge-a: #ff7bad; --badge-b: #ffd45f; animation: badge-shine 3.3s ease-in-out infinite; }
.badge-fx-confetti::after { content: '•  •'; inset: -7px 3px auto; color: #70e8ff; font-size: 8px; letter-spacing: 8px; animation: badge-confetti 2.8s steps(4, end) infinite; }
.badge-fx-pixel-cat { --badge-a: #ff9ed2; --badge-b: #7ee7ff; animation: badge-pixel-flicker 2.5s steps(5, end) infinite; }
.badge-fx-cat-ears { --badge-a: #ffb58e; --badge-b: #ffc8df; animation: badge-breathe 3.6s ease-in-out infinite; }
.badge-fx-cat-ears::after { content: '▲     ▲'; inset: -7px 2px auto; color: #ffba99; font-size: 6px; animation: badge-cat-ears 2.4s ease-in-out infinite; }
@keyframes badge-breathe { 50% { border-color: var(--badge-a); box-shadow: 0 0 9px var(--badge-glow); } }
@keyframes badge-shine { 0%, 60%, 100% { background-position: 130% 0; } 78% { background-position: -30% 0; box-shadow: 0 0 8px var(--badge-glow); } }
@keyframes badge-steam { 0% { transform: translate(-50%, 3px) scaleX(.7); opacity: 0; } 45% { opacity: .75; } 100% { transform: translate(-45%, -5px) scaleX(1.15); opacity: 0; } }
@keyframes badge-rainbow-glitch { 0%, 100% { background-position: 0 0; } 48% { transform: translateX(0); } 50% { transform: translateX(1px); background-position: 100% 0; } 54% { transform: translateX(-1px); } }
@keyframes badge-pixel-flicker { 0%, 84%, 100% { box-shadow: 2px 0 0 var(--badge-a), -2px 0 0 var(--badge-b); } 88% { box-shadow: -1px -1px 0 var(--badge-b), 2px 1px 0 var(--badge-a); } }
@keyframes badge-confetti { 0%, 70%, 100% { transform: translateY(2px) scale(.7); opacity: 0; } 76% { opacity: 1; } 90% { transform: translateY(-3px) scale(1); opacity: 0; } }
@keyframes badge-cat-ears { 50% { transform: translateY(-1px) rotate(-2deg); } }

/* 영웅: 회전 림과 8비트 단계 움직임 */
.badge-fx-moon-pulse { --badge-a: #7986ff; --badge-b: #d18cff; animation: badge-hero-breathe 3.2s ease-in-out infinite; }
.badge-fx-rocket-fire { --badge-a: #ff5c42; --badge-b: #ffd65a; animation: badge-rocket 2.6s ease-in-out infinite; }
.badge-fx-golden-breathe { --badge-a: #ffe179; --badge-b: #d89325; animation: badge-hero-breathe 3s ease-in-out infinite; }
.badge-fx-pixel-motion,
.badge-fx-pixel-hero { --badge-a: #73f2ff; --badge-b: #ff67c8; animation: badge-pixel-border 1.9s steps(6, end) infinite; }
.badge-fx-sakura-flow { --badge-a: #ff8fc7; --badge-b: #ffd6ea; background-image: linear-gradient(105deg, rgba(255,83,165,.14), rgba(255,220,239,.34), rgba(255,83,165,.14)); background-size: 230% 100%; animation: badge-sakura 3.2s linear infinite; }
.badge-fx-sakura-flow::after { width: 5px; height: 4px; right: 7px; top: -4px; background: #ff9dcb; border-radius: 80% 20% 70% 30%; animation: badge-petal 2.7s ease-in infinite; }
.badge-fx-cyberpunk { --badge-a: #00f5ff; --badge-b: #ff37d1; animation: badge-cyber 2.2s steps(7, end) infinite; }
.badge-fx-cyberpunk::after { inset: 45% -1px auto; height: 1px; background: rgba(255,255,255,.75); animation: badge-scan 1.8s linear infinite; }
/* 얼음 여왕: 글래시얼 티아라 서리 안개 + 혹한 서리 빔 테두리 + 6각 눈꽃 결정 사파이어 스파클 */
.badge-fx-ice-queen {
  overflow: visible;
  --badge-a: #e0f2fe;
  --badge-b: #38bdf8;
  --badge-glow: rgba(56, 189, 248, 0.85);
  color: #f0f9ff;
  background-color: rgba(4, 18, 36, 0.94);
  background-image: linear-gradient(110deg, rgba(56, 189, 248, 0.38), rgba(224, 242, 254, 0.48), rgba(255, 255, 255, 0.55), rgba(56, 189, 248, 0.38));
  background-size: 200% 100%;
  border: 1px solid #7dd3fc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.75), inset 0 0 6px rgba(224, 242, 254, 0.55);
  animation: badge-queen-shine 2.6s ease-in-out infinite;
}
.badge-fx-ice-queen::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #7dd3fc 35%, #ffffff 50%, #38bdf8 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-queen-beam 3.0s linear infinite;
}
.badge-fx-ice-queen::after {
  content: "✶";
  position: absolute;
  right: -5px;
  top: -7px;
  color: #e0f2fe;
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 0 8px #38bdf8, 0 0 14px #ffffff, -8px 7px 0 rgba(125, 211, 252, 0.8);
  pointer-events: none;
  animation: badge-queen-sparkle 2.2s ease-in-out infinite;
}
@keyframes badge-queen-shine {
  0%, 100% { background-position: 120% 0; filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.6)); }
  50% { background-position: -60% 0; filter: brightness(1.3) drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #38bdf8); }
}
@keyframes badge-queen-beam { to { transform: rotate(360deg); } }
@keyframes badge-queen-sparkle {
  0%, 100% { transform: rotate(0deg) scale(0.9); opacity: 0.8; }
  50% { transform: rotate(90deg) scale(1.35); opacity: 1; filter: brightness(1.6); }
}
/* 황금 제왕: 황실 제국관 보주 빛무리 + 전도 황금 빔 테두리 + 루비/에메랄드 다중 스파클 */
.badge-fx-gold-emperor {
  overflow: visible;
  --badge-a: #fff1a6;
  --badge-b: #f59e0b;
  --badge-glow: rgba(245, 158, 11, 0.85);
  color: #fffbeb;
  background-color: rgba(36, 22, 4, 0.94);
  background-image: linear-gradient(110deg, rgba(245, 158, 11, 0.38), rgba(255, 244, 164, 0.48), rgba(255, 255, 255, 0.45), rgba(245, 158, 11, 0.38));
  background-size: 200% 100%;
  border: 1px solid #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.75), inset 0 0 6px rgba(255, 244, 164, 0.55);
  animation: badge-emperor-shine 2.6s ease-in-out infinite;
}
.badge-fx-gold-emperor::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #fde047 35%, #ffffff 50%, #f59e0b 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-emperor-beam 3.0s linear infinite;
}
.badge-fx-gold-emperor::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  right: -4px;
  top: -4px;
  background: #ff496c;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff496c, 0 0 14px #fbbf24, -6px 5px 0 1px #10b981, -12px 10px 0 0.5px #fde047;
  pointer-events: none;
  animation: badge-emperor-sparkle 1.8s ease-out infinite;
}
@keyframes badge-emperor-shine {
  0%, 100% { background-position: 120% 0; filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.6)); }
  50% { background-position: -60% 0; filter: brightness(1.25) drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #f59e0b); }
}
@keyframes badge-emperor-beam { to { transform: rotate(360deg); } }
@keyframes badge-emperor-sparkle {
  0%, 100% { opacity: 0.8; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); filter: brightness(1.5); }
}
.badge-fx-pixel-motion::before,
.badge-fx-pixel-hero::before,
.badge-fx-cyberpunk::before {
  inset: -3px;
  padding: 3px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.badge-fx-pixel-motion::before,
.badge-fx-pixel-hero::before,
.badge-fx-cyberpunk::before {
  background: repeating-conic-gradient(from 45deg, var(--badge-a) 0 8deg, transparent 8deg 18deg, var(--badge-b) 18deg 26deg, transparent 26deg 45deg);
  opacity: .75;
}
@keyframes badge-hero-breathe { 50% { box-shadow: 0 0 10px var(--badge-glow); border-color: var(--badge-a); transform: translateY(-.5px); } }
@keyframes badge-rocket { 50% { box-shadow: -5px 0 8px rgba(255,91,41,.5), 0 0 5px #ffd65a; transform: translateX(.5px); } }
@keyframes badge-pixel-border { 50% { filter: hue-rotate(45deg); transform: translateY(-1px); } }
@keyframes badge-sakura { to { background-position: -230% 0; } }
@keyframes badge-petal { 0% { transform: translate(-9px, -2px) rotate(0); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(8px, 10px) rotate(170deg); opacity: 0; } }
@keyframes badge-cyber { 0%, 86%, 100% { transform: translate(0); text-shadow: 0 0 4px rgba(0,245,255,.55); } 89% { transform: translateX(1px); text-shadow: 1px 0 #ff37d1, -1px 0 #00f5ff; } 92% { transform: translateX(-1px); filter: brightness(1.5); } }
@keyframes badge-scan { from { transform: translateY(-5px); opacity: 0; } 30% { opacity: .8; } to { transform: translateY(5px); opacity: 0; } }
@keyframes badge-frost { 50% { box-shadow: 0 0 11px rgba(116,218,255,.55), inset 0 0 5px rgba(224,252,255,.3); } }
@keyframes badge-sparkle { 50% { transform: rotate(90deg) scale(1.35); opacity: .35; } }
@keyframes badge-gold-emperor { 0%, 100% { background-position: 120% 0; } 58% { background-position: -60% 0; box-shadow: 0 0 10px rgba(255,202,70,.5); } }
@keyframes badge-gem { 50% { transform: scale(1.5); filter: brightness(1.6); } }

/* 전설: 빛의 림, 꿈틀이, 불꽃과 궤도 효과 */
.badge-fx-rainbow-holo { --badge-a: #6dfff1; --badge-b: #ff62c7; background-image: linear-gradient(105deg, rgba(49,235,255,.25), rgba(255,84,197,.3), rgba(255,225,77,.3), rgba(49,235,255,.25)); background-size: 240% 100%; animation: badge-holo 3s linear infinite; }
.badge-fx-spotlight { --badge-a: #fff3b0; --badge-b: #ffb52e; background-image: linear-gradient(108deg, transparent 28%, rgba(255,255,255,.58) 48%, transparent 67%); background-size: 260% 100%; animation: badge-spotlight 2.8s ease-in-out infinite; }
.badge-fx-golden-vortex,
.badge-fx-azure-swirl { animation: badge-vortex 3.2s linear infinite; }
.badge-fx-golden-vortex { --badge-a: #fff09a; --badge-b: #e79c22; }
.badge-fx-azure-swirl { --badge-a: #65f5ff; --badge-b: #2474ff; --badge-glow: rgba(45,173,255,.65); }
.badge-fx-golden-vortex::before,
.badge-fx-azure-swirl::before {
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 18%, var(--badge-a) 25%, transparent 34% 64%, var(--badge-b) 72%, transparent 82%);
  box-shadow: 0 0 9px var(--badge-glow);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.badge-fx-galaxy {
  overflow: visible;
  --badge-a: #f0abfc;
  --badge-b: #38bdf8;
  --badge-glow: rgba(192, 132, 252, 0.85);
  color: #faf5ff;
  background-color: rgba(16, 8, 32, 0.94);
  background-image: linear-gradient(110deg, rgba(192, 132, 252, 0.35), rgba(56, 189, 248, 0.45), rgba(253, 224, 71, 0.40), rgba(192, 132, 252, 0.35));
  background-size: 200% 100%;
  border: 1px solid #c084fc;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.75), inset 0 0 6px rgba(56, 189, 248, 0.55);
  animation: badge-galaxy-shine 2.6s ease-in-out infinite;
}
.badge-fx-galaxy::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #c084fc 35%, #ffffff 50%, #38bdf8 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-galaxy-beam 3.2s linear infinite;
}
.badge-fx-galaxy::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  right: -5px;
  top: -4px;
  background: #ffffff;
  box-shadow: 0 0 8px #fde047, 0 0 14px #38bdf8, -6px 5px 0 1px #c084fc, -12px 10px 0 0.5px #fde047;
  pointer-events: none;
  animation: badge-galaxy-orbit 2.4s linear infinite;
}

.badge-fx-electric {
  overflow: visible;
  --badge-a: #fef08a;
  --badge-b: #00f0ff;
  --badge-glow: rgba(0, 240, 255, 0.85);
  color: #fffbeb;
  background-color: rgba(6, 16, 28, 0.94);
  background-image: linear-gradient(110deg, rgba(0, 240, 255, 0.35), rgba(254, 240, 138, 0.50), rgba(255, 255, 255, 0.45), rgba(0, 240, 255, 0.35));
  background-size: 200% 100%;
  border: 1px solid #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.75), inset 0 0 6px rgba(254, 240, 138, 0.55);
  animation: badge-electric-shine 2.4s ease-in-out infinite;
}
.badge-fx-electric::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #00f0ff 35%, #ffffff 50%, #fef08a 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-electric-beam 3.0s linear infinite;
}
.badge-fx-electric::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  right: -5px;
  top: -4px;
  background: #ffffff;
  box-shadow: 0 0 8px #00f0ff, 0 0 14px #fef08a, -6px 5px 0 1px #00f0ff, -12px 10px 0 0.5px #fef08a;
  pointer-events: none;
  animation: badge-electric-sparkle 1.8s steps(5, end) infinite;
}
.badge-fx-black-hole {
  overflow: visible;
  --badge-a: #fff3d0;
  --badge-b: #ff5a1f;
  --badge-glow: rgba(255, 90, 31, 0.85);
  color: #fff3d0;
  background-color: rgba(10, 2, 20, 0.94);
  background-image: linear-gradient(110deg, rgba(179, 136, 255, 0.35), rgba(255, 90, 31, 0.50), rgba(255, 243, 208, 0.40), rgba(179, 136, 255, 0.35));
  background-size: 200% 100%;
  border: 1px solid #ff5a1f;
  box-shadow: 0 0 10px rgba(255, 90, 31, 0.7), inset 0 0 6px rgba(179, 136, 255, 0.55);
  animation: badge-black-hole-shine 2.5s ease-in-out infinite;
}
.badge-fx-black-hole::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #ff5a1f 35%, #fff3d0 50%, #b388ff 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(179, 136, 255, 0.75);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-black-hole-runes 3.6s linear infinite, badge-black-hole-flash 2.8s ease-in-out infinite;
}
.badge-fx-black-hole::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  right: -5px;
  top: -4px;
  background: #fff3d0;
  box-shadow: 0 0 8px #ff5a1f, 0 0 14px #b388ff, -6px 5px 0 1px #ff9233, -12px 10px 0 0.5px #b388ff;
  pointer-events: none;
  animation: badge-black-hole-singularity 2.2s ease-in-out infinite;
}
.badge-fx-frost { --badge-a: #dffeff; --badge-b: #70d9ff; animation: badge-frost 2.8s ease-in-out infinite; }
.badge-fx-frost::after { content: '✶'; right: -4px; top: -6px; color: white; font-size: 8px; animation: badge-sparkle 2s ease-in-out infinite; }
.badge-fx-rocket-fire { overflow: visible; }
.badge-fx-fire::before,
.badge-fx-rocket-fire::before {
  inset: -7px -2px -2px;
  background: radial-gradient(ellipse at 18% 100%, var(--badge-b) 0 20%, transparent 45%), radial-gradient(ellipse at 48% 100%, var(--badge-a) 0 18%, transparent 47%), radial-gradient(ellipse at 78% 100%, var(--badge-b) 0 20%, transparent 45%);
  padding: 7px 2px 2px;
  -webkit-mask: linear-gradient(to top, #000 0 55%, transparent 100%), linear-gradient(#000 0 0) content-box;
  -webkit-mask-composite: source-out;
  mask: linear-gradient(to top, #000 0 55%, transparent 100%), linear-gradient(#000 0 0) content-box;
  mask-composite: subtract;
  mask: linear-gradient(to top, #000 0 55%, transparent 100%) subtract, linear-gradient(#000 0 0) content-box;
  opacity: .72;
}

.badge-fx-phoenix {
  overflow: visible;
  --badge-a: #fffbeb;
  --badge-b: #ff3b20;
  --badge-glow: rgba(255, 64, 26, 0.9);
  color: #fffbeb;
  background-color: rgba(30, 8, 4, 0.94);
  background-image: linear-gradient(110deg, rgba(255, 106, 61, 0.35), rgba(255, 201, 77, 0.50), rgba(255, 251, 235, 0.40), rgba(255, 106, 61, 0.35));
  background-size: 200% 100%;
  border: 1px solid #ff4f5e;
  box-shadow: 0 0 10px rgba(255, 79, 94, 0.75), inset 0 0 6px rgba(255, 201, 77, 0.55);
  animation: badge-phoenix-shine 2.4s ease-in-out infinite;
}
.badge-fx-phoenix::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #ff3b20 35%, #fffbeb 50%, #fde047 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(255, 106, 61, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-phoenix-beam 3.2s linear infinite;
}
.badge-fx-phoenix::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  right: -5px;
  top: -4px;
  background: #fffbeb;
  box-shadow: 0 0 8px #ff3b20, 0 0 14px #fde047, -6px 5px 0 1px #ff6a3d, -12px 10px 0 0.5px #fde047;
  pointer-events: none;
  animation: badge-phoenix-sparkle 2.0s ease-out infinite;
}
@keyframes badge-holo { to { background-position: -240% 0; filter: hue-rotate(22deg); } }
@keyframes badge-spotlight { 0%, 55%, 100% { background-position: 150% 0; } 78% { background-position: -80% 0; box-shadow: 0 0 12px rgba(255,225,122,.55); } }
@keyframes badge-vortex { to { background-position: -200% 0; filter: hue-rotate(12deg) drop-shadow(0 0 3px var(--badge-glow)); } }
@keyframes badge-orbit { to { transform: translate(-46px, 7px) rotate(360deg); opacity: .2; } }
@keyframes badge-electric { 0%, 100% { box-shadow: 0 0 6px var(--badge-glow); } 45% { filter: brightness(1.65); box-shadow: -2px 0 8px #55c7ff, 2px 0 5px #e9ffff; } 52% { filter: brightness(.85); } }
@keyframes badge-black-hole-shine {
  0%, 100% { background-position: 0 0; filter: drop-shadow(0 0 3px rgba(179, 136, 255, 0.6)); }
  50% { background-position: 100% 0; filter: brightness(1.3) drop-shadow(0 0 8px #ff5a1f) drop-shadow(0 0 14px #b388ff); }
}
@keyframes badge-black-hole-runes {
  to { transform: rotate(360deg); }
}
@keyframes badge-black-hole-flash {
  0%, 75%, 100% { opacity: 0.85; }
  85% { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 6px #fff3d0); }
}
@keyframes badge-black-hole-singularity {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2) translate(-1px, 1px); opacity: 1; filter: drop-shadow(0 0 6px #fff3d0); }
}
@keyframes badge-phoenix-flame { 0%, 100% { box-shadow: 0 -1px 7px rgba(255,70,20,.55); } 45% { box-shadow: 0 -4px 13px var(--badge-glow); filter: brightness(1.18); } 52% { transform: translateY(-.5px) scaleX(.99); } }
@keyframes badge-embers { from { transform: translateY(6px); opacity: .9; } to { transform: translate(5px, -7px); opacity: 0; } }

/* 세트 뱃지 16종(2026-09): 테마마다 움직임이 다르다. transform, opacity, background-position, filter 위주 */
.badge-fx-tiger-bolt, .badge-fx-dragon-abyss, .badge-fx-fox-fire, .badge-fx-angel-halo, .badge-fx-demon-horns, .badge-fx-sea-wave, .badge-fx-storm-drum, .badge-fx-flower-bloom,
.badge-fx-magma-crack, .badge-fx-aurora-ribbon, .badge-fx-oni-glitch, .badge-fx-crystal-prism, .badge-fx-jelly-pulse, .badge-fx-blade-slash, .badge-fx-clock-gear, .badge-fx-warp-thruster, .badge-fx-gold-emperor, .badge-fx-ice-queen { overflow: visible; }
/* 백호: 흰 바탕에 검은 줄무늬가 흐르고 청백 번개가 번쩍이는 전설 뱃지 */
.badge-fx-tiger-bolt {
  overflow: visible;
  --badge-a: #f8fafc;
  --badge-b: #38bdf8;
  --badge-glow: rgba(56, 189, 248, 0.85);
  color: #f8fbff;
  background-color: rgba(8, 18, 32, 0.94);
  background-image: repeating-linear-gradient(115deg, rgba(15, 23, 42, 0.55) 0 3px, transparent 3px 9px), linear-gradient(110deg, rgba(56, 189, 248, 0.35), rgba(255, 255, 255, 0.50), rgba(125, 211, 252, 0.40), rgba(56, 189, 248, 0.35));
  background-size: 34px 100%, 200% 100%;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.75), inset 0 0 6px rgba(255, 255, 255, 0.55);
  animation: badge-tiger-stripe 3.6s linear infinite, badge-tiger-shine 2.6s ease-in-out infinite;
}
.badge-fx-tiger-bolt::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #38bdf8 35%, #ffffff 50%, #0284c7 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-tiger-beam 3.2s linear infinite;
}
.badge-fx-tiger-bolt::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 11px;
  right: -5px;
  top: -6px;
  background: #ffffff;
  clip-path: polygon(55% 0, 10% 55%, 45% 55%, 25% 100%, 90% 40%, 55% 40%);
  filter: drop-shadow(0 0 4px #38bdf8);
  pointer-events: none;
  animation: badge-tiger-flash 2.4s steps(1, end) infinite;
}
@keyframes badge-tiger-stripe { to { background-position: 34px 0, 0 0; } }
@keyframes badge-tiger-shine {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.6)); }
  50% { filter: brightness(1.3) drop-shadow(0 0 8px #38bdf8) drop-shadow(0 0 14px #ffffff); }
}
@keyframes badge-tiger-beam { to { transform: rotate(360deg); } }
@keyframes badge-tiger-flash { 0%, 70% { opacity: 0; } 72% { opacity: 1; transform: translateY(0) scale(1.2); } 76% { opacity: .15; } 80% { opacity: 1; transform: translateY(1px); } 84%, 100% { opacity: 0; } }
/* 흑룡: 검보라 연기가 숨 쉬고 여의주가 칩을 한 바퀴 돈다 */
.badge-fx-dragon-abyss { --badge-a: #d8b4fe; --badge-b: #7e22ce; --badge-glow: rgba(147,51,234,.75); color: #f3e8ff; background-color: rgba(24,10,40,.75); }
.badge-fx-dragon-abyss::before { inset: -4px -3px; background: radial-gradient(ellipse at 20% 60%, rgba(126,34,206,.7), transparent 60%), radial-gradient(ellipse at 80% 40%, rgba(88,28,135,.8), transparent 62%); filter: blur(2px); animation: badge-abyss-breath 3.4s ease-in-out infinite; }
.badge-fx-dragon-abyss::after { width: 5px; height: 5px; left: -3px; top: 50%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #c084fc 45%, #6b21a8); box-shadow: 0 0 5px #a855f7; animation: badge-abyss-orb 3.2s linear infinite; }
@keyframes badge-abyss-breath { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes badge-abyss-orb { 0% { transform: translate(0, -60%); } 25% { transform: translate(24px, -170%); } 50% { transform: translate(48px, -60%); } 75% { transform: translate(24px, 60%); opacity: .5; } 100% { transform: translate(0, -60%); } }
/* 구미호 (전설): 여우불이 8자로 맴돌고 분홍·보라 플라즈마 빔이 회전하는 뱃지 */
.badge-fx-fox-fire {
  overflow: visible;
  --badge-a: #fbcfe8;
  --badge-b: #ec4899;
  --badge-glow: rgba(236, 72, 153, 0.85);
  color: #fdf2f8;
  background-color: rgba(26, 4, 30, 0.94);
  background-image: linear-gradient(110deg, rgba(192, 132, 252, 0.35), rgba(236, 72, 153, 0.50), rgba(253, 242, 248, 0.40), rgba(192, 132, 252, 0.35));
  background-size: 200% 100%;
  border: 1px solid #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.7), inset 0 0 6px rgba(192, 132, 252, 0.55);
  animation: badge-fox-fire-shine 2.6s ease-in-out infinite;
}
.badge-fx-fox-fire::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #ec4899 35%, #ffffff 50%, #c084fc 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.75);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-fox-fire-runes 3.6s linear infinite, badge-fox-fire-flash 2.8s ease-in-out infinite;
}
.badge-fx-fox-fire::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  right: -5px;
  top: -5px;
  background: #ffffff;
  box-shadow: 0 0 8px #ec4899, 0 0 14px #c084fc, -7px 6px 0 1px #f472b6, -14px 10px 0 0.5px #c084fc;
  pointer-events: none;
  animation: badge-foxfire-orb 2.4s ease-in-out infinite;
}
@keyframes badge-fox-fire-shine {
  0%, 100% { background-position: 0 0; filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.6)); }
  50% { background-position: 100% 0; filter: brightness(1.3) drop-shadow(0 0 8px #ec4899) drop-shadow(0 0 14px #c084fc); }
}
@keyframes badge-fox-fire-runes { to { transform: rotate(360deg); } }
@keyframes badge-fox-fire-flash {
  0%, 75%, 100% { opacity: 0.85; }
  85% { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 6px #fbcfe8); }
}
@keyframes badge-foxfire-orb {
  0%, 100% { transform: translate(0, 0) scale(0.9); opacity: 0.8; }
  50% { transform: translate(1px, -2px) scale(1.2); opacity: 1; filter: drop-shadow(0 0 6px #ffffff); }
}

/* 천사 날개 (전설): 백금빛 성광 빔이 회전하고 머리 위 광배가 빛나는 뱃지 */
.badge-fx-angel-halo {
  overflow: visible;
  --badge-a: #fffbeb;
  --badge-b: #fde047;
  --badge-glow: rgba(254, 240, 138, 0.85);
  color: #fffbeb;
  background-color: rgba(20, 24, 38, 0.94);
  background-image: linear-gradient(110deg, rgba(254, 240, 138, 0.35), rgba(251, 191, 36, 0.50), rgba(255, 255, 255, 0.45), rgba(254, 240, 138, 0.35));
  background-size: 200% 100%;
  border: 1px solid #fde047;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.7), inset 0 0 6px rgba(255, 255, 255, 0.55);
  animation: badge-angel-halo-shine 2.6s ease-in-out infinite;
}
.badge-fx-angel-halo::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #fde047 35%, #ffffff 50%, #f59e0b 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.75);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-angel-halo-runes 3.6s linear infinite, badge-angel-halo-flash 2.8s ease-in-out infinite;
}
.badge-fx-angel-halo::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 5px;
  left: 50%;
  top: -8px;
  margin-left: -9px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 8px #fde047, 0 0 14px #fbbf24;
  pointer-events: none;
  animation: badge-angel-halo-float 2.4s ease-in-out infinite;
}
@keyframes badge-angel-halo-shine {
  0%, 100% { background-position: 0 0; filter: drop-shadow(0 0 3px rgba(254, 240, 138, 0.6)); }
  50% { background-position: 100% 0; filter: brightness(1.3) drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #fbbf24); }
}
@keyframes badge-angel-halo-runes { to { transform: rotate(360deg); } }
@keyframes badge-angel-halo-flash {
  0%, 75%, 100% { opacity: 0.85; }
  85% { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 6px #ffffff); }
}
@keyframes badge-angel-halo-float {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.85; }
  50% { transform: translateY(-2px) scaleX(1.12); opacity: 1; filter: drop-shadow(0 0 6px #ffffff); }
}

/* 악마 날개 (전설): 진홍 지옥불 빔이 회전하고 심장 박동처럼 붉게 박동하는 뿔 뱃지 */
.badge-fx-demon-horns {
  overflow: visible;
  --badge-a: #fee2e2;
  --badge-b: #dc2626;
  --badge-glow: rgba(220, 38, 38, 0.85);
  color: #fee2e2;
  background-color: rgba(30, 4, 8, 0.94);
  background-image: linear-gradient(110deg, rgba(220, 38, 38, 0.35), rgba(249, 115, 22, 0.50), rgba(254, 226, 226, 0.40), rgba(220, 38, 38, 0.35));
  background-size: 200% 100%;
  border: 1px solid #dc2626;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.7), inset 0 0 6px rgba(249, 115, 22, 0.55);
  animation: badge-demon-horns-beat 2.0s ease-in-out infinite;
}
.badge-fx-demon-horns::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #dc2626 35%, #ffffff 50%, #f97316 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.75);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-demon-horns-runes 3.6s linear infinite, badge-demon-horns-flash 2.8s ease-in-out infinite;
}
.badge-fx-demon-horns::after {
  content: "";
  position: absolute;
  height: 8px;
  left: 2px;
  right: 2px;
  top: -7px;
  background: linear-gradient(#fecaca, #dc2626 60%, #450a0a);
  clip-path: polygon(0 0, 24% 100%, 76% 100%, 100% 0, 86% 100%, 14% 100%);
  filter: drop-shadow(0 0 4px #ef4444);
  pointer-events: none;
  animation: badge-demon-horn-pulse 2.0s ease-in-out infinite;
}
@keyframes badge-demon-horns-beat {
  0%, 40%, 100% { background-position: 0 0; transform: scale(1); box-shadow: 0 0 6px rgba(220, 38, 38, 0.5); }
  10% { background-position: 100% 0; transform: scale(1.05); filter: brightness(1.3); box-shadow: 0 0 14px #dc2626; }
  20% { transform: scale(1); }
  28% { transform: scale(1.04); filter: brightness(1.2); box-shadow: 0 0 10px #f97316; }
}
@keyframes badge-demon-horns-runes { to { transform: rotate(360deg); } }
@keyframes badge-demon-horns-flash {
  0%, 75%, 100% { opacity: 0.85; }
  85% { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 6px #fecaca); }
}
@keyframes badge-demon-horn-pulse {
  0%, 40%, 100% { transform: scale(1); opacity: 0.9; }
  10%, 28% { transform: scale(1.12); opacity: 1; filter: drop-shadow(0 0 6px #f87171); }
}
/* 해신 용왕: 아래 물결이 옆으로 흐르고 물방울이 떠오른다 */
.badge-fx-sea-wave { --badge-a: #99f6e4; --badge-b: #0891b2; --badge-glow: rgba(45,212,191,.6); color: #ecfeff; background-image: radial-gradient(circle at 6px 110%, rgba(45,212,191,.55) 0 5px, transparent 5.5px); background-size: 12px 100%; background-repeat: repeat-x; animation: badge-sea-flow 2.4s linear infinite; }
.badge-fx-sea-wave::after { width: 3px; height: 3px; left: 30%; bottom: 0; border-radius: 50%; border: 1px solid #ccfbf1; box-shadow: 12px 2px 0 -1px #a5f3fc; animation: badge-bubble 2.6s ease-in infinite; }
@keyframes badge-sea-flow { to { background-position: 12px 0; } }
@keyframes badge-bubble { 0% { transform: translateY(2px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(2px, -14px); opacity: 0; } }
/* 뇌신: 황금 번개 북 진동 맥박 + 전도 뇌전 빔 테두리 + 청백색 방전 스파크 */
.badge-fx-storm-drum {
  overflow: visible;
  --badge-a: #fef08a;
  --badge-b: #00e5ff;
  --badge-glow: rgba(250, 204, 21, 0.85);
  color: #fef9c3;
  background-color: rgba(22, 18, 4, 0.94);
  background-image: linear-gradient(110deg, rgba(250, 204, 21, 0.38), rgba(0, 229, 255, 0.42), rgba(255, 255, 255, 0.45), rgba(250, 204, 21, 0.38));
  background-size: 200% 100%;
  border: 1px solid #fde047;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.75), inset 0 0 6px rgba(0, 229, 255, 0.55);
  animation: badge-storm-hit 1.8s cubic-bezier(.3, 1.6, .5, 1) infinite, badge-storm-shine 2.4s ease-in-out infinite;
}
.badge-fx-storm-drum::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #fde047 35%, #ffffff 50%, #00e5ff 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-storm-beam 3.0s linear infinite;
}
.badge-fx-storm-drum::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  right: -5px;
  top: -4px;
  background: #ffffff;
  box-shadow: 0 0 8px #fde047, 0 0 14px #00e5ff, -6px 5px 0 1px #fde047, -12px 10px 0 0.5px #00e5ff;
  pointer-events: none;
  animation: badge-storm-sparkle 1.8s ease-out infinite;
}
@keyframes badge-storm-hit { 0%, 100% { transform: scale(1); } 6% { transform: scale(1.07, .94); filter: brightness(1.3); } 16% { transform: scale(1); } }
@keyframes badge-storm-shine { 0%, 100% { filter: drop-shadow(0 0 3px rgba(250, 204, 21, 0.6)); } 50% { filter: brightness(1.25) drop-shadow(0 0 8px #00e5ff) drop-shadow(0 0 14px #fde047); } }
@keyframes badge-storm-beam { to { transform: rotate(360deg); } }
@keyframes badge-storm-sparkle { 0%, 100% { opacity: 0.8; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.2); } }

/* 봄꽃 여신: 만개한 작약 꽃잎 회전 + 봄빛 프리즘 빔 + 황금 꽃가루 스파클 */
.badge-fx-flower-bloom {
  overflow: visible;
  --badge-a: #fbcfe8;
  --badge-b: #f472b6;
  --badge-glow: rgba(244, 114, 182, 0.85);
  color: #fdf2f8;
  background-color: rgba(30, 8, 22, 0.94);
  background-image: linear-gradient(110deg, rgba(244, 114, 182, 0.40), rgba(254, 240, 138, 0.45), rgba(134, 239, 172, 0.35), rgba(244, 114, 182, 0.40));
  background-size: 200% 100%;
  border: 1px solid #f472b6;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.75), inset 0 0 6px rgba(254, 240, 138, 0.55);
  animation: badge-bloom-shine 2.6s ease-in-out infinite;
}
.badge-fx-flower-bloom::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #f472b6 35%, #ffffff 50%, #fef08a 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(244, 114, 182, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-bloom-beam 3.4s linear infinite;
}
.badge-fx-flower-bloom::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  right: -5px;
  top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a 0 20%, transparent 22%), conic-gradient(#f9a8d4 0 20%, #fbcfe8 20% 40%, #f472b6 40% 60%, #fbcfe8 60% 80%, #f9a8d4 80%);
  box-shadow: 0 0 8px #f472b6, 0 0 12px #fef08a;
  pointer-events: none;
  animation: badge-bloom-spin 3.2s ease-in-out infinite;
}
@keyframes badge-bloom-shine {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(244, 114, 182, 0.6)); }
  50% { filter: brightness(1.25) drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 14px #f472b6); }
}
@keyframes badge-bloom-beam { to { transform: rotate(360deg); } }
@keyframes badge-bloom-spin {
  0%, 100% { transform: scale(0.8) rotate(0); opacity: 0.8; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

/* 용암 골렘: 흑요석 균열 마그마 맥동 + 지열 융합 빔 테두리 + 분출 불티 */
.badge-fx-magma-crack {
  overflow: visible;
  --badge-a: #fdba74;
  --badge-b: #ea580c;
  --badge-glow: rgba(249, 115, 22, 0.9);
  color: #fff7ed;
  background-color: rgba(30, 10, 4, 0.94);
  background-image: linear-gradient(110deg, rgba(234, 88, 12, 0.40), rgba(249, 115, 22, 0.50), rgba(254, 240, 138, 0.45), rgba(234, 88, 12, 0.40));
  background-size: 200% 100%;
  border: 1px solid #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.8), inset 0 0 6px rgba(234, 88, 12, 0.6);
  animation: badge-magma-pulse 2.2s ease-in-out infinite;
}
.badge-fx-magma-crack::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #ea580c 35%, #ffffff 50%, #fde047 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.85);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-magma-beam 3.0s linear infinite;
}
.badge-fx-magma-crack::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  right: -5px;
  top: -4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #f97316, 0 0 14px #ea580c, -7px 6px 0 1px #fde047, -13px 11px 0 0.5px #ea580c;
  pointer-events: none;
  animation: badge-magma-sparkle 2.0s ease-out infinite;
}
@keyframes badge-magma-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(249, 115, 22, 0.6)); }
  50% { filter: brightness(1.3) drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #ea580c); }
}
@keyframes badge-magma-beam { to { transform: rotate(360deg); } }
@keyframes badge-magma-sparkle { 0%, 100% { opacity: 0.8; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.2); } }
/* 오로라 늑대: 테두리 고리를 따라 오로라 띠가 흐르고 눈꽃 하나가 반짝 */
.badge-fx-aurora-ribbon { --badge-a: #6ee7b7; --badge-b: #c084fc; --badge-glow: rgba(110,231,183,.6); color: #ecfdf5; }
.badge-fx-aurora-ribbon::before { padding: 2px; background: linear-gradient(90deg, #34d399, #67e8f9, #a78bfa, #f0abfc, #34d399); background-size: 300% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); filter: drop-shadow(0 0 3px rgba(110,231,183,.7)); animation: badge-aurora-ribbon 4.5s ease-in-out infinite alternate; }
.badge-fx-aurora-ribbon::after { width: 7px; height: 7px; right: -4px; top: -5px; background: #ecfeff; -webkit-mask: url(icons/snowflake.svg) center / contain no-repeat; mask: url(icons/snowflake.svg) center / contain no-repeat; animation: badge-sparkle 3s ease-in-out infinite; }
@keyframes badge-aurora-ribbon { 0% { background-position: 0 0; } 100% { background-position: 100% 0; filter: drop-shadow(0 -1px 4px rgba(192,132,252,.8)); } }
/* 사이버 오니: 붉은색과 사이안 잔상이 어긋나며 찢어지는 전설 뱃지 */
.badge-fx-oni-glitch {
  overflow: visible;
  --badge-a: #fb7185;
  --badge-b: #00f0ff;
  --badge-glow: rgba(255, 0, 85, 0.85);
  color: #fff1f2;
  background-color: rgba(26, 4, 18, 0.94);
  background-image: linear-gradient(110deg, rgba(255, 0, 85, 0.40), rgba(0, 240, 255, 0.45), rgba(255, 255, 255, 0.40), rgba(255, 0, 85, 0.40));
  background-size: 200% 100%;
  border: 1px solid #ff0055;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.75), inset 0 0 6px rgba(0, 240, 255, 0.55);
  animation: badge-oni-jitter 2.6s steps(1, end) infinite, badge-oni-shine 2.5s ease-in-out infinite;
}
.badge-fx-oni-glitch::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #ff0055 35%, #ffffff 50%, #00f0ff 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-oni-beam 3.2s linear infinite;
}
.badge-fx-oni-glitch::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  right: -5px;
  top: -4px;
  background: #00f0ff;
  box-shadow: 0 0 8px #ff0055, 0 0 14px #00f0ff, -6px 6px 0 1px #ff0055;
  pointer-events: none;
  animation: badge-oni-shard-flash 1.9s steps(1, end) infinite;
}
@keyframes badge-oni-shine {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 0, 85, 0.6)); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px #ff0055) drop-shadow(0 0 14px #00f0ff); }
}
@keyframes badge-oni-beam { to { transform: rotate(360deg); } }
@keyframes badge-oni-shard-flash { 0%, 75%, 100% { opacity: 0.3; transform: none; } 78% { opacity: 1; transform: translate(1px, -1px) scale(1.3); } 82% { opacity: 0.2; } 85% { opacity: 1; } }
@keyframes badge-oni-jitter { 0%, 78%, 100% { transform: none; filter: none; } 80% { transform: skewX(-8deg) translateX(1px); filter: hue-rotate(-20deg); } 83% { transform: translateX(-1px); } 86% { transform: skewX(6deg); filter: brightness(1.4); } 89% { transform: none; } }
@keyframes badge-oni-red { 0%, 78%, 92%, 100% { opacity: 0; transform: none; } 80% { opacity: .9; transform: translate(-2px, 1px); } 86% { opacity: .7; transform: translate(2px, -1px); } }
@keyframes badge-oni-cyan { 0%, 78%, 92%, 100% { opacity: 0; transform: none; } 80% { opacity: .9; transform: translate(2px, -1px); } 86% { opacity: .7; transform: translate(-3px, 0); } }
/* 크리스탈 성채: 6방향 프리즘 스펙트럼 굴절 빔 + 다이아몬드 회전 보석 */
.badge-fx-crystal-prism {
  overflow: visible;
  --badge-a: #c4b5fd;
  --badge-b: #67e8f9;
  --badge-glow: rgba(168, 85, 247, 0.85);
  color: #faf5ff;
  background-color: rgba(16, 10, 32, 0.94);
  background-image: linear-gradient(110deg, rgba(168, 85, 247, 0.38), rgba(103, 232, 249, 0.45), rgba(255, 255, 255, 0.45), rgba(168, 85, 247, 0.38));
  background-size: 200% 100%;
  border: 1px solid #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.75), inset 0 0 6px rgba(103, 232, 249, 0.55);
  animation: badge-crystal-shine 2.6s ease-in-out infinite;
}
.badge-fx-crystal-prism::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #c084fc 35%, #ffffff 50%, #67e8f9 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-crystal-beam 3.2s linear infinite;
}
.badge-fx-crystal-prism::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: -4px;
  top: -4px;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  transform: rotate(45deg);
  box-shadow: 0 0 8px #67e8f9, 0 0 14px #c084fc;
  pointer-events: none;
  animation: badge-crystal-gem 2.4s ease-in-out infinite;
}
@keyframes badge-crystal-shine {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.6)); }
  50% { filter: brightness(1.25) drop-shadow(0 0 8px #67e8f9) drop-shadow(0 0 14px #c084fc); }
}
@keyframes badge-crystal-beam { to { transform: rotate(360deg); } }
@keyframes badge-crystal-gem {
  0%, 100% { transform: rotate(45deg) scale(0.8); opacity: 0.8; }
  50% { transform: rotate(135deg) scale(1.2); opacity: 1; }
}
/* 심해 해파리: 칩 뒤에서 물결 빛이 동심원으로 번지고 촉수가 흔들린다 */
.badge-fx-jelly-pulse { --badge-a: #67e8f9; --badge-b: #a78bfa; --badge-glow: rgba(103,232,249,.7); color: #ecfeff; background-color: rgba(8,24,48,.55); animation: badge-jelly-glow 3.6s ease-in-out infinite; }
.badge-fx-jelly-pulse::before { inset: -2px; border: 1px solid rgba(103,232,249,.8); opacity: 0; animation: badge-jelly-ripple 3.6s ease-out infinite; }
.badge-fx-jelly-pulse::after { width: 1.5px; height: 6px; left: 35%; bottom: -6px; border-radius: 1px; background: linear-gradient(#67e8f9, transparent); box-shadow: 5px 0 0 rgba(167,139,250,.8), 10px 0 0 rgba(103,232,249,.7); transform-origin: top; animation: badge-jelly-tentacle 2.4s ease-in-out infinite; }
@keyframes badge-jelly-glow { 0%, 100% { filter: brightness(.95); box-shadow: 0 0 3px rgba(103,232,249,.3); } 40% { filter: brightness(1.25); box-shadow: 0 0 9px var(--badge-glow); } }
@keyframes badge-jelly-ripple { 0%, 30% { transform: scale(1); opacity: 0; } 40% { opacity: .9; } 100% { transform: scale(1.25, 1.8); opacity: 0; } }
@keyframes badge-jelly-tentacle { 0%, 100% { transform: skewX(18deg); } 50% { transform: skewX(-18deg) scaleY(1.2); } }
/* 벚꽃 검객: 대각선 쾌검 섬광 + 분홍 검기 빔 테두리 + 흩날리는 벚꽃잎 */
.badge-fx-blade-slash {
  overflow: visible;
  --badge-a: #fda4af;
  --badge-b: #f43f5e;
  --badge-glow: rgba(244, 63, 94, 0.85);
  color: #fff1f2;
  background-color: rgba(30, 6, 16, 0.94);
  background-image: linear-gradient(110deg, rgba(244, 63, 94, 0.40), rgba(251, 207, 232, 0.45), rgba(255, 255, 255, 0.45), rgba(244, 63, 94, 0.40));
  background-size: 200% 100%;
  border: 1px solid #fb7185;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.75), inset 0 0 6px rgba(251, 207, 232, 0.55);
  animation: badge-blade-shine 2.4s ease-in-out infinite;
}
.badge-fx-blade-slash::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0% 18%, #f43f5e 35%, #ffffff 50%, #fbcfe8 68%, transparent 85%);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: badge-blade-beam 3.0s linear infinite;
}
.badge-fx-blade-slash::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  right: -4px;
  top: -4px;
  border-radius: 80% 10% 80% 10%;
  background: #ffffff;
  box-shadow: 0 0 8px #f43f5e, 0 0 14px #fda4af, -6px 6px 0 1px #fb7185;
  pointer-events: none;
  animation: badge-blade-sparkle 2.0s ease-out infinite;
}
@keyframes badge-blade-shine {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(244, 63, 94, 0.6)); }
  50% { filter: brightness(1.25) drop-shadow(0 0 8px #fda4af) drop-shadow(0 0 14px #f43f5e); }
}
@keyframes badge-blade-beam { to { transform: rotate(360deg); } }
@keyframes badge-blade-sparkle {
  0%, 100% { opacity: 0.8; transform: translate(0, 0) rotate(0deg) scale(0.9); }
  50% { opacity: 1; transform: translate(-2px, 2px) rotate(45deg) scale(1.2); }
}
/* 황금 태엽 기계: 톱니바퀴가 째깍째깍 한 칸씩 돈다 */
.badge-fx-clock-gear { --badge-a: #fcd34d; --badge-b: #92400e; --badge-glow: rgba(217,163,84,.6); color: #fef3c7; background-color: rgba(66,32,6,.55); padding-left: 16px !important; }
.badge-fx-clock-gear::after { width: 10px; height: 10px; left: 3px; top: 50%; margin-top: -5px; border-radius: 50%; background: radial-gradient(circle, transparent 0 22%, #fcd34d 24% 52%, transparent 54%), repeating-conic-gradient(#d6a354 0 18deg, transparent 18deg 45deg); -webkit-mask: radial-gradient(circle, #000 68%, transparent 70%); mask: radial-gradient(circle, #000 68%, transparent 70%); animation: badge-gear-tick 4s steps(8, end) infinite; }
@keyframes badge-gear-tick { to { transform: rotate(360deg); } }
/* 우주 전함: 속도선이 뒤로 흐르고 왼쪽 추진기 불꽃이 깜빡인다 */
.badge-fx-warp-thruster { --badge-a: #7dd3fc; --badge-b: #6366f1; --badge-glow: rgba(56,189,248,.7); color: #f0f9ff; background-color: rgba(8,15,40,.6); background-image: linear-gradient(90deg, transparent 0 30%, rgba(186,230,253,.55) 30% 34%, transparent 34% 70%, rgba(165,180,252,.45) 70% 72%, transparent 72%); background-size: 22px 2px; background-repeat: repeat-x; background-position: 0 30%; animation: badge-warp-lines .9s linear infinite; }
.badge-fx-warp-thruster::after { width: 8px; height: 5px; left: -7px; top: 50%; margin-top: -2.5px; border-radius: 50% 0 0 50%; background: linear-gradient(90deg, transparent, #7dd3fc 60%, #fff); filter: drop-shadow(0 0 3px #38bdf8); transform-origin: right center; animation: badge-warp-flame .45s ease-in-out infinite alternate; }
@keyframes badge-warp-lines { to { background-position: -22px 30%; } }
@keyframes badge-warp-flame { from { transform: scaleX(.6); opacity: .7; } to { transform: scaleX(1.15); opacity: 1; } }

/* ── 동물 테마 10종 초특급 화려한 뱃지 효과 (Phoenix 세트 능가) ──────────────── */
.badge-fx-baby-lion,
.badge-fx-golden-lion,
.badge-fx-baby-tiger,
.badge-fx-mountain-tiger,
.badge-fx-puppy-hood,
.badge-fx-guardian-hound,
.badge-fx-loaf-kitty,
.badge-fx-black-panther,
.badge-fx-baby-whale,
.badge-fx-deepsea-orca {
  overflow: visible !important;
}

/* 1. 아기 사자: 황금빛 솜털 오라 + 떠오르는 3단 햇살 불티 + 심장 펄스 */
.badge-fx-baby-lion {
  --badge-a: #fde68a; --badge-b: #d97706; --badge-glow: rgba(245,158,11,.85);
  color: #fef3c7; background: linear-gradient(135deg, rgba(120,53,15,.7), rgba(217,119,6,.55));
  border: 1px solid rgba(253,230,138,.6);
  animation: badge-baby-lion-pulse 2.2s ease-in-out infinite;
}
.badge-fx-baby-lion::before {
  content: ""; position: absolute; inset: -4px -1px -1px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(254,240,138,.7) 0 30%, transparent 70%);
  opacity: .75; pointer-events: none; animation: badge-halo 2.4s ease-in-out infinite alternate;
}
.badge-fx-baby-lion::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 20%; top: -6px; border-radius: 50%;
  background: #fef08a; box-shadow: 14px 2px 0 #fbbf24, 28px -2px 0 #f59e0b;
  pointer-events: none; animation: badge-embers 1.8s ease-out infinite;
}
@keyframes badge-baby-lion-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 5px rgba(245,158,11,.4); filter: brightness(1); }
  50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(245,158,11,.85); filter: brightness(1.25); }
}

/* 2. 황금 사자왕: 작열하는 태양 관 갈기 화염 + 4단 태양 플레어 불티 */
.badge-fx-golden-lion {
  --badge-a: #fef08a; --badge-b: #dc2626; --badge-glow: rgba(234,88,12,.92);
  color: #fffbeb;
  background-image: linear-gradient(110deg, rgba(180,83,9,.4), rgba(254,240,138,.75), rgba(220,38,38,.5), rgba(254,240,138,.75));
  background-size: 260% 100%; border: 1px solid rgba(254,240,138,.85);
  animation: badge-gold-lion-shine 2.2s ease-in-out infinite;
}
.badge-fx-golden-lion::before {
  content: ""; position: absolute; inset: -7px -2px -2px; padding: 7px 2px 2px;
  background: radial-gradient(ellipse at 20% 100%, #dc2626 0 25%, transparent 50%),
              radial-gradient(ellipse at 50% 100%, #fef08a 0 22%, transparent 52%),
              radial-gradient(ellipse at 80% 100%, #dc2626 0 25%, transparent 50%);
  -webkit-mask: linear-gradient(to top, #000 0 50%, transparent 100%), linear-gradient(#000 0 0) content-box;
  -webkit-mask-composite: source-out;
  mask: linear-gradient(to top, #000 0 50%, transparent 100%) subtract, linear-gradient(#000 0 0) content-box;
  opacity: .85; pointer-events: none; animation: badge-flame-flicker 1.5s ease-in-out infinite alternate;
}
.badge-fx-golden-lion::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 15%; top: -7px; border-radius: 50%;
  background: #fff; box-shadow: 12px 3px 0 #f59e0b, 24px -2px 0 #dc2626, 36px 2px 0 #fde047;
  pointer-events: none; animation: badge-embers 1.5s ease-out infinite;
}
@keyframes badge-gold-lion-shine {
  0%, 100% { background-position: 0 0; box-shadow: 0 0 6px rgba(234,88,12,.6); }
  50% { background-position: 100% 0; box-shadow: 0 0 16px rgba(254,240,138,.9); filter: brightness(1.3); }
}

/* 3. 아기 호랑이: 쫑긋 호치 귀 오라 + 살랑이는 꼬리 + 복숭아빛 펄스 */
.badge-fx-baby-tiger {
  --badge-a: #fed7aa; --badge-b: #ea580c; --badge-glow: rgba(249,115,22,.85);
  color: #fff7ed; background: linear-gradient(135deg, rgba(124,45,18,.7), rgba(234,88,12,.55));
  border: 1px solid rgba(254,215,170,.6);
  animation: badge-baby-tiger-wag 2.2s ease-in-out infinite;
}
.badge-fx-baby-tiger::before {
  content: ""; position: absolute; inset: -4px -1px -1px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(254,215,170,.65) 0 35%, transparent 70%);
  opacity: .7; pointer-events: none; animation: badge-halo 2.2s ease-in-out infinite alternate;
}
.badge-fx-baby-tiger::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 22%; top: -6px; border-radius: 50%;
  background: #fff7ed; box-shadow: 14px 2px 0 #fed7aa, 28px -1px 0 #ea580c;
  pointer-events: none; animation: badge-embers 1.7s ease-out infinite;
}
@keyframes badge-baby-tiger-wag {
  0%, 100% { transform: rotate(0) scale(1); box-shadow: 0 0 5px rgba(234,88,12,.4); }
  35% { transform: rotate(1.8deg) scale(1.03); box-shadow: 0 0 12px rgba(249,115,22,.8); }
  70% { transform: rotate(-1.8deg) scale(1.02); }
}

/* 4. 산군 호랑이: 백두산 호랑이 포효 + 전동 벼락 볼트 + 섬광 불꽃 폭풍 */
.badge-fx-mountain-tiger {
  --badge-a: #fde047; --badge-b: #c2410c; --badge-glow: rgba(234,88,12,.95);
  color: #fefce8; background: linear-gradient(135deg, rgba(67,20,7,.85), rgba(194,65,12,.7));
  border: 1px solid rgba(253,224,71,.8);
  animation: badge-mt-tiger 2.4s linear infinite;
}
.badge-fx-mountain-tiger::before {
  content: ""; position: absolute; inset: -4px; border: 1.5px solid rgba(253,224,71,.7);
  border-radius: inherit; opacity: 0; pointer-events: none; animation: badge-drum-ring 2.0s ease-out infinite;
}
.badge-fx-mountain-tiger::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 16%; top: -7px; border-radius: 50%;
  background: #fff; box-shadow: 10px -2px 0 #fde047, 22px 2px 0 #ea580c, 34px -3px 0 #fff;
  pointer-events: none; animation: badge-embers 1.4s ease-out infinite;
}
@keyframes badge-mt-tiger {
  0%, 75%, 100% { box-shadow: 0 0 6px rgba(194,65,12,.6); filter: brightness(1); }
  80% { box-shadow: 0 0 18px #fde047, 0 0 26px #ea580c; filter: brightness(1.5); }
  85% { filter: brightness(1.1); }
}

/* 5. 댕댕이 모자: 쫑긋 처진 귀 펄럭임 + 튀어오르는 황금 뼈다귀 불티 */
.badge-fx-puppy-hood {
  --badge-a: #fef3c7; --badge-b: #92400e; --badge-glow: rgba(217,119,6,.8);
  color: #fffbeb; background: linear-gradient(135deg, rgba(120,53,15,.7), rgba(217,119,6,.55));
  border: 1px solid rgba(254,243,199,.6);
  animation: badge-puppy-bounce 1.9s ease-in-out infinite;
}
.badge-fx-puppy-hood::before {
  content: ""; position: absolute; inset: -4px -1px -1px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(254,243,199,.7) 0 30%, transparent 70%);
  opacity: .75; pointer-events: none; animation: badge-halo 2.2s ease-in-out infinite alternate;
}
.badge-fx-puppy-hood::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 20%; top: -6px; border-radius: 50%;
  background: #fffbeb; box-shadow: 14px 2px 0 #fde047, 28px -1px 0 #b45309;
  pointer-events: none; animation: badge-embers 1.7s ease-out infinite;
}
@keyframes badge-puppy-bounce {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 5px rgba(217,119,6,.4); }
  50% { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 13px rgba(245,158,11,.85); filter: brightness(1.2); }
}

/* 6. 충견 수호자: 신성한 백금 사파이어 방패 결계 + 회전하는 프리즘 다이아몬드 */
.badge-fx-guardian-hound {
  --badge-a: #e0f2fe; --badge-b: #0284c7; --badge-glow: rgba(56,189,248,.9);
  color: #f0f9ff; background: linear-gradient(135deg, rgba(8,47,73,.8), rgba(2,132,199,.65));
  border: 1px solid rgba(186,230,253,.7);
  animation: badge-hound-guard 2.8s ease-in-out infinite;
}
.badge-fx-guardian-hound::before {
  content: ""; position: absolute; inset: -3px; border: 1px solid rgba(56,189,248,.6);
  border-radius: inherit; opacity: .7; pointer-events: none; animation: badge-shield-barrier 2.8s ease-in-out infinite alternate;
}
.badge-fx-guardian-hound::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 18%; top: -6px; border-radius: 50%;
  background: #fff; box-shadow: 14px 2px 0 #38bdf8, 28px -2px 0 #818cf8;
  pointer-events: none; animation: badge-embers 1.6s ease-out infinite;
}
@keyframes badge-hound-guard {
  0%, 100% { box-shadow: 0 0 6px rgba(2,132,199,.5); filter: brightness(1); }
  50% { box-shadow: 0 0 16px #38bdf8, 0 0 24px rgba(129,140,248,.7); filter: brightness(1.3); }
}
@keyframes badge-shield-barrier {
  0% { transform: scale(.97); opacity: .4; }
  100% { transform: scale(1.04); opacity: .85; }
}

/* 7. 식빵 냥이: 얌전한 식빵 버터 토스트 광택 + 냥방울 골골송 펄 */
.badge-fx-loaf-kitty {
  --badge-a: #fffbeb; --badge-b: #d97706; --badge-glow: rgba(245,158,11,.8);
  color: #fffbeb; background: linear-gradient(135deg, rgba(120,53,15,.65), rgba(217,119,6,.5));
  border: 1px solid rgba(254,240,138,.65);
  animation: badge-loaf-purr 2.6s ease-in-out infinite;
}
.badge-fx-loaf-kitty::before {
  content: ""; position: absolute; inset: -4px -1px -1px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(254,240,138,.7) 0 32%, transparent 70%);
  opacity: .75; pointer-events: none; animation: badge-halo 2.4s ease-in-out infinite alternate;
}
.badge-fx-loaf-kitty::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 22%; top: -6px; border-radius: 50%;
  background: #fde047; box-shadow: 14px 2px 0 #fda4af, 28px -1px 0 #fbbf24;
  pointer-events: none; animation: badge-embers 1.8s ease-out infinite;
}
@keyframes badge-loaf-purr {
  0%, 100% { transform: scale(1); box-shadow: 0 0 5px rgba(245,158,11,.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 13px rgba(251,191,36,.85); filter: brightness(1.22); }
}

/* 8. 밤의 흑표: 자수정 초승달 안광 + 심연 그림자 오라 */
.badge-fx-black-panther {
  --badge-a: #f3e8ff; --badge-b: #7e22ce; --badge-glow: rgba(168,85,247,.9);
  color: #faf5ff; background: linear-gradient(135deg, rgba(30,10,50,.85), rgba(126,34,206,.65));
  border: 1px solid rgba(192,132,252,.7);
  animation: badge-panther-shadow 2.6s ease-in-out infinite;
}
.badge-fx-black-panther::before {
  content: ""; position: absolute; inset: -5px -2px -2px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(192,132,252,.75) 0 25%, transparent 70%);
  opacity: .8; pointer-events: none; animation: badge-halo 2.4s ease-in-out infinite alternate;
}
.badge-fx-black-panther::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 18%; top: -6px; border-radius: 50%;
  background: #fff; box-shadow: 14px 2px 0 #c084fc, 28px -2px 0 #e879f9;
  pointer-events: none; animation: badge-embers 1.6s ease-out infinite;
}
@keyframes badge-panther-shadow {
  0%, 100% { box-shadow: 0 0 6px rgba(126,34,206,.5); filter: brightness(1); }
  50% { box-shadow: 0 0 16px #a855f7, 0 0 24px rgba(232,121,249,.75); filter: brightness(1.32); }
}

/* 9. 아기 고래: 퐁퐁 솟는 청량 물분수 + 3단 탄산 기포 캐스케이드 */
.badge-fx-baby-whale {
  --badge-a: #f0fdfa; --badge-b: #0284c7; --badge-glow: rgba(56,189,248,.85);
  color: #ecfeff; background: linear-gradient(135deg, rgba(8,47,73,.75), rgba(3,105,161,.6));
  border: 1px solid rgba(125,211,252,.7);
  animation: badge-baby-whale 2.2s ease-in-out infinite;
}
.badge-fx-baby-whale::before {
  content: ""; position: absolute; inset: -4px -1px -1px; border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(125,211,252,.7) 0 30%, transparent 70%);
  opacity: .75; pointer-events: none; animation: badge-halo 2.2s ease-in-out infinite alternate;
}
.badge-fx-baby-whale::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 18%; top: -7px; border-radius: 50%;
  background: #fff; box-shadow: 12px -2px 0 #38bdf8, 24px 2px 0 #7dd3fc, 34px -3px 0 #fff;
  pointer-events: none; animation: badge-bubble 1.6s ease-out infinite;
}
@keyframes badge-baby-whale {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 5px rgba(2,132,199,.5); }
  50% { transform: translateY(-2px); box-shadow: 0 0 14px #38bdf8; filter: brightness(1.25); }
}

/* 10. 심해 범고래: 심해 해일 파도 + 초음파 소나 펄스 + 시아닌 발광 */
.badge-fx-deepsea-orca {
  --badge-a: #e0f2fe; --badge-b: #0891b2; --badge-glow: rgba(6,182,212,.95);
  color: #f0fdfa; background: linear-gradient(135deg, rgba(3,7,18,.9), rgba(8,145,178,.7));
  border: 1px solid rgba(34,211,238,.75);
  animation: badge-orca-surge 2.6s ease-in-out infinite;
}
.badge-fx-deepsea-orca::before {
  content: ""; position: absolute; inset: -4px; border: 1.5px solid rgba(34,211,238,.65);
  border-radius: inherit; opacity: 0; pointer-events: none; animation: badge-drum-ring 2.2s ease-out infinite;
}
.badge-fx-deepsea-orca::after {
  content: ""; position: absolute; width: 3.5px; height: 3.5px; left: 15%; top: -7px; border-radius: 50%;
  background: #fff; box-shadow: 14px 2px 0 #22d3ee, 28px -2px 0 #06b6d4, 38px 2px 0 #38bdf8;
  pointer-events: none; animation: badge-embers 1.5s ease-out infinite;
}
@keyframes badge-orca-surge {
  0%, 100% { box-shadow: 0 0 6px rgba(6,182,212,.6); filter: brightness(1); }
  50% { box-shadow: 0 0 18px #22d3ee, 0 0 28px rgba(6,182,212,.8); filter: brightness(1.35); }
}

/* 세트 보너스는 선택 미리보기와 실제 장착 조합에만 붙는다. */
.badge-set-aura {
  border-color: var(--badge-a) !important;
  filter: drop-shadow(0 0 5px var(--badge-glow)) brightness(1.12);
}
.badge-set-aura::before { opacity: 1; filter: saturate(1.35) brightness(1.25); }
.badge-set-phoenix { --badge-a: #ffd35a; --badge-b: #ff4028; --badge-glow: rgba(255,72,30,.8); }
.badge-set-azure_dragon { --badge-a: #80fbff; --badge-b: #2775ff; --badge-glow: rgba(43,173,255,.78); }
.badge-set-thunder_lord { --badge-a: #eaffff; --badge-b: #4b92ff; --badge-glow: rgba(75,146,255,.85); }
.badge-set-black_hole { --badge-a: #fff3d0; --badge-b: #ff5a1f; --badge-glow: rgba(179,136,255,.85); }
.badge-set-galaxy_guardian { --badge-a: #d1a6ff; --badge-b: #4bdcff; --badge-glow: rgba(152,87,255,.78); }
.badge-set-golden_emperor { --badge-a: #fff2a3; --badge-b: #d9901d; --badge-glow: rgba(255,197,52,.75); }
.badge-set-sakura_shrine { --badge-a: #ffabd5; --badge-b: #ff5da8; --badge-glow: rgba(255,91,169,.68); }
.badge-set-ice_queen { --badge-a: #e5ffff; --badge-b: #6dcfff; --badge-glow: rgba(102,211,255,.72); }
.badge-set-cat_playground { --badge-a: #ffc4a2; --badge-b: #ff8fc2; --badge-glow: rgba(255,153,180,.6); }
.badge-set-birthday_party { --badge-a: #ffe46e; --badge-b: #ff6ea9; --badge-glow: rgba(255,111,171,.65); }
.badge-set-pixel_cat { --badge-a: #ff9ed2; --badge-b: #73eaff; --badge-glow: rgba(108,226,255,.65); }
.badge-set-pixel_hero { --badge-a: #70f5ff; --badge-b: #ff69c7; --badge-glow: rgba(88,229,255,.72); }
.badge-set-cyberpunk { --badge-a: #00f6ff; --badge-b: #ff31ce; --badge-glow: rgba(0,244,255,.72); }
.badge-set-white_tiger { --badge-a: #f1f9ff; --badge-b: #38bdf8; --badge-glow: rgba(125,211,252,.82); }
.badge-set-black_dragon { --badge-a: #e9d5ff; --badge-b: #7e22ce; --badge-glow: rgba(147,51,234,.8); }
.badge-set-nine_tailed_fox { --badge-a: #fbcfe8; --badge-b: #e879f9; --badge-glow: rgba(232,121,249,.75); }
.badge-set-angel_wings { --badge-a: #fff7cc; --badge-b: #f5c542; --badge-glow: rgba(253,230,138,.85); }
.badge-set-demon_wings { --badge-a: #fca5a5; --badge-b: #b91c1c; --badge-glow: rgba(220,38,38,.82); }
.badge-set-sea_dragon_king { --badge-a: #99f6e4; --badge-b: #0891b2; --badge-glow: rgba(45,212,191,.7); }
.badge-set-storm_god { --badge-a: #fde047; --badge-b: #ea580c; --badge-glow: rgba(250,204,21,.78); }
.badge-set-flower_goddess { --badge-a: #fbcfe8; --badge-b: #4ade80; --badge-glow: rgba(244,114,182,.65); }
.badge-set-magma_golem { --badge-a: #fdba74; --badge-b: #c2410c; --badge-glow: rgba(249,115,22,.82); }
.badge-set-aurora_wolf { --badge-a: #6ee7b7; --badge-b: #c084fc; --badge-glow: rgba(110,231,183,.72); }
.badge-set-cyber_oni { --badge-a: #fb7185; --badge-b: #22d3ee; --badge-glow: rgba(244,63,94,.75); }
.badge-set-crystal_citadel { --badge-a: #e9d5ff; --badge-b: #93c5fd; --badge-glow: rgba(196,181,253,.78); }
.badge-set-abyssal_jellyfish { --badge-a: #67e8f9; --badge-b: #a78bfa; --badge-glow: rgba(103,232,249,.78); }
.badge-set-sakura_blade { --badge-a: #fecdd3; --badge-b: #e11d48; --badge-glow: rgba(244,63,94,.68); }
.badge-set-clockwork_owl { --badge-a: #fcd34d; --badge-b: #92400e; --badge-glow: rgba(217,163,84,.72); }
.badge-set-space_battleship { --badge-a: #7dd3fc; --badge-b: #6366f1; --badge-glow: rgba(56,189,248,.78); }
.badge-set-baby_lion { --badge-a: #fde68a; --badge-b: #d97706; --badge-glow: rgba(245,158,11,.75); }
.badge-set-golden_lion { --badge-a: #fef08a; --badge-b: #dc2626; --badge-glow: rgba(234,88,12,.82); }
.badge-set-baby_tiger { --badge-a: #fed7aa; --badge-b: #ea580c; --badge-glow: rgba(249,115,22,.78); }
.badge-set-mountain_tiger { --badge-a: #fde047; --badge-b: #c2410c; --badge-glow: rgba(234,88,12,.85); }
.badge-set-puppy_hood { --badge-a: #fef3c7; --badge-b: #92400e; --badge-glow: rgba(217,119,6,.72); }
.badge-set-guardian_hound { --badge-a: #e0f2fe; --badge-b: #0284c7; --badge-glow: rgba(56,189,248,.82); }
.badge-set-loaf_kitty { --badge-a: #fffbeb; --badge-b: #d97706; --badge-glow: rgba(245,158,11,.72); }
.badge-set-black_panther { --badge-a: #f3e8ff; --badge-b: #7e22ce; --badge-glow: rgba(168,85,247,.82); }
.badge-set-baby_whale { --badge-a: #f0fdfa; --badge-b: #0284c7; --badge-glow: rgba(56,189,248,.75); }
.badge-set-deepsea_orca { --badge-a: #e0f2fe; --badge-b: #0891b2; --badge-glow: rgba(6,182,212,.85); }

/* 닉네임 색은 채팅과 미리보기에서 같은 페인트와 fx를 쓴다. */
.nickname-color { color: var(--nick-paint) !important; }
.nickname-gradient {
  color: transparent !important;
  background-image: var(--nick-paint);
  background-size: 220% 100%;
  background-position: 0 50%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.item-color-swatch.nickname-color {
  color: initial !important;
  background: var(--nick-paint);
  -webkit-text-fill-color: initial;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  background-size: 220% 100%;
}
.nickname-fx-flow { animation: nickname-flow 5s ease-in-out infinite alternate; }
.nickname-fx-rainbow-flow { animation: nickname-rainbow 3.4s linear infinite; }
.nickname-fx-aurora-flow { animation: nickname-aurora 4.4s ease-in-out infinite; }
.nickname-fx-sunset-flow { animation: nickname-sunset 4s ease-in-out infinite; }
.nickname-fx-burning { animation: nickname-burning 1.35s steps(5, end) infinite; }
.nickname-fx-neon-flicker { animation: nickname-neon 2.8s steps(12, end) infinite; }
.nickname-fx-golden-shine { animation: nickname-gold 2.9s ease-in-out infinite; }
.nickname-fx-legend-gradient { animation: nickname-legend-gradient 3.6s ease-in-out infinite; }
.nickname-fx-pixel-glitch { animation: nickname-pixel 1.9s steps(6, end) infinite; }
@keyframes nickname-flow { to { background-position: 100% 50%; } }
@keyframes nickname-rainbow { to { background-position: -220% 50%; filter: hue-rotate(18deg); } }
@keyframes nickname-aurora { 50% { background-position: 100% 50%; filter: drop-shadow(0 0 3px rgba(74,255,196,.52)); } }
@keyframes nickname-sunset { 50% { background-position: 100% 50%; filter: drop-shadow(0 0 3px rgba(255,99,76,.58)); } }
@keyframes nickname-burning { 0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 2px #ff5722); } 45% { background-position: 100% 50%; filter: drop-shadow(0 -1px 5px #ff3d00) brightness(1.3); } 52% { filter: drop-shadow(0 0 1px #ffcc00); } }
@keyframes nickname-neon { 0%, 82%, 100% { filter: drop-shadow(0 0 3px #00f5ff) drop-shadow(0 0 4px #ff37d1); opacity: 1; } 85% { opacity: .62; } 88% { opacity: 1; } 91% { opacity: .76; } }
@keyframes nickname-gold { 0%, 100% { background-position: 120% 50%; filter: drop-shadow(0 0 2px rgba(255,204,73,.45)); } 55% { background-position: -80% 50%; filter: drop-shadow(0 0 5px rgba(255,225,107,.75)); } }
@keyframes nickname-legend-gradient { 0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 2px rgba(0,255,163,.45)); } 50% { background-position: 100% 50%; filter: drop-shadow(0 0 5px rgba(255,126,182,.68)); } }
@keyframes nickname-pixel { 0%, 84%, 100% { transform: translate(0); text-shadow: 1px 0 #00fff0, -1px 0 #ff2bd6; } 88% { transform: translateX(1px); } 92% { transform: translateX(-1px); filter: hue-rotate(55deg); } }
/* 세트 닉네임 색: 글자가 먼저 읽히게 밝은 색만, 움직임은 느리게 */
.nickname-fx-set-party { animation: nickname-rainbow 4.2s linear infinite; }
.nickname-fx-set-pixel-cat { animation: nickname-set-steps 2.4s steps(4, end) infinite alternate; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.55)); }
.nickname-fx-set-yarn { animation: nickname-flow 4s ease-in-out infinite alternate; }
.nickname-fx-set-pixel-hero { animation: nickname-set-steps 2s steps(4, end) infinite alternate; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.6)); }
.nickname-fx-set-sakura { --nick-glow: rgba(255,143,192,.6); animation: nickname-set-glow 4.2s ease-in-out infinite; }
.nickname-fx-set-cyberpunk { animation: nickname-neon 3.2s steps(12, end) infinite; }
.nickname-fx-set-frost { --nick-glow: rgba(125,211,252,.65); animation: nickname-set-glow 4.8s ease-in-out infinite; }
.nickname-fx-set-emperor { animation: nickname-gold 3.2s ease-in-out infinite; }
.nickname-fx-set-galaxy { --nick-glow: rgba(192,132,252,.7); animation: nickname-set-glow 5s ease-in-out infinite; }
.nickname-fx-set-thunder { animation: nickname-set-thunder 3.8s linear infinite; }
.nickname-fx-set-black-hole { animation: nickname-set-black-hole 4s ease-in-out infinite; }
.nickname-fx-set-phoenix { animation: nickname-burning 1.9s steps(5, end) infinite; }
.nickname-fx-set-azure { animation: nickname-aurora 5s ease-in-out infinite; }
@keyframes nickname-set-steps { to { background-position: 100% 50%; } }
@keyframes nickname-set-glow { 50% { background-position: 100% 50%; filter: drop-shadow(0 0 4px var(--nick-glow)); } }
@keyframes nickname-set-thunder { 0%, 86%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 2px rgba(147,197,253,.45)); } 89% { background-position: 60% 50%; filter: brightness(1.5) drop-shadow(0 0 6px #fef08a); } 92% { filter: drop-shadow(0 0 1px rgba(147,197,253,.4)); } 95% { filter: brightness(1.3) drop-shadow(0 0 5px #93c5fd); } }
@keyframes nickname-set-black-hole { 0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 2px rgba(179,136,255,.5)); } 50% { background-position: 100% 50%; filter: brightness(1.25) drop-shadow(0 0 5px rgba(255,179,71,.65)); } }

/* 세트 닉네임 16종(2026-09): 글자가 먼저 읽히게 밝은 색, 테마별 다른 움직임 */
.nickname-fx-set-tiger { animation: nickname-set-tiger 3.4s linear infinite; }
.nickname-fx-set-black-dragon { animation: nickname-set-abyss 4.6s ease-in-out infinite; }
.nickname-fx-set-foxfire { animation: nickname-set-foxfire 2.6s ease-in-out infinite; }
.nickname-fx-set-angel { animation: nickname-set-angel 4.2s ease-in-out infinite; }
.nickname-fx-set-demon { animation: nickname-set-demon 1.9s ease-in-out infinite; }
.nickname-fx-set-sea-king { animation: nickname-set-tide 3.2s linear infinite; }
.nickname-fx-set-storm-god { animation: nickname-set-drum 1.6s ease-out infinite; }
.nickname-fx-set-flower { animation: nickname-set-bloom 5s ease-in-out infinite alternate; }
.nickname-fx-set-magma { animation: nickname-set-magma 3.8s ease-in-out infinite; }
.nickname-fx-set-aurora-wolf { animation: nickname-set-ribbon 4.5s ease-in-out infinite alternate; }
.nickname-fx-set-oni { animation: nickname-set-oni 2.6s steps(1, end) infinite; }
.nickname-fx-set-crystal { animation: nickname-set-prism 4s linear infinite; }
.nickname-fx-set-jelly { animation: nickname-set-jelly 3.6s ease-in-out infinite; }
.nickname-fx-set-blade { animation: nickname-set-blade 3s cubic-bezier(.7,0,.3,1) infinite; }
.nickname-fx-set-clockwork { animation: nickname-set-clock 4s steps(8, end) infinite; }
.nickname-fx-set-warp { animation: nickname-set-warp 1.4s linear infinite; }
/* ── 동물 테마 10종 초특급 화려한 닉네임 효과 ────────────────────────── */
.nickname-fx-set-baby-lion { animation: nickname-set-baby-lion 2.4s ease-in-out infinite alternate; }
.nickname-fx-set-golden-lion { animation: nickname-set-gold-lion 2.0s ease-in-out infinite; }
.nickname-fx-set-baby-tiger { animation: nickname-set-baby-tiger 2.4s linear infinite; }
.nickname-fx-set-mountain-tiger { animation: nickname-set-mt-tiger 2.0s ease-out infinite; }
.nickname-fx-set-puppy-hood { animation: nickname-set-puppy 2.2s ease-in-out infinite; }
.nickname-fx-set-guardian-hound { animation: nickname-set-hound 2.4s ease-in-out infinite; }
.nickname-fx-set-loaf-kitty { animation: nickname-set-loaf 2.6s ease-in-out infinite alternate; }
.nickname-fx-set-black-panther { animation: nickname-set-panther 2.2s ease-in-out infinite; }
.nickname-fx-set-baby-whale { animation: nickname-set-whale 2.2s ease-in-out infinite; }
.nickname-fx-set-deepsea-orca { animation: nickname-set-orca 2.4s linear infinite; }

@keyframes nickname-set-baby-lion {
  0% { background-position: 0 50%; filter: drop-shadow(0 0 2px #f59e0b) drop-shadow(0 0 5px rgba(251,191,36,.6)); }
  50% { filter: brightness(1.22) drop-shadow(0 0 4px #fef08a) drop-shadow(0 0 8px #f59e0b); }
  100% { background-position: 100% 50%; filter: drop-shadow(0 0 3px #fbbf24) drop-shadow(0 0 6px rgba(245,158,11,.8)); }
}
@keyframes nickname-set-gold-lion {
  0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 3px #dc2626) drop-shadow(0 0 6px #f59e0b); }
  50% { background-position: 100% 50%; filter: brightness(1.35) drop-shadow(0 0 5px #fef08a) drop-shadow(0 0 10px #dc2626); }
}
@keyframes nickname-set-baby-tiger {
  0% { background-position: 0 50%; filter: drop-shadow(0 0 2px #ea580c) drop-shadow(0 0 5px rgba(249,115,22,.6)); }
  50% { background-position: 110% 50%; filter: brightness(1.25) drop-shadow(0 0 4px #fed7aa) drop-shadow(0 0 8px #ea580c); }
  100% { background-position: 220% 50%; filter: drop-shadow(0 0 2px #ea580c) drop-shadow(0 0 5px rgba(249,115,22,.6)); }
}
@keyframes nickname-set-mt-tiger {
  0%, 75%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 3px rgba(234,88,12,.7)) drop-shadow(0 0 6px rgba(194,65,12,.5)); }
  80% { background-position: 80% 50%; filter: brightness(1.5) drop-shadow(0 0 6px #fde047) drop-shadow(0 0 12px #ea580c); }
  85% { filter: brightness(1.15) drop-shadow(0 0 3px #fde047); }
}
@keyframes nickname-set-puppy {
  0%, 100% { transform: translateY(0); background-position: 0 50%; filter: drop-shadow(0 0 2px #d97706) drop-shadow(0 0 5px rgba(245,158,11,.5)); }
  50% { transform: translateY(-1px); background-position: 100% 50%; filter: brightness(1.22) drop-shadow(0 0 4px #fef3c7) drop-shadow(0 0 8px #d97706); }
}
@keyframes nickname-set-hound {
  0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 3px #0284c7) drop-shadow(0 0 6px rgba(56,189,248,.6)); }
  50% { background-position: 100% 50%; filter: brightness(1.3) drop-shadow(0 0 5px #e0f2fe) drop-shadow(0 0 10px #38bdf8); }
}
@keyframes nickname-set-loaf {
  0% { background-position: 0 50%; filter: drop-shadow(0 0 2px #d97706) drop-shadow(0 0 5px rgba(245,158,11,.5)); }
  50% { filter: brightness(1.22) drop-shadow(0 0 4px #fef08a) drop-shadow(0 0 7px #fda4af); }
  100% { background-position: 100% 50%; filter: drop-shadow(0 0 3px #f59e0b) drop-shadow(0 0 6px rgba(217,119,6,.7)); }
}
@keyframes nickname-set-panther {
  0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 3px #7e22ce) drop-shadow(0 0 6px rgba(168,85,247,.6)); }
  50% { background-position: 100% 50%; filter: brightness(1.35) drop-shadow(0 0 5px #f3e8ff) drop-shadow(0 0 10px #a855f7); }
}
@keyframes nickname-set-whale {
  0%, 100% { transform: translateY(0); background-position: 0 50%; filter: drop-shadow(0 0 3px #0284c7) drop-shadow(0 0 6px rgba(56,189,248,.6)); }
  50% { transform: translateY(-1px); background-position: 100% 50%; filter: brightness(1.25) drop-shadow(0 0 5px #ecfeff) drop-shadow(0 0 9px #38bdf8); }
}
@keyframes nickname-set-orca {
  0% { background-position: 0 50%; filter: drop-shadow(0 0 3px #0891b2) drop-shadow(0 0 7px rgba(6,182,212,.6)); }
  50% { background-position: -110% 50%; filter: brightness(1.3) drop-shadow(0 0 5px #e0f2fe) drop-shadow(0 0 10px #22d3ee); }
  100% { background-position: -220% 50%; filter: drop-shadow(0 0 3px #0891b2) drop-shadow(0 0 7px rgba(6,182,212,.6)); }
}
@keyframes nickname-set-tiger { 0%, 80%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 2px rgba(125,211,252,.4)); } 82% { background-position: 70% 50%; filter: brightness(1.45) drop-shadow(0 0 5px #7dd3fc); } 85% { filter: drop-shadow(0 0 1px rgba(125,211,252,.3)); } 88% { background-position: 100% 50%; filter: brightness(1.3) drop-shadow(0 0 4px #e0f2fe); } }
@keyframes nickname-set-abyss { 0%, 100% { background-position: 0 50%; filter: drop-shadow(0 1px 2px rgba(88,28,135,.8)); } 50% { background-position: 100% 50%; filter: drop-shadow(0 0 6px rgba(168,85,247,.85)); } }
@keyframes nickname-set-foxfire { 0%, 100% { background-position: 0 50%; filter: drop-shadow(-3px -1px 3px rgba(240,171,252,.7)); } 50% { background-position: 100% 50%; filter: drop-shadow(3px -2px 4px rgba(249,168,212,.8)); } }
@keyframes nickname-set-angel { 0%, 55%, 100% { background-position: 110% 50%; filter: drop-shadow(0 -1px 2px rgba(253,230,138,.5)); } 78% { background-position: -10% 50%; filter: drop-shadow(0 -2px 5px rgba(255,251,235,.9)); } }
@keyframes nickname-set-demon { 0%, 40%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 2px rgba(185,28,28,.6)); } 10% { background-position: 40% 50%; filter: drop-shadow(0 0 6px #ef4444) brightness(1.2); } 28% { background-position: 70% 50%; filter: drop-shadow(0 0 5px #f87171); } }
@keyframes nickname-set-tide { 0% { background-position: 0 50%; transform: translateY(0); } 50% { transform: translateY(-.5px); filter: drop-shadow(0 1px 3px rgba(45,212,191,.6)); } 100% { background-position: -220% 50%; transform: translateY(0); } }
@keyframes nickname-set-drum { 0%, 100% { background-position: 0 50%; filter: none; } 6% { background-position: 50% 50%; filter: brightness(1.4) drop-shadow(0 0 5px #fde047); } 40% { filter: drop-shadow(0 0 1px rgba(253,224,71,.4)); } }
@keyframes nickname-set-bloom { to { background-position: 100% 50%; filter: drop-shadow(0 0 3px rgba(244,114,182,.55)); } }
@keyframes nickname-set-magma { 0%, 100% { background-position: 0 50%; filter: brightness(.92) drop-shadow(0 1px 1px rgba(124,45,18,.9)); } 55% { background-position: 100% 50%; filter: brightness(1.25) drop-shadow(0 0 5px rgba(249,115,22,.8)); } }
@keyframes nickname-set-ribbon { 0% { background-position: 0 50%; filter: drop-shadow(0 -1px 3px rgba(110,231,183,.6)); } 100% { background-position: 100% 50%; filter: drop-shadow(0 1px 4px rgba(192,132,252,.7)); } }
@keyframes nickname-set-oni { 0%, 80%, 100% { transform: none; filter: drop-shadow(0 0 2px rgba(244,63,94,.5)); } 82% { transform: translateX(1px) skewX(-8deg); filter: drop-shadow(-2px 0 0 #22d3ee) drop-shadow(2px 0 0 #fb7185); } 86% { transform: translateX(-1px); background-position: 100% 50%; } 90% { transform: none; background-position: 0 50%; } }
@keyframes nickname-set-prism { 0% { background-position: 0 50%; filter: hue-rotate(0) drop-shadow(0 0 2px rgba(196,181,253,.6)); } 100% { background-position: -220% 50%; filter: hue-rotate(40deg) drop-shadow(0 0 2px rgba(147,197,253,.6)); } }
@keyframes nickname-set-jelly { 0%, 100% { background-position: 0 50%; filter: drop-shadow(0 0 1px rgba(103,232,249,.4)); opacity: .9; } 40% { background-position: 100% 50%; filter: drop-shadow(0 0 7px rgba(103,232,249,.9)); opacity: 1; } }
@keyframes nickname-set-blade { 0%, 62% { background-position: 120% 50%; filter: none; } 72% { background-position: -20% 50%; filter: brightness(1.35) drop-shadow(0 0 3px #fff); } 100% { background-position: -20% 50%; filter: none; } }
@keyframes nickname-set-clock { to { background-position: 100% 50%; } }
@keyframes nickname-set-warp { 0% { background-position: 0 50%; } 100% { background-position: -220% 50%; filter: drop-shadow(-3px 0 2px rgba(56,189,248,.7)); } }

.msg.me .who.nickname-color,
.preview-name.nickname-color { color: var(--nick-paint) !important; }
.msg.me .who.nickname-gradient,
.preview-name.nickname-gradient { color: transparent !important; }

/* 채팅이 누적되어도 최근 12줄만 움직여 방송실 합성 부하를 제한한다. */
.messages .msg:nth-last-child(n + 13) [class*="badge-fx-"],
.messages .msg:nth-last-child(n + 13) [class*="badge-fx-"]::before,
.messages .msg:nth-last-child(n + 13) [class*="badge-fx-"]::after,
.messages .msg:nth-last-child(n + 13) [class*="nickname-fx-"] {
  animation: none !important;
  transform: none !important;
}

.item-set-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 215, 92, .45);
  border-radius: 3px;
  background: rgba(255, 193, 44, .12);
  color: #ffe08a;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.item-set-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 211, 91, .25);
  border-radius: var(--r-md);
  background: rgba(255, 196, 47, .07);
  word-break: keep-all;
}
.item-set-detail span { grid-row: 1 / 3; padding: 2px 6px; border-radius: var(--r-full); background: rgba(255, 205, 76, .16); color: #ffe08a; font-size: 10px; font-weight: 800; white-space: nowrap; }
.item-set-detail strong { color: var(--text-bright); font-size: 12.5px; }
.item-set-detail small { color: var(--muted); font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  [class*="badge-fx-"],
  [class*="badge-fx-"]::before,
  [class*="badge-fx-"]::after,
  [class*="nickname-fx-"] { animation: none !important; transform: none !important; }
}

/* ── 꾸미기 상세 패널 ─────────────────────────────── */
.items-detail-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.items-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.preview-avatar-container {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 2px solid var(--line);
  display: grid;
  place-content: center;
  font-weight: 800;
  font-size: 26px;
  color: var(--text-bright);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.preview-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  animation: frame-pulse 3s ease-in-out infinite;
}
.preview-chat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  white-space: nowrap;
}
.preview-badge {
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}
.preview-badge.badge-rarity-희귀 { background: rgba(68, 156, 255, 0.18); color: #a9d5ff; border-color: rgba(91, 173, 255, 0.5); }
.preview-badge.badge-rarity-영웅 { background: rgba(157, 99, 255, 0.2); color: #d8c2ff; border-color: rgba(177, 128, 255, 0.52); }
.preview-badge.badge-rarity-전설 {
  color: #ffe08a;
  border-color: rgba(255, 197, 66, 0.62);
  background: linear-gradient(105deg, rgba(255, 183, 38, 0.15) 20%, rgba(255, 234, 166, 0.34) 45%, rgba(255, 183, 38, 0.15) 70%);
  background-size: 220% 100%;
}
.preview-name {
  font-weight: 700;
  color: var(--accent);
}
.preview-text {
  color: var(--muted);
  font-size: 12px;
}

.items-info-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.items-info-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.items-info-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
}
.item-rarity-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.items-info-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.items-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.item-set-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
  word-break: keep-all;
}
.item-set-offer .btn { white-space: nowrap; }
.item-set-pieces { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; margin: 0; padding: 0; list-style: none; }
.item-set-pieces li { padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 11px; white-space: nowrap; }
.item-set-pieces li.owned { background: rgba(34, 197, 94, 0.13); color: #86efac; }
.item-set-price { white-space: nowrap; font-size: 13px; }
.item-set-price s { color: var(--dim); }
.item-set-price b { color: var(--gold); }
.item-set-chip {
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #e5484d;
}
.items-action-row { flex-wrap: wrap; row-gap: 8px; }
#itemActionArea { flex: 1 1 240px; min-width: 0; }
.item-price-tag {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
}
.items-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--dim);
}

@media (max-width: 860px) {
  .items-view-layout { grid-template-columns: 1fr; }
  .items-detail-panel { grid-template-columns: 1fr; }
}

/* 휴대폰: 캡처 주기 칸(설명 글 포함)이 화면 밖으로 밀지 않게 */
.strip > .cell { min-width: 0; }
.cell.ctl select { max-width: 100%; }
@media (max-width: 560px) {
  .strip > .cell.ctl { flex: 1 1 100%; max-width: 100%; }
}

/* AI가 방금 본 화면 썸네일 (시청자 칩 목록 대신) */
.ai-seen { margin: 6px 0 0; display: inline-flex; flex-direction: column; gap: 6px; max-width: min(360px, 100%); }
.ai-seen img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-3); }
.ai-seen figcaption { font-size: 12px; color: var(--muted); }

/* 시청자 유형 켜기/끄기 */
.person-wrap { position: relative; min-width: 0; }
.person-wrap .person { width: 100%; height: 100%; padding-right: 64px; }
.type-toggle { position: absolute; top: 10px; right: 10px; z-index: 1; border: 1px solid var(--accent-border); background: var(--accent-dim); color: var(--accent);
  border-radius: var(--r-full); padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.type-toggle[aria-pressed="false"] { border-color: var(--line-strong); background: var(--bg-3); color: var(--dim); }
.person-wrap.off .person { opacity: .45; filter: grayscale(.6); }
.person-wrap.locked .person { padding-right: 118px; opacity: .72; }
.person-lock-chip { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 8px; border: 1px solid rgba(255, 197, 66, .35);
  border-radius: var(--r-full); background: rgba(255, 197, 66, .1); color: var(--gold); font-size: 11px; font-weight: 700; white-space: nowrap; }
.person-unlock { position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 5px 9px; border: 1px solid var(--accent-border);
  border-radius: var(--r-sm); background: var(--accent-dim); color: var(--accent); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.person-unlock:hover { border-color: var(--accent); }

.item-viewer-thumb { width: 50px; height: 50px; display: grid; place-content: center; border: 2px solid; border-radius: 18px; background: var(--bg-3); font-size: 25px; }
.item-voice-thumb { width: 50px; height: 50px; display: grid; place-content: center; border: 1px solid var(--accent-border); border-radius: 50%; background: var(--accent-dim); font-size: 24px; }
.item-extra { display: grid; gap: 8px; }
.unlock-viewer-avatar, .unlock-voice-icon { width: 72px; height: 72px; display: grid; place-content: center; border-radius: 22px; color: #0b0d11; font-size: 34px; box-shadow: var(--shadow-md); }
.unlock-voice-icon { border-radius: 50%; background: var(--accent-dim); color: var(--accent); }
.unlock-preview-name { color: var(--text-bright); font-size: 16px; }
.voice-hello { max-width: 200px; color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; }
.unlock-personality { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.unlock-samples { display: flex; flex-wrap: wrap; gap: 6px; }
.unlock-samples span { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-full); color: var(--text); font-size: 11.5px; }
.item-voice-preview { justify-self: start; white-space: nowrap; }

@media (max-width: 560px) {
  .items-cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .items-cat-btn { justify-content: center; padding-inline: 8px; text-align: center; white-space: nowrap; }
  .items-action-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .person-wrap.locked .person { padding-right: 112px; }
}

/* 후원 테스트 버튼 */
.composer-row .test-cheese { margin-left: auto; margin-right: 6px; white-space: nowrap; }
.composer-row .test-cheese + .btn { margin-left: 0; }

/* ── 도전미션 막대: 채팅 머리줄 밑 ───────────────────── */
.mission-bar { display: flex; align-items: center; gap: 8px; margin: 6px 10px 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--bg-3); font-size: 12.5px; min-width: 0; }
.mission-bar > i { font-style: normal; font-size: 16px; flex: none; }
.mission-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; word-break: keep-all; }
.mission-main b { color: var(--text-bright); font-weight: 700; }
.mission-main small { color: var(--muted); font-size: 11.5px; }
.mission-left { font-style: normal; font-variant-numeric: tabular-nums; color: var(--accent); }
.mission-acts { display: flex; gap: 4px; flex: none; }
.mission-acts button { white-space: nowrap; font-size: 12px; padding: 5px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; }
.mission-acts button.go { background: var(--accent); border-color: var(--accent); color: #080a0c; font-weight: 700; }
.mission-acts button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 마이크로 한 말: 왼쪽 정렬, 민트 줄 */
.msg.system.speech { text-align: left; border-left: 2px solid var(--accent); color: var(--text); word-break: keep-all; }

/* ── 채널 밈 사전 ───────────────────────────────────────── */
.msg.lore-source { position: relative; padding-right: 88px; }
.lore-save {
  position: absolute;
  top: 4px;
  right: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--bg-3);
  color: var(--muted);
  padding: 2px 7px;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
}
.msg.lore-source:hover .lore-save,
.msg.lore-source:focus-within .lore-save,
.lore-save:focus-visible { opacity: 1; }
.lore-save:hover, .lore-save:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.lore-suggestion { display: flex; align-items: center; gap: 8px; word-break: keep-all; }
.lore-suggestion span { flex: 1; min-width: 0; }
.lore-confirm, .lore-meta button {
  flex: none;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: var(--r-full);
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.lore-panel { word-break: keep-all; }
.lore-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line-subtle); border-radius: var(--r-md); background: var(--line-subtle); }
.lore-row { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 11px 12px; background: var(--bg-2); }
.lore-copy { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.lore-copy strong { flex: none; color: var(--text-bright); font-size: 14px; }
.lore-copy span { min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lore-meta { display: flex; align-items: center; gap: 10px; flex: none; color: var(--dim); font-size: 11px; }
.lore-meta time, .lore-meta span { white-space: nowrap; }
.lore-meta button { border-color: var(--line); background: transparent; color: var(--muted); }
.lore-empty { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.msg.system.return { border-left-color: #50d890; color: #b8f5d5; }
@media (hover: none) { .lore-save { opacity: 1; } }
@media (max-width: 560px) {
  .lore-row { align-items: flex-start; gap: 8px; }
  .lore-copy { flex-direction: column; gap: 2px; }
  .lore-copy span { max-width: 100%; }
  .lore-meta { gap: 6px; }
  .lore-meta time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lore-save, .lore-confirm, .lore-meta button { transition: none; }
}
/* 오늘의 미션 카드 */
.quest-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; padding: 4px 0; word-break: keep-all; }
.quest-row b { white-space: nowrap; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.quest-row.done span, .quest-row.done b { color: var(--accent); }
.quest-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
/* 미션이 아직 없을 때(내 채널 카드처럼 늘 보인다, 사장님 요청 2026-09-20) */
.quest-empty { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--dim); word-break: keep-all; }

/* ── 투표 · 승부예측 ───────────────────────────── */
.poll-bar { margin: 6px 10px 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-3); font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.poll-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; word-break: keep-all; }
.poll-head b { flex: none; color: var(--accent); font-weight: 700; }
.poll-head span { flex: 1; min-width: 0; color: var(--text-bright); }
.poll-left { flex: none; font-style: normal; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.poll-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--r-sm); background: var(--bg-2); overflow: hidden; min-width: 0; }
.poll-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(var(--accent-rgb), 0.14); transition: width 0.6s ease; }
.poll-t, .poll-num, .poll-row button { position: relative; }
.poll-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.poll-num { flex: none; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.poll-row button, .poll-acts button { white-space: nowrap; font-size: 11.5px; padding: 3px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; }
.poll-row button { border-color: var(--accent); color: var(--accent); }
.poll-acts { display: flex; justify-content: flex-end; gap: 4px; }
/* 넓은 화면: 투표 만들기 창은 채팅창 왼쪽 바깥에 띄워 채팅을 가리지 않는다(사장님 요청 2026-09-15) */
@media (min-width: 961px) {
  .chat .poll-menu > #pollMenu { position: absolute; right: calc(100% + 12px); bottom: 96px; width: 440px; margin: 0; padding: 18px; gap: 10px; z-index: 30; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
}
/* 투표 만들기 창 글자·칸 키우기(사장님: 너무 작음, 2026-09-15) */
.poll-menu input, .poll-menu select { font-size: 15px !important; padding: 10px 12px !important; min-height: 42px; }
.poll-menu-opts { gap: 8px !important; }
.poll-menu-note { font-size: 13px !important; }
.poll-menu-row .btn { font-size: 14px; padding: 9px 18px; min-height: 40px; }
.poll-menu > div { margin: 6px 10px 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-3); display: flex; flex-direction: column; gap: 6px; }
.poll-menu input, .poll-menu select { width: 100%; min-width: 0; box-sizing: border-box; font-size: 12.5px; padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--text); }
.poll-menu-row { display: flex; gap: 6px; justify-content: flex-end; }
.poll-menu-row select { flex: 1; }
.poll-menu-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.poll-menu-opts input[hidden] { display: none; }
.poll-menu-note { margin: 0; font-size: 11px; color: var(--muted); word-break: keep-all; }
.composer-row .poll-btn { margin-left: auto; padding-inline: 8px; }
.composer-row .poll-btn + .test-cheese { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .poll-fill { transition: none; } }

/* ── 명장면 카드 (하이라이트 & 공유) ── */
.card-mini-toast {
  position: absolute;
  top: 52px;
  right: 14px;
  z-index: 20;
  background: rgba(19, 21, 27, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--text-bright);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), var(--accent-glow);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: miniToastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease;
  word-break: keep-all;
}
@keyframes miniToastIn {
  from { transform: translateY(-8px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.summary-hl-section {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.summary-hl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.summary-hl-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}
.summary-hl-count {
  font-size: 11.5px;
  color: var(--muted);
}
.summary-hl-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
}
.summary-hl-item {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  color: var(--text);
  min-width: 0;
}
.summary-hl-item:hover, .summary-hl-item:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.summary-hl-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}
.summary-hl-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.summary-hl-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.summary-hl-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-hl-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-hl-btn {
  margin-top: 4px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
}

.share-card-box {
  width: min(720px, calc(100vw - 24px));
  max-height: min(92dvh, calc(100dvh - 24px));
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}
.share-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.share-card-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--text-bright);
}
.share-card-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.share-card-pill {
  padding: 6px 12px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.share-card-pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.share-card-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
}
.share-card-canvas-wrap {
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-card-canvas-wrap canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  display: block;
}
.share-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .card-mini-toast {
    top: 44px;
    right: 10px;
    font-size: 11px;
    padding: 5px 10px;
  }
  .summary-hl-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .share-card-box {
    padding: 16px 14px;
  }
  .share-card-actions {
    flex-direction: column;
    width: 100%;
  }
  .share-card-actions button {
    width: 100%;
  }
}


/* ── 매운맛 커뮤 말투 토글 ───────────────────── */
.spicy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.spicy-row small { flex: 1 1 220px; min-width: 0; color: var(--muted); font-size: 12px; word-break: keep-all; }
.spicy-toggle { white-space: nowrap; font-size: 12.5px; font-weight: 700; padding: 6px 14px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--muted); cursor: pointer; }
.spicy-toggle.on { border-color: #ff8a5b; color: #ff8a5b; background: rgba(255, 138, 91, 0.1); }
.spicy-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 테마 색 ───────────────────────────────── */
:root[data-accent="coral"] { --accent-rgb: 255, 107, 139; --accent: #ff6b8b; --accent-hover: #ff85a1; --gate-scene-sprite: url("/istream/pixel-stream-coral-sprite.png?v=1"); }
:root[data-accent="mango"] { --accent-rgb: 255, 159, 28; --accent: #ff9f1c; --accent-hover: #ffb03a; --gate-scene-sprite: url("/istream/pixel-stream-mango-sprite.png?v=1"); }
.theme-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.theme-swatches button { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; font-size: 11.5px; padding: 6px 4px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); cursor: pointer; }
.theme-swatches button i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.theme-swatches button.on { border-color: var(--accent); color: var(--text-bright); }
.theme-swatches button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 오늘의 미션: 이름은 한 줄, 넘치면 …(건 사람 이름은 줄에 마우스를 올리면, 2026-10-01) */
.quest-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 꾸미기 화면 간격: 사이드바에 붙지 않게 여백, 미리보기 채팅이 상자 밖으로 넘치지 않게 */
.items-view-layout { padding: 0 clamp(16px, 2.4vw, 32px) 32px; gap: 24px; }
@media (min-width: 861px) { .items-detail-panel { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); } }
.items-preview-box { min-width: 0; overflow: hidden; }
.preview-chat-row { white-space: normal; flex-wrap: wrap; max-width: 100%; box-sizing: border-box; word-break: keep-all; }
@media (max-width: 960px) { .items-view-layout { padding: 0 16px 24px; } }
@media (max-width: 760px) {
  .items-detail-panel { grid-template-columns: minmax(0, 1fr); }
  .items-action-row { flex-wrap: wrap; }
  .items-info-box { min-width: 0; }
}

/* ── 뽑기(가챠) ─────────────────────────────── */
.items-grid:has(.gacha-machine) { display: block; }
.gacha-machine { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--r-xl); border: 1px solid var(--accent-border); background: radial-gradient(120% 90% at 0% 0%, rgba(var(--accent-rgb), 0.14), transparent 60%), var(--bg-2); }
.gacha-head { display: flex; gap: 16px; align-items: center; min-width: 0; }
.gacha-head h3 { margin: 0 0 4px; font-size: 20px; color: var(--text-bright); }
.gacha-head p { margin: 0; color: var(--muted); font-size: 13px; word-break: keep-all; }
.gacha-orb { position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), linear-gradient(160deg, rgba(var(--accent-rgb), 0.9), #6d28d9); box-shadow: var(--accent-glow); animation: gacha-float 3s ease-in-out infinite; }
.gacha-orb span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #ffd76a; box-shadow: 0 0 8px #ffd76a; animation: gacha-orbit 2.4s linear infinite; top: 27px; left: 27px; }
.gacha-orb span:nth-child(2) { background: #ff6b8b; box-shadow: 0 0 8px #ff6b8b; animation-delay: -0.8s; }
.gacha-orb span:nth-child(3) { background: #7dd3fc; box-shadow: 0 0 8px #7dd3fc; animation-delay: -1.6s; }
@keyframes gacha-float { 50% { transform: translateY(-4px); } }
@keyframes gacha-orbit { from { transform: rotate(0deg) translateX(30px) rotate(0deg); } to { transform: rotate(360deg) translateX(30px) rotate(-360deg); } }
.gacha-odds { display: flex; flex-wrap: wrap; gap: 6px; }
.gacha-odd { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--bg-3); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gacha-odd b { color: var(--text); font-weight: 700; }
.gacha-odd.rarity-희귀 b { color: #60a5fa; } .gacha-odd.rarity-영웅 b { color: #a78bfa; } .gacha-odd.rarity-전설 b { color: #fbbf24; }
.gacha-note { margin: 0; font-size: 12px; color: var(--dim); word-break: keep-all; }
/* 상자 내용물과 아이템별 확률(사장님 요청 2026-09-16). 영웅만 92종이라 여러 칸으로 접고 높이를 묶는다 */
.gacha-contents { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: rgba(255, 255, 255, 0.02); }
.gacha-contents > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); }
.gacha-pool { margin-top: 10px; }
.gacha-pool > small { font-size: 11.5px; color: var(--dim); }
/* 다단(columns)에 높이를 제한하면 넘친 내용이 세로로 스크롤되지 않고 옆 단으로 뻗는다. 격자로 깔아야 세로 스크롤이 확실하다 */
.gacha-pool ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2px 12px; max-height: 180px; overflow-y: auto; font-size: 11.5px; color: var(--muted); }
.gacha-pool li { line-height: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gacha-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gacha-actions .btn { white-space: nowrap; }
.gacha-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; min-height: 8px; position: relative; }
.gacha-spinning { grid-column: 1 / -1; text-align: center; padding: 24px; font-weight: 800; color: var(--accent); animation: gacha-float 0.4s ease-in-out infinite; }
.gacha-card { position: relative; aspect-ratio: 3 / 4; max-width: 100%; border-radius: var(--r-lg); perspective: 600px; }
.gacha-card-back, .gacha-card-face { position: absolute; inset: 0; border-radius: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; backface-visibility: hidden; transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); text-align: center; padding: 8px; word-break: keep-all; }
.gacha-card-back { background: linear-gradient(145deg, var(--bg-3), var(--bg-hover)); border: 1px solid var(--line-strong); font-size: 30px; font-weight: 900; color: var(--dim); }
.gacha-card-face { transform: rotateY(180deg); background: var(--bg-3); border: 1px solid var(--line); }
.gacha-card.open .gacha-card-back { transform: rotateY(-180deg); }
.gacha-card.open .gacha-card-face { transform: rotateY(0deg); }
.gacha-card b { font-size: 12.5px; color: var(--text-bright); line-height: 1.3; }
.gacha-card small { font-size: 11px; color: var(--muted); }
.gacha-icon { font-size: 26px; }
.gacha-rarity { font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: var(--r-full); background: var(--bg-hover); color: var(--muted); }
.gacha-card.rarity-꽝 .gacha-card-face { opacity: 0.75; }
.gacha-card.rarity-희귀 .gacha-card-face { border-color: #3b82f6; box-shadow: 0 0 14px rgba(59, 130, 246, 0.35); }
.gacha-card.rarity-희귀 .gacha-rarity { background: #1e3a8a; color: #bfdbfe; }
.gacha-card.rarity-영웅 .gacha-card-face { border-color: #8b5cf6; box-shadow: 0 0 18px rgba(139, 92, 246, 0.45); }
.gacha-card.rarity-영웅 .gacha-rarity { background: #4c1d95; color: #ddd6fe; }
.gacha-card.rarity-전설 .gacha-card-face { border-color: #f59e0b; background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.28), var(--bg-3) 70%); box-shadow: 0 0 26px rgba(251, 191, 36, 0.6); }
.gacha-card.rarity-전설 .gacha-rarity { background: #b45309; color: #fef3c7; }
.gacha-card.rarity-전설.open .gacha-card-face::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); background-size: 250% 100%; animation: gacha-shine 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes gacha-shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.gacha-results.legend-burst::before { content: ''; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, 0.45), transparent 65%); animation: gacha-burst 0.9s ease-out forwards; pointer-events: none; }
@keyframes gacha-burst { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(1.4); } }
.items-cat-btn.gacha-tab { color: #fbbf24; }
@media (prefers-reduced-motion: reduce) { .gacha-orb, .gacha-orb span, .gacha-spinning, .gacha-card.rarity-전설.open .gacha-card-face::after, .gacha-results.legend-burst::before { animation: none; } .gacha-card-back, .gacha-card-face { transition: none; } }
@media (max-width: 480px) { .gacha-results { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); } .gacha-head { align-items: flex-start; } .gacha-orb { width: 48px; height: 48px; } }

/* 해시박스식 박스 등급 */
.gacha-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.gacha-box-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); cursor: pointer; min-width: 0; }
.gacha-box-pick b { font-size: 12.5px; color: var(--text); white-space: nowrap; }
.gacha-box-pick small { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gacha-box-pick.on { border-color: var(--b1); box-shadow: 0 0 14px color-mix(in srgb, var(--b1) 45%, transparent); }
.gacha-box-pick:disabled { opacity: 0.6; cursor: default; }
.gacha-mini-box { width: 28px; height: 22px; border-radius: 4px; background: linear-gradient(160deg, var(--b1), var(--b2)); box-shadow: inset 0 -5px 0 rgba(0,0,0,0.25), inset 0 3px 0 rgba(255,255,255,0.35); }
.gacha-stage { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: radial-gradient(90% 90% at 20% 50%, color-mix(in srgb, var(--b1) 22%, transparent), transparent 70%), var(--bg-3); border: 1px solid var(--line); }
.gacha-stage-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gacha-stage-info h3 { margin: 0; font-size: 20px; color: var(--text-bright); }
.gacha-stage-info p { margin: 0; color: var(--muted); font-size: 13px; word-break: keep-all; }
.gacha-box3d { position: relative; width: 120px; height: 110px; margin: 0 auto; }
.gacha-box3d .body { position: absolute; left: 10px; right: 10px; bottom: 0; height: 70px; border-radius: 10px; background: linear-gradient(160deg, var(--b1), var(--b2)); box-shadow: inset 0 -12px 0 rgba(0,0,0,0.22), inset 0 6px 0 rgba(255,255,255,0.3), 0 10px 24px rgba(0,0,0,0.45); }
.gacha-box3d .body::after { content: '?'; position: absolute; inset: 0; display: grid; place-content: center; font-size: 30px; font-weight: 900; color: rgba(255,255,255,0.85); text-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.gacha-box3d .lid { position: absolute; left: 4px; right: 4px; top: 22px; height: 24px; border-radius: 8px; background: linear-gradient(160deg, var(--b1), var(--b2)); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.25), inset 0 4px 0 rgba(255,255,255,0.4); transform-origin: 10% 100%; transition: transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); z-index: 2; }
.gacha-box3d .glow { position: absolute; left: 50%; top: 40px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%) scale(0); background: radial-gradient(circle, #fff, color-mix(in srgb, var(--b1) 80%, #fff) 40%, transparent 70%); transition: transform 0.6s ease-out; }
.gacha-box3d { animation: gacha-float 3s ease-in-out infinite; }
.gacha-box3d.shake { animation: gacha-shake 0.12s linear infinite; }
@keyframes gacha-shake { 0% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-2px); } 100% { transform: rotate(-4deg); } }
.gacha-box3d.open .lid { transform: rotate(-38deg) translate(-6px, -18px); }
.gacha-box3d.open .glow { transform: translateX(-50%) scale(14); }
.gacha-box3d.open[data-best="전설"] .glow { background: radial-gradient(circle, #fff, #fcd34d 35%, transparent 70%); }
.gacha-box3d.open[data-best="영웅"] .glow { background: radial-gradient(circle, #fff, #a78bfa 35%, transparent 70%); }
.gacha-box3d.open[data-best="꽝"] .glow { transform: translateX(-50%) scale(5); background: radial-gradient(circle, #9ca3af, transparent 70%); }
.gacha-log h4 { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.gacha-log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gacha-log li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg-3); min-width: 0; }
.gacha-log li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.gacha-log li small { color: var(--dim); white-space: nowrap; }
/* 도구줄 버튼과 같은 목록을 쓰면서 날짜가 들어왔다. 그쪽과 같은 모양으로 맞춘다 */
.gacha-log time { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--dim); white-space: nowrap; }
/* 뽑기 탭 목록이 도구줄 버튼과 같은 마크업(.gacha-odd 칩)을 쓰게 되면서
   .gacha-log li.rarity-* .gacha-rarity 세 규칙은 걸릴 일이 없어져 지웠다. 등급 색은 칩 쪽에서 준다 */
@media (max-width: 640px) { .gacha-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gacha-stage { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .gacha-box3d, .gacha-box3d.shake { animation: none; } .gacha-box3d .lid, .gacha-box3d .glow { transition: none; } }
/* 움직임 줄이기: 테두리 바깥 반짝임도 멈춘다(테두리 SVG 안의 애니메이션은 각 파일이 따로 멈춘다) */
@media (prefers-reduced-motion: reduce) { .avatar-frame, .preview-frame, .item-thumb-box img { animation: none !important; } }

/* ── 채팅 스타일(chatStyle): 내 채팅 줄 꾸미기. 여백은 기본 줄과 같게, 글자 대비는 높게 ── */
.msg.me.chat-style { position: relative; isolation: isolate; }
.msg.me.chat-style .txt { color: #f8fafc; }
/* 시각 글자가 스타일 줄에서 안 보이던 것(사장님 지적 2026-09-16). 기본색 --dim(#6b7280)이 은하·불꽃처럼
   밝은 띠가 쓸고 지나가는 배경에 묻힌다. 스타일이 114개라 하나씩 색을 고를 수 없으니,
   밝은 글자에 어두운 그림자를 얹어 어느 배경에서도 읽히게 한다 */
/* 고정색은 밝은 배경에서 또 묻힌다(사장님 지적 2026-09-16: 배경색 따라 알아서 바꿔라).
   difference 는 뒤에 깔린 색을 뒤집어 그린다. 어두우면 밝게, 밝으면 어둡게 저절로 간다.
   .msg.me.chat-style 에 isolation: isolate 가 있어 그 줄 안에서만 섞인다 */
.msg.me.chat-style time { color: #fff; mix-blend-mode: difference; }
.msg.me.cs-mint { background: rgba(94, 234, 212, 0.11); border-left-color: #5eead4; }
.msg.me.cs-peach { background: rgba(253, 164, 120, 0.12); border-left-color: #fdba74; }
.msg.me.cs-double { background: rgba(167, 139, 250, 0.09); border-left: 4px double #c4b5fd; }
.msg.me.cs-sunset { background: linear-gradient(90deg, rgba(251, 113, 133, 0.24), rgba(251, 191, 36, 0.1) 70%, rgba(251, 191, 36, 0.04)); border-left-color: #fb7185; }
.msg.me.cs-dotted { background: rgba(192, 132, 252, 0.1); border: 1px dotted rgba(216, 180, 254, 0.8); border-radius: var(--r-sm); padding: 4px 7px; }
.msg.me.cs-pixel {
  background: rgba(74, 222, 128, 0.09); border: 2px solid #4ade80; border-radius: 0; padding: 3px 6px;
  border-image: repeating-linear-gradient(90deg, #4ade80 0 4px, #166534 4px 8px) 2;
}
.msg.me.cs-shimmer {
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 4px 7px;
  background: linear-gradient(rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.12)) padding-box, linear-gradient(#171a21, #171a21) padding-box,
    linear-gradient(100deg, rgba(148, 163, 184, 0.35) 35%, #ffffff 50%, rgba(148, 163, 184, 0.35) 65%) border-box;
  background-size: auto, auto, 250% 100%;
  animation: cs-shimmer 3s linear infinite;
}
.msg.me.cs-neon {
  background: rgba(34, 211, 238, 0.09); border: 1px solid rgba(103, 232, 249, 0.8); border-radius: var(--r-sm); padding: 4px 7px;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.4), inset 0 0 8px rgba(34, 211, 238, 0.12);
  animation: cs-neon 2.6s ease-in-out infinite;
}
.msg.me.cs-cyber {
  background: linear-gradient(90deg, rgba(255, 55, 209, 0.15), rgba(0, 245, 255, 0.08)); border-left-color: #ff37d1;
  box-shadow: inset -1px 0 0 rgba(0, 245, 255, 0.6);
}
.msg.me.cs-cyber::after { content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px; background: linear-gradient(225deg, #00f5ff 50%, transparent 50%); pointer-events: none; }
.msg.me.cs-sakura { background: linear-gradient(90deg, rgba(249, 168, 212, 0.18), rgba(249, 168, 212, 0.05)); border-left-color: #f9a8d4; padding-right: 20px; }
.msg.me.cs-sakura::after { content: ""; position: absolute; top: 2px; right: 4px; width: 11px; height: 11px; background: #f9a8d4; -webkit-mask: url(icons/sakura.svg) center / contain no-repeat; mask: url(icons/sakura.svg) center / contain no-repeat; opacity: 0.9; pointer-events: none; animation: cs-sway 3.2s ease-in-out infinite; }
.msg.me.cs-aurora {
  background: linear-gradient(100deg, rgba(52, 211, 153, 0.24), rgba(103, 232, 249, 0.14), rgba(167, 139, 250, 0.24), rgba(52, 211, 153, 0.24));
  background-size: 300% 100%; border: 1px solid rgba(167, 243, 208, 0.38); border-radius: var(--r-sm); padding: 4px 7px;
  animation: cs-aurora 9s ease-in-out infinite;
}
.msg.me.cs-flame {
  background:
    linear-gradient(110deg, transparent 15%, rgba(255, 106, 61, 0.24) 35%, rgba(255, 201, 77, 0.28) 50%, rgba(255, 251, 235, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(65, 15, 6, 0.85) 0%, rgba(35, 8, 3, 0.88) 45%, rgba(18, 4, 2, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #ff4f5e;
  border-right: 1px solid rgba(255, 201, 77, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(255, 79, 94, 0.85), inset 18px 0 26px -6px rgba(255, 106, 61, 0.5), 0 0 16px -2px rgba(255, 64, 26, 0.5);
  padding-right: 48px;
  animation: cs-flame-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-flame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 106, 61, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(255, 201, 77, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 25%, #fffbeb 70%, transparent),
    radial-gradient(1.5px 1.5px at 52% 75%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #ff4f5e 70%, transparent);
  pointer-events: none;
  animation: cs-flame-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-flame::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #ffffff 0% 25%, #fde047 45%, #ea580c 75%, #7f1d1d 100%);
  border: 1px solid rgba(255, 251, 235, 0.85);
  box-shadow:
    0 0 10px #ea580c,
    0 0 18px rgba(253, 224, 71, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fffbeb,
    -11px 6px 0 -2px #fde047,
    -18px -4px 0 -2.5px #ff4f5e;
  pointer-events: none;
  animation: cs-flame-core-pulse 2.8s ease-in-out infinite alternate;
}

.msg.me.cs-galaxy {
  background:
    linear-gradient(110deg, transparent 15%, rgba(192, 132, 252, 0.24) 35%, rgba(56, 189, 248, 0.28) 50%, rgba(253, 224, 71, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(35, 12, 60, 0.85) 0%, rgba(18, 6, 35, 0.88) 45%, rgba(10, 3, 20, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #c084fc;
  border-right: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(192, 132, 252, 0.85), inset 18px 0 26px -6px rgba(56, 189, 248, 0.45), 0 0 16px -2px rgba(192, 132, 252, 0.5);
  padding-right: 48px;
  animation: cs-galaxy-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-galaxy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(192, 132, 252, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(56, 189, 248, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 25%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 50% 75%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #38bdf8 70%, transparent);
  pointer-events: none;
  animation: cs-galaxy-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-galaxy::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #ffffff 0% 25%, #c084fc 55%, #38bdf8 80%, #1e1b4b 100%);
  border: 1px solid rgba(253, 224, 71, 0.85);
  box-shadow:
    0 0 10px #c084fc,
    0 0 18px rgba(56, 189, 248, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fde047,
    -11px 6px 0 -2px #38bdf8,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-galaxy-core-pulse 2.8s ease-in-out infinite alternate;
}
@keyframes cs-flame-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-flame-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-flame-core-pulse {
  0%, 100% { transform: scale(0.95); filter: drop-shadow(0 0 4px #ea580c); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #ff3b20); }
}
@keyframes cs-galaxy-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-galaxy-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-galaxy-core-pulse {
  0%, 100% { transform: scale(0.95); filter: drop-shadow(0 0 4px #c084fc); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #38bdf8); }
}
@keyframes cs-shimmer { from { background-position: 0 0, 0 0, 120% 0; } to { background-position: 0 0, 0 0, -120% 0; } }
@keyframes cs-neon { 0%, 100% { box-shadow: 0 0 4px rgba(34, 211, 238, 0.3), inset 0 0 6px rgba(34, 211, 238, 0.1); } 50% { box-shadow: 0 0 9px rgba(34, 211, 238, 0.6), inset 0 0 10px rgba(34, 211, 238, 0.18); } }
@keyframes cs-sway { 0%, 100% { transform: rotate(-12deg) translateY(0); } 50% { transform: rotate(10deg) translateY(1px); } }
@keyframes cs-aurora { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cs-flame { 0%, 100% { box-shadow: inset 4px 0 9px -3px rgba(255, 120, 0, 0.55); } 45% { box-shadow: inset 6px 0 12px -3px rgba(255, 170, 0, 0.75); } 70% { box-shadow: inset 3px 0 7px -3px rgba(255, 90, 0, 0.5); } }
@keyframes cs-twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
/* 세트 채팅 스타일 8종(생일 파티, 픽셀 고양이, 고양이 놀이터, 픽셀 용사, 얼음 여왕, 황금 제왕, 번개 군주, 청룡) */
.msg.me.cs-party {
  background: radial-gradient(2px 2px at 12% 30%, #ffe066 60%, transparent), radial-gradient(2px 2px at 38% 80%, #7ee0ff 60%, transparent), radial-gradient(2px 2px at 64% 22%, #ff8fc7 60%, transparent),
    linear-gradient(90deg, rgba(255, 143, 199, 0.18), rgba(255, 224, 102, 0.06));
  border-left-color: #ff8fc7; padding-right: 20px;
}
.msg.me.cs-party::after { content: ""; position: absolute; top: 2px; right: 4px; width: 11px; height: 11px; background: #ffe066; -webkit-mask: url(icons/party.svg) center / contain no-repeat; mask: url(icons/party.svg) center / contain no-repeat; pointer-events: none; animation: cs-sway 2.8s ease-in-out infinite; }
.msg.me.cs-pixel-cat {
  background: rgba(255, 184, 107, 0.1); border: 2px solid #ffb86b; border-radius: 0; padding: 3px 20px 3px 6px;
  border-image: repeating-linear-gradient(90deg, #ffb86b 0 4px, #9a3412 4px 8px) 2;
}
.msg.me.cs-pixel-cat::after { content: ""; position: absolute; top: 3px; right: 4px; width: 10px; height: 10px; background: #ffb86b; -webkit-mask: url(icons/paw.svg) center / contain no-repeat; mask: url(icons/paw.svg) center / contain no-repeat; pointer-events: none; animation: cs-blink 2.4s steps(2, end) infinite; }
.msg.me.cs-yarn { background: linear-gradient(90deg, rgba(255, 198, 168, 0.2), rgba(255, 158, 203, 0.07)); border-left-color: #ffb199; padding-right: 20px; }
.msg.me.cs-yarn::after { content: ""; position: absolute; top: 2px; right: 4px; width: 11px; height: 11px; background: #ff9ecb; -webkit-mask: url(icons/yarn.svg) center / contain no-repeat; mask: url(icons/yarn.svg) center / contain no-repeat; pointer-events: none; animation: cs-sway 3.4s ease-in-out infinite; }
.msg.me.cs-pixel-hero {
  background: rgba(30, 58, 138, 0.42); border: 2px solid #93c5fd; border-radius: 0; padding: 3px 20px 3px 6px;
  box-shadow: inset 0 0 0 1px #1e3a8a, 2px 2px 0 rgba(0, 0, 0, 0.45);
}
.msg.me.cs-pixel-hero::after { content: ""; position: absolute; bottom: 3px; right: 5px; width: 9px; height: 9px; background: #fde047; -webkit-mask: url(icons/play.svg) center / contain no-repeat; mask: url(icons/play.svg) center / contain no-repeat; pointer-events: none; animation: cs-blink 1.2s steps(2, end) infinite; }
.msg.me.cs-frost {
  background:
    linear-gradient(110deg, transparent 15%, rgba(125, 211, 252, 0.30) 35%, rgba(255, 255, 255, 0.42) 50%, rgba(56, 189, 248, 0.28) 65%, transparent 80%),
    linear-gradient(90deg, rgba(6, 22, 44, 0.88) 0%, rgba(3, 12, 28, 0.90) 45%, rgba(1, 6, 16, 0.78) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #7dd3fc;
  border-right: 1px solid rgba(186, 230, 253, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(56, 189, 248, 0.85), inset 18px 0 26px -6px rgba(224, 242, 254, 0.45), 0 0 16px -2px rgba(56, 189, 248, 0.5);
  padding-right: 48px;
  animation: cs-frost-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-frost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(56, 189, 248, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(224, 242, 254, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #7dd3fc 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #38bdf8 70%, transparent);
  pointer-events: none;
  animation: cs-frost-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-frost::after {
  content: "✶";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #ffffff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 25%, #7dd3fc 55%, #0284c7 80%, #082f49 100%);
  border: 1.5px solid #bae6fd;
  box-shadow:
    0 0 10px #7dd3fc,
    0 0 18px rgba(56, 189, 248, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #38bdf8,
    -11px 6px 0 -2px #bae6fd,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-frost-pulse 2.0s cubic-bezier(.3, 1.6, .5, 1) infinite;
}
.msg.me.cs-emperor {
  background:
    linear-gradient(110deg, transparent 15%, rgba(251, 191, 36, 0.32) 35%, rgba(255, 248, 220, 0.40) 50%, rgba(245, 158, 11, 0.30) 65%, transparent 80%),
    linear-gradient(90deg, rgba(42, 26, 4, 0.88) 0%, rgba(26, 16, 2, 0.90) 45%, rgba(10, 6, 1, 0.78) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #fbbf24;
  border-right: 1px solid rgba(253, 224, 71, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(245, 158, 11, 0.85), inset 18px 0 26px -6px rgba(254, 240, 138, 0.45), 0 0 16px -2px rgba(245, 158, 11, 0.5);
  padding-right: 48px;
  animation: cs-emperor-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-emperor::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(251, 191, 36, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(245, 158, 11, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #ff496c 70%, transparent);
  pointer-events: none;
  animation: cs-emperor-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-emperor::after {
  content: "♛";
  position: absolute;
  top: 3px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #fffbeb;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%, #ffffff 0% 20%, #fde047 45%, #d97706 75%, #241402 100%);
  border: 1.5px solid #fbbf24;
  box-shadow:
    0 0 10px #fbbf24,
    0 0 18px rgba(245, 158, 11, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #ff496c,
    -11px 6px 0 -2px #fbbf24,
    -18px -4px 0 -2.5px #10b981;
  pointer-events: none;
  animation: cs-emperor-pulse 1.8s cubic-bezier(.3, 1.6, .5, 1) infinite;
}
.msg.me.cs-thunder {
  background:
    linear-gradient(110deg, transparent 15%, rgba(0, 240, 255, 0.24) 35%, rgba(254, 240, 138, 0.28) 50%, rgba(255, 255, 255, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(6, 24, 48, 0.85) 0%, rgba(4, 14, 30, 0.88) 45%, rgba(2, 7, 18, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #00f0ff;
  border-right: 1px solid rgba(254, 240, 138, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(0, 240, 255, 0.85), inset 18px 0 26px -6px rgba(254, 240, 138, 0.45), 0 0 16px -2px rgba(0, 240, 255, 0.5);
  padding-right: 48px;
  animation: cs-thunder-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-thunder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(0, 240, 255, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(254, 240, 138, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 18% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #00f0ff 70%, transparent),
    radial-gradient(1.5px 1.5px at 82% 25%, #fef08a 70%, transparent);
  pointer-events: none;
  animation: cs-thunder-aura 2.6s ease-in-out infinite alternate;
}
.msg.me.cs-thunder::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 30%, #00f0ff 60%, #1d4ed8 85%, #082f49 100%);
  border: 1px solid rgba(254, 240, 138, 0.85);
  box-shadow:
    0 0 10px #00f0ff,
    0 0 18px rgba(254, 240, 138, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fef08a,
    -11px 6px 0 -2px #00f0ff,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-thunder-core-pulse 2.4s ease-in-out infinite alternate;
}
@keyframes cs-thunder-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-thunder-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-thunder-core-pulse {
  0%, 100% { transform: scale(0.95); filter: drop-shadow(0 0 4px #00f0ff); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 14px #00f0ff); }
}
.msg.me.cs-black-hole {
  background:
    linear-gradient(110deg, transparent 15%, rgba(179, 136, 255, 0.24) 35%, rgba(255, 90, 31, 0.28) 50%, rgba(255, 243, 208, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(42, 10, 72, 0.85) 0%, rgba(22, 5, 40, 0.88) 45%, rgba(10, 2, 20, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #ff5a1f;
  border-right: 1px solid rgba(179, 136, 255, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(255, 90, 31, 0.85), inset 18px 0 26px -6px rgba(179, 136, 255, 0.5), 0 0 16px -2px rgba(179, 136, 255, 0.5);
  padding-right: 48px;
  animation: cs-black-hole 3.6s ease-in-out infinite;
}
.msg.me.cs-black-hole::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 90, 31, 0.6), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(179, 136, 255, 0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 25%, #fff3d0 70%, transparent),
    radial-gradient(1.5px 1.5px at 50% 75%, #ffb347 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #b388ff 70%, transparent);
  pointer-events: none;
  animation: cs-black-hole-aura 2.8s ease-in-out infinite;
}
.msg.me.cs-black-hole::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #000000 0% 32%, #050008 42%, transparent 46%),
    conic-gradient(from 0deg, #b388ff 0deg, #ff5a1f 110deg, #fff3d0 180deg, #ff9233 270deg, #b388ff 360deg);
  border: 1px solid rgba(255, 243, 208, 0.85);
  box-shadow:
    0 0 10px #ff5a1f,
    0 0 18px rgba(179, 136, 255, 0.75),
    inset 0 0 4px #000,
    -5px -4px 0 -1.5px #fff3d0,
    -11px 6px 0 -2px #ffb347,
    -18px -4px 0 -2.5px #b388ff;
  pointer-events: none;
  animation: cs-black-hole-disk-spin 2.8s linear infinite, cs-black-hole-pulse 1.8s ease-in-out infinite;
}
.msg.me.cs-azure {
  background: linear-gradient(100deg, rgba(94, 234, 212, 0.2), rgba(37, 99, 235, 0.26), rgba(94, 234, 212, 0.2)); background-size: 300% 100%;
  border: 1px solid rgba(125, 211, 252, 0.45); border-radius: var(--r-sm); padding: 4px 7px;
  animation: cs-aurora 10s ease-in-out infinite;
}
@keyframes cs-blink { 50% { opacity: 0.25; } }
@keyframes cs-thunder { 0%, 88%, 100% { box-shadow: inset 3px 0 6px -3px rgba(147, 197, 253, 0.5); } 90% { box-shadow: inset 0 0 14px rgba(254, 240, 138, 0.5), 0 0 6px rgba(147, 197, 253, 0.45); } 93% { box-shadow: inset 3px 0 6px -3px rgba(147, 197, 253, 0.5); } 96% { box-shadow: inset 0 0 10px rgba(254, 240, 138, 0.38); } }
@keyframes cs-black-hole {
  0%, 100% {
    background-position: 0 0, 0 0;
    box-shadow: inset 5px 0 14px -2px rgba(255, 90, 31, 0.85), inset 18px 0 26px -6px rgba(179, 136, 255, 0.5), 0 0 16px -2px rgba(179, 136, 255, 0.5);
  }
  50% {
    background-position: 100% 0, 0 0;
    box-shadow: inset 7px 0 20px -2px rgba(255, 243, 208, 0.95), inset 22px 0 32px -4px rgba(255, 90, 31, 0.7), 0 0 22px 0 rgba(179, 136, 255, 0.7);
  }
}
@keyframes cs-black-hole-aura {
  0%, 100% { opacity: 0.45; transform: scaleX(0.96); filter: drop-shadow(0 0 3px rgba(255, 90, 31, 0.5)); }
  50% { opacity: 0.95; transform: scaleX(1.04); filter: drop-shadow(0 0 8px rgba(179, 136, 255, 0.8)); }
}
@keyframes cs-black-hole-disk-spin {
  to { transform: rotate(360deg); }
}
@keyframes cs-black-hole-pulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px #ff5a1f); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px #fff3d0) drop-shadow(0 0 14px #b388ff); }
}
/* 세트 채팅 스타일 16종(2026-09): 테마마다 다른 움직임. 오른쪽 장식은 ::after, 바닥 장식은 ::before */
.msg.me.cs-tiger {
  background:
    linear-gradient(110deg, transparent 15%, rgba(56, 189, 248, 0.24) 35%, rgba(255, 255, 255, 0.28) 50%, rgba(224, 242, 254, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(8, 28, 50, 0.85) 0%, rgba(5, 16, 32, 0.88) 45%, rgba(2, 8, 18, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #38bdf8;
  border-right: 1px solid rgba(125, 211, 252, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(56, 189, 248, 0.85), inset 18px 0 26px -6px rgba(255, 255, 255, 0.4), 0 0 16px -2px rgba(56, 189, 248, 0.5);
  padding-right: 48px;
  animation: cs-tiger-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-tiger::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 50%, rgba(56, 189, 248, 0.55), transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(255, 255, 255, 0.4), transparent 50%),
    repeating-linear-gradient(115deg, rgba(15, 23, 42, 0.25) 0 4px, transparent 4px 14px),
    radial-gradient(1.5px 1.5px at 25% 25%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 70% 75%, #38bdf8 70%, transparent);
  pointer-events: none;
  animation: cs-tiger-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-tiger::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #ffffff 0% 25%, #38bdf8 55%, #0369a1 80%, #082f49 100%);
  border: 1px solid rgba(248, 250, 252, 0.85);
  box-shadow:
    0 0 10px #38bdf8,
    0 0 18px rgba(125, 211, 252, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #ffffff,
    -11px 6px 0 -2px #38bdf8,
    -18px -4px 0 -2.5px #e0f2fe;
  pointer-events: none;
  animation: cs-tiger-orb-pulse 2.6s ease-in-out infinite alternate;
}
@keyframes cs-tiger-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-tiger-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-tiger-orb-pulse {
  0%, 100% { transform: scale(0.95); filter: drop-shadow(0 0 4px #38bdf8); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #38bdf8); }
}
.msg.me.cs-abyss {
  background: linear-gradient(90deg, rgba(59, 7, 100, 0.55), rgba(88, 28, 135, 0.2) 70%, rgba(88, 28, 135, 0.05)); border-left-color: #a855f7;
  animation: cs-abyss 4.4s ease-in-out infinite;
}
.msg.me.cs-abyss::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 15% 50%, rgba(168, 85, 247, 0.35), transparent 60%); pointer-events: none; animation: cs-abyss-smoke 4.4s ease-in-out infinite; }
.msg.me.cs-foxfire {
  background:
    linear-gradient(110deg, transparent 15%, rgba(192, 132, 252, 0.24) 35%, rgba(236, 72, 153, 0.28) 50%, rgba(253, 242, 248, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(46, 6, 52, 0.85) 0%, rgba(26, 4, 30, 0.88) 45%, rgba(15, 2, 18, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #ec4899;
  border-right: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(236, 72, 153, 0.85), inset 18px 0 26px -6px rgba(192, 132, 252, 0.5), 0 0 16px -2px rgba(236, 72, 153, 0.5);
  padding-right: 48px;
  animation: cs-foxfire-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-foxfire::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 50%, rgba(236, 72, 153, 0.55), transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(192, 132, 252, 0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 22% 25%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 75%, #f472b6 70%, transparent),
    radial-gradient(1.5px 1.5px at 78% 30%, #c084fc 70%, transparent);
  pointer-events: none;
  animation: cs-foxfire-aura 2.8s ease-in-out infinite;
}
.msg.me.cs-foxfire::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #ffffff 0% 25%, #ec4899 50%, #701a75 75%, #2a032e 100%);
  border: 1px solid rgba(253, 242, 248, 0.85);
  box-shadow:
    0 0 10px #ec4899,
    0 0 18px rgba(192, 132, 252, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #ffffff,
    -11px 6px 0 -2px #f472b6,
    -18px -4px 0 -2.5px #c084fc;
  pointer-events: none;
  animation: cs-foxfire-orb-spin 3.2s ease-in-out infinite alternate, cs-foxfire-pulse 1.8s ease-in-out infinite;
}

.msg.me.cs-halo {
  background:
    linear-gradient(110deg, transparent 15%, rgba(254, 240, 138, 0.25) 35%, rgba(251, 191, 36, 0.28) 50%, rgba(255, 255, 255, 0.38) 60%, transparent 80%),
    linear-gradient(90deg, rgba(28, 32, 54, 0.88) 0%, rgba(18, 22, 38, 0.90) 45%, rgba(10, 14, 25, 0.78) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #fde047;
  border-right: 1px solid rgba(254, 240, 138, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(253, 224, 71, 0.85), inset 18px 0 26px -6px rgba(251, 191, 36, 0.5), 0 0 16px -2px rgba(253, 224, 71, 0.5);
  padding-right: 48px;
  animation: cs-halo-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-halo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 50%, rgba(253, 224, 71, 0.55), transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(254, 240, 138, 0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 25% 25%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 52% 75%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 78% 30%, #fffbeb 70%, transparent);
  pointer-events: none;
  animation: cs-halo-aura 2.8s ease-in-out infinite;
}
.msg.me.cs-halo::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 30%, #ffffff 0% 35%, #fde047 60%, rgba(251, 191, 36, 0.2) 75%, transparent 80%),
    conic-gradient(from 0deg, #fffbeb 0deg, #fde047 90deg, #ffffff 180deg, #f59e0b 270deg, #fffbeb 360deg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 10px #fde047,
    0 0 18px rgba(251, 191, 36, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #ffffff,
    -11px 6px 0 -2px #fef08a,
    -18px -4px 0 -2.5px #fde047;
  pointer-events: none;
  animation: cs-halo-wing-flap 2.6s ease-in-out infinite, cs-halo-pulse 1.8s ease-in-out infinite;
}

.msg.me.cs-hellfire {
  background:
    linear-gradient(110deg, transparent 15%, rgba(220, 38, 38, 0.28) 35%, rgba(249, 115, 22, 0.30) 50%, rgba(254, 240, 138, 0.38) 60%, transparent 80%),
    linear-gradient(90deg, rgba(46, 6, 12, 0.88) 0%, rgba(26, 4, 8, 0.90) 45%, rgba(15, 2, 4, 0.78) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #dc2626;
  border-right: 1px solid rgba(220, 38, 38, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(220, 38, 38, 0.85), inset 18px 0 26px -6px rgba(249, 115, 22, 0.5), 0 0 16px -2px rgba(220, 38, 38, 0.5);
  padding-right: 48px;
  animation: cs-hellfire-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-hellfire::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 50%, rgba(220, 38, 38, 0.6), transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(249, 115, 22, 0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 25%, #fef08a 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 75%, #f97316 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #ef4444 70%, transparent);
  pointer-events: none;
  animation: cs-hellfire-aura 2.8s ease-in-out infinite;
}
.msg.me.cs-hellfire::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1c040b 0% 32%, #450a0a 44%, transparent 48%),
    conic-gradient(from 0deg, #dc2626 0deg, #f97316 110deg, #fef08a 180deg, #b91c1c 270deg, #dc2626 360deg);
  border: 1px solid rgba(254, 202, 202, 0.85);
  box-shadow:
    0 0 10px #dc2626,
    0 0 18px rgba(249, 115, 22, 0.75),
    inset 0 0 4px #000,
    -5px -4px 0 -1.5px #fef08a,
    -11px 6px 0 -2px #f97316,
    -18px -4px 0 -2.5px #dc2626;
  pointer-events: none;
  animation: cs-hellfire-spin 2.8s linear infinite, cs-hellfire-pulse 1.8s ease-in-out infinite;
}
.msg.me.cs-tide { background: linear-gradient(90deg, rgba(8, 145, 178, 0.2), rgba(45, 212, 191, 0.05)); border-left-color: #2dd4bf; padding-bottom: 7px; }
.msg.me.cs-tide::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: -1; background: radial-gradient(circle at 5px 100%, rgba(94, 234, 212, 0.6) 0 4px, transparent 4.5px); background-size: 10px 4px; pointer-events: none; animation: cs-tide 2s linear infinite; }
.msg.me.cs-drum {
  background:
    linear-gradient(110deg, transparent 15%, rgba(250, 204, 21, 0.28) 35%, rgba(0, 229, 255, 0.28) 50%, rgba(255, 255, 255, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(38, 30, 6, 0.85) 0%, rgba(22, 16, 4, 0.88) 45%, rgba(8, 6, 2, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #fde047;
  border-right: 1px solid rgba(0, 229, 255, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(250, 204, 21, 0.85), inset 18px 0 26px -6px rgba(0, 229, 255, 0.45), 0 0 16px -2px rgba(250, 204, 21, 0.5);
  padding-right: 48px;
  animation: cs-drum-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-drum::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(250, 204, 21, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(0, 229, 255, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #00e5ff 70%, transparent);
  pointer-events: none;
  animation: cs-drum-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-drum::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 25%, #fde047 55%, #ca8a04 80%, #1c1917 100%);
  border: 1.5px solid #00e5ff;
  box-shadow:
    0 0 10px #fde047,
    0 0 18px rgba(0, 229, 255, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #00e5ff,
    -11px 6px 0 -2px #fde047,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-drum-pulse 1.8s cubic-bezier(.3, 1.6, .5, 1) infinite;
}

.msg.me.cs-bloom {
  background:
    linear-gradient(110deg, transparent 15%, rgba(244, 114, 182, 0.28) 35%, rgba(254, 240, 138, 0.28) 50%, rgba(134, 239, 172, 0.25) 60%, transparent 80%),
    linear-gradient(90deg, rgba(42, 10, 30, 0.85) 0%, rgba(26, 6, 20, 0.88) 45%, rgba(12, 3, 10, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #f472b6;
  border-right: 1px solid rgba(254, 240, 138, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(244, 114, 182, 0.85), inset 18px 0 26px -6px rgba(254, 240, 138, 0.45), 0 0 16px -2px rgba(244, 114, 182, 0.5);
  padding-right: 48px;
  animation: cs-bloom-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-bloom::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(244, 114, 182, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(254, 240, 138, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 22% 28%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 58% 72%, #f472b6 70%, transparent),
    radial-gradient(1.5px 1.5px at 78% 28%, #86efac 70%, transparent);
  pointer-events: none;
  animation: cs-bloom-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-bloom::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fef08a 0% 20%, transparent 22%),
    conic-gradient(from 0deg, #f472b6 0deg, #fbcfe8 60deg, #f472b6 120deg, #fbcfe8 180deg, #f472b6 240deg, #fbcfe8 300deg, #f472b6 360deg);
  border: 1.5px solid rgba(254, 240, 138, 0.85);
  box-shadow:
    0 0 10px #f472b6,
    0 0 18px rgba(254, 240, 138, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fef08a,
    -11px 6px 0 -2px #f472b6,
    -18px -4px 0 -2.5px #86efac;
  pointer-events: none;
  animation: cs-bloom-spin 3.2s ease-in-out infinite;
}

.msg.me.cs-magma {
  background:
    linear-gradient(110deg, transparent 15%, rgba(249, 115, 22, 0.28) 35%, rgba(220, 38, 38, 0.32) 50%, rgba(254, 240, 138, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(46, 14, 6, 0.85) 0%, rgba(26, 8, 3, 0.88) 45%, rgba(12, 4, 1, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #f97316;
  border-right: 1px solid rgba(220, 38, 38, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(249, 115, 22, 0.85), inset 18px 0 26px -6px rgba(220, 38, 38, 0.45), 0 0 16px -2px rgba(249, 115, 22, 0.5);
  padding-right: 48px;
  animation: cs-magma-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-magma::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(249, 115, 22, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(220, 38, 38, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #fde047 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #f97316 70%, transparent);
  pointer-events: none;
  animation: cs-magma-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-magma::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 20%, #fde047 40%, #ea580c 70%, #431407 100%);
  border: 1px solid rgba(254, 240, 138, 0.85);
  box-shadow:
    0 0 10px #ea580c,
    0 0 18px rgba(249, 115, 22, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fde047,
    -11px 6px 0 -2px #ea580c,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-magma-core-pulse 2.2s ease-in-out infinite;
}
.msg.me.cs-ribbon { border: 1px solid transparent; border-radius: var(--r-sm); padding: 4px 22px 4px 7px; background: linear-gradient(rgba(6, 30, 30, 0.72), rgba(20, 12, 40, 0.72)) padding-box, linear-gradient(90deg, #34d399, #67e8f9, #a78bfa, #f0abfc, #34d399) border-box; background-size: auto, 300% 100%; animation: cs-ribbon 5s ease-in-out infinite alternate; }
.msg.me.cs-ribbon::after { content: ""; position: absolute; top: 3px; right: 5px; width: 10px; height: 10px; background: #ecfeff; -webkit-mask: url(icons/snowflake.svg) center / contain no-repeat; mask: url(icons/snowflake.svg) center / contain no-repeat; pointer-events: none; animation: cs-twinkle 3s ease-in-out infinite; }
.msg.me.cs-oni {
  background:
    linear-gradient(110deg, transparent 15%, rgba(255, 0, 85, 0.24) 35%, rgba(0, 240, 255, 0.28) 50%, rgba(255, 255, 255, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(45, 6, 26, 0.85) 0%, rgba(24, 3, 16, 0.88) 45%, rgba(12, 2, 9, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #ff0055;
  border-right: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(255, 0, 85, 0.85), inset 18px 0 26px -6px rgba(0, 240, 255, 0.45), 0 0 16px -2px rgba(255, 0, 85, 0.5);
  padding-right: 48px;
  animation: cs-oni-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-oni::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 0, 85, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(0, 240, 255, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 22% 28%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 58% 72%, #ff0055 70%, transparent),
    radial-gradient(1.5px 1.5px at 78% 28%, #00f0ff 70%, transparent);
  pointer-events: none;
  animation: cs-oni-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-oni::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 25%, #ff0055 60%, #4c0519 85%, #090d16 100%);
  border: 1px solid rgba(0, 240, 255, 0.85);
  box-shadow:
    0 0 10px #ff0055,
    0 0 18px rgba(0, 240, 255, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #00f0ff,
    -11px 6px 0 -2px #ff0055,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-oni-core-jitter 2.6s steps(1, end) infinite;
}
@keyframes cs-oni-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-oni-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-oni-core-jitter {
  0%, 75%, 100% { transform: none; filter: drop-shadow(0 0 4px #ff0055); }
  78% { transform: translate(1px, -1px) skewX(-4deg); filter: drop-shadow(0 0 8px #00f0ff) drop-shadow(0 0 14px #ff0055); }
  82% { transform: translate(-1px, 1px); }
  85% { transform: none; }
}
.msg.me.cs-prism {
  background:
    linear-gradient(110deg, transparent 15%, rgba(168, 85, 247, 0.26) 35%, rgba(103, 232, 249, 0.28) 50%, rgba(255, 255, 255, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(28, 14, 48, 0.85) 0%, rgba(16, 8, 30, 0.88) 45%, rgba(8, 4, 16, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #c084fc;
  border-right: 1px solid rgba(103, 232, 249, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(168, 85, 247, 0.85), inset 18px 0 26px -6px rgba(103, 232, 249, 0.45), 0 0 16px -2px rgba(168, 85, 247, 0.5);
  padding-right: 48px;
  animation: cs-prism-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-prism::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(168, 85, 247, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(103, 232, 249, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #c084fc 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #67e8f9 70%, transparent);
  pointer-events: none;
  animation: cs-prism-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-prism::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 25%, #67e8f9 55%, #c084fc 80%, #1e1b4b 100%);
  border: 1px solid rgba(192, 132, 252, 0.85);
  box-shadow:
    0 0 10px #c084fc,
    0 0 18px rgba(103, 232, 249, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #67e8f9,
    -11px 6px 0 -2px #c084fc,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-prism-gem-pulse 2.4s ease-in-out infinite;
}
.msg.me.cs-jelly { background: linear-gradient(90deg, rgba(8, 47, 73, 0.5), rgba(103, 232, 249, 0.06)); border-left-color: #67e8f9; }
.msg.me.cs-jelly::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 0% 50%, rgba(103, 232, 249, 0.4), rgba(167, 139, 250, 0.12) 45%, transparent 70%); transform-origin: left center; pointer-events: none; animation: cs-jelly 3.6s ease-in-out infinite; }
.msg.me.cs-blade {
  background:
    linear-gradient(110deg, transparent 15%, rgba(244, 63, 94, 0.28) 35%, rgba(251, 207, 232, 0.30) 50%, rgba(255, 255, 255, 0.35) 60%, transparent 80%),
    linear-gradient(90deg, rgba(46, 8, 22, 0.85) 0%, rgba(26, 4, 14, 0.88) 45%, rgba(12, 2, 8, 0.75) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3.5px solid #fb7185;
  border-right: 1px solid rgba(251, 207, 232, 0.45);
  box-shadow: inset 5px 0 14px -2px rgba(244, 63, 94, 0.85), inset 18px 0 26px -6px rgba(251, 207, 232, 0.45), 0 0 16px -2px rgba(244, 63, 94, 0.5);
  padding-right: 48px;
  animation: cs-blade-sweep 3.6s ease-in-out infinite;
}
.msg.me.cs-blade::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 50%, rgba(244, 63, 94, 0.55), transparent 45%),
    radial-gradient(circle at 90% 50%, rgba(251, 207, 232, 0.45), transparent 50%),
    radial-gradient(1.5px 1.5px at 20% 30%, #ffffff 70%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #fb7185 70%, transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, #fda4af 70%, transparent);
  pointer-events: none;
  animation: cs-blade-aura 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-blade::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 45% 45%, #ffffff 0% 25%, #f43f5e 55%, #881337 80%, #1e050f 100%);
  border: 1px solid rgba(251, 207, 232, 0.85);
  box-shadow:
    0 0 10px #f43f5e,
    0 0 18px rgba(251, 207, 232, 0.75),
    inset 0 0 4px #fff,
    -5px -4px 0 -1.5px #fbcfe8,
    -11px 6px 0 -2px #f43f5e,
    -18px -4px 0 -2.5px #ffffff;
  pointer-events: none;
  animation: cs-blade-glint 2.6s ease-in-out infinite;
}
.msg.me.cs-gear { background: linear-gradient(90deg, rgba(120, 53, 15, 0.35), rgba(252, 211, 77, 0.06)); border: 1px solid rgba(214, 163, 84, 0.6); border-radius: var(--r-sm); padding: 4px 22px 4px 7px; }
.msg.me.cs-gear::after { content: ""; position: absolute; top: 50%; right: 5px; width: 12px; height: 12px; margin-top: -6px; background: #fcd34d; -webkit-mask: url(icons/settings.svg) center / contain no-repeat; mask: url(icons/settings.svg) center / contain no-repeat; pointer-events: none; animation: cs-gear 4s steps(8, end) infinite; }
.msg.me.cs-warp {
  background: linear-gradient(90deg, transparent 0 40%, rgba(186, 230, 253, 0.35) 40% 44%, transparent 44%) 0 30% / 40px 1px repeat-x, linear-gradient(90deg, transparent 0 70%, rgba(165, 180, 252, 0.3) 70% 73%, transparent 73%) 0 75% / 56px 1px repeat-x, linear-gradient(90deg, rgba(30, 58, 138, 0.4), rgba(8, 15, 40, 0.25));
  border-left-color: #38bdf8; box-shadow: inset 3px 0 6px -2px rgba(56, 189, 248, 0.7); animation: cs-warp 1.2s linear infinite;
}
/* ── 동물 테마 10종 초특급 화려한 채팅 스타일 (Phoenix flame 능가) ─────── */
.msg.me.cs-lion-paws {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22), rgba(254, 243, 199, 0.08) 60%, rgba(245, 158, 11, 0.03));
  border-left: 3px solid #f59e0b; padding-right: 24px;
  box-shadow: inset 4px 0 10px -2px rgba(245, 158, 11, 0.65), 0 0 8px rgba(251, 191, 36, 0.25);
  animation: cs-lion-paws-glow 2.2s ease-in-out infinite;
}
.msg.me.cs-lion-paws::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(251, 191, 36, 0.35), transparent 60%);
  animation: cs-lion-sunburst 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-lion-paws::after {
  content: ""; position: absolute; top: 3px; right: 5px; width: 12px; height: 12px;
  background: #fbbf24; -webkit-mask: url(icons/paw.svg) center / contain no-repeat; mask: url(icons/paw.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 3px #f59e0b); pointer-events: none; animation: cs-sway 2.4s ease-in-out infinite;
}
@keyframes cs-lion-paws-glow {
  0%, 100% { box-shadow: inset 4px 0 9px -2px rgba(245, 158, 11, 0.55); }
  50% { box-shadow: inset 5px 0 13px -1px rgba(251, 191, 36, 0.85), 0 0 10px rgba(245, 158, 11, 0.4); }
}
@keyframes cs-lion-sunburst {
  0% { opacity: .4; transform: scaleX(.85); }
  100% { opacity: .85; transform: scaleX(1.15); }
}

.msg.me.cs-lion-roar {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.28), rgba(245, 158, 11, 0.2) 40%, rgba(254, 240, 138, 0.08) 70%, transparent);
  border-left: 3.5px solid #ea580c; padding-right: 24px;
  box-shadow: inset 5px 0 14px -3px rgba(234, 88, 12, 0.8), 0 0 12px rgba(220, 38, 38, 0.35);
  animation: cs-lion-roar-flame 1.8s ease-in-out infinite;
}
.msg.me.cs-lion-roar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(245, 158, 11, 0.45), rgba(220, 38, 38, 0.2) 45%, transparent 70%);
  animation: cs-abyss-smoke 3.2s ease-in-out infinite;
}
.msg.me.cs-lion-roar::after {
  content: ""; position: absolute; top: 2px; right: 5px; width: 13px; height: 13px;
  background: #fef08a; -webkit-mask: url(icons/sparkle.svg) center / contain no-repeat; mask: url(icons/sparkle.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 4px #ea580c) drop-shadow(0 0 8px #dc2626); pointer-events: none; animation: cs-twinkle 1.8s ease-in-out infinite;
}
@keyframes cs-lion-roar-flame {
  0%, 100% { box-shadow: inset 4px 0 10px -3px rgba(234, 88, 12, 0.65); filter: brightness(1); }
  50% { box-shadow: inset 6px 0 18px -2px rgba(254, 240, 138, 0.9), 0 0 14px rgba(234, 88, 12, 0.5); filter: brightness(1.2); }
}

.msg.me.cs-tiger-paw {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.24), rgba(254, 215, 170, 0.1) 50%, rgba(249, 115, 22, 0.03));
  border-left: 3px solid #f97316; padding-right: 24px;
  box-shadow: inset 4px 0 10px -2px rgba(234, 88, 12, 0.7), 0 0 8px rgba(249, 115, 22, 0.3);
  animation: cs-tiger-paw-bounce 2.2s ease-in-out infinite;
}
.msg.me.cs-tiger-paw::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent 0 80%, rgba(234, 88, 12, 0.18) 80% 90%, transparent 90%) 0 0 / 28px 100%;
  animation: cs-tide 3s linear infinite;
}
.msg.me.cs-tiger-paw::after {
  content: ""; position: absolute; top: 3px; right: 5px; width: 12px; height: 12px;
  background: #f97316; -webkit-mask: url(icons/paw.svg) center / contain no-repeat; mask: url(icons/paw.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 3px #ea580c); pointer-events: none; animation: cs-blink 2.0s steps(2, end) infinite;
}
@keyframes cs-tiger-paw-bounce {
  0%, 100% { box-shadow: inset 4px 0 9px -2px rgba(234, 88, 12, 0.6); }
  50% { box-shadow: inset 5px 0 14px -1px rgba(249, 115, 22, 0.85), 0 0 10px rgba(234, 88, 12, 0.4); }
}

.msg.me.cs-tiger-claw {
  background: linear-gradient(90deg, rgba(194, 65, 12, 0.32), rgba(253, 224, 71, 0.12) 55%, transparent);
  border-left: 3.5px solid #fde047; padding-right: 24px;
  box-shadow: inset 5px 0 14px -2px rgba(234, 88, 12, 0.85), 0 0 14px rgba(253, 224, 71, 0.4);
  animation: cs-mountain-tiger-roar 2.0s ease-in-out infinite;
}
.msg.me.cs-tiger-claw::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 10% 50%, rgba(234, 88, 12, 0.5), transparent 65%);
  animation: cs-abyss-smoke 2.8s ease-in-out infinite;
}
.msg.me.cs-tiger-claw::after {
  content: ""; position: absolute; top: 2px; right: 4px; width: 12px; height: 12px;
  background: #fde047; -webkit-mask: url(icons/bolt.svg) center / contain no-repeat; mask: url(icons/bolt.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 4px #ea580c) drop-shadow(0 0 8px #fde047); pointer-events: none; animation: cs-tiger-flash 2.2s steps(1, end) infinite;
}
@keyframes cs-mountain-tiger-roar {
  0%, 100% { box-shadow: inset 4px 0 10px -2px rgba(234, 88, 12, 0.7); filter: brightness(1); }
  50% { box-shadow: inset 6px 0 18px -1px rgba(253, 224, 71, 0.95), 0 0 16px rgba(234, 88, 12, 0.6); filter: brightness(1.22); }
}

.msg.me.cs-puppy-wag {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.22), rgba(254, 243, 199, 0.09) 60%, transparent);
  border-left: 3px solid #d97706; padding-right: 24px;
  box-shadow: inset 4px 0 10px -2px rgba(217, 119, 6, 0.65), 0 0 8px rgba(245, 158, 11, 0.25);
  animation: cs-puppy-wag-wave 2.0s ease-in-out infinite;
}
.msg.me.cs-puppy-wag::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(245, 158, 11, 0.3), transparent 60%);
  animation: cs-lion-sunburst 2.6s ease-in-out infinite alternate;
}
.msg.me.cs-puppy-wag::after {
  content: ""; position: absolute; top: 3px; right: 5px; width: 12px; height: 12px;
  background: #fbbf24; -webkit-mask: url(icons/paw.svg) center / contain no-repeat; mask: url(icons/paw.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 3px #d97706); pointer-events: none; animation: cs-sway 2.0s ease-in-out infinite;
}
@keyframes cs-puppy-wag-wave {
  0%, 100% { box-shadow: inset 4px 0 9px -2px rgba(217, 119, 6, 0.55); }
  50% { box-shadow: inset 5px 0 14px -1px rgba(245, 158, 11, 0.85), 0 0 10px rgba(217, 119, 6, 0.35); }
}

.msg.me.cs-hound-guard {
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.45), rgba(2, 132, 199, 0.22) 45%, rgba(186, 230, 253, 0.06) 75%, transparent);
  border-left: 3.5px solid #38bdf8; padding-right: 24px;
  box-shadow: inset 5px 0 14px -2px rgba(56, 189, 248, 0.8), 0 0 12px rgba(2, 132, 199, 0.45);
  animation: cs-hound-guard-barrier 2.4s ease-in-out infinite;
}
.msg.me.cs-hound-guard::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 12% 50%, rgba(56, 189, 248, 0.4), transparent 60%);
  animation: cs-abyss-smoke 3.4s ease-in-out infinite;
}
.msg.me.cs-hound-guard::after {
  content: ""; position: absolute; top: 3px; right: 5px; width: 11px; height: 11px;
  transform: rotate(45deg); border: 1.5px solid #38bdf8; box-shadow: 0 0 5px #e0f2fe, 0 0 8px #0284c7;
  background: rgba(56, 189, 248, 0.35); pointer-events: none; animation: cs-twinkle 2.2s ease-in-out infinite;
}
@keyframes cs-hound-guard-barrier {
  0%, 100% { box-shadow: inset 4px 0 10px -2px rgba(56, 189, 248, 0.65); filter: brightness(1); }
  50% { box-shadow: inset 6px 0 18px -1px #38bdf8, 0 0 16px rgba(2, 132, 199, 0.6); filter: brightness(1.25); }
}

.msg.me.cs-cat-purr {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.2), rgba(254, 240, 138, 0.1) 50%, rgba(253, 164, 175, 0.06) 80%, transparent);
  border-left: 3px solid #f59e0b; padding-right: 24px;
  box-shadow: inset 4px 0 10px -2px rgba(245, 158, 11, 0.65), 0 0 8px rgba(254, 240, 138, 0.3);
  animation: cs-cat-purr-pulse 2.6s ease-in-out infinite;
}
.msg.me.cs-cat-purr::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(254, 240, 138, 0.35), transparent 60%);
  animation: cs-lion-sunburst 3.0s ease-in-out infinite alternate;
}
.msg.me.cs-cat-purr::after {
  content: ""; position: absolute; top: 2px; right: 4px; width: 12px; height: 12px;
  background: #fde047; -webkit-mask: url(icons/paw.svg) center / contain no-repeat; mask: url(icons/paw.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 3px #f59e0b); pointer-events: none; animation: cs-sway 2.8s ease-in-out infinite;
}
@keyframes cs-cat-purr-pulse {
  0%, 100% { box-shadow: inset 4px 0 9px -2px rgba(245, 158, 11, 0.55); }
  50% { box-shadow: inset 5px 0 14px -1px rgba(251, 191, 36, 0.85), 0 0 10px rgba(245, 158, 11, 0.4); }
}

.msg.me.cs-panther-shadow {
  background: linear-gradient(90deg, rgba(59, 7, 100, 0.55), rgba(126, 34, 206, 0.25) 45%, rgba(15, 3, 25, 0.2) 80%, transparent);
  border-left: 3.5px solid #a855f7; padding-right: 24px;
  box-shadow: inset 5px 0 14px -2px rgba(168, 85, 247, 0.85), 0 0 12px rgba(126, 34, 206, 0.5);
  animation: cs-panther-shadow-breathe 2.2s ease-in-out infinite;
}
.msg.me.cs-panther-shadow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(168, 85, 247, 0.45), transparent 60%);
  animation: cs-abyss-smoke 3.6s ease-in-out infinite;
}
.msg.me.cs-panther-shadow::after {
  content: ""; position: absolute; top: 2px; right: 5px; width: 12px; height: 12px;
  background: #c084fc; -webkit-mask: url(icons/sparkle.svg) center / contain no-repeat; mask: url(icons/sparkle.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 4px #a855f7) drop-shadow(0 0 8px #7e22ce); pointer-events: none; animation: cs-twinkle 2.0s ease-in-out infinite;
}
@keyframes cs-panther-shadow-breathe {
  0%, 100% { box-shadow: inset 4px 0 10px -2px rgba(168, 85, 247, 0.7); filter: brightness(1); }
  50% { box-shadow: inset 6px 0 18px -1px #a855f7, 0 0 16px rgba(168, 85, 247, 0.6); filter: brightness(1.25); }
}

.msg.me.cs-whale-bubble {
  background: linear-gradient(90deg, rgba(3, 105, 161, 0.28), rgba(56, 189, 248, 0.14) 50%, rgba(240, 253, 250, 0.05) 80%, transparent);
  border-left: 3px solid #38bdf8; padding-right: 24px;
  box-shadow: inset 4px 0 10px -2px rgba(56, 189, 248, 0.75), 0 0 10px rgba(56, 189, 248, 0.35);
  animation: cs-whale-bubble-surge 2.2s ease-in-out infinite;
}
.msg.me.cs-whale-bubble::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 50%, rgba(56, 189, 248, 0.35), transparent 60%);
  animation: cs-lion-sunburst 2.8s ease-in-out infinite alternate;
}
.msg.me.cs-whale-bubble::after {
  content: ""; position: absolute; top: 3px; right: 5px; width: 9px; height: 9px;
  border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 5px #38bdf8, 0 0 9px #7dd3fc;
  background: rgba(56, 189, 248, 0.4); pointer-events: none; animation: cs-twinkle 2.0s ease-in-out infinite;
}
@keyframes cs-whale-bubble-surge {
  0%, 100% { box-shadow: inset 4px 0 9px -2px rgba(56, 189, 248, 0.6); }
  50% { box-shadow: inset 5px 0 14px -1px #38bdf8, 0 0 12px rgba(56, 189, 248, 0.5); }
}

.msg.me.cs-orca-wave {
  background: linear-gradient(90deg, rgba(2, 44, 34, 0.6), rgba(8, 145, 178, 0.32) 40%, rgba(3, 7, 18, 0.4) 80%, transparent);
  border-left: 3.5px solid #22d3ee; padding-right: 24px;
  box-shadow: inset 5px 0 15px -2px rgba(6, 182, 212, 0.9), 0 0 14px rgba(34, 211, 238, 0.5);
  animation: cs-orca-wave-surge 2.0s ease-in-out infinite;
}
.msg.me.cs-orca-wave::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 12% 50%, rgba(6, 182, 212, 0.45), transparent 65%);
  animation: cs-abyss-smoke 3.0s ease-in-out infinite;
}
.msg.me.cs-orca-wave::after {
  content: ""; position: absolute; top: 2px; right: 5px; width: 12px; height: 12px;
  background: #22d3ee; -webkit-mask: url(icons/sparkle.svg) center / contain no-repeat; mask: url(icons/sparkle.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 4px #06b6d4) drop-shadow(0 0 8px #22d3ee); pointer-events: none; animation: cs-twinkle 1.8s ease-in-out infinite;
}
@keyframes cs-orca-wave-surge {
  0%, 100% { box-shadow: inset 4px 0 10px -2px rgba(6, 182, 212, 0.7); filter: brightness(1); }
  50% { box-shadow: inset 6px 0 18px -1px #22d3ee, 0 0 16px rgba(6, 182, 212, 0.7); filter: brightness(1.25); }
}
@keyframes cs-tiger { to { background-position: 46px 0, 0 0; } }
@keyframes cs-tiger-flash { 0%, 72%, 100% { opacity: 0.35; transform: none; } 74% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 3px #e0f2fe); } 78% { opacity: 0.3; } 82% { opacity: 1; } }
@keyframes cs-abyss { 50% { box-shadow: inset 6px 0 12px -4px rgba(168, 85, 247, 0.6); } }
@keyframes cs-abyss-smoke { 0%, 100% { opacity: 0.4; transform: scaleX(0.8); } 50% { opacity: 1; transform: scaleX(1.15); } }
/* 구미호 채팅 애니메이션 */
@keyframes cs-foxfire-sweep {
  0%, 100% {
    background-position: 0 0, 0 0;
    box-shadow: inset 5px 0 14px -2px rgba(236, 72, 153, 0.85), inset 18px 0 26px -6px rgba(192, 132, 252, 0.5), 0 0 16px -2px rgba(236, 72, 153, 0.5);
  }
  50% {
    background-position: 100% 0, 0 0;
    box-shadow: inset 7px 0 20px -2px rgba(253, 242, 248, 0.95), inset 22px 0 32px -4px rgba(236, 72, 153, 0.7), 0 0 22px 0 rgba(192, 132, 252, 0.7);
  }
}
@keyframes cs-foxfire-aura {
  0%, 100% { opacity: 0.45; transform: scaleX(0.96); filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.5)); }
  50% { opacity: 0.95; transform: scaleX(1.04); filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.8)); }
}
@keyframes cs-foxfire-orb-spin { to { transform: rotate(360deg); } }
@keyframes cs-foxfire-pulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px #ec4899); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #c084fc); }
}

/* 천사 날개 채팅 애니메이션 */
@keyframes cs-halo-sweep {
  0%, 100% {
    background-position: 0 0, 0 0;
    box-shadow: inset 5px 0 14px -2px rgba(253, 224, 71, 0.85), inset 18px 0 26px -6px rgba(251, 191, 36, 0.5), 0 0 16px -2px rgba(253, 224, 71, 0.5);
  }
  50% {
    background-position: 100% 0, 0 0;
    box-shadow: inset 7px 0 20px -2px rgba(255, 255, 255, 0.95), inset 22px 0 32px -4px rgba(253, 224, 71, 0.7), 0 0 22px 0 rgba(251, 191, 36, 0.7);
  }
}
@keyframes cs-halo-aura {
  0%, 100% { opacity: 0.45; transform: scaleX(0.96); filter: drop-shadow(0 0 3px rgba(253, 224, 71, 0.5)); }
  50% { opacity: 0.95; transform: scaleX(1.04); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)); }
}
@keyframes cs-halo-wing-flap {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14) translateY(-1px); }
}
@keyframes cs-halo-pulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px #fde047); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #fbbf24); }
}

/* 악마 날개 채팅 애니메이션 */
@keyframes cs-hellfire-sweep {
  0%, 100% {
    background-position: 0 0, 0 0;
    box-shadow: inset 5px 0 14px -2px rgba(220, 38, 38, 0.85), inset 18px 0 26px -6px rgba(249, 115, 22, 0.5), 0 0 16px -2px rgba(220, 38, 38, 0.5);
  }
  50% {
    background-position: 100% 0, 0 0;
    box-shadow: inset 7px 0 20px -2px rgba(254, 240, 138, 0.95), inset 22px 0 32px -4px rgba(220, 38, 38, 0.7), 0 0 22px 0 rgba(249, 115, 22, 0.7);
  }
}
@keyframes cs-hellfire-aura {
  0%, 100% { opacity: 0.45; transform: scaleX(0.96); filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.5)); }
  50% { opacity: 0.95; transform: scaleX(1.04); filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.8)); }
}
@keyframes cs-hellfire-spin { to { transform: rotate(360deg); } }
@keyframes cs-hellfire-pulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px #dc2626); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 14px #f97316); }
}
@keyframes cs-tide { to { background-position: -10px 0; } }
@keyframes cs-drum-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-drum-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-drum-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #fde047); }
  10% { transform: scale(1.15); filter: drop-shadow(0 0 8px #00e5ff) drop-shadow(0 0 14px #fde047); }
}
@keyframes cs-bloom-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-bloom-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-bloom-spin {
  0%, 100% { transform: rotate(0deg) scale(0.95); filter: drop-shadow(0 0 4px #f472b6); }
  50% { transform: rotate(180deg) scale(1.1); filter: drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 14px #f472b6); }
}
@keyframes cs-magma-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-magma-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-magma-core-pulse {
  0%, 100% { transform: scale(0.95); filter: drop-shadow(0 0 4px #ea580c); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 8px #fde047) drop-shadow(0 0 14px #ea580c); }
}
@keyframes cs-ribbon { to { background-position: 0 0, 100% 0; } }
@keyframes cs-oni { 0%, 84%, 100% { transform: none; } 86% { transform: translateX(1px) skewX(-3deg); filter: hue-rotate(-25deg); } 89% { transform: translateX(-1px); } 91% { transform: none; filter: none; } }
@keyframes cs-oni-ghost { 0%, 84%, 92%, 100% { opacity: 0; transform: none; } 86% { opacity: 0.9; transform: translateX(3px); } 89% { opacity: 0.6; transform: translateX(-2px); } }
@keyframes cs-prism-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-prism-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-prism-gem-pulse {
  0%, 100% { transform: rotate(45deg) scale(0.9); filter: drop-shadow(0 0 4px #c084fc); }
  50% { transform: rotate(135deg) scale(1.15); filter: drop-shadow(0 0 8px #67e8f9) drop-shadow(0 0 14px #c084fc); }
}
@keyframes cs-jelly { 0%, 100% { opacity: 0.35; transform: scaleX(0.6); } 40% { opacity: 1; transform: scaleX(1.2); } }
@keyframes cs-blade-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-blade-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-blade-glint {
  0%, 100% { transform: rotate(0deg) scale(0.95); filter: drop-shadow(0 0 4px #f43f5e); }
  50% { transform: rotate(15deg) scale(1.12); filter: drop-shadow(0 0 8px #fbcfe8) drop-shadow(0 0 14px #f43f5e); }
}
@keyframes cs-gear { to { transform: rotate(360deg); } }
@keyframes cs-warp { to { background-position: -40px 30%, -56px 75%, 0 0; } }
@keyframes cs-frost-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-frost-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-frost-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #7dd3fc); }
  10% { transform: scale(1.15); filter: drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #38bdf8); }
}
@keyframes cs-emperor-sweep {
  0%, 100% { background-position: 0% 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-emperor-aura {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1.0; }
}
@keyframes cs-emperor-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #fbbf24); }
  10% { transform: scale(1.15); filter: drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #f59e0b); }
}
/* 방송실 채팅은 최근 12줄만 움직인다(뱃지 효과와 같은 기준) */
.messages .msg.chat-style:nth-last-child(n + 13),
.messages .msg.chat-style:nth-last-child(n + 13)::before,
.messages .msg.chat-style:nth-last-child(n + 13)::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .msg.chat-style, .msg.chat-style::before, .msg.chat-style::after { animation: none !important; }
}

/* 상점 카드 썸네일 */
.item-style-thumb.chat-style { display: inline-flex; align-items: center; gap: 3px; padding: 5px 7px; font-size: 11px; line-height: 1.3; color: #f8fafc; white-space: nowrap; animation-play-state: running; }
.item-style-thumb.chat-style b { font-weight: 800; }
.item-style-thumb.cs-sakura, .item-style-thumb.cs-party, .item-style-thumb.cs-pixel-cat, .item-style-thumb.cs-yarn, .item-style-thumb.cs-pixel-hero { padding-right: 16px; }
.item-style-thumb.cs-black-hole, .item-style-thumb.cs-foxfire, .item-style-thumb.cs-halo, .item-style-thumb.cs-hellfire, .item-style-thumb.cs-flame, .item-style-thumb.cs-galaxy, .item-style-thumb.cs-thunder, .item-style-thumb.cs-tiger, .item-style-thumb.cs-oni, .item-style-thumb.cs-drum, .item-style-thumb.cs-bloom, .item-style-thumb.cs-magma, .item-style-thumb.cs-prism, .item-style-thumb.cs-blade, .item-style-thumb.cs-frost, .item-style-thumb.cs-emperor { padding-right: 20px; }
.item-style-thumb.cs-sakura::after, .item-style-thumb.cs-party::after, .item-style-thumb.cs-pixel-cat::after, .item-style-thumb.cs-yarn::after, .item-style-thumb.cs-pixel-hero::after { right: 2px; }
.item-style-thumb.cs-black-hole::after, .item-style-thumb.cs-foxfire::after, .item-style-thumb.cs-halo::after, .item-style-thumb.cs-hellfire::after, .item-style-thumb.cs-flame::after, .item-style-thumb.cs-galaxy::after, .item-style-thumb.cs-thunder::after, .item-style-thumb.cs-tiger::after, .item-style-thumb.cs-oni::after, .item-style-thumb.cs-drum::after, .item-style-thumb.cs-bloom::after, .item-style-thumb.cs-magma::after, .item-style-thumb.cs-prism::after, .item-style-thumb.cs-blade::after, .item-style-thumb.cs-frost::after, .item-style-thumb.cs-emperor::after { width: 13px; height: 13px; top: 3px; right: 3px; }
.item-style-thumb.cs-ribbon, .item-style-thumb.cs-gear { padding-right: 18px; }
.item-style-thumb.cs-ribbon::after, .item-style-thumb.cs-gear::after { right: 3px; }
.item-card-status.trying { color: #0b0d11; background: #fcd34d; }

/* ── 미리 입어 보기 미리보기 ── */
.items-preview-box.tryon { align-items: stretch; justify-content: flex-start; gap: 12px; }
.tryon-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tryon-top .preview-avatar-container { flex: none; margin: 6px 8px 6px 6px; }
.tryon-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.tryon-chip { display: inline-flex; flex-direction: column; gap: 2px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); color: var(--text); font-size: 11.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tryon-chip small { color: var(--dim); font-size: 10px; font-weight: 600; }
.tryon-chip.trying { border-color: rgba(252, 211, 77, 0.6); background: rgba(252, 211, 77, 0.1); }
.tryon-chip.trying small { color: #fcd34d; }
button.tryon-chip { font-family: inherit; text-align: left; cursor: pointer; }
button.tryon-chip:not(.trying):not(:disabled) { opacity: .6; border-style: dashed; }
button.tryon-chip:not(:disabled):hover { border-color: rgba(252, 211, 77, 0.9); opacity: 1; }
button.tryon-chip:disabled { cursor: default; }
button.tryon-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tryon-chat { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
.tryon-chat .msg { animation: none; }
.tryon-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-self: stretch; }
.tryon-reset, .tryon-set { white-space: nowrap; }
.tryon-set-back:not(:disabled) { border-color: rgba(255, 205, 76, 0.6); color: #ffe08a; }
.item-try-set { margin-top: 8px; white-space: nowrap; }
.tryon-set-fx { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--r-full); background: rgba(255, 205, 76, .16); border: 1px solid rgba(255, 205, 76, .5); color: #ffe08a; font-size: 11px; font-weight: 800; white-space: nowrap; }
.items-preview-box.tryon.set-on .preview-avatar-container { filter: drop-shadow(0 0 8px rgba(255, 205, 76, .55)); }
.tryon-viewer-head { display: flex; align-items: center; gap: 12px; min-width: 0; word-break: keep-all; }
.tryon-viewer-head > div:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tryon-viewer-av { width: 52px; height: 52px; flex: none; display: grid; place-content: center; border-radius: 16px; color: #0b0d11; font-size: 26px; font-weight: 800; position: relative; overflow: hidden; }
.tryon-viewer-av img { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (min-width: 861px) { .items-detail-panel { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); } }

/* ── 가입과 로그인 (authModal, 계정 칸, 랭킹 가입 안내) ───────────────── */
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { filter: brightness(1.15); }
.auth-box { width: min(440px, 94vw); position: relative; gap: 14px; word-break: keep-all; }
.auth-head { display: flex; flex-direction: column; gap: 6px; padding-right: 32px; }
.auth-head .lbl { font-size: 13px; line-height: 1.5; }
.auth-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); display: grid; place-content: center; cursor: pointer; }
.auth-close:hover { color: var(--text-bright); border-color: var(--line-strong); }
.auth-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #121419; border: 1px solid var(--line); border-radius: var(--r-md); }
.auth-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 8px 0; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.auth-tabs button[aria-selected="true"] { background: var(--bg-active); color: var(--text-bright); }
.auth-pane { display: flex; flex-direction: column; gap: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input:disabled, .auth-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-submit { width: 100%; height: 44px; font-size: 14.5px; }
.auth-hint { font-size: 11.5px; color: var(--dim); font-weight: 500; }
.auth-hint.good { color: #34d399; }
.auth-error { margin: 0; color: var(--live); font-size: 13px; font-weight: 600; line-height: 1.5; }
.auth-ok { margin: 0; color: #34d399; font-size: 13px; font-weight: 600; line-height: 1.5; }
.auth-off { margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-3); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.auth-fine { margin: 0; font-size: 11.5px; color: var(--dim); line-height: 1.5; text-align: center; }
.auth-fine a { color: var(--muted); }
.auth-text { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.auth-link { align-self: center; font-size: 12.5px; color: var(--muted); }
.auth-resend { align-self: flex-start; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 11.5px; white-space: nowrap; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-center { align-items: center; text-align: center; }
.auth-center h3 { margin: 0; font-size: 17px; color: var(--text-bright); }
.auth-center p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
/* break-all 은 한글 안내 문구도 글자 단위로 쪼갠다. 긴 이메일은 .account-email 이 따로 맡는다 */
.auth-center b { color: var(--text-bright); word-break: keep-all; overflow-wrap: break-word; }
.auth-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-content: center; background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.auth-icon svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.auth-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* 구글 버튼: 흰 바탕 + 네 색 G(원래 로고 파일 아님) */
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s, box-shadow 0.15s; }
.google-btn:hover { background: #f7f8f8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.google-btn.small { width: auto; height: 32px; padding: 0 12px; font-size: 12.5px; gap: 8px; }
.g-mark { width: 18px; height: 18px; flex: none; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="3.4"><circle cx="12" cy="12" r="8" stroke="%234285F4" stroke-dasharray="6.28 50.27"/><circle cx="12" cy="12" r="8" stroke="%2334A853" stroke-dasharray="14.66 50.27" stroke-dashoffset="-6.28"/><circle cx="12" cy="12" r="8" stroke="%23FBBC05" stroke-dasharray="9.08 50.27" stroke-dashoffset="-20.94"/><circle cx="12" cy="12" r="8" stroke="%23EA4335" stroke-dasharray="13.96 50.27" stroke-dashoffset="-30.02"/><path d="M12 12h8.2" stroke="%234285F4"/></svg>') center / contain no-repeat; }
.google-btn.small .g-mark { width: 15px; height: 15px; }

/* 내 계정 칸 */
.account-body { display: flex; flex-direction: column; gap: 10px; word-break: keep-all; }
.account-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-email { font-size: 14px; font-weight: 700; color: var(--text-bright); word-break: break-all; }
.account-email.muted { color: var(--muted); word-break: keep-all; }
.account-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.account-badge.ok { color: #34d399; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.account-badge.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.account-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 랭킹: 가입 안내 */
.rank-join { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rank-join p { margin: 0; font-size: 12px; color: var(--muted); word-break: keep-all; }
.rank-join .btn { align-self: flex-start; }
.rank-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-md); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.04)); border: 1px solid rgba(var(--accent-rgb), 0.3); word-break: keep-all; }
.rank-banner-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rank-banner-text b { font-size: 14.5px; color: var(--text-bright); }
.rank-banner-text span { font-size: 12.5px; color: var(--muted); }
.rank-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rank-guest-row { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); font-size: 13px; color: var(--muted); word-break: keep-all; }
.rank-guest-row b { color: var(--accent); }
.rank-guest-tag { font-weight: 700; color: var(--text); white-space: nowrap; }
.rank-guest-name { color: var(--text-bright); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
@media (max-width: 560px) {
  .auth-box { gap: 12px; }
  .rank-banner-actions { width: 100%; }
  .rank-banner-actions > * { flex: 1; }
}

/* ── 아이콘(이모지 대신 SVG). .ico 는 라인(currentColor, 강조 채움은 --ico-accent), .art 는 색이 정해진 그림 ── */
.ico { display: inline-block; width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; overflow: visible; --ico-accent: currentColor; pointer-events: none; }
.art { display: inline-block; width: 1.3em; height: 1.3em; flex: none; vertical-align: -0.3em; object-fit: contain; pointer-events: none; }
.menu-item i { display: inline-grid; place-items: center; }
.menu-item i .ico { width: 17px; height: 17px; vertical-align: 0; }
.menu-item.active i .ico { --ico-accent: var(--accent); --ico-accent-o: .35; }
.side-logout .ico { width: 15px; height: 15px; vertical-align: 0; }
.side-title .ico { width: 13px; height: 13px; color: var(--gold, #ffc542); }
.likes i .ico { --ico-accent-o: 1; width: 16px; height: 16px; vertical-align: -3px; }
.btn .ico, .chat-head button .ico, .items-cat-btn .ico, .spicy-toggle .ico { vertical-align: 0; }
.btn.go .ico, .btn.end .ico { width: 12px; height: 12px; }
.chat-head button .ico { width: 13px; height: 13px; vertical-align: -2px; }
#clearBtn .ico { width: 14px; height: 14px; }
.pinned i .ico { width: 14px; height: 14px; color: var(--accent); }
.emote-toggle-btn .ico { width: 20px; height: 20px; vertical-align: middle; }
.emote-picker-close .ico, .share-card-header .btn .ico { width: 14px; height: 14px; }
.poll-btn .ico { width: 16px; height: 16px; }
.gate-safe b .ico, .gate-steps .ico { color: var(--accent); }
.msg.system .ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: 1px; }
.msg.system.join.loyal .ico, .msg.system.return .ico { color: #4ade80; --ico-accent-o: .5; }
.msg .amt .ico { width: 13px; height: 13px; vertical-align: -2px; color: var(--gold, #ffc542); }
.msg.deleted .txt .ico { width: 12px; height: 12px; vertical-align: -2px; }
.overlay-event .ico { vertical-align: -0.2em; }
.noti .ic .ico { width: 18px; height: 18px; color: var(--accent); }
.noti.cheese .ic .ico { color: var(--gold, #ffc542); }
.noti.sub .ic .ico { color: #c084fc; }
.medal { display: inline-grid; place-items: center; }
.ico.medal-1 { color: #ffd24a; --ico-accent-o: .5; }
.ico.medal-2 { color: #c3c8d4; --ico-accent-o: .5; }
.ico.medal-3 { color: #d9905a; --ico-accent-o: .5; }
.rank-top .medal .ico { width: 15px; height: 15px; vertical-align: -3px; }
.hall-mark .ico { width: 18px; height: 18px; vertical-align: -3px; --ico-accent-o: .45; }
.mission-bar > i .ico { width: 17px; height: 17px; color: var(--gold, #ffc542); vertical-align: -3px; }
.heart .ico { width: 26px; height: 26px; --ico-accent-o: 1; }
.summary-hl-placeholder .ico { width: 28px; height: 28px; color: var(--dim); }
/* 명장면: 화면 사진 없이 글 카드, 포착한 만큼 옆으로 밀어서 본다(2026-09-15) */
.summary-hl-section .summary-hl-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 6px; scrollbar-width: thin; }
.summary-hl-section .summary-hl-item { flex: 0 0 min(240px, 78%); scroll-snap-align: start; }
.summary-hl-section .summary-hl-placeholder { height: 56px; aspect-ratio: auto; }
.summary-hl-section .summary-hl-placeholder .ico { width: 24px; height: 24px; color: var(--accent); }
.summary-hl-section .summary-hl-tag { font-size: 15px; }
.summary-hl-section .summary-hl-meta { font-size: 13px; }
.summary-hl-tag .ico, .summary-hl-title .ico { width: 14px; height: 14px; vertical-align: -2px; }
.special-avatar span { display: grid; place-items: center; width: 100%; height: 100%; }
.special-avatar img.art { position: static !important; inset: auto; width: 72% !important; height: 72% !important; object-fit: contain; vertical-align: 0; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.special-avatar { place-content: stretch !important; }
.tryon-viewer-av.special-avatar img.art { width: 40px !important; height: 40px !important; }
/* flex 칸은 아이콘 뒤 띄어쓰기가 사라지니 여백으로 */
.overlay-top > span .ico, .items-cat-btn .ico { margin-right: 5px; }
.currency-emoji .ico { width: 1.25em; height: 1.25em; vertical-align: -0.25em; color: var(--gold, #ffc542); }
.person .nm .art, .hire-who .rl .art, .rl .art { width: 16px; height: 16px; vertical-align: -3px; }
.person-lock-chip .ico { width: 12px; height: 12px; vertical-align: -2px; }
h2 .art { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.pill-sub .ico { width: 11px; height: 11px; vertical-align: -1px; }
.item-viewer-thumb .art { width: 34px; height: 34px; }
.item-voice-thumb .art { width: 32px; height: 32px; }
.unlock-voice-icon .art { width: 48px; height: 48px; }
.gacha-icon { display: grid; place-items: center; }
.gacha-icon .art { width: 42px; height: 42px; vertical-align: 0; }
.tts-menu .ico { width: 12px; height: 12px; vertical-align: -2px; }
.tts-menu .tts-allow.locked .ico { color: var(--gold, #ffc542); }
.item-set-pieces .ico, .quest-row b .ico, .tryon-set-fx .ico { width: 11px; height: 11px; vertical-align: -1px; }
.tryon-set-fx .ico { margin-right: 3px; }
.pip-fold .ico { width: 16px; height: 16px; vertical-align: middle; }
body.pip.mini .pip-bubble span .ico { display: none; }
.mic-caption b .ico { width: 12px; height: 12px; vertical-align: -2px; }
.still-tag .ico { width: 12px; height: 12px; vertical-align: -2px; }
.card-mini-toast .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* 무료 AI 안내(설정 창) */
.free-ai { display: grid; gap: 8px; }
.free-why summary { cursor: pointer; font-size: 13px; color: var(--muted, #9aa3ad); word-break: keep-all; }
.free-why ul.lbl { margin: 4px 0; padding-left: 18px; display: grid; gap: 4px; }
.free-why .lbl { word-break: keep-all; }

/* ── 왼쪽 위 로고: 누르면 이 화면 새로고침 ─────────────── */
button.brand { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; border-radius: var(--r-md); }
.side button.brand { border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
button.brand:hover .logo-name { color: var(--text-bright); }
button.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 960px) { .side button.brand { border-bottom: 0; border-radius: var(--r-md); } }

/* ── 설정 창: 위에 탭, 넓게 두 칸(MoToo 계정 설정), 아래 내용만 스크롤 ───────── */
.modal-box.settings-box { width: min(980px, calc(100vw - 24px)); height: auto; max-height: min(92dvh, calc(100dvh - 24px)); padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; }
.settings-box [hidden] { display: none !important; }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px 24px; flex: none; }
.settings-head .btn { flex: none; }
.settings-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs button { flex: none; display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 10px 12px 11px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.settings-tabs button:hover { color: var(--text-bright); }
.settings-tabs button[aria-selected="true"] { color: var(--text-bright); border-bottom-color: var(--accent); }
.settings-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-sm); }
.settings-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 24px 24px; }
.settings-panel { display: flex; flex-direction: column; gap: 14px; word-break: keep-all; }
.settings-panel[hidden] { display: none; }
.set-form { display: flex; flex-direction: column; gap: 16px; }
.set-lead { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-bright); }
.set-card { display: flex; flex-direction: column; gap: 10px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.set-card[hidden] { display: none; }
.set-card h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text-bright); }
.set-card .lbl { margin: 0; line-height: 1.55; }
.set-card .name-form .btn { flex: none; white-space: nowrap; }
.set-avatar-row { display: flex; align-items: center; gap: 14px; }
.set-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-content: center; font-weight: 800; font-size: 20px; background: var(--bg-2) center / cover no-repeat; color: var(--text-bright); border: 2px solid var(--line); }
.set-avatar.pic { color: transparent; }
.settings-box .theme-swatches button { font-size: 13px; padding: 10px 8px; }
.settings-box .theme-swatches button i { width: 14px; height: 14px; }
.set-msg { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); min-height: 1.4em; }
.set-msg:empty { display: none; }
.set-msg.ok { color: #34d399; }
.set-msg.err { color: var(--live); }
.set-wallet { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.set-wallet b { color: var(--text-bright); font-variant-numeric: tabular-nums; }
.set-promo { max-width: 560px; }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 28px; align-items: start; }
.set-pane { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ai-grid:not(:has(.ai-side > :not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.ai-side:not(:has(> :not([hidden]))) { display: none; }
.set-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.set-label { display: block; font-size: 12.5px; font-weight: 800; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-label small { font-weight: 500; color: var(--dim); margin-left: 4px; }
.set-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-foot .lbl { margin: 0; flex: 1 1 auto; }
.set-foot .btn { flex: none; white-space: nowrap; }
.set-sep { border: 0; border-top: 1px solid var(--line); margin: 0; }
.set-note { display: flex; flex-direction: column; gap: 8px; }
.ai-effort-note { margin: 8px 0 0; word-break: keep-all; }
.set-note .lbl { margin: 0; }
.set-look { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.set-look .set-avatar-row { flex: none; }
.set-theme { flex: 1 1 220px; max-width: 300px; }
.set-theme .theme-swatches button { font-size: 12px; padding: 7px 6px; }
.set-pane .name-form .btn { flex: none; white-space: nowrap; }
.set-pane .account-body { gap: 8px; }
/* 오른쪽 위험 구역 */
.set-pane.set-danger { margin-top: 0; padding: 16px 18px; gap: 12px; border: 1px solid rgba(255, 51, 75, 0.35); border-radius: var(--r-lg); background: rgba(255, 51, 75, 0.04); }
.set-danger > .set-label { color: var(--live); font-size: 14px; }
.set-danger > .lbl { margin: 0; }
.wd-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-box label.wd-chip { display: inline-flex; flex-direction: row; gap: 0; position: relative; cursor: pointer; }
.wd-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; margin: 0; pointer-events: none; }
.wd-chip span { display: inline-block; white-space: nowrap; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--muted); }
.wd-chip input:checked + span { border-color: var(--live); color: #ff8a98; background: rgba(255, 51, 75, 0.12); }
.wd-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-box textarea.wd-comment { min-height: 72px; }
.wd-warn { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); word-break: keep-all; }
.wd-warn b { color: #ff8a98; }
.wd-confirm { display: flex; gap: 10px; align-items: center; }
.wd-confirm input { flex: 1 1 auto; }
.btn.danger-fill { flex: none; white-space: nowrap; background: var(--live); color: #fff; border: 1px solid var(--live); height: 42px; padding: 0 18px; }
.btn.danger-fill:hover { filter: brightness(1.08); }
@media (max-width: 820px) {
  .set-grid, .ai-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .set-2col { grid-template-columns: minmax(0, 1fr); }
  .set-foot { flex-direction: column; align-items: stretch; }
  .set-foot .btn { align-self: flex-end; }
  .set-theme { max-width: none; }
  .wd-confirm { flex-direction: column; align-items: stretch; }
  .settings-head { padding: 14px 12px 8px 16px; }
  .settings-tabs { padding: 0 8px; }
  .settings-tabs button { padding: 10px 10px 11px; font-size: 13px; }
  .settings-body { padding: 14px 14px 18px; }
  .set-card { padding: 12px; }
}

/* 시청자 유형 상세: 가로로 한눈에(왼쪽 소개·닉네임, 오른쪽 채팅 예시 두 줄씩) */
.modal-box.person-box { width: min(1080px, calc(100vw - 24px)); max-height: min(92dvh, calc(100dvh - 24px)); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 28px; align-items: start; }
.pd-left, .pd-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.person-box .pd-grid h4 { margin: 6px 0 0; }
.pd-grid .pd-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pd-grid .pd-chat { word-break: keep-all; overflow-wrap: break-word; }
.pd-grid .chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 860px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
  .pd-grid .pd-samples { grid-template-columns: minmax(0, 1fr); }
}

/* 시청자들 화면 글씨 키움(작다는 요청) */
#view-people .view-head p { font-size: 15px; line-height: 1.6; }
#view-people .spicy-row small { font-size: 14px; line-height: 1.55; }
#view-people .spicy-toggle { font-size: 14px; }
#view-people .panel-head h2 { font-size: 20px; }
#view-people .panel-head .lbl, #view-people .panel .lbl, #view-people .panel p { font-size: 14px; line-height: 1.6; }
#view-people .hire-who .nm, #view-people .fan-who .nm { font-size: 16px; }
#view-people .hire-who .rl, #view-people .fan-who .rl { font-size: 13.5px; }
#view-people .person .nm { font-size: 17px; }
#view-people .person .rl { font-size: 13.5px; }
#view-people .person .ds { font-size: 14.5px; line-height: 1.55; }
#view-people .person .st { font-size: 13.5px; }
/* ── 인벤토리: 위에 지금 내 모습(상점 미리 입어 보기와 같은 재료), 칸 탭, 가진 아이템만 칸별 구역 ── */
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inv-head .btn { white-space: nowrap; }
.inv-wrap { display: flex; flex-direction: column; gap: 16px; padding: 0 clamp(16px, 2.4vw, 32px) 32px; margin-top: 16px; word-break: keep-all; }
.inv-loading { color: var(--muted); font-size: 13px; }
.inv-look { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 18px; padding: 16px; border-radius: var(--r-lg); background: var(--bg-3); border: 1px solid var(--line); min-width: 0; }
.inv-look .preview-avatar-container { margin: 6px 10px; }
.inv-look.set-on .preview-avatar-container { filter: drop-shadow(0 0 8px rgba(255, 205, 76, .55)); }
.inv-look-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inv-look-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-bright); }
.inv-sets { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.inv-sets-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.inv-sets .btn { white-space: nowrap; }
/* 완성한 세트 접기(details): 제목 줄을 눌러 열고 닫는다 */
details.inv-sets { display: block; }
details.inv-sets > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); user-select: none; }
details.inv-sets > summary::-webkit-details-marker { display: none; }
details.inv-sets > summary::after { content: "펼치기 ▾"; font-weight: 600; color: var(--dim); }
details.inv-sets[open] > summary::after { content: "접기 ▴"; }
details.inv-sets > summary b { color: var(--accent); }
details.inv-sets > summary:hover { border-color: var(--accent); color: var(--text); }
details.inv-sets .inv-sets-body { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.inv-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.inv-tabs::-webkit-scrollbar { display: none; }
.inv-tab { flex: none; white-space: nowrap; padding: 8px 12px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.inv-tab b { margin-left: 2px; color: var(--dim); font-weight: 700; }
.inv-tab:hover { color: var(--text); border-color: var(--line-strong); }
.inv-tab.on { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }
.inv-tab.on b { color: var(--accent); }
.inv-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.inv-sections.all { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.inv-section { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.inv-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.inv-section-head h3 { margin: 0; font-size: 15px; color: var(--text-bright); white-space: nowrap; }
.inv-section-head h3 small { color: var(--dim); font-size: 12px; font-weight: 700; margin-left: 2px; }
.inv-cur { font-size: 12px; color: var(--gold); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.inv-card { cursor: default; padding: 22px 8px 10px; gap: 6px; min-width: 0; background: var(--bg-3); }
.inv-card-actions { display: flex; gap: 4px; width: 100%; justify-content: center; }
/* 즐겨찾기 별: 오른쪽 위. 세트 표시는 그 왼쪽으로 비킨다 */
.inv-fav { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; display: grid; place-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--dim); cursor: pointer; }
.inv-fav .ico { width: 15px; height: 15px; }
.inv-fav:hover { color: var(--text-bright); background: rgba(255, 255, 255, 0.06); }
.inv-card.fav .inv-fav { color: #ffc542; }
.inv-card.fav .inv-fav .ico { fill: currentColor; }
.inv-card .item-set-tag { right: 34px; }
.inv-card-actions .btn { white-space: nowrap; padding: 5px 12px; font-size: 12px; }
.inv-card-actions .btn:not(.inv-play) { flex: 1 1 auto; }
.inv-play { flex: none; padding: 5px 8px !important; }
.inv-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 14px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); }
.inv-empty p { margin: 0; font-size: 13px; color: var(--muted); }
.inv-empty .btn { white-space: nowrap; }
@media (max-width: 960px) { .inv-wrap { padding: 0 16px 24px; } }
@media (max-width: 560px) {
  .inv-look { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .inv-look .preview-avatar-container { justify-self: center; }
  .inv-look-main, .inv-sets { justify-self: stretch; }
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 꾸미기 등급 탭: 분류(아이콘 알약)와 같은 모양이라 위계가 안 보였다(사장님 지적 2026-09-20).
   테두리·배경을 빼고 작은 글자 필터로 낮춘다 */
.items-rarity-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 0; scrollbar-width: none; }
.items-rarity-tabs::-webkit-scrollbar { display: none; }
.rarity-tab { flex: none; white-space: nowrap; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 5px 10px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; cursor: pointer; }
.rarity-tab b { font-weight: 600; opacity: .7; margin-left: 2px; }
.rarity-tab:hover:not(:disabled) { color: var(--text-bright); background: var(--bg-3); }
.rarity-tab.active { color: var(--accent); background: var(--accent-dim); border-color: var(--accent-border); }
.rarity-tab.active b { opacity: .9; }
.rarity-tab:disabled { opacity: .35; cursor: default; }
.rarity-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 가입 안내(무료 AI, 가입 전 방송 시작) */
.join-box { position: relative; width: min(440px, calc(100vw - 24px)); max-height: min(92dvh, calc(100dvh - 24px)); text-align: center; gap: 14px; }
.join-box h2 { margin: 6px 0 0; font-size: 20px; font-weight: 800; color: var(--text-bright); word-break: keep-all; }
.join-box .lbl { font-size: 14px; line-height: 1.6; word-break: keep-all; }
.join-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 4px; }
.join-actions .btn { width: 100%; height: 46px; justify-content: center; font-size: 15px; }
.join-actions .btn { white-space: nowrap; }
.join-own { justify-self: center; font-size: 13px; }
.join-box .modal-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }

/* ── 업적 등급·보상, 랭킹 탭 ── */
.item-rarity-pill.rarity-신화 { background: linear-gradient(135deg, #ff5fa2, #8f6bff 55%, #33d6ff); color: #fff; }
.hall-reward { display: block; margin-top: 3px; font-size: 11.5px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hall-reward .ico { width: 11px; height: 11px; vertical-align: -1px; }
.hall-item .item-rarity-pill { font-size: 10px; padding: 1px 6px; vertical-align: 1px; }
.hall-item.locked .hall-reward { opacity: 0.7; }
.rank-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rank-grade, .rank-button { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.rank-grade { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.rank-button { background: rgba(255, 197, 66, 0.16); color: var(--gold); }
#view-rank .panel-head { flex-wrap: wrap; gap: 8px; }

/* ── 첫 화면 v2: 오른쪽은 MoToo 로그인 카드 그대로(탭, 입력, 검은 버튼, 구글, 구경하기), 왼쪽은 짧은 소개 ── */
.gate-card.gate-auth { gap: 0; }
.gate-auth .gate-sub { margin: 8px 0 26px; font-size: 13px; }
.gate-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: #f2f4f6; padding: 4px; border-radius: 12px; }
.gate-tabs button { flex: 1; padding: 11px; border: none; background: transparent; border-radius: 9px; font: inherit; font-weight: 700; font-size: 14px; color: #8b95a1; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.gate-tabs button[aria-selected="true"] { background: #fff; color: #14161a; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.gate-auth form { display: flex; flex-direction: column; }
.gate-auth form[hidden] { display: none; }
.gate-auth input:not([type="checkbox"]) { display: block; width: 100%; height: 52px; padding: 0 16px; border: 1px solid #e5e8eb; border-radius: 12px; margin-bottom: 12px; font: inherit; font-size: 16px; background: #fff; color: #14161a; box-sizing: border-box; transition: border-color .15s; }
.gate-auth input::placeholder { color: #b0b8c1; }
.gate-auth input:focus { border-color: #14161a; outline: none; box-shadow: 0 0 0 3px rgba(20, 22, 26, .08); }
.gate-remember { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: #6b7684; margin: 2px 0 12px; cursor: pointer; word-break: keep-all; box-sizing: border-box; }
.gate-remember input { width: 16px; height: 16px; margin: 0; accent-color: #14161a; flex: none; }
.gate-remember a { color: #3182f6; text-decoration: underline; }
.gate-agree { align-items: flex-start; font-size: 12px; line-height: 1.5; }
.gate-agree input { margin-top: 2px; }
.gate-submit { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; background: #14161a; color: #fff; border: none; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 6px; white-space: nowrap; transition: background .15s; }
.gate-submit:hover { background: #2a2f37; }
.gate-submit:disabled { opacity: .55; cursor: progress; }
.gate-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin: 8px auto 0; background: none; border: none; color: #8b95a1; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; box-sizing: border-box; }
.gate-link:hover { color: #14161a; }
.gate-msg { margin: 0 0 10px; font-size: 13px; font-weight: 600; line-height: 1.5; color: #e5383b; word-break: keep-all; }
.gate-msg.ok { color: #0a8f5a; }
.gate-msg:empty { display: none; }
.gate-auth .gate-or { margin: 22px 0 16px; }
.gate-auth .gate-google { width: 100%; height: 50px; border-radius: 12px; border: 1px solid #e5e8eb; font-size: 15px; }
.gate-look { display: flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; width: 100%; height: 48px; margin-top: 12px; border: 1px solid rgba(0, 166, 204, .45); border-radius: 12px; background: #fff; color: #00a6cc; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.gate-look:hover { background: rgba(0, 166, 204, .06); border-color: #00a6cc; }
.gate-look svg { transition: transform .15s; }
.gate-look:hover svg { transform: translateX(3px); }
.gate-look:disabled { opacity: .55; cursor: progress; }

.gate-hero-body.gate-hero-short { gap: 28px; }
.gate-hero-short .gate-title { font-size: clamp(34px, 4.2vw, 56px); }
.gate-lead { margin: 0; color: #c9d1da; font-size: 18px; font-weight: 500; }
.gate-flow { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.gate-flow li { counter-increment: flow; display: flex; align-items: center; gap: 10px; padding: 12px 16px 15px; border-radius: 6px; background: rgba(13, 15, 20, .82); border: 1px solid var(--accent-border); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .26), inset 3px 0 0 rgba(var(--accent-rgb), .18); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.gate-flow li::before { content: counter(flow); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--accent); color: #0b0d12; box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .35); font-size: 13px; font-weight: 800; }
.gate-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gate-chips li { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(13, 15, 20, .74); color: #aeb7c2; font-size: 13px; white-space: nowrap; }
.gate-chips .ico { width: 14px; height: 14px; color: var(--accent); }
@media (max-width: 400px) {
  .gate-tabs button { padding: 10px 6px; }
}

/* ── 채널 성향 막대 ── */
.style-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.style-end { font-size: 12px; color: var(--muted, #8b95a1); white-space: nowrap; }
.style-track { position: relative; flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .55), rgba(255, 255, 255, .08) 50%, rgba(177, 151, 252, .6)); }
.style-track i { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); transform: translate(-50%, -50%); }
.style-nums { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--text-2, #c9d1da); font-variant-numeric: tabular-nums; }
.style-tip { margin: 10px 0 0; word-break: keep-all; }
/* 가운데 정렬된 안내 상자 안에서 버튼만 왼쪽에 붙어 있던 것(사장님 지적 2026-09-16) */
.safari-helper-btn { display: block; margin: 8px auto 0; white-space: nowrap; }

/* ── 설정 창 v2: 탭을 바꿔도 창 크기 그대로, AI 고르기는 카드·목록·버튼(숨긴 select 가 원본) ── */
.modal-box.settings-box { height: min(760px, calc(100dvh - 24px)); }
.sr-select { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.ai-cards { display: flex; flex-direction: column; gap: 10px; }
.ai-provider-intro { margin: -6px 0 0; word-break: keep-all; }
.ai-card-group { display: flex; flex-direction: column; gap: 6px; }
.ai-card-group-name { font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: .02em; }
.ai-card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ai-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-3); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.ai-card:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.ai-card.on { border-color: var(--accent-border); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-border); }
.ai-card-ico { flex: none; width: 32px; height: 32px; display: grid; place-content: center; border-radius: 9px; background: var(--bg-2); color: var(--muted); }
.ai-card.on .ai-card-ico { background: var(--accent); color: #06121a; }
.ai-card-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ai-card-text b { font-size: 13.5px; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-card-text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-models { display: flex; flex-direction: column; gap: 4px; max-height: 208px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.ai-model { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ai-model:hover { background: var(--bg-hover); }
.ai-model.on { border-color: var(--accent-border); background: var(--accent-dim); }
.ai-model-text { display: flex; flex-direction: column; min-width: 0; }
.ai-model-text b { font-size: 13.5px; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-model-text small { font-size: 11px; color: var(--dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-model-check { flex: none; width: 18px; color: var(--accent); }
.ai-model-empty { margin: 0; padding: 12px; font-size: 13px; color: var(--muted); }
.ai-effort { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-effort-btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-3); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ai-effort-btn:hover { color: var(--text-bright); border-color: var(--line-strong); }
.ai-effort-btn.on { color: #06121a; background: var(--accent); border-color: var(--accent); }
.ai-effort-btn em { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: rgba(252, 211, 77, .18); color: #fcd34d; }
.ai-effort-btn.on em { background: rgba(6, 18, 26, .18); color: #06121a; }
.ai-card:focus-visible, .ai-model:focus-visible, .ai-effort-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-key-note { margin: 0; line-height: 1.65; word-break: keep-all; text-wrap: pretty; }
.ai-key-note a { display: inline-block; margin-left: 4px; color: var(--accent); font-weight: 700; white-space: nowrap; text-underline-offset: 2px; }
.ai-key-note a:hover { color: var(--text-bright); }
.ai-key-note a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
/* 프로모션 코드: 왼쪽 입력, 오른쪽 지갑과 사용법 */
.promo-grid { align-items: stretch; }
.promo-grid .set-promo { max-width: none; }
.promo-grid .set-promo .promo-wallet { margin-top: 18px; }
.promo-side .op-note { margin-top: 0; }
.promo-wallet { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid rgba(252, 211, 77, .35); background: linear-gradient(135deg, rgba(252, 211, 77, .12), rgba(255, 159, 28, .04)); }
.promo-wallet .lbl { margin: 0; }
.promo-wallet-val { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.promo-wallet-val b { font-size: 30px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.promo-wallet-val small { font-size: 13px; color: var(--muted); font-weight: 600; }
.promo-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.promo-steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; align-items: start; word-break: keep-all; }
.promo-steps li::before { content: counter(step); grid-row: span 2; width: 26px; height: 26px; display: grid; place-content: center; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); color: var(--accent); font-size: 12.5px; font-weight: 800; }
.promo-steps b { font-size: 13.5px; color: var(--text-bright); }
.promo-steps span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 560px) {
  .modal-box.settings-box { height: calc(100dvh - 24px); }
  .ai-card-row { grid-template-columns: minmax(0, 1fr); }
}

/* ── 꾸미기 왼쪽 칸 v2: 아이콘, 보유/전체 수, 고급스러운 지갑 ── */
.items-cat-btn { gap: 10px; padding: 8px 10px; }
.items-cat-btn .cat-ico { flex: none; width: 30px; height: 30px; display: grid; place-content: center; border-radius: 9px; background: var(--bg-3); color: var(--muted); transition: background .15s, color .15s; }
.items-cat-btn .cat-ico .ico { margin: 0; }
.items-cat-btn .cat-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.items-cat-btn .cat-count { flex: none; font-size: 11.5px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.items-cat-btn:hover .cat-ico { color: var(--text-bright); }
.items-cat-btn.active { box-shadow: inset 3px 0 0 var(--accent); }
.items-cat-btn.active .cat-ico { background: var(--accent); color: #06121a; }
.items-cat-btn.active .cat-count { color: var(--accent); }
.items-cat-btn.gacha-tab .cat-ico { color: #fbbf24; background: rgba(251, 191, 36, .12); }
.items-cat-btn.gacha-tab.active { box-shadow: inset 3px 0 0 #fbbf24; background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .4); color: #fbbf24; }
.items-cat-btn.gacha-tab.active .cat-ico { background: #fbbf24; color: #1a1204; }
.items-cat-btn.gacha-tab .cat-count { color: rgba(251, 191, 36, .8); }
.items-wallet-card { position: relative; overflow: hidden; padding: 16px; border-radius: var(--r-lg); border: 1px solid rgba(252, 211, 77, .38); background: radial-gradient(120% 90% at 100% 0%, rgba(252, 211, 77, .2), transparent 60%), linear-gradient(160deg, #1d1a12, var(--bg-2) 70%); gap: 4px; }
.items-wallet-card .wallet-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #fcd34d; }
.items-wallet-card .wallet-balance-row { font-size: 26px; letter-spacing: -.01em; }
.items-wallet-card .wallet-balance-row b { font-variant-numeric: tabular-nums; }
.items-wallet-card .wallet-owned { font-size: 11.5px; color: var(--muted); }
.items-wallet-card .wallet-owned:empty { display: none; }
@media (max-width: 560px) {
  .items-cat-btn { justify-content: flex-start; text-align: left; }
  .items-cat-btn .cat-count { display: none; }
  .items-cat-btn.active { box-shadow: inset 0 -2px 0 var(--accent); }
}
/* 첫 화면 소개글: 실제 사람은 없다는 안내를 한 문단으로 */
.gate-hero .gate-lead { max-width: 560px; font-size: 16.5px; line-height: 1.65; word-break: keep-all; color: #c9d1da; text-shadow: 0 2px 5px #0d0f14, 0 0 12px #0d0f14; }
.gate-hero .gate-lead b { color: #fff; font-weight: 700; }
.gate-trust { margin: 0; max-width: 560px; padding-left: 12px; border-left: 3px solid var(--accent); font-size: 13.5px; line-height: 1.6; color: #8b95a1; word-break: keep-all; }
.gate-trust b { color: #e6ebf0; font-weight: 700; }
@media (min-width: 1200px) {
  .gate-hero-body.gate-hero-short { gap: 16px; }
  .gate-flow { width: min(310px, 100%); flex-direction: column; gap: 7px; }
  .gate-flow li { width: 100%; min-height: 40px; box-sizing: border-box; padding: 8px 12px 11px; }
  .gate-chips { display: grid; grid-template-columns: repeat(2, max-content); width: max-content; max-width: 100%; gap: 7px; }
  .gate-trust { width: min(430px, 100%); box-sizing: border-box; padding: 9px 12px; border-radius: 0 6px 6px 0; background: rgba(13, 15, 20, .72); }
  .gate-hero .app-footer { z-index: 3; background: linear-gradient(180deg, transparent, rgba(13, 15, 20, .92) 34%); }
}
/* 미리보기·캡처 주기 칸: 같은 너비, 같은 높이의 조작 버튼, 아래 설명 한 줄 */
.strip > .cell.ctl { flex: 1 1 280px; justify-content: flex-start; gap: 6px; }
.strip > .cell.ctl select, .strip > .cell.ctl button { width: 100%; height: 36px; margin-top: 2px; font-size: 13px; }
.strip > .cell.ctl .cell-help { margin-top: 0; }
/* 숫자 칸은 격자로 빈칸 없이, 미리보기·캡처 주기는 따로 한 줄에 반반 */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
/* 미리보기는 버튼 하나에 설명 한 줄, 캡처 주기는 설명이 네 줄이라 반반으로 나누면 오른쪽만 길어진다(사장님 지적 2026-09-16) */
.strip-ctl { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr); gap: 8px; margin-top: 8px; }
.strip-ctl > .cell.ctl { min-width: 0; justify-content: flex-start; gap: 6px; }
.strip-ctl > .cell.ctl select, .strip-ctl > .cell.ctl button { width: 100%; height: 36px; margin-top: 2px; font-size: 13px; }
.strip-ctl .cell-help { margin-top: 0; }
/* 왼쪽 위 로고는 사이드바를 내려도 위에 붙어 있게 */
@media (min-width: 961px) { .side .brand { position: sticky; top: -16px; z-index: 3; margin-top: -16px; padding-top: 20px; background: var(--bg-2); } }
@media (min-width: 961px) and (max-width: 1024px), (min-width: 961px) and (max-height: 720px) { .side .brand { top: -12px; margin-top: -12px; padding-top: 16px; } }
@media (max-width: 560px) { .strip-ctl { grid-template-columns: minmax(0, 1fr); } }
/* 무료 AI 안내: 문장을 짧게 끊어 목록으로, 오른쪽 칸 글은 줄 끝이 들쭉날쭉하지 않게 */
.free-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; text-wrap: pretty; }
.free-points b { color: var(--text-bright); }
.ai-side .lbl, .ai-side li, .free-why p { text-wrap: pretty; max-width: 52ch; }
.strip { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.strip-ctl { margin: 8px 20px 14px; }
@media (max-width: 1180px) { .strip { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } }
/* 내 API 키 안전 안내: 초록 강조 상자, 읽기 편한 크기 */
.key-safe { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); color: #c7f0de; font-size: 14px; line-height: 1.6; word-break: keep-all; text-wrap: pretty; }
.key-safe b { color: #34d399; }
.key-safe .ico { flex: none; width: 18px; height: 18px; margin-top: 3px; color: #34d399; }
.settings-box .key-safe[hidden] { display: none !important; }

/* 조작 칸 줄 좌우 여백·간격은 숫자 칸 줄(.strip)과 같게 */
@media (max-width: 1280px) { .strip-ctl { margin: 8px 16px 12px; } }
@media (max-width: 960px) { .strip-ctl { margin: 6px 14px 12px; gap: 6px; } }
@media (max-width: 400px) { .strip-ctl { margin: 6px 12px 10px; } }
/* 테마 색 미리보기: 방송하기 화면을 작게 그린 목업. 강조색(--accent)을 따라 바로 바뀐다 */
.set-pane .set-theme { max-width: none; flex: none; }
.theme-mock { display: grid; grid-template-columns: 22% minmax(0, 1fr) 26%; gap: 6px; height: 170px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); overflow: hidden; }
.tm-side, .tm-chat { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 8px; background: var(--bg-2); min-width: 0; }
.tm-logo { width: 60%; height: 10px; border-radius: 4px; background: var(--accent); }
.tm-menu { height: 12px; border-radius: 4px; background: var(--bg-3); }
.tm-menu.on { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.tm-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tm-screen { flex: 1; display: grid; place-content: center; border-radius: 8px; background: radial-gradient(circle at 50% 45%, var(--accent-dim), transparent 60%), #0b0c0f; }
.tm-play { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.tm-bar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm-title { width: 26%; height: 8px; border-radius: 4px; background: var(--bg-3); }
.tm-tag { font-size: 9px; padding: 1px 5px; border-radius: 4px; color: var(--accent); background: var(--accent-dim); white-space: nowrap; }
.tm-btn { margin-left: auto; font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 6px; color: #06121a; background: var(--accent); white-space: nowrap; box-shadow: 0 0 10px var(--accent-dim); }
.tm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tm-stats b { font-size: 10px; font-weight: 800; padding: 4px 5px; border-radius: 6px; background: var(--bg-2); color: var(--accent); font-variant-numeric: tabular-nums; }
.tm-msg { font-size: 9px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-msg i { font-style: normal; font-weight: 700; color: var(--text-bright); margin-right: 3px; }
.tm-msg.me i { color: var(--accent); }
.tm-send { margin-top: auto; align-self: flex-end; font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 6px; color: #06121a; background: var(--accent); }
.tm-logo, .tm-menu, .tm-tag, .tm-btn, .tm-stats b, .tm-send, .tm-screen, .tm-play { transition: background-color .25s, color .25s, box-shadow .25s; }
@media (prefers-reduced-motion: reduce) { .theme-mock * { transition: none; } }
@media (max-width: 560px) { .theme-mock { grid-template-columns: minmax(0, 1fr) 34%; } .tm-side { display: none; } }
/* 채팅 맨 위 환영 인사 */
.msg.system.welcome { color: var(--text-bright); font-weight: 700; font-size: 14px; border: 1px solid var(--accent-border); background: var(--accent-dim); }
.msg.system.welcome .ico { color: var(--accent); }
/* 가입 직후 이름 정하기 창 */
.setup-box { width: min(440px, calc(100vw - 32px)); }
.setup-box .modal-actions .btn { flex: 1; height: 44px; }
/* 테마 목업: 좁은 화면에서 가운데 줄이 넘치지 않게 */
.tm-bar { overflow: hidden; }
@media (max-width: 560px) { .tm-tag, .tm-title { display: none; } }
/* 창 안의 안내 글씨: 읽기 편하게 키움(방송 예고·휴방 공지·설정 등 모든 창) */
.modal-box .lbl { font-size: 14.5px; line-height: 1.65; color: #c3c8d0; }
.modal-box .lbl small, .modal-box label small { font-size: 13px; }
.settings-box .set-label small { font-size: 12.5px; }
@media (max-width: 560px) { .modal-box .lbl { font-size: 14px; } }
/* 설명 글 속 중요한 말은 방 테마 색(소다 파랑·코랄 핑크·망고 노랑)으로 */
.view-head p b, .panel .lbl b, .panel-head .lbl b, .panel p b { color: var(--accent); font-weight: 700; }
/* 선택 상자 대신 칩 버튼(방송 시작 창 카테고리·화면 구성) */
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip-pick.col { flex-direction: column; }
.chip-pick button, .chip-multi button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-3); color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chip-pick.col button { border-radius: var(--r-md); text-align: left; white-space: normal; word-break: keep-all; }
.chip-pick button:hover, .chip-multi button:hover { color: var(--text-bright); border-color: var(--line-strong); }
.chip-pick button.on, .chip-multi button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
.chip-pick button:focus-visible, .chip-multi button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.setup-usage { display: flex; flex-direction: column; gap: 8px; }
.setup-usage-q { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.setup-usage-q small { font-weight: 500; color: var(--dim); margin-left: 4px; }
/* 기타를 누르면 나오는 직접 적는 칸 */
.setup-usage-other { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--accent); background: var(--bg-3); color: var(--text-bright); font-size: 14px; outline: none; }
.setup-usage-other:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }
.chip-multi { display: flex; flex-wrap: wrap; gap: 6px; }
/* 개행 정리: 한국어 문장은 단어 단위로, 마지막 줄이 한 단어만 남지 않게 */
p, li, .lbl, .safe-note, .cell-help, .msg .txt, .set-label small, .gate-lead, .gate-trust { word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty; }
h1, h2, h3, .gate-title { text-wrap: balance; }
.safe-note { max-width: none; }

/* ── 전설의 방송인 세트(제미나이 3.8 Flash, 2026-09-15) ── */
.badge-fx-magma-crack, .badge-fx-aurora-ribbon, .badge-fx-oni-glitch, .badge-fx-crystal-prism, .badge-fx-jelly-pulse, .badge-fx-blade-slash, .badge-fx-clock-gear, .badge-fx-warp-thruster, .badge-fx-legend-streamer { overflow: visible; }
/* 전설의 방송인: 황금 왕관 광채, 회전하는 룬 고리와 황금 불꽃 입자 */
.badge-fx-legend-streamer {
  --badge-a: #fff9db;
  --badge-b: #ff3838;
  --badge-glow: rgba(255, 56, 56, 0.9);
  color: #fff9db;
  background-color: rgba(26, 14, 4, 0.92);
  background-image: linear-gradient(110deg, rgba(255, 215, 0, 0.35), rgba(255, 56, 56, 0.45), rgba(255, 215, 0, 0.35));
  background-size: 200% 100%;
  border: 1px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.65), inset 0 0 6px rgba(255, 56, 56, 0.5);
  animation: badge-legend-shine 2.4s ease-in-out infinite;
}
.badge-fx-legend-streamer::before {
  content: "";
  position: absolute;
  inset: -3.5px;
  border-radius: inherit;
  border: 1.5px dashed rgba(255, 215, 0, 0.85);
  box-shadow: 0 0 8px rgba(255, 56, 56, 0.7), inset 0 0 4px rgba(255, 215, 0, 0.4);
  pointer-events: none;
  animation: badge-legend-runes 7s linear infinite;
}
.badge-fx-legend-streamer::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  left: 12%;
  top: -6px;
  border-radius: 50%;
  background: #fff9db;
  box-shadow: 8px -3px 0 #ffd700, 18px -6px 0 #ff4757, 28px -2px 0 #ffe082, 38px -7px 0 #ff3838, 48px -4px 0 #fff;
  pointer-events: none;
  animation: badge-legend-embers 1.8s ease-out infinite;
}
@keyframes badge-legend-shine {
  0%, 100% { background-position: 0 0; filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.7)); }
  50% { background-position: 100% 0; filter: brightness(1.3) drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 14px #ff3838); }
}
@keyframes badge-legend-runes {
  to { transform: rotate(360deg); }
}
@keyframes badge-legend-embers {
  0% { transform: translateY(0) scale(1); opacity: 0.9; }
  50% { opacity: 1; }
  100% { transform: translateY(-10px) scale(0.4); opacity: 0; }
}
.badge-set-legend_streamer { --badge-a: #fff3b0; --badge-b: #ef4444; --badge-glow: rgba(239, 68, 68, .85); }
.nickname-fx-set-legend-streamer {
  background-size: 280% 100% !important;
  animation: nickname-set-legend-streamer 2.6s ease-in-out infinite;
}
@keyframes nickname-set-legend-streamer {
  0% { background-position: 0% 50%; filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.7)); }
  25% { filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 8px rgba(255, 56, 56, 0.4)); }
  50% { background-position: 140% 50%; filter: brightness(1.45) drop-shadow(0 0 7px #ffd700) drop-shadow(0 0 14px rgba(255, 56, 56, 0.9)); }
  75% { filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 8px rgba(255, 56, 56, 0.4)); }
  100% { background-position: 280% 50%; filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.7)); }
}
.msg.me.cs-legend-streamer {
  background:
    linear-gradient(110deg, transparent 15%, rgba(255, 215, 0, 0.22) 40%, rgba(255, 56, 56, 0.25) 55%, transparent 80%),
    linear-gradient(90deg, rgba(75, 15, 15, 0.75) 0%, rgba(45, 28, 5, 0.8) 45%, rgba(18, 12, 6, 0.5) 100%);
  background-size: 250% 100%, 100% 100%;
  border-left: 3px solid #ffd700;
  border-right: 1px solid rgba(255, 56, 56, 0.5);
  box-shadow: inset 4px 0 12px -2px rgba(255, 215, 0, 0.75), 0 0 16px -2px rgba(255, 56, 56, 0.6);
  animation: cs-legend-streamer 3.2s ease-in-out infinite;
}
.msg.me.cs-legend-streamer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 215, 0, 0.55), transparent 50%),
    radial-gradient(circle at 88% 50%, rgba(255, 56, 56, 0.45), transparent 55%),
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 55% 70%, #ffd700 60%, transparent),
    radial-gradient(1.5px 1.5px at 80% 25%, #ff6b81 60%, transparent);
  pointer-events: none;
  animation: cs-legend-aura 2.8s ease-in-out infinite;
}
@keyframes cs-legend-streamer {
  0%, 100% { background-position: 0 0, 0 0; }
  50% { background-position: 100% 0, 0 0; }
}
@keyframes cs-legend-aura {
  0%, 100% { opacity: 0.45; transform: scaleX(0.95); filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5)); }
  50% { opacity: 0.95; transform: scaleX(1.05); filter: drop-shadow(0 0 8px rgba(255, 56, 56, 0.8)); }
}

@media (prefers-reduced-motion: reduce) {
  .badge-fx-legend-streamer, .badge-fx-legend-streamer *, .nickname-fx-set-legend-streamer, .msg.me.cs-legend-streamer, .msg.me.cs-legend-streamer::before,
  .badge-fx-black-hole, .badge-fx-black-hole *, .nickname-fx-set-black-hole, .msg.me.cs-black-hole, .msg.me.cs-black-hole::before, .msg.me.cs-black-hole::after,
  .badge-fx-fox-fire, .badge-fx-fox-fire *, .msg.me.cs-foxfire, .msg.me.cs-foxfire::before, .msg.me.cs-foxfire::after,
  .badge-fx-angel-halo, .badge-fx-angel-halo *, .msg.me.cs-halo, .msg.me.cs-halo::before, .msg.me.cs-halo::after,
  .badge-fx-demon-horns, .badge-fx-demon-horns *, .msg.me.cs-hellfire, .msg.me.cs-hellfire::before, .msg.me.cs-hellfire::after,
  .badge-fx-phoenix, .badge-fx-phoenix *, .msg.me.cs-flame, .msg.me.cs-flame::before, .msg.me.cs-flame::after,
  .badge-fx-tiger-bolt, .badge-fx-tiger-bolt *, .msg.me.cs-tiger, .msg.me.cs-tiger::before, .msg.me.cs-tiger::after,
  .badge-fx-electric, .badge-fx-electric *, .msg.me.cs-thunder, .msg.me.cs-thunder::before, .msg.me.cs-thunder::after,
  .badge-fx-oni-glitch, .badge-fx-oni-glitch *, .msg.me.cs-oni, .msg.me.cs-oni::before, .msg.me.cs-oni::after,
  .badge-fx-galaxy, .badge-fx-galaxy *, .msg.me.cs-galaxy, .msg.me.cs-galaxy::before, .msg.me.cs-galaxy::after,
  .badge-fx-storm-drum, .badge-fx-storm-drum *, .msg.me.cs-drum, .msg.me.cs-drum::before, .msg.me.cs-drum::after,
  .badge-fx-flower-bloom, .badge-fx-flower-bloom *, .msg.me.cs-bloom, .msg.me.cs-bloom::before, .msg.me.cs-bloom::after,
  .badge-fx-magma-crack, .badge-fx-magma-crack *, .msg.me.cs-magma, .msg.me.cs-magma::before, .msg.me.cs-magma::after,
  .badge-fx-crystal-prism, .badge-fx-crystal-prism *, .msg.me.cs-prism, .msg.me.cs-prism::before, .msg.me.cs-prism::after,
  .badge-fx-blade-slash, .badge-fx-blade-slash *, .msg.me.cs-blade, .msg.me.cs-blade::before, .msg.me.cs-blade::after,
  .badge-fx-gold-emperor, .badge-fx-gold-emperor *, .msg.me.cs-emperor, .msg.me.cs-emperor::before, .msg.me.cs-emperor::after,
  .badge-fx-ice-queen, .badge-fx-ice-queen *, .msg.me.cs-frost, .msg.me.cs-frost::before, .msg.me.cs-frost::after {
    animation: none !important;
  }
}
.side-logout-out { color: var(--muted); }
.side-logout-out:hover { color: #ff8a98; border-color: rgba(255, 51, 75, .4); }
/* 세트를 다 입고 있으면 "OO 세트 입는 중" 버튼에 불이 들어온다(흐린 비활성 대신 금빛) */
.btn.tryon-set:disabled, .btn.tryon-set:disabled:hover { opacity: 1; cursor: default; color: #1a1204; background: linear-gradient(135deg, #ffe08a, #ffc542); border-color: #ffc542; box-shadow: 0 0 0 1px rgba(255, 197, 66, .35), 0 0 16px rgba(255, 197, 66, .45); font-weight: 800; }

/* 꾸미기 상단: 등급 탭 왼쪽, 아이템 검색 오른쪽. 좁으면 검색이 아래 줄 전체로 */
.items-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.items-toolbar-lbl { flex: none; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.items-toolbar .items-rarity-tabs { flex: 0 1 auto; min-width: 0; }
.items-search { flex: 0 0 220px; font: inherit; font-size: 14px; color: var(--text-bright); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; outline: none; }
.items-search:focus { border-color: var(--accent); }
.items-search::placeholder { color: var(--muted); }
/* 캡처 주기 버튼(사장님 요청 2026-09-16: 드롭다운이 무식하게 기니 버튼으로 나란히) */
.interval-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.interval-pick { flex: 1 1 auto; min-width: 54px; height: 36px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.interval-pick:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text-bright); }
.interval-pick.on { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.interval-pick:disabled { opacity: 0.5; cursor: default; }
/* .cell.ctl 안의 button 은 width:100% 규칙을 받아 한 줄씩 차지한다(드롭다운 하나만 있던 시절 규칙).
   캡처 주기 버튼만 거기서 빼내 나란히 서게 한다. 클래스 수가 많아야 그 규칙을 이긴다 */
.strip-ctl > .cell.ctl .interval-pick, .strip > .cell.ctl .interval-pick { width: auto; flex: 1 1 auto; min-width: 54px; margin-top: 0; }
/* 언박싱 기록(사장님 요청 2026-09-16): 검색창 옆 버튼과 그 아래 펼쳐지는 목록 */
.items-log-btn { flex: 0 0 auto; height: 40px; box-sizing: border-box; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-bright); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.items-log-btn:hover { border-color: var(--accent); }
.items-log-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.items-log { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.02); }
.items-log-note { margin: 0 0 8px; font-size: 11.5px; color: var(--dim); }
.items-log ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.items-log li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.items-log time { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--dim); }
.items-log li b { color: var(--text-bright); font-weight: 700; }
.items-log li small { color: var(--dim); }
@media (max-width: 1100px) {
  .items-toolbar { flex-direction: column; gap: 0; }
  .items-search { flex: none; width: 100%; margin-bottom: 12px; }
}
.items-search-empty { grid-column: 1 / -1; padding: 40px 12px; text-align: center; color: var(--muted); }
.inv-look-title .inv-reset { margin-left: auto; white-space: nowrap; }
/* 로고 새로고침 중엔 로그인 화면을 잠깐 가림(index.html 머리 스크립트, open()에서 풂) */
html.reloading #gate { visibility: hidden; }
/* 뽑기 결과: 아이템 카드는 눌러서 상점 상세로 */
.gacha-card.gacha-go.open { cursor: pointer; }
.gacha-card.gacha-go.open:hover, .gacha-card.gacha-go.open:focus-visible { transform: translateY(-3px); outline: 2px solid var(--accent); outline-offset: 2px; }
.gacha-go-hint { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
/* 인벤토리 보유 스쿱 + 스쿱 내역 */
.inv-wallet { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid rgba(252, 211, 77, .38); background: radial-gradient(120% 140% at 100% 0%, rgba(252, 211, 77, .14), transparent 60%), var(--bg-2); }
.inv-wallet-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.inv-wallet-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fcd34d; white-space: nowrap; }
.inv-wallet-val { font-size: 22px; color: #fcd34d; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-wallet-val small { font-size: 13px; color: var(--muted); font-weight: 600; }
.inv-wallet-row .btn { margin-left: auto; white-space: nowrap; }
.scoop-log { list-style: none; margin: 12px 0 0; padding: 0; max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); }
.scoop-log li { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.scoop-log-when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scoop-log-what { display: flex; flex-direction: column; min-width: 0; }
.scoop-log-what b { font-size: 14px; color: var(--text-bright); }
.scoop-log-what small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoop-log-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scoop-log-amt.plus { color: #fcd34d; }
.scoop-log-amt.minus { color: var(--muted); }
.scoop-log-empty { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 520px) { .scoop-log li { grid-template-columns: minmax(0, 1fr) auto; } .scoop-log-when { grid-column: 1 / -1; } }
/* 랭킹 채널 칸: 프로필 사진 + 테두리, 뱃지·닉네임 색·채팅 스타일 한 줄 */
.rank-ch { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rank-avatar { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.rank-pic { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-3) center / cover no-repeat; display: grid; place-items: center; font-weight: 800; color: var(--text-bright); font-size: 16px; }
.rank-frame { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); object-fit: contain; pointer-events: none; }
.rank-ch-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rank-table .msg.rank-line { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border-radius: 10px; max-width: 100%; width: fit-content; white-space: nowrap; }
.rank-table .msg.rank-line .who { font-weight: 800; }
/* 랭킹에서는 채팅 스타일을 멈춘 그림으로만(사장님 지적 2026-09-15: 네모가 계속 움직임), 채팅 줄의 "이름:" 쌍점도 뺀다 */
.rank-table .msg.rank-line, .rank-table .msg.rank-line *, .rank-table .msg.rank-line::before, .rank-table .msg.rank-line::after { animation: none !important; transition: none !important; }
.rank-table .msg.rank-line .who::after { content: none; }
.rank-me { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.rank-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rank-tags:empty { display: none; }
/* 랭킹 상태 칸 */
.rank-live { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #e5243b; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.rank-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.rank-off { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
/* 랭킹 채널 칸은 사진·테두리·채팅 한 줄이 들어가서 넓게, 잘리지 않게 */
.rank-table td.t { max-width: none; min-width: 240px; overflow: visible; }
/* 창 안내 글의 중요한 말은 방 테마 색(--accent: 파랑·핑크·노랑)으로 */
.modal-box .lbl b { color: var(--accent); }
/* 알림이 없을 때 안내는 화면 가운데 */
.noti-list:has(> .noti-empty) { max-width: none; }
/* 설정 프로모션 탭: 운영자의 한마디(MoToo 공지 카드 느낌) */
.op-note { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-3); }
.op-note-head { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-bright); }
.op-note-tag { padding: 2px 9px; border-radius: 6px; background: var(--accent-dim); color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.op-note h4 { margin: 10px 0 8px; font-size: 16px; color: var(--text-bright); }
.op-note p { margin: 0 0 8px; font-size: 14px; line-height: 1.7; color: var(--text); }
.op-note p b { color: var(--accent); }
.op-note a { color: var(--accent); }
.op-note .op-note-sign { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
/* 방송 예고 · 휴방 공지 한 창: 설정 창 탭 모양을 창 안에서 */
.plan-box { width: min(640px, calc(100vw - 24px)); max-height: min(92dvh, calc(100dvh - 24px)); }
.plan-box .plan-tabs { padding: 0; margin: 4px 0 14px; }
.plan-box .plan-tabs button[aria-selected="true"] { color: var(--text-bright); border-bottom-color: var(--accent); }
.plan-pane { display: flex; flex-direction: column; gap: 12px; }
.plan-pane[hidden] { display: none; }
/* 시청자 유형 창 설명: 문장마다 줄을 나눠 읽기 쉽게 */
.pm-lines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pm-lines li { line-height: 1.65; }

/* 채팅창 봇 검색(관리자가 아니면 후원 테스트 자리) */
.composer-row:has(.bot-search-wrap) { position: relative; }
.composer-row .bot-search-wrap { position: static; margin-left: auto; margin-right: 6px; flex: 0 1 130px; min-width: 0; }
.composer-row .poll-btn + .bot-search-wrap { margin-left: 8px; } /* 투표 버튼과 붙지 않게(사장님 요청 2026-09-15) */
.bot-search { width: 100%; box-sizing: border-box; padding: 6px 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); }
.bot-search:focus { outline: none; border-color: var(--accent); }
.bot-search-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); max-height: 340px; overflow-y: auto; padding: 8px; display: grid; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); z-index: 40; }
.bot-search-list[hidden] { display: none; }
.bot-search-head { font-size: 12px; color: var(--muted); padding: 2px 4px 4px; word-break: keep-all; }
.bot-search-empty { margin: 0; padding: 10px 4px; font-size: 13px; color: var(--muted); word-break: keep-all; }
.bot-search-list .hire-row { padding: 8px 10px; }
.bot-search-list .btn { white-space: nowrap; }
.subgift-view { grid-column: 1 / -1; display: grid; gap: 8px; }
.subgift-view .lbl b { color: var(--accent); }
/* 구독권 판매(보유 장수 크게 + 1·5·10장 사기) */
.ticket-shop { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); }
.ticket-have { display: flex; align-items: baseline; gap: 6px; color: var(--muted); }
.ticket-have b { font-size: 34px; line-height: 1; color: var(--text-bright); }
.ticket-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; word-break: keep-all; }
.ticket-note b { color: var(--accent); }
.ticket-buy { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-buy .btn { white-space: nowrap; }
/* 업적으로 여는 시청자 유형의 자물쇠 표시 */
.type-lock { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--bg-3); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.type-lock:hover { border-color: var(--line-strong); color: var(--text); }
.type-lock.on { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); }
.type-lock .ico { width: 13px; height: 13px; }
.type-lock .ico:last-child { width: 11px; height: 11px; opacity: .7; transition: transform .15s; }
.type-lock.on .ico:last-child { transform: rotate(180deg); }
/* 잠긴 유형을 누르면 뜨는 "여는 순서" 모달(사장님 요청 2026-09-20) */
.lock-order-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lock-order-head h2 { margin: 0; font-size: 18px; color: var(--text-bright); }
.lock-order-head .lbl { font-size: 12.5px; color: var(--muted); }
.lock-order-lead { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.lock-order-lead b { color: var(--text-bright); }
.type-lock-order { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; padding: 0; list-style: none; }
.type-lock-order li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--bg-2); font-size: 12.5px; color: var(--muted); }
.type-lock-order li .n { display: grid; place-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-3); color: var(--dim); font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.type-lock-order li.next { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); }
.type-lock-order li.next .n { background: var(--accent); color: #06121a; }
.type-lock-order li.me { border-color: var(--gold, #ffc542); background: rgba(255, 197, 66, .12); color: var(--gold, #ffc542); }
.type-lock-order li em { font-style: normal; font-size: 10.5px; font-weight: 800; color: inherit; }
@media (max-width: 560px) {
  .rest-days { grid-template-columns: repeat(2, 1fr); }
  .composer-row .bot-search-wrap { flex-basis: 96px; }
}
.cell.ctl .cell-help b { display: inline; font-size: inherit; line-height: inherit; margin: 0; color: var(--accent); font-weight: 600; }
select#interval option:disabled { color: var(--dim); }
/* 방송 시작 창 화면 구성: 세 가지를 한 줄에 한눈에(설명은 아래 fScreensNote) */
.chip-pick.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip-pick.row3 button { white-space: nowrap; justify-content: center; text-align: center; }
@media (max-width: 480px) { .chip-pick.row3 { grid-template-columns: 1fr; } }
/* 상점·인벤토리 가로 스크롤 막기(사장님 요청 2026-09-15): 오른쪽 칸이 내용 최소 폭보다 줄어들 수 있게 */
.items-view-layout { grid-template-columns: 200px minmax(0, 1fr); }
.items-main, .items-grid, .inv-sections, .inv-section, .inv-grid { min-width: 0; }
.items-toolbar { flex-wrap: wrap; }
.items-toolbar .items-search { flex: 0 0 auto; width: min(260px, 100%); height: 40px; box-sizing: border-box; align-self: flex-start; }
@media (max-width: 860px) { .items-view-layout { grid-template-columns: minmax(0, 1fr); } }
.items-toolbar .items-rarity-tabs { flex-wrap: wrap; row-gap: 8px; }

/* ── 모바일 반응형 정돈: 상점 2열, 시청자 상세 1열, 모달 닫기 버튼 크기, 모바일 입력창 줌 방지 ── */
#settingsClose.btn,
#shareCardClose.btn { min-width: 40px; min-height: 40px; padding: 0; }

@media (max-width: 768px) {
  .modal-box input,
  .modal-box select,
  .modal-box textarea,
  .composer input {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 480px) {
  .pd-grid .pd-samples { grid-template-columns: minmax(0, 1fr); }
}

/* 방송 시작 창: 넓은 화면에선 두 칸(왼쪽 제목·카테고리·공지, 오른쪽 화면 구성·안내)으로 세로 스크롤 없이. 좁으면 한 칸 */
.modal-box.start-box { width: min(920px, calc(100vw - 24px)); }
.start-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 28px; align-items: start; }
.start-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.start-box .start-col .chip-pick.row3 { grid-template-columns: minmax(0, 1fr); }
.start-box .start-col .chip-pick.row3 button { justify-content: flex-start; padding-inline: 14px; border-radius: var(--r-md); }
.start-box #fScreensNote { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-line; }
@media (max-width: 760px) {
  .start-cols { grid-template-columns: minmax(0, 1fr); }
}

/* 인벤토리 전체 탭: 칸들을 나란히, 칸마다 두 개씩 미리 보기 + 모두 보기 버튼 */
.inv-sections.all .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inv-sections.all .inv-section { display: flex; flex-direction: column; }
.inv-more { align-self: stretch; justify-content: center; margin-top: 10px; white-space: nowrap; }

/* 관리자 페이지 입구: 관리자 계정만(renderAdminTools). PC 는 채널 이름 줄 오른쪽(.side-admin, 파일 끝), 모바일(960px 이하)은 로고 줄 오른쪽 위 */
.admin-link-top { display: none; }
@media (max-width: 960px) {
  .side .admin-link-top:not([hidden]) {
    display: inline-flex; align-items: center; gap: 5px; flex: none; margin-left: auto;
    min-height: 40px; padding: 0 12px; box-sizing: border-box; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--text);
    font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  }
  .side .admin-link-top .ico { width: 15px; height: 15px; color: var(--accent); }
}
.pd-right h4 + .pd-nick-note { margin: -2px 0 8px; font-size: 12.5px; }
.pd-right .pd-samples + h4 { margin-top: 18px; }

/* ── 공통: 탭 요약 히어로 바 및 위계 ── */
.tab-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 0;
  word-break: keep-all;
}
.tab-hero-lead {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.5;
  min-width: 0;
  word-break: keep-all;
}
.tab-hero-lead b {
  color: var(--accent);
  font-weight: 700;
}
.tab-hero-action {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-hero-action .btn {
  white-space: nowrap;
}

/* 제목 크기 위계: 탭 제목 24px, 섹션 제목 18px, 카드 제목 14px, 보조문 12~13px. 섹션 간 28~32px, 카드 간 10~12px */
.view-head h1 { font-size: 24px; line-height: 1.3; }
.view-head p { font-size: 13px; color: var(--muted); }

/* ── 4. 인벤토리 (inv) 정돈 ── */
.inv-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 0 var(--view-gutter, 28px) 32px;
  margin-top: 16px;
  min-width: 0;
}
.inv-look {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 22px;
  padding: 20px;
  border-radius: var(--r-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.inv-look.set-on {
  border-color: rgba(255, 197, 66, 0.4);
  box-shadow: 0 0 16px var(--gold-dim);
}
.inv-look .preview-avatar-container {
  margin: 4px;
  width: 72px;
  height: 72px;
}
.inv-look-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
/* 미리보기 말풍선: 글자 길이만큼만 차지한다. 늘리면 폭 900px짜리 빈 막대가 된다(사장님 지적 2026-09-20) */
.inv-look-main .tryon-chat {
  align-self: flex-start;
  max-width: 100%;
}
.inv-look-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-look-title b {
  font-size: 18px;
  color: var(--text-bright);
}
.inv-sets {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.inv-sets-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.inv-wallet-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}
.inv-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.inv-wallet-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.inv-wallet-lbl b {
  color: var(--gold);
  font-size: 14px;
}
.inv-wallet-lbl small {
  color: var(--muted);
}
.inv-wallet-expand {
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.inv-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.inv-sections.all {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 28px;
  align-items: start;
}
.inv-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  min-width: 0;
}
.inv-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.inv-section-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
}
.inv-section-head h3 small {
  font-size: 13px;
  color: var(--dim);
  font-weight: 600;
  margin-left: 4px;
}
.inv-cur {
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(110px, 14vw, 150px), 1fr));
  gap: 10px;
}
.inv-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px 8px 10px;
  border-radius: var(--r-lg);
  cursor: default;
}
.inv-card.equipped-active {
  border: 1px solid var(--gold);
  box-shadow: 0 0 10px var(--gold-dim);
}
.inv-card .item-card-name {
  font-size: 14px;
}
.inv-card .item-card-status {
  font-size: 12px;
}
.inv-card .item-card-status.equipped {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(255, 197, 66, 0.3);
}

@media (min-width: 1200px) {
  .inv-sections:not(.all) .inv-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 1199px) and (min-width: 860px) {
  .inv-sections:not(.all) .inv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 859px) and (min-width: 541px) {
  .inv-sections:not(.all) .inv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .tab-hero-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .tab-hero-action .btn {
    width: 100%;
    justify-content: center;
  }
  .inv-look {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .inv-look-title,
  .tryon-chips,
  .tryon-chat,
  .inv-sets,
  .inv-wallet-row {
    justify-content: center;
  }
  .inv-grid,
  .inv-sections:not(.all) .inv-grid,
  .inv-sections.all .inv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .inv-card-actions .btn {
    width: 100%;
  }
}

/* ── 2. AI봇 시청자들 (people) 정돈 ── */
.view-head-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.spicy-inline-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.spicy-help-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.15s;
}
.spicy-help-btn:hover {
  color: var(--text-bright);
  border-color: var(--line-strong);
  background: var(--bg-3);
}
.people-help-box {
  padding: 14px 18px;
  margin-top: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.people-help-box p { margin: 0 0 6px; }
.people-help-box p:last-child { margin-bottom: 0; }
.people-help-box b { color: var(--text-bright); }

/* 매니저 한 줄 바 */
.panel.hire {
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 28px;
}
.mgr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.mgr-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mgr-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 9px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.mgr-desc {
  font-size: 14px;
  color: var(--text-bright);
}
.mgr-desc b { color: var(--text-bright); }
.mgr-desc small { color: var(--muted); }
.mgr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mgr-actions .btn { white-space: nowrap; }
.mgr-expand {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 열혈 AI봇 포디움 */
.panel.fans-panel {
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 28px;
}
.podium-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.podium-who .nm {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-who .rl {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-cheese {
  color: var(--gold);
  font-weight: 700;
}
.fans-rest-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 유형 필터 칩 */
.people-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.people-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 8px;
  white-space: nowrap;
}
.people-filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.filter-chip.on {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
}
.filter-chip small {
  margin-left: 3px;
  font-weight: 700;
}

/* 유형 카드: 평평한 목록형 */
.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.person-wrap.flat-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 0;
  transition: opacity 0.15s, border-color 0.15s;
}
.person-wrap.flat-person:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}
.person-wrap.flat-person.off {
  opacity: 0.55;
}
.person-wrap.flat-person .person {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}
.person-wrap.flat-person .av {
  flex: none;
  width: 38px;
  height: 38px;
}
.person-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.person-content .nm {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.special-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 4px;
}
.person-content .sample-chat {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-switch-wrap {
  flex: none;
  display: flex;
  align-items: center;
}
.person-switch-wrap .type-toggle {
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  min-height: 34px;
}
.person-switch-wrap .type-toggle[aria-pressed="true"] {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
}
.person-switch-wrap .mgr-fixed-tag {
  font-size: 11px;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-dim);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .people {
    grid-template-columns: minmax(0, 1fr);
  }
  .person-switch-wrap .type-toggle {
    min-height: 40px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mgr-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .mgr-actions {
    display: flex;
    gap: 8px;
  }
  .mgr-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── 3. 상점 (items) 정돈 ── */
.items-shelf-wrap {
  margin-bottom: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  min-width: 0;
}
.items-shelf-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.items-shelf-track::-webkit-scrollbar { display: none; }
.shelf-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  position: relative;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 0;
  gap: 6px;
  font: inherit;
}
.shelf-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
}
.shelf-thumb {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shelf-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shelf-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.shelf-price {
  font-size: 11.5px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}
.items-shelf-empty {
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
}
.items-shelf-empty b { color: var(--accent); }

/* 툴바 정렬 드롭다운 */
.items-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.items-sort-select {
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-bright);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.items-sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* 1100px 이상에서 선택 상세 sticky */
.items-content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.items-detail-panel {
  position: sticky;
  top: 20px;
  margin-top: 0;
  min-width: 0;
}
@media (max-width: 1439px) {
  .items-content-row {
    display: flex;
    flex-direction: column;
  }
  .items-detail-panel {
    position: static;
    order: -1;
    margin-bottom: 20px;
    width: 100%;
  }
}

/* 상점 아이템 카드 단순화 */
.items-grid .item-card {
  padding: 16px 8px 10px;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.15s;
}
.items-grid .item-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
}
.items-grid .item-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}
.items-grid .item-card.equipped-active {
  border-color: var(--line-strong);
}
.items-grid .item-thumb-box {
  width: 72px;
  height: 72px;
}
.items-grid .item-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-bright);
}
.item-card-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.item-card-price.equipped {
  color: var(--accent);
}
.item-card-price.owned {
  color: var(--muted);
}

@media (max-width: 1024px) {
  .items-shelf-track {
    display: flex;
  }
  .items-shelf-track .shelf-card {
    flex: 0 0 calc(25% - 8px);
    min-width: 120px;
  }
  .items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .items-view-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .items-cat-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .items-cat-list::-webkit-scrollbar { display: none; }
  .items-cat-btn {
    flex: none;
    white-space: nowrap;
    padding: 8px 12px;
  }
  .items-shelf-track .shelf-card {
    flex: 0 0 calc(50% - 6px);
    min-width: 110px;
  }
  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .items-action-row .btn {
    width: 100%;
    justify-content: center;
  }
  .items-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .items-tools-right {
    width: 100%;
    margin-left: 0;
  }
  .items-tools-right .items-search {
    flex: 1;
  }
}

.dash-card.primary {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}
.dash-card.primary:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.dash-card.primary .lbl {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.dash-card.primary b {
  font-size: 22px;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin: 4px 0 2px;
  display: block;
  white-space: nowrap;
}
.dash-card.primary small {
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
}
.dash-cards-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.dash-card.secondary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.dash-card.secondary .lbl {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.dash-card.secondary b {
  font-size: 16px;
  color: var(--text-bright);
  margin: 3px 0 2px;
  display: block;
  white-space: nowrap;
}
.dash-card.secondary small {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.chart-panel .chart {
  margin-top: 12px;
}

/* 업적 하이라이트 */
.hall-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.hall-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hall-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-bright);
  word-break: keep-all;
}
.hall-section-icon {
  font-size: 15px;
  line-height: 1;
}
.hall-section-title .lbl {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}
.hall-highlight-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hall-highlight-card {
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  word-break: keep-all;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hall-highlight-card.achieved {
  border-color: rgba(255, 197, 66, 0.35);
  background: rgba(255, 197, 66, 0.06);
}
.hh-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hh-title {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.hh-remain {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex: none;
}
.hh-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}
.hh-desc {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.35;
  word-break: keep-all;
}
.hh-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hh-pct {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.hh-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #ffc542;
  font-weight: 600;
  white-space: nowrap;
}
.hh-status-tag .ico {
  width: 12px;
  height: 12px;
}
.hall-highlight-empty {
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--dim);
  border: 1px dashed var(--line-subtle);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.01);
  word-break: keep-all;
}

/* 프로그레스 바 */
.achieve-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.achieve-bar-track.small {
  height: 4px;
  margin: 4px 0;
}
.achieve-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* 업적 전체 목록 */
.hall-full-wrap {
  margin-top: 14px;
  border-top: 1px solid var(--line-subtle);
  padding-top: 14px;
}
.hall-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.hall-status-tabs,
.hall-grade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hall-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.hall-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  word-break: keep-all;
}
.hall-item.achieved {
  border-color: rgba(255, 197, 66, 0.3);
  background: rgba(255, 197, 66, 0.05);
}
.hall-item.progressing,
.hall-item.locked {
  opacity: 1;
  filter: none;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.hall-item .hall-mark {
  flex: none;
  font-size: 16px;
  margin-top: 1px;
}
.hall-item .hall-mark .ico {
  width: 16px;
  height: 16px;
}
.hall-item.achieved .hall-mark {
  color: #ffc542;
}
.hall-item .hall-mark.pending {
  color: var(--dim);
}
.hall-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hall-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hall-item-top b {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.hall-item-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}
.hall-item-remain {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex: none;
}
.hall-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hall-item-sub small {
  font-size: 11.5px;
  color: var(--dim);
}
.hall-item-pct {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.hall-item-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}

/* 지난 방송 패널 */
.streams-panel {
  margin-bottom: 28px;
}


/* 반응형 미디어 쿼리 */
@media (max-width: 1024px) {
  .dash-cards-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .dash-card.primary {
    padding: 10px 12px;
  }
  .dash-card.primary b {
    font-size: 18px;
  }
  .dash-cards-secondary {
    grid-template-columns: 1fr;
  }
}

/* 검수 수정: 요약 행을 패널과 같은 좌우 여백으로, 포디움 아바타 크기 고정, 상점 상세는 넓을 때만 오른쪽 */
.view > .tab-hero-bar { margin: 0 var(--view-gutter, 28px) 24px; }
@media (min-width: 1440px) { .items-content-row .items-detail-panel { grid-template-columns: minmax(0, 1fr); } }
.items-tools-right { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; min-width: 0; }
.items-tools-right .items-search { flex: 1 1 180px; width: auto; max-width: 260px; min-width: 0; }
.view > .items-shelf-wrap { margin-left: var(--view-gutter, 28px); margin-right: var(--view-gutter, 28px); }
.people-wrap > .people-filter-bar { padding-left: var(--view-gutter, 28px); padding-right: var(--view-gutter, 28px); }

/* 상점 구매 조건(스쿱만으로 못 사는 영웅·전설): 못 채운 조건과 지금 값 */
.item-req-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; word-break: keep-all; }
.item-req-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--bg-2); color: var(--text); }
.item-req-list li span { color: var(--danger); font-weight: 600; white-space: nowrap; }

/* 인벤토리 세트 탭: 한 조각이라도 가진 세트, 안 가진 조각은 흐리게 */
.inv-set-group .inv-section-head .btn { white-space: nowrap; }
.inv-card.inv-missing { opacity: .45; }
.inv-card.inv-missing .item-card-status { color: var(--dim); }

/* 상점 선택 상세는 화면 폭과 상관없이 목록 위에 가로로(왼쪽 미리보기 | 오른쪽 이름·가격·세트, 사장님 요청 2026-09-15). 위의 1440px 오른쪽 고정 규칙을 덮는다 */
.items-content-row { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
.items-content-row .items-detail-panel { position: static; order: -1; width: 100%; margin: 0; }
.items-content-row .items-grid { width: 100%; }
@media (min-width: 861px) { .items-content-row .items-detail-panel { grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); } }

/* 인벤토리 세트 탭: 세트 능력치 설명 한 줄 */
.inv-set-rule { margin: 2px 0 8px; font-size: 12px; word-break: keep-all; }

/* 상점 카테고리는 왼쪽 칸 대신 위에 가로로(사장님 요청 2026-09-15): 1줄 카테고리(프로필 테두리·닉네임 색…), 2줄 등급 탭(전체·일반…) */
.items-view-layout { display: flex; flex-direction: column; gap: 14px; }
.items-sidebar { gap: 0; min-width: 0; }
.items-cat-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.items-cat-btn { width: auto; flex: 0 0 auto; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; white-space: nowrap; }
.items-cat-btn .cat-ico { width: 26px; height: 26px; border-radius: 50%; }
.items-cat-btn .cat-name { flex: none; overflow: visible; }
.items-cat-btn.active, .items-cat-btn.gacha-tab.active { box-shadow: none; }
@media (max-width: 600px) {
  /* 좁아도 옆으로 밀지 않고 자리가 없으면 아랫줄로(사장님 요청 2026-09-16) */
  .items-cat-list { flex-wrap: wrap; overflow-x: visible; }
  .items-cat-btn .cat-count { display: none; }
}

/* ── 대시보드: 유튜브 스튜디오·치지직 스튜디오식(사장님 요청 2026-09-15). 왼쪽 넓은 칸 분석·지난 방송, 오른쪽 좁은 칸 최근 방송·요약·업적·성향·밈 ── */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 20px; align-items: start; margin: 0 var(--view-gutter, 28px) 28px; }
.studio-main, .studio-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.studio-grid .panel, .studio-grid .detail { margin: 0; }
.studio-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.studio-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 14px 16px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 -3px 0 transparent; transition: background .15s; }
.studio-kpi:last-child { border-right: 0; }
.studio-kpi:hover { background: var(--bg-3); }
.studio-kpi.on { background: var(--accent-dim); box-shadow: inset 0 -3px 0 var(--accent); }
.studio-kpi-label { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.studio-kpi b { font-size: 26px; font-weight: 800; color: var(--text-bright); line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.studio-kpi small { max-width: 100%; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-kpi.on small { color: var(--accent); }
.studio-chart { margin-top: 16px; }
.studio-chart svg { height: 240px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; }
.studio-chart-note { margin: 8px 0 0; font-size: 12px; word-break: keep-all; }
.studio-streams { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.studio-stream { display: grid; grid-template-columns: 48px minmax(0, 1fr) repeat(3, 76px); align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.studio-stream:hover { border-color: var(--accent); background: var(--bg-3); }
.studio-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; border-radius: 10px; background: var(--bg-3); line-height: 1.1; }
.studio-date b { font-size: 17px; color: var(--text-bright); }
.studio-date small, .studio-stream small { font-size: 11px; color: var(--dim); white-space: nowrap; }
.studio-stream-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.studio-stream-main b { color: var(--text-bright); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-stream-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.studio-stream-stat b { font-size: 14px; color: var(--text-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.studio-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--muted); word-break: keep-all; }
.studio-empty .ico { width: 28px; height: 28px; color: var(--dim); }
.studio-empty b { color: var(--text-bright); font-size: 14px; }
.studio-empty span { font-size: 12.5px; }
.studio-latest-title { margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--text-bright); word-break: keep-all; }
.studio-cat { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--bg-3); color: var(--muted); font-size: 11.5px; font-weight: 600; vertical-align: 2px; white-space: nowrap; }
.studio-rows { display: flex; flex-direction: column; margin: 12px 0 0; }
.studio-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.studio-rows > div:first-child { border-top: 0; }
.studio-rows dt { color: var(--muted); font-size: 13px; white-space: nowrap; }
.studio-rows dd { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; color: var(--text-bright); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.studio-rows dd small, .studio-rows dd em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--dim); word-break: keep-all; }
.studio-rows dd em.up { color: #4ade80; font-weight: 600; }
.studio-rows dd em.down { color: var(--danger); font-weight: 600; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.studio-actions .btn { flex: 1 1 auto; white-space: nowrap; }
.studio-go { width: 100%; }
.studio-side .hall-list { grid-template-columns: minmax(0, 1fr); }
.studio-side .lore-copy { flex-direction: column; gap: 2px; }
.studio-side .lore-meta time { display: none; }
@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-side { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 760px) {
  .studio-grid { margin: 0 16px 20px; gap: 14px; }
  .studio-side { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .studio-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-kpi:nth-child(2) { border-right: 0; }
  .studio-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .studio-kpi b { font-size: 21px; }
  .studio-stream { grid-template-columns: 44px minmax(0, 1fr) 64px; }
  .studio-stream-stat.s-more { display: none; }
  .studio-chart svg { height: 180px; }
}

/* 대시보드 지난 방송: 전부 싣고 칸 안에서 스크롤 */
.studio-streams { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
/* 업적 탭(대시보드에서 따로 뺌): 전체 목록을 늘 펼쳐 두므로 접기 버튼은 숨긴다 */
.ach-wrap { margin: 0 var(--view-gutter, 28px) 28px; }
.ach-wrap .panel { margin: 0; }
/* 업적 전체 목록은 두 칸(사장님: 한 줄씩은 쓸데없이 김, 2026-09-15). 좁으면 한 칸 */
#view-ach .hall-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
/* 위쪽 곧 달성·최근 달성(최대 3개)도 한 줄에 나란히(사장님: 위는 너무 김, 2026-09-15). 하나뿐이면(빈 안내 포함) 한 줄 전체 */
#view-ach .hall-highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
#view-ach .hall-highlight-grid > :only-child { grid-column: 1 / -1; }
@media (max-width: 1024px) { #view-ach .hall-highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  #view-ach .hall-highlight-grid { grid-template-columns: minmax(0, 1fr); }
  #view-ach .hall-list { grid-template-columns: minmax(0, 1fr); }
  .ach-wrap { margin: 0 16px 20px; }
  .studio-streams { max-height: 360px; }
}

/* 업적 탭 제목 옆 이모지를 SVG 아이콘으로 */
.hall-section-icon .ico { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }
.hall-highlight-empty .ico { width: 16px; height: 16px; vertical-align: -3px; color: var(--gold, #ffc542); }

/* ── 열혈 AI봇 단상(사장님 요청 2026-09-15): 사람은 단 위에 서고, 금·은·동 단은 붙어 있고 2위 왼쪽·1위 가운데 가장 높게·3위 오른쪽 ── */
.podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; max-width: 760px; margin: 34px auto 6px; border-bottom: 3px solid rgba(255, 255, 255, .12); }
.podium-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.podium-col.rank-2 { order: 1; }
.podium-col.rank-1 { order: 2; }
.podium-col.rank-3 { order: 3; }
.podium-person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 100%; min-width: 0; padding: 0 8px 12px; text-align: center; }
.podium-person .av { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 6px #c3c8d4; }
.podium-person .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.podium-col.rank-1 .podium-person .av { width: 84px; height: 84px; box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 6px #ffc542, 0 0 26px rgba(255, 197, 66, .45); }
.podium-col.rank-3 .podium-person .av { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 6px #d9905a; }
.podium-crown { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); color: #ffc542; line-height: 0; }
.podium-crown .ico { width: 32px; height: 32px; filter: drop-shadow(0 2px 8px rgba(255, 197, 66, .55)); }
.podium-person .nm { max-width: 100%; font-size: 15px; font-weight: 800; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-col.rank-1 .podium-person .nm { font-size: 17px; }
.podium-person .rl { max-width: 100%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-person .rl .art, .podium-person .rl .ico { width: 14px; height: 14px; vertical-align: -2px; }
.podium-cheese { margin-top: 2px; font-size: 13.5px; font-weight: 800; color: var(--gold, #ffc542); white-space: nowrap; }
.podium-cheese .ico { width: 13px; height: 13px; vertical-align: -2px; }
.podium-block { position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 16px; color: #fff; box-shadow: inset 0 -14px 24px rgba(0, 0, 0, .2); }
.podium-block::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: rgba(255, 255, 255, .3); border-radius: inherit; }
.podium-block b { font-size: 36px; font-weight: 900; line-height: 1; text-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.podium-title { padding: 1px 9px; border-radius: 999px; background: rgba(0, 0, 0, .22); font-size: 12px; font-weight: 800; white-space: nowrap; }
.podium-block small { margin-top: auto; padding-bottom: 10px; font-size: 11px; opacity: .9; white-space: nowrap; }
.podium-col.rank-1 .podium-block { height: 156px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #f7c948, #c78d14); z-index: 1; }
.podium-col.rank-1 .podium-block b { font-size: 48px; }
.podium-col.rank-2 .podium-block { height: 112px; border-radius: 12px 0 0 0; background: linear-gradient(180deg, #d3d8e0, #8e96a4); color: #1c2230; }
.podium-col.rank-2 .podium-title { background: rgba(0, 0, 0, .12); }
.podium-col.rank-3 .podium-block { height: 82px; border-radius: 0 12px 0 0; background: linear-gradient(180deg, #e3a36d, #a8663a); }
/* 아직 사람이 없는 자리: 단은 그대로 두고 흐리게, 사람 자리는 점선 동그라미 */
.podium-col.empty .podium-block { opacity: .35; filter: saturate(.6); }
.podium-col.empty .podium-person .nm { color: var(--dim); font-weight: 700; }
.podium-col.empty .podium-cheese { color: var(--dim); font-weight: 600; font-size: 12px; }
.podium-person .podium-empty-av { background: transparent; color: var(--dim); font-size: 20px; font-weight: 800; box-shadow: none !important; border: 2px dashed rgba(255, 255, 255, .18); box-sizing: border-box; }
@media (max-width: 600px) {
  .podium { margin-top: 36px; }
  .podium-person { padding: 0 4px 10px; }
  .podium-person .av { width: 46px; height: 46px; }
  .podium-col.rank-1 .podium-person .av { width: 58px; height: 58px; }
  .podium-crown { top: -24px; }
  .podium-crown .ico { width: 24px; height: 24px; }
  .podium-person .nm { font-size: 13px; }
  .podium-col.rank-1 .podium-person .nm { font-size: 14px; }
  .podium-person .rl, .podium-block small { display: none; }
  .podium-cheese { font-size: 12px; }
  .podium-col.rank-1 .podium-block { height: 112px; }
  .podium-col.rank-2 .podium-block { height: 80px; }
  .podium-col.rank-3 .podium-block { height: 58px; }
  .podium-block b { font-size: 26px; }
  .podium-col.rank-1 .podium-block b { font-size: 34px; }
}

/* 열혈 AI봇: 왼쪽 단상, 오른쪽 4위부터 늘 보이는 목록(사장님: 빈 공간이 너무 큼, 2026-09-15). 목록은 단상 높이에 맞추고 넘치면 그 안에서 스크롤 */
.fans-board { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: end; margin-top: 4px; }
.fans-board.solo { grid-template-columns: minmax(0, 1fr); }
.fans-board .podium { width: 100%; max-width: none; margin: 34px 0 0; }
.fans-board.solo .podium { max-width: 640px; margin: 34px auto 0; }
.fans-side { display: flex; flex-direction: column; align-self: stretch; min-width: 0; }
.fans-side-head { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* 열혈 AI봇이 하나도 없을 때: 빈 포디움 대신 한 줄 안내(사장님 지적 2026-09-20) */
.fans-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 26px 0 10px; padding: 28px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--bg-2); text-align: center; }
.fans-empty-ico { display: grid; place-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-3); color: var(--gold, #ffc542); }
.fans-empty-ico .ico { width: 22px; height: 22px; }
.fans-empty b { font-size: 15px; color: var(--text-bright); }
.fans-empty span:last-child { max-width: 460px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.fans-side-head small { margin-left: 4px; color: var(--dim); font-weight: 600; }
.fans-board .fans-rest-list { flex: 1 1 0; min-height: 0; margin: 0; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-width: 1024px) {
  .fans-board { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .fans-board .fans-rest-list { flex: none; max-height: 320px; }
}
/* 열혈 목록 행 아바타: 크기 규칙이 없어 좁은 칸에서 세로 막대로 찌그러지던 것 */
.fan-row .av { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
.fan-row .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fan-row .av > span { font-size: 14px; font-weight: 700; color: #fff; }

/* 띄운 채팅 창 접기 버튼: 둥근 유리 네모 + 창 모양 아이콘(사장님 요청 2026-09-15, 아래 꺾쇠 대신) */
body.pip .pip-fold { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.1); color: var(--text-bright); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); backdrop-filter: blur(8px); cursor: pointer; }
body.pip .pip-fold:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(var(--accent-rgb), 0.5); }
body.pip .pip-fold svg { width: 18px; height: 18px; }

/* 채팅을 끝까지 굴려도 뒤 페이지가 따라 내려가지 않게(사장님 지적 2026-09-15) */
#messages, .chat .messages { overscroll-behavior: contain; }

/* 입장 알림 끄기(사장님 요청 2026-09-15): 일반 입장 줄만 감춘다. 열혈팬·단골 입장은 그대로 */
.messages.hide-join .msg.system.join:not(.fan):not(.loyal) { display: none; }
.chat-head .join-toggle.off { color: var(--dim); position: relative; }
.chat-head .join-toggle.off::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: currentColor; transform: rotate(-35deg); border-radius: 2px; }

/* 채팅 글은 들어갈 자리가 있으면 한 줄로(text-wrap: pretty 가 짧은 채팅을 일찍 두 줄로 나누던 것, 사장님 지적 2026-09-15) */
.msg .txt { text-wrap: wrap; }

/* 밈으로 저장 버튼 자리를 늘 비워 두면(오른쪽 88px) 짧은 채팅도 두 줄이 된다: 여백 없이, 올렸을 때만 글 위에 뜬다(사장님 지적 2026-09-15) */
.msg.lore-source { padding-right: 8px; }
.msg.lore-source .lore-save { background: var(--bg-2); box-shadow: -8px 0 10px var(--bg-2); }

/* 방송 끝 요약: 세로로 길게 스크롤하지 않게 넓게, 숫자는 4칸, 긴 칸(댓글·지갑·연속·미션)은 2칸씩 가로로(사장님 요청 2026-09-15) */
#endModal .modal-box, #endBox { width: min(1120px, calc(100vw - 32px)); max-width: none; }
#endBox .summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#endBox .summary > div.wide { grid-column: span 2; }
#endBox .summary-hl-section { margin-top: 12px; }
@media (max-width: 900px) { #endBox .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { #endBox .summary { grid-template-columns: minmax(0, 1fr); } #endBox .summary > div.wide { grid-column: auto; } }

/* 사진 한 장 방송: 사진 고르기 줄 */
.photo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-pick[hidden] { display: none; }
.photo-pick-btn { white-space: nowrap; cursor: pointer; }
.photo-pick-name { min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 사이드바 카드 접기(사장님 요청 2026-09-15): 제목 줄(CH 포함)을 누르면 제목 한 줄만 남는다 */
.side-card > .side-title[role="button"] { cursor: pointer; user-select: none; margin-bottom: 8px; }
.side-card > .side-title[role="button"]:hover::after { background: rgba(var(--accent-rgb), 0.2); color: var(--accent); }
.side-card.collapsed > :not(.side-title) { display: none !important; }
.side-card.collapsed > .side-title { margin-bottom: 0; }
.side-card.collapsed > .side-title::after { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }

/* 가운데 정렬 알림 줄은 낱말 중간에서 끊지 않는다("화면 공 / 유" 처럼 꺾이던 것, 사장님 지적 2026-09-15) */
.msg.system { word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }

/* ── 채팅 읽기(2026-09-15): 위로 올려 읽는 동안 끌어내리지 않음, 새 채팅 버튼 ── */
.messages { overflow-anchor: none; }
.chat-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-jump { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 5; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--bg-3); color: var(--accent);
  font-size: 12.5px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.chat-jump:hover { background: var(--accent); color: #080a0c; }

/* 채팅 모드(모두·구독자만·얼리기) */
.chat-head .chat-mode.on { color: #bae6fd; border-color: #38bdf8; background: rgba(56, 189, 248, 0.14); }
.chat-mode-menu { position: absolute; top: calc(100% + 2px); right: 8px; z-index: 30; display: grid; gap: 4px; padding: 8px; width: min(220px, calc(100% - 16px));
  background: var(--bg-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-weight: 500; }
.chat-head .chat-mode-menu button { text-align: left; font-size: 12.5px; padding: 7px 9px; white-space: nowrap; }
.chat-head .chat-mode-menu button.on { border-color: var(--accent); color: var(--accent); font-weight: 800; }
.chat-mode-menu small { display: block; font-size: 11px; color: var(--dim); font-weight: 500; }

/* 닉네임을 눌러 강퇴 */
.msg[data-name] .who { cursor: pointer; }
.msg[data-name] .who:hover { text-decoration: underline; }
.kick-pop { position: absolute; z-index: 40; display: flex; align-items: center; gap: 6px; padding: 6px 8px; white-space: nowrap;
  background: var(--bg-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: 12.5px; }
.kick-pop b { color: var(--text-bright); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.kick-pop button { font-size: 12px; padding: 4px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; white-space: nowrap; }
.kick-pop button.kick-go { color: #fff; background: var(--live); border-color: var(--live); font-weight: 800; }

/* 후원·구독은 채팅창에 크게(사장님 요청 2026-09-15, 실제 방송 채팅처럼) */
.msg.cheese { padding: 12px 14px; animation: alert-pop 0.35s cubic-bezier(.2,1.4,.4,1); }
.msg.cheese .amt { font-size: 15px; }
.msg.cheese .txt { font-size: 15px; }
.msg.system.sub { font-size: 14.5px; padding: 12px 14px; margin: 6px 0; border-left: 4px solid #a855f7; animation: alert-pop 0.35s cubic-bezier(.2,1.4,.4,1); }
@keyframes alert-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .msg.cheese, .msg.system.sub { animation: none; } }

/* 공유 카드 버튼은 확인 옆에 짧게 */
.modal-actions .summary-hl-btn { width: auto; margin-top: 0; }

/* 인벤토리: 요약 줄과 내 꾸미기 카드 사이가 여백 24px + 칸 간격 28px 로 겹쳐 너무 벌어졌던 것(사장님 지적 2026-09-15) */
.inv-wrap > .tab-hero-bar { margin-bottom: 0; }
.inv-wrap > .tab-hero-bar + .inv-look { margin-top: -12px; }


/* TTS 목록은 인벤토리에 항상 보이는 칸(2026-09-18). 마이크는 채팅 머리로 돌아갔다 */
/* 다른 인벤토리 내용(.inv-wrap)과 같은 좌우 여백을 쓴다. 안 그러면 카드만 양옆으로 삐져나온다(사장님 지적 2026-09-20) */
.inv-tts-card { margin: 0 var(--view-gutter, 28px) 16px; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.inv-tts-card h2 { margin: 0 0 2px; font-size: 14px; font-weight: 800; color: var(--text-bright); }
.inv-tts-card > p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); word-break: keep-all; }
.tts-menu.tts-static { position: static; width: auto; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* 인벤토리 안에서는 끄기 토글이 줄 전체를 차지해 빈 막대처럼 보였다(사장님 지적 2026-09-20). 목소리 칸 하나 크기로 줄인다 */
.tts-menu.tts-static .tts-power { grid-column: auto; justify-self: start; width: auto; }
.actions { flex-wrap: wrap; justify-content: flex-end; }

/* 랭킹 정리(사장님 지적 2026-09-15): 가입 전에는 안내 한 줄 + 가입 버튼 둘, 순위가 비면 빈 표 대신 안내 한 줄 */
.rank-empty { margin: 4px 0 0; padding: 28px 16px; text-align: center; font-size: 13.5px; color: var(--muted); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--line); word-break: keep-all; }
@media (max-width: 540px) {
  .rank-banner { flex-direction: column; align-items: stretch; }
  .panel-head:has(.rank-tabs) { flex-wrap: wrap; gap: 10px; }
}

/* 띄운 채팅 창 머리(사장님 지적 2026-09-16): 접기 버튼이 머리 오른쪽 버튼에 겹쳐 뭉쳐 보이고, 눈송이·사람 버튼만 세로로 길쭉하고 질감이 달랐다.
   머리 버튼을 접기 버튼과 같은 36px 유리 네모로 맞추고, 접기 버튼 자리만큼 오른쪽을 비운다 */
body.pip .chat-head { padding: 10px 58px 10px 12px; gap: 8px; min-height: 56px; box-sizing: border-box; }
body.pip .chat-head #chatModeBtn,
body.pip .chat-head #joinToggleBtn { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.08); color: var(--text-bright); }
body.pip .chat-head #chatModeBtn:hover,
body.pip .chat-head #joinToggleBtn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(var(--accent-rgb), 0.5); }
body.pip .chat-head #chatModeBtn .ico,
body.pip .chat-head #joinToggleBtn .ico { width: 17px; height: 17px; }
body.pip .chat-head .pop { height: 36px; padding: 0 12px; border-radius: 10px; }
body.pip .pip-fold { top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 10px; box-shadow: none; background: rgba(255, 255, 255, 0.08); }

/* 열혈 AI봇 4위부터 칸이 비었을 때 안내(사장님 지적 2026-09-16: 빈 채널에서도 단상과 칸을 보여 준다) */
.fans-rest-empty { margin: 0; padding: 28px 12px; text-align: center; font-size: 13px; color: var(--muted); border-radius: var(--r-md); border: 1px dashed var(--line); word-break: keep-all; }


/* 업적 전용 아이템 상세: 잠긴 버튼과 조건 글이 따로 떠 어수선하던 것을 한 상자로(사장님 요청 2026-09-16) */
.item-ach-lock { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 197, 66, 0.06); border: 1px solid rgba(255, 197, 66, 0.28); color: var(--text); font-size: 13px; line-height: 1.5; word-break: keep-all; }
.item-ach-lock .ico { flex: none; width: 18px; height: 18px; color: var(--gold, #ffc542); }
.item-ach-lock b { color: var(--gold, #ffc542); }

/* 미리 입어 보기 칩 값(사장님 요청 2026-09-16) */
.tryon-chip .tryon-chip-price { display: block; margin-top: 2px; font-size: 11px; font-weight: 800; color: var(--gold, #ffc542); }
.tryon-chip .tryon-chip-price.owned { color: var(--accent); }
.tryon-actions { flex-wrap: wrap; }

/* 세트 조각별 원래 값(사장님 요청 2026-09-16): 작은 칸 4개를 한 줄에, 칸 이름+조각 이름 / 값 두 줄(창 높이가 늘지 않게) */
.item-set-offer .item-set-pieces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; margin: 0; padding: 0; list-style: none; }
.item-set-offer .item-set-pieces li { display: flex; flex-direction: column; gap: 0; padding: 4px 8px; border-radius: var(--r-sm, 8px); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.35; color: var(--text); min-width: 0; white-space: normal; }
.item-set-offer .item-set-pieces li small { font-size: 10px; color: var(--dim); }
.item-set-offer .item-set-pieces .item-set-piece-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-set-offer .item-set-pieces .item-set-piece-price { font-size: 11px; color: var(--gold, #ffc542); white-space: nowrap; }
@media (max-width: 640px) { .item-set-offer .item-set-pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.item-set-offer .item-set-pieces li.owned .item-set-piece-price { color: var(--accent); }

/* 상점 상세 배치(사장님 요청 2026-09-16): 창 높이 고정, 가격은 제목 옆, 세트 조각 2x2, 구매 버튼과 세트 구매를 한 줄로, 왼쪽 입어 보기 칩은 같은 크기 2x2 */
.items-info-head { flex-wrap: wrap; }
.items-info-head .item-price-tag { margin-left: 6px; }
#itemActionArea { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#itemActionArea .item-set-offer { display: contents; }
#itemActionArea .item-set-offer .item-set-pieces { order: -1; flex: 0 0 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
#itemActionArea .need-more-cheese, #itemActionArea .item-req-list, #itemActionArea .item-ach-lock { flex: 0 0 100%; order: 1; }
#itemActionArea .need-more-cheese { margin-top: 0 !important; flex: 0 1 auto; order: 0; }
.items-preview-box .tryon-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; min-width: 0; }
.items-preview-box .tryon-chip { width: 100%; min-height: 62px; padding: 8px 12px; justify-content: center; }
@media (min-width: 861px) {
  .items-content-row .items-detail-panel { grid-template-columns: minmax(280px, 500px) minmax(0, 1fr); height: 356px; }
  .items-content-row .items-info-box { justify-content: flex-start; min-height: 0; overflow-y: auto; }
}
@media (max-width: 640px) {
  .items-preview-box .tryon-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1 1 auto; }
}
.items-preview-box .tryon-mid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.items-preview-box .tryon-mid .tryon-actions { margin: 0; justify-content: flex-end; }
/* 상점 상세: 프로필을 키워 왼쪽 빈 곳을 채우고 창 높이는 380px(사장님 요청 2026-09-16) */
.items-preview-box .tryon-top .preview-avatar-container { width: 92px; height: 92px; margin: 30px 22px 20px 20px; } /* 윗여백 30px: 테두리 그림이 칸보다 23px 튀어나오고 왕관이 위아래로 3px 뜬다. 20px이면 왕관 끝이 박스 edge에 잘려 깜빡였다(2026-09-18) */
.items-preview-box .tryon-top .preview-avatar { width: 84px; height: 84px; font-size: 30px; }
@media (min-width: 861px) { .items-content-row .items-info-box { gap: 6px; } }
/* 상점 정렬: 기본 선택 상자 대신 한 묶음 칩(사장님 요청 2026-09-16) */
.items-tools-right .chip-pick { flex-wrap: nowrap; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.items-tools-right .chip-pick button { min-height: 32px; padding: 5px 12px; border: 0; background: transparent; font-size: 12.5px; }
.items-tools-right .chip-pick button.on { background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-border); }
/* 상점 카드: 구매 조건을 못 채우면 살짝 어둡게 + 잠긴 자물쇠, 채우면 열린 자물쇠(사장님 요청 2026-09-16) */
.item-card.req-locked .item-thumb-box, .item-card.req-locked .item-card-name { opacity: .5; filter: grayscale(.4); transition: opacity .15s, filter .15s; }
.item-card.req-locked:hover .item-thumb-box, .item-card.req-locked.selected .item-thumb-box, .item-card.req-locked:hover .item-card-name, .item-card.req-locked.selected .item-card-name { opacity: .8; filter: none; }
.item-thumb-wrap { position: relative; display: grid; place-items: center; }
.req-lock-big { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.req-lock-big svg { width: 50%; height: 50%; min-width: 28px; min-height: 28px; padding: 7px; box-sizing: content-box; border-radius: 12px; color: rgba(255, 255, 255, .9); background: rgba(20, 22, 28, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.item-card.req-locked:hover .req-lock-big, .item-card.req-locked.selected .req-lock-big { opacity: .75; }
.item-card-price .req-ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--dim); }
.item-card-price .req-ico.open { color: var(--accent); }
/* 방송 화면 윗줄 이름표: "별명님의 방 이름방"(사장님 요청 2026-09-16, 성능 버튼 자리) */
.overlay-top .meta-who { display: inline-flex; align-items: center; max-width: 340px; padding: 5px 14px; border-radius: 999px; background: rgba(8, 12, 18, 0.6); border: 1px solid var(--accent-border); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; backdrop-filter: blur(6px); }
.overlay-top .meta-who b { flex: none; color: var(--accent); font-weight: 800; }
.overlay-top .meta-who span { min-width: 0; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; }
#itemActionArea .item-set-offer .item-set-pieces { order: -2; flex: 1 1 calc(100% - 150px); max-width: 520px; }
#itemActionArea .need-short { order: -1; color: var(--danger); font-size: 13px; font-weight: 600; align-self: center; white-space: nowrap; }
#itemActionArea:not(:has(.item-set-pieces)) .need-short:empty { display: none; }
#itemActionArea .need-short { flex: 1 0 auto; min-width: calc(100% - 528px); }
/* 세트 조각을 눌러 그 조각을 구매 버튼에 담는다(사장님 요청 2026-09-16) */
.item-set-offer .item-set-pieces li[data-piece] { cursor: pointer; transition: border-color .15s, background .15s; }
.item-set-offer .item-set-pieces li[data-piece]:hover { border-color: var(--line-strong); }
.item-set-offer .item-set-pieces li.picked { border-color: var(--accent-border); background: var(--accent-dim); }

/* ── 방송실 윗줄 한 줄 정리(사장님 요청 2026-09-30) ─────────────────
   방송을 켜면 공유 화면 바꾸기·미리보기 끄기·N일차가 늘어나 줄이 넘쳐 아래로 밀렸다.
   이제 방송 전·중 모두 한 줄: 칸 높이 28px·모서리 통일, 방 이름 칩만 줄어들며 … 처리.
   폭은 화면이 아니라 이 막대 자신의 폭(컨테이너)으로 판단한다(사이드바·채팅 폭에 따라 무대 폭이 달라서).
   ★이 블록은 위의 .overlay-top 규칙들과 @media 560px 규칙보다 뒤에 있어야 이긴다 */
.overlay-top {
  container: topbar / inline-size;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}
.overlay-top > span,
.overlay-top > button {
  flex: none;
  box-sizing: border-box;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.overlay-top > span[hidden], .overlay-top > button[hidden] { display: none !important; }
.overlay-top .ico { flex: none; }
.overlay-top > span .ico { margin-right: 0; }
.overlay-top .safe-tag, .overlay-top .swap-tag { gap: 5px; }
.overlay-top .swap-tag { border-radius: var(--r-sm); }
/* 순서: 상태(LIVE·시청자·시간·N일차) → 방 이름(남는 폭) → 오른쪽 도구 */
.overlay-top > .live-tag { order: 1; }
.overlay-top > .viewer-tag { order: 2; }
.overlay-top > .time-tag { order: 3; }
.overlay-top > .day-tag { order: 4; }
.overlay-top > .meta-who { order: 5; flex: 0 1 auto; min-width: 0; max-width: none; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.overlay-top > .safe-tag { order: 6; margin-left: auto; }
.overlay-top > .swap-tag { order: 7; }
.overlay-top > .preview-off { order: 8; margin-left: 0; width: 28px; padding: 0; display: inline-grid; place-items: center; }
.overlay-top > .preview-off .ico { width: 14px; height: 14px; }
/* 폭이 모자라면 글자를 접고 아이콘만(설명은 title 로) */
@container topbar (max-width: 900px) {
  .overlay-top .safe-tag .tag-label, .overlay-top .swap-tag .tag-label { display: none; }
  .overlay-top > .safe-tag, .overlay-top > .swap-tag { width: 28px; padding: 0; justify-content: center; }
}
/* 더 좁으면 방 이름 칩은 뺀다(아래 채널 정보에 같은 내용이 있다) */
@container topbar (max-width: 560px) {
  .overlay-top > .meta-who { display: none !important; }
}
@container topbar (max-width: 430px) {
  .overlay-top { gap: 4px; }
  .overlay-top > span, .overlay-top > button { padding: 0 7px; font-size: 11px; }
  .overlay-top > .day-tag { display: none !important; }
  .overlay-top > .safe-tag, .overlay-top > .swap-tag, .overlay-top > .preview-off { width: 26px; padding: 0; }
}

/* ── 채널 정보: 대칭 격자(사장님 목업 2026-09-30) ─────────────────────
   넓을 때:  [아바타 | 제목 / 공지 / 태그·시청자 수]  ↔  [방송인 / 팔로워·구독자 / 창 닫기 경고]  (양쪽 3줄, 같은 줄끼리 높이를 맞춤)
             그 아래 한 줄: 채팅·스쿱·좋아요·팔로워·구독 칩 → 공지 수정 → 방송 종료(오른쪽 정렬, 칩은 버튼과 같은 높이)
   좁을 때(채널칸 600px 이하):  아바타 | 제목 / 공지 / 태그·시청자 수 / 방송인·팔로워·경고, 맨 아래 칩·버튼(넘치면 줄바꿈)
   양쪽 줄 맞춤은 subgrid: 제목 칸과 방송인 칸이 바깥 격자의 1~3행을 나눠 쓴다.
   .channel-left/.channel-right 는 display: contents: 자식이 이 격자에 바로 놓인다(.channel-left .avatar-wrap 선택자는 그대로 먹는다).
   통계 카드 줄(최고 동접·채팅·스쿱)은 없앴다. 채팅·스쿱은 칩으로 올라왔다 */
.channel { padding: 12px 20px 12px; gap: 0; }
.channel-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  grid-template-areas: none;
  column-gap: 14px;
  row-gap: 3px;
  align-items: center;
  flex-wrap: nowrap;
}
.channel-left, .channel-right { display: contents; }
/* 프로필 사진은 왼쪽 끝에서 36px(채널칸 여백 20 + 16, 사장님 지정 2026-09-20). 테두리 효과가 번질 여유를 위아래로 */
.channel-left .avatar-wrap { grid-column: 1; grid-row: 1 / 4; align-self: center; margin: 12px 4px 12px 16px; }
.channel-titlebox { grid-column: 2; grid-row: 1 / 4; display: grid; grid-template-rows: subgrid; align-items: center; min-width: 0; }
.channel-titlebox .channel-title { width: auto; }
.channel-titlebox .channel-under { flex: none; margin: 0; gap: 6px; }
/* 카테고리·시청자 수를 먼저, 세트 칩은 그 뒤(좁아서 줄이 넘치면 칩만 다음 줄로) */
.channel-titlebox .channel-under .channel-live { order: 1; }
.channel-titlebox .channel-under .channel-setfx { order: 2; }
.channel-meta { grid-column: 3; grid-row: 1 / 4; display: grid; grid-template-rows: subgrid; align-items: center; justify-items: end; min-width: 0; text-align: right; gap: 0; }
.channel-meta > * { min-width: 0; max-width: 100%; }
.channel-meta .channel-who { justify-content: flex-end; font-size: 13.5px; }
.channel-meta .channel-who b { font-size: 14.5px; }
.channel-meta .channel-who #chWhoRoom { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.channel-meta .channel-who-sub { justify-content: flex-end; }
/* 창 닫기 경고: 방송인·팔로워 아래 셋째 줄, 오른쪽 한 줄(사장님 요청 2026-09-30) */
.channel-meta .end-warn { flex: none; margin: 0; text-align: right; font-size: 12px; white-space: nowrap; }
/* 방송 전에도 같은 배치: 경고 자리는 비워 두고 높이를 지킨다 */
.channel-meta .end-warn[hidden] { display: block; visibility: hidden; }
.channel-body > .channel-right > .actions { grid-column: 1 / -1; grid-row: 4; justify-self: end; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; max-width: none; margin-top: 8px; }
/* 수치 칩: 채팅·스쿱·좋아요·팔로워·구독. 공지 수정 버튼과 같은 높이·글자 크기 */
.actions .likes { padding: 0 13px; gap: 6px; font-size: 13.5px; }
.actions .likes i { font-size: 15px; }
.actions .likes.stat i { color: var(--muted); }
.actions .likes.stat-cheese i { color: var(--gold, #ffc542); }
.actions .likes .currency-emoji .ico { width: 15px; height: 15px; vertical-align: 0; }
.actions .likes, .actions .btn, .actions #startBtn { box-sizing: border-box; height: 38px; min-height: 0; }
.actions .btn, .actions #startBtn { padding: 0 15px; font-size: 13.5px; }
.action-btns { display: inline-flex; gap: 6px; flex: none; }
/* 조금 좁으면(1280 등) 대칭은 그대로, 경고만 두 줄까지 */
@container ch (max-width: 820px) {
  .channel-right .channel-meta { max-width: 250px; }
  .channel-meta .end-warn { white-space: normal; word-break: keep-all; }
}
/* 아주 좁으면(1024·폰) 방송인 줄을 제목 칸 아래로, 칩·버튼은 맨 아래(넘치면 줄바꿈). 방송 전·중 같은 배치 */
@container ch (max-width: 600px) {
  .channel-body { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto auto auto; }
  .channel-right .channel-meta { max-width: none; }
  .channel-meta { grid-column: 2; grid-row: 4; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-items: normal; text-align: left; margin-top: 3px; }
  .channel-meta .channel-who { justify-content: flex-start; font-size: 13px; }
  .channel-meta .channel-who b { font-size: 13.5px; }
  .channel-meta .channel-who-sub { justify-content: flex-start; }
  .channel-meta .channel-who-sub::before { content: "·"; margin: 0 5px 0 5px; color: var(--dim); }
  .channel-meta .end-warn { flex: 1 1 100%; text-align: left; white-space: normal; }
  .channel-meta .end-warn[hidden] { display: none; }
  .channel-body > .channel-right > .actions { grid-row: 5; flex-wrap: wrap; }
}
@container ch (max-width: 420px) {
  .channel-meta .channel-who-sub::before { content: none; }
  .channel-meta .channel-who-sub { flex: 1 1 100%; }
  .actions .likes { padding: 0 9px; gap: 4px; font-size: 13px; }
  .actions .btn, .actions #startBtn { padding: 0 12px; font-size: 13px; }
}

/* ── 방송실 다듬기(사장님 요청 2026-09-30: "거슬리는 것들 정리") ─────── */
/* 대본: 한글이 고정폭 글꼴 대체로 그려져 글자 사이가 벌어져 보였다. 본문은 앱 글꼴, 시각만 고정폭 */
.speech-script { font-family: inherit; }
.speech-script time { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
/* 캡처 주기: 폭이 좁으면 90초 하나만 다음 줄로 떨어졌다. 다섯 칸을 늘 한 줄에 같은 폭으로 */
.strip-ctl .interval-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 6px; }
.strip-ctl > .cell.ctl .interval-pick { min-width: 0; padding-left: 0; padding-right: 0; }

/* ── 스크롤은 페이지 하나(2026-10-01 사장님 승인: 사이드바가 자기 안에서, 업적 목록이 480px 상자 안에서 또 스크롤되던 것).
   같은 날 방송 화면으로 옮겼던 오늘의 미션·팁은 사이드바로 되돌렸다(파일 끝 "사이드바 빈칸에 오늘의 미션·팁") */
/* 업적 전체 목록: 안쪽 상자 스크롤 없이 페이지와 함께 내려간다 */
#view-ach .hall-list { max-height: none; overflow: visible; padding-right: 0; }

/* ── 업적 단계 줄(2026-10-01, 안티그래비티) ── */
#view-ach #hallHighlights {
  margin-top: 0;
}
#view-ach .ach-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  word-break: keep-all;
}
#view-ach .ach-sum-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  white-space: nowrap;
}
#view-ach .ach-sum-count b {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}
#view-ach .ach-sum-count span {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
#view-ach .ach-sum-bar {
  flex: 1 1 0;
  min-width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
#view-ach .ach-sum-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}
#view-ach .ach-sum-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
#view-ach .ach-sum-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  word-break: keep-all;
}
#view-ach .ach-sum-meta b {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#view-ach .ach-sum-meta .ico {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
@media (max-width: 760px) {
  #view-ach .ach-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  #view-ach .ach-sum-bar {
    width: 100%;
    flex: none;
  }
  #view-ach .ach-sum-meta {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 12px;
    white-space: normal;
  }
}

#view-ach .hall-full-wrap {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
#view-ach .hall-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
@media (min-width: 1100px) {
  #view-ach .hall-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#view-ach .ach-chain {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  min-width: 0;
  box-sizing: border-box;
  word-break: keep-all;
}
#view-ach .ach-chain.complete {
  border-color: rgba(255, 197, 66, 0.25);
}

#view-ach .ach-chain-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#view-ach .ach-chain-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-3);
  flex: none;
}
#view-ach .ach-chain-ico .ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
#view-ach .ach-chain.complete .ach-chain-ico .ico {
  color: var(--gold);
}
#view-ach .ach-chain-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}
#view-ach .ach-chain-title b {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-ach .ach-chain-title small {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-ach .ach-chain-count {
  margin-left: auto;
  flex: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#view-ach .ach-chain-count small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#view-ach .ach-steps {
  display: grid;
  grid-template-columns: repeat(var(--steps, 4), 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: start;
}
#view-ach .ach-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
#view-ach .ach-step::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
#view-ach .ach-step:first-child::before {
  display: none;
}
#view-ach .ach-step.done.rarity-일반::before { background: rgba(206, 212, 218, 0.6); }
#view-ach .ach-step.done.rarity-희귀::before { background: rgba(25, 113, 194, 0.6); }
#view-ach .ach-step.done.rarity-영웅::before { background: rgba(103, 65, 217, 0.6); }
#view-ach .ach-step.done.rarity-전설::before { background: rgba(255, 197, 66, 0.6); }
#view-ach .ach-step.done.rarity-신화::before { background: linear-gradient(90deg, rgba(255, 95, 162, 0.6), rgba(143, 107, 255, 0.6) 55%, rgba(51, 214, 255, 0.6)); }

#view-ach .ach-step i {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-sizing: border-box;
  font-style: normal;
}
#view-ach .ach-step.done.rarity-일반 i { background: #373a40; }
#view-ach .ach-step.done.rarity-희귀 i { background: #1971c2; }
#view-ach .ach-step.done.rarity-영웅 i { background: #6741d9; }
#view-ach .ach-step.done.rarity-전설 i { background: #e8590c; }
#view-ach .ach-step.done.rarity-신화 i { background: linear-gradient(135deg, #ff5fa2, #8f6bff 55%, #33d6ff); }

#view-ach .ach-step.done i .ico {
  width: 12px;
  height: 12px;
  color: #ffffff;
}

#view-ach .ach-step.next i {
  background: var(--bg-2);
  border-width: 2px;
  border-style: solid;
}
#view-ach .ach-step.next.rarity-일반 i {
  border-color: #ced4da;
  box-shadow: 0 0 0 3px rgba(206, 212, 218, 0.2);
}
#view-ach .ach-step.next.rarity-희귀 i {
  border-color: #a5d8ff;
  box-shadow: 0 0 0 3px rgba(165, 216, 255, 0.25);
}
#view-ach .ach-step.next.rarity-영웅 i {
  border-color: #b197fc;
  box-shadow: 0 0 0 3px rgba(177, 151, 252, 0.25);
}
#view-ach .ach-step.next.rarity-전설 i {
  border-color: #ffc542;
  box-shadow: 0 0 0 3px rgba(255, 197, 66, 0.25);
}
#view-ach .ach-step.next.rarity-신화 i {
  border-color: transparent;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
              linear-gradient(135deg, #ff5fa2, #8f6bff 55%, #33d6ff) border-box;
  box-shadow: 0 0 0 3px rgba(143, 107, 255, 0.25);
}

#view-ach .ach-step.todo i {
  background: var(--bg-2);
  border: 2px solid var(--line-strong);
  opacity: 0.55;
}

#view-ach .ach-step span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
#view-ach .ach-step.done span,
#view-ach .ach-step.next span {
  color: var(--text);
  font-weight: 600;
}
#view-ach .ach-step.todo span {
  color: var(--dim);
}

#view-ach .ach-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
#view-ach .ach-next-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#view-ach .ach-next-top .item-rarity-pill {
  flex: none;
}
#view-ach .ach-next-top b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#view-ach .ach-next-remain {
  margin-left: auto;
  flex: none;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#view-ach .ach-next .achieve-bar-track.small {
  width: 100%;
  height: 6px;
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
#view-ach .ach-next .achieve-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
#view-ach .ach-next-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
#view-ach .ach-next-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#view-ach .ach-next-bottom .hall-reward {
  margin-top: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#view-ach .ach-next-bottom .hall-reward .ico {
  width: 12px;
  height: 12px;
  color: var(--gold);
  vertical-align: 0;
}
#view-ach .ach-next.all-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255, 197, 66, 0.06);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  word-break: keep-all;
}
#view-ach .ach-next.all-done .ico {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

#view-ach .item-rarity-pill.rarity-일반 { background: #373a40; color: #ced4da; }
#view-ach .item-rarity-pill.rarity-희귀 { background: #1971c2; color: #a5d8ff; }
#view-ach .item-rarity-pill.rarity-영웅 { background: #6741d9; color: #b197fc; }
#view-ach .item-rarity-pill.rarity-전설 { background: #e8590c; color: #ffc542; }
#view-ach .item-rarity-pill.rarity-신화 { background: linear-gradient(135deg, #ff5fa2, #8f6bff 55%, #33d6ff); color: #ffffff; }

#view-ach .ach-whos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  word-break: keep-all;
}
#view-ach .ach-whos li {
  position: relative;
  padding-left: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
#view-ach .ach-whos li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

#view-ach .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;
}

@media (max-width: 400px) {
  #view-ach .ach-chain {
    padding: 14px;
  }
  #view-ach .ach-step i {
    width: 18px;
    height: 18px;
  }
  #view-ach .ach-step::before {
    top: 8px;
  }
  #view-ach .ach-step.done i .ico {
    width: 10px;
    height: 10px;
  }
  #view-ach .ach-step span {
    font-size: 11px;
  }
}
/* 검수(Claude): 전역 .rarity-* 규칙이 단계 칸 전체를 등급 색으로 칠하던 것을 끈다. 색은 점·선에만 */
#view-ach .ach-step { background: transparent; color: inherit; }
/* 일반 등급 점이 #373a40이면 어두운 카드 위에서 안 보인다 */
#view-ach .ach-step.done.rarity-일반 i { background: #6b7280; }
#view-ach .ach-step.done.rarity-일반::before { background: rgba(156, 163, 175, 0.55); }
/* ── 업적 단계 줄 끝 ── */

/* ── 상점 개편(2026-10-01, 안티그래비티) ── */

/* ── 0. 기본 규칙 & 리셋 ── */
#view-items {
  word-break: keep-all;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#view-items[hidden],
#view-items [hidden] {
  display: none !important;
}

#view-items button,
#view-items [role="tab"],
#view-items [role="option"],
#view-items .cat-name,
#view-items .cat-count,
#view-items .item-card-price,
#view-items .item-card-rarity,
#view-items .item-price-tag,
#view-items .set-card-have,
#view-items .item-set-tag,
#view-items .tryon-chip-price {
  white-space: nowrap;
}

#view-items [data-cat-count],
#view-items .cat-count,
#view-items .shop-wallet b,
#view-items #itemsWalletVal,
#view-items #affordableCount,
#view-items .item-card-price,
#view-items .set-card-have,
#view-items .item-price-tag,
#view-items .item-set-piece-price,
#view-items .item-set-price,
#view-items .tryon-chip-price,
#view-items .scoop-log-when,
#view-items .scoop-log-amt,
#view-items .inv-summary b,
#view-items .inv-tab b,
#view-items .inv-section-head small,
#view-items .shop-dd-menu small {
  font-variant-numeric: tabular-nums;
}

/* ── 1. 헤더 ── */
#view-items .shop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

#view-items .shop-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#view-items .shop-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
}

#view-items .shop-title p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

#view-items .shop-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#view-items .items-cat-btn.shop-special {
  height: 38px;
  padding: 0 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  width: auto;
  flex: none;
  transition: border-color 150ms, background-color 150ms, color 150ms;
}

#view-items .items-cat-btn.shop-special::after {
  display: none;
}

#view-items .items-cat-btn.shop-special:hover {
  border-color: var(--line-strong);
  color: var(--text-bright);
}

#view-items .items-cat-btn.shop-special .ico,
#view-items .items-cat-btn.shop-special svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
}

#view-items .items-cat-btn.shop-special .cat-name {
  white-space: nowrap;
}

#view-items .items-cat-btn.shop-special .cat-count {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

#view-items .items-cat-btn.shop-special.gacha-tab .ico,
#view-items .items-cat-btn.shop-special.gacha-tab svg {
  color: #fbbf24;
}

#view-items .items-cat-btn.shop-special.gacha-tab.active {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
  box-shadow: none;
}

#view-items .items-cat-btn.shop-special.gacha-tab.active .cat-count {
  color: #fbbf24;
}

#view-items .items-cat-btn.shop-special[data-cat="subGift"].active {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: none;
}

#view-items .items-cat-btn.shop-special[data-cat="subGift"].active .cat-count {
  color: var(--accent);
}

#view-items .shop-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px 0 14px;
  background: var(--gold-dim);
  border: 1px solid rgba(255, 197, 66, 0.28);
  border-radius: var(--r-full);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 150ms, background-color 150ms;
}

#view-items .shop-wallet:hover {
  border-color: rgba(255, 197, 66, 0.5);
}

#view-items .shop-wallet .ico:first-child,
#view-items .shop-wallet svg:first-child {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex: none;
  margin: 0;
}

#view-items .shop-wallet b,
#view-items #itemsWalletVal {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--gold);
}

#view-items .shop-wallet-unit {
  font-size: 12px;
  color: var(--muted);
}

#view-items .shop-wallet-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: none;
  margin: 0;
  transition: transform 150ms;
}

#view-items .shop-wallet[aria-expanded="true"] .shop-wallet-chev {
  transform: rotate(180deg);
}

/* ── 1-1. 지갑 내역 (itemsLog) ── */
#view-items .items-log {
  margin: 12px 0 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
}

#view-items .shop-log-tabs {
  display: inline-flex;
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}

#view-items .shop-log-tabs button {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms;
}

#view-items .shop-log-tabs button.on {
  background: var(--bg-active);
  color: var(--text);
}

#view-items .shop-log-body {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#view-items .shop-log-body::-webkit-scrollbar {
  width: 6px;
}

#view-items .shop-log-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
}

#view-items .items-log-note {
  font-size: 11.5px;
  color: var(--dim);
  margin: 4px 0 8px 4px;
}

#view-items .scoop-log {
  list-style: none;
  margin: 0;
  padding: 0;
}

#view-items .scoop-log li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 13px;
  align-items: center;
}

#view-items .scoop-log-when {
  color: var(--dim);
  font-size: 12px;
}

#view-items .scoop-log-what b {
  color: var(--text);
  font-weight: 600;
  display: block;
}

#view-items .scoop-log-what small {
  color: var(--dim);
  display: block;
  font-size: 11.5px;
  margin-top: 2px;
}

#view-items .scoop-log-amt {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

#view-items .scoop-log-amt.plus {
  color: #51cf66;
}

#view-items .scoop-log-amt.minus {
  color: #ff8787;
}

#view-items .shop-log-body ul:not(.scoop-log) {
  list-style: none;
  margin: 0;
  padding: 0;
}

#view-items .shop-log-body ul:not(.scoop-log) li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--line-subtle);
}

#view-items .shop-log-body ul:not(.scoop-log) li time {
  color: var(--dim);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  flex: none;
}

#view-items .shop-log-body ul:not(.scoop-log) li b {
  color: var(--text);
  font-weight: 600;
}

#view-items .shop-log-body ul:not(.scoop-log) li small {
  color: var(--dim);
  margin-left: auto;
}

#view-items .shop-log-body .gacha-odd {
  padding: 1px 6px;
  font-size: 11px;
  border-radius: var(--r-full);
}

#view-items .scoop-log-empty,
#view-items .shop-log-body .gacha-note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 16px;
  margin: 0;
}

/* ── 2. 분류 탭 바 (Underline Tab Bar) ── */
#view-items .shop-tabs {
  margin-top: 22px;
  display: flex;
  gap: 2px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
  padding: 0;
  box-sizing: border-box;
}

#view-items .shop-tabs::-webkit-scrollbar {
  display: none;
}

#view-items .shop-tabs .items-cat-btn {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  width: auto;
  flex: none;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms;
}

#view-items .shop-tabs .items-cat-btn .ico,
#view-items .shop-tabs .items-cat-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  flex: none;
  margin: 0;
  transition: opacity 150ms, color 150ms;
}

#view-items .shop-tabs .items-cat-btn:hover {
  color: var(--text);
}

#view-items .shop-tabs .items-cat-btn:hover .ico,
#view-items .shop-tabs .items-cat-btn:hover svg {
  opacity: 1;
}

#view-items .shop-tabs .items-cat-btn.active {
  color: var(--text-bright);
  box-shadow: none;
}

#view-items .shop-tabs .items-cat-btn.active .ico,
#view-items .shop-tabs .items-cat-btn.active svg {
  opacity: 1;
  color: var(--accent);
}

#view-items .shop-tabs .items-cat-btn.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

#view-items .shop-tabs .cat-name {
  flex: none;
  white-space: nowrap;
}

#view-items .shop-tabs .cat-count:empty {
  display: none;
}

#view-items .shop-tabs .cat-count:not(:empty) {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  color: var(--muted);
  display: inline-block;
  line-height: 1.4;
}

#view-items .shop-tabs .items-cat-btn.active .cat-count:not(:empty) {
  background: var(--accent-dim);
  color: var(--accent);
}

#view-items .shop-tabs-sep {
  flex: none;
  width: 1px;
  height: 18px;
  align-self: center;
  margin: 0 8px;
  background: var(--line-strong);
}

/* ── 3. 도구줄 (Toolbar) ── */
#view-items .items-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 16px;
  flex-wrap: nowrap;
}

#view-items .shop-dd {
  position: relative;
  flex: none;
}

#view-items .shop-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms, background-color 150ms;
}

#view-items .shop-dd-btn small {
  font-size: 12px;
  color: var(--dim);
}

#view-items .shop-dd-btn b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

#view-items .shop-dd-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: none;
  transition: transform 150ms;
}

#view-items .shop-dd-btn:hover {
  border-color: var(--line-strong);
}

#view-items .shop-dd-btn[aria-expanded="true"] {
  border-color: var(--accent-border);
}

#view-items .shop-dd-btn[aria-expanded="true"] .shop-dd-chev {
  transform: rotate(180deg);
}

#view-items .shop-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 200px;
  background: #1b1e26;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

#view-items .shop-dd-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 6px;
}

#view-items .shop-dd-menu [role="option"] {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms;
}

#view-items .shop-dd-menu [role="option"] span {
  flex: 1 1 auto;
  min-width: 0;
}

#view-items .shop-dd-menu [role="option"] small {
  font-size: 12px;
  color: var(--dim);
  flex: none;
}

#view-items .shop-dd-menu .shop-dd-on {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex: none;
}

#view-items .shop-dd-menu [role="option"]:hover,
#view-items .shop-dd-menu [role="option"]:focus-visible {
  background: var(--bg-hover);
  outline: none;
}

#view-items .shop-dd-menu [role="option"][aria-selected="true"] span {
  color: var(--accent);
  font-weight: 700;
}

#view-items .shop-dd-menu [role="option"][disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

#view-items .shop-dd-menu [role="option"][data-r]::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  margin-right: -2px;
}

#view-items .shop-dd-menu [role="option"][data-r="일반"]::before { background: #adb5bd; }
#view-items .shop-dd-menu [role="option"][data-r="희귀"]::before { background: #4dabf7; }
#view-items .shop-dd-menu [role="option"][data-r="영웅"]::before { background: #9775fa; }
#view-items .shop-dd-menu [role="option"][data-r="전설"]::before { background: #ffa94d; }

#view-items .shop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: border-color 150ms, background-color 150ms;
}

#view-items .shop-toggle-box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
  transition: background-color 150ms, border-color 150ms;
}

#view-items .shop-toggle-box svg,
#view-items .shop-toggle-box .ico {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity 150ms;
}

#view-items .shop-toggle[aria-pressed="true"] {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

#view-items .shop-toggle[aria-pressed="true"] .shop-toggle-box {
  background: var(--accent);
  border-color: var(--accent);
}

#view-items .shop-toggle[aria-pressed="true"] .shop-toggle-box svg,
#view-items .shop-toggle[aria-pressed="true"] .shop-toggle-box .ico {
  opacity: 1;
  color: #06121a;
}

#view-items #affordableCount {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  color: var(--muted);
}

#view-items #affordableCount:empty {
  display: none;
}

#view-items .items-search {
  margin-left: auto;
  width: 240px;
  height: 36px;
  padding: 0 12px 0 34px;
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
  background-size: 16px 16px;
  box-sizing: border-box;
  transition: border-color 150ms;
}

#view-items .items-search:focus {
  border-color: var(--accent-border);
  outline: none;
}

#view-items .items-search::placeholder {
  color: var(--dim);
}

/* ── 4. 본문 배치 (Shop Body) ── */
#view-items .shop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

#view-items .shop-body.no-panel {
  grid-template-columns: 1fr;
}

#view-items .shop-main {
  min-width: 0;
}

/* ── 5. 카드 (Cards) ── */
#view-items .items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

#view-items .items-grid.sets {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

#view-items .items-grid:has(.gacha-machine),
#view-items .items-grid:has(.subgift-view) {
  display: block;
}

#view-items .items-grid > .gacha-machine,
#view-items .items-grid > .subgift-view {
  grid-column: 1 / -1;
  width: 100%;
}

#view-items .item-card {
  padding: 0;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 150ms, border-color 150ms, background-color 150ms;
}

#view-items .item-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #5c636e;
  opacity: 0.9;
  z-index: 2;
}

#view-items .item-card[data-r="일반"]::before { background: #5c636e; }
#view-items .item-card[data-r="희귀"]::before { background: #4dabf7; }
#view-items .item-card[data-r="영웅"]::before { background: #9775fa; }
#view-items .item-card[data-r="전설"]::before { background: #ffa94d; }

#view-items .item-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--bg-2);
}

#view-items .item-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 210, 255, 0.12);
}

#view-items .item-card.equipped-active:not(.selected) {
  border-color: var(--accent-border);
}

#view-items .item-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#view-items .item-thumb-wrap {
  position: relative;
  aspect-ratio: 5 / 4;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 35%, rgba(255, 255, 255, 0.045), transparent 60%), var(--bg-3);
  border-bottom: 1px solid var(--line-subtle);
  overflow: hidden;
}

#view-items .item-thumb-box {
  width: 84px;
  height: 84px;
  position: relative;
  display: grid;
  place-items: center;
}

#view-items .set-card .item-thumb-box {
  width: 100px;
  height: 100px;
}

#view-items .item-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

#view-items .item-thumb-box .item-color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

#view-items .item-set-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  bottom: auto;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: rgba(255, 197, 66, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 197, 66, 0.28);
  white-space: nowrap;
  z-index: 3;
}

#view-items .item-card.req-locked .item-thumb-box {
  opacity: 0.4;
}

#view-items .req-lock-big {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}

#view-items .req-lock-big svg,
#view-items .req-lock-big .ico {
  width: 28px;
  height: 28px;
  color: var(--text);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

#view-items .set-card-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
}

#view-items .item-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#view-items .item-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

#view-items .item-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#view-items .item-card-price {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

#view-items .item-card-price.equipped {
  color: var(--accent);
}

#view-items .item-card-price.owned {
  color: var(--muted);
}

#view-items .item-card-price.locked {
  color: var(--muted);
}

#view-items .item-card-price .req-ico {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

#view-items .set-card-have {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-full);
  background: var(--bg-hover);
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}

#view-items .item-card-rarity {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

#view-items .item-card-rarity[data-r="일반"] { color: #adb5bd; }
#view-items .item-card-rarity[data-r="희귀"] { color: #4dabf7; }
#view-items .item-card-rarity[data-r="영웅"] { color: #9775fa; }
#view-items .item-card-rarity[data-r="전설"] { color: #ffa94d; }

#view-items .items-search-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 48px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  margin: 0;
}

/* ── 6. 상세 패널 (Detail Panel) ── */
#view-items .items-detail-panel {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 0;
  min-width: 0;
  height: auto;
  grid-template-columns: none;
}

#view-items .items-detail-panel::-webkit-scrollbar {
  width: 6px;
}

#view-items .items-detail-panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
}

#view-items .items-sheet-close {
  display: none;
}

#view-items .items-preview-box {
  border: 0;
  border-radius: 0;
  padding: 22px 16px 16px;
  gap: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(90% 70% at 50% 0%, rgba(0, 210, 255, 0.10), transparent 70%), var(--bg-3);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

#view-items .tryon-stage {
  display: grid;
  place-items: center;
  width: 100%;
}

#view-items .preview-avatar-container {
  width: 108px;
  height: 108px;
  position: relative;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

#view-items .preview-avatar {
  width: 96px;
  height: 96px;
  font-size: 34px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  font-weight: 700;
  color: var(--text-bright);
}

#view-items .items-preview-box.set-on .preview-avatar-container {
  filter: drop-shadow(0 0 10px rgba(255, 197, 66, 0.55));
}

#view-items .tryon-chat {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-md);
  padding: 8px 10px;
  box-sizing: border-box;
}

#view-items .tryon-chat .msg {
  font-size: 13px;
  line-height: 1.5;
  background: transparent;
}

#view-items .tryon-viewer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#view-items .tryon-viewer-head .tryon-viewer-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}

#view-items .tryon-viewer-head .unlock-preview-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

#view-items .tryon-viewer-head .lbl {
  font-size: 12px;
  color: var(--dim);
  display: block;
  margin-top: 2px;
}

#view-items .unlock-voice-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 2px;
}

#view-items .unlock-voice-icon svg,
#view-items .unlock-voice-icon .ico {
  width: 24px;
  height: 24px;
}

#view-items .items-preview-box > .unlock-preview-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

#view-items .voice-hello {
  font-size: 12.5px;
  color: var(--dim);
  text-align: center;
}

#view-items .items-info-box {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

#view-items .items-info-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
}

#view-items .item-rarity-pill {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  line-height: 1.4;
  white-space: nowrap;
}

#view-items .item-rarity-pill[data-r="일반"] {
  background: rgba(173, 181, 189, 0.15);
  color: #adb5bd;
}

#view-items .item-rarity-pill[data-r="희귀"] {
  background: rgba(77, 171, 247, 0.15);
  color: #4dabf7;
}

#view-items .item-rarity-pill[data-r="영웅"] {
  background: rgba(151, 117, 250, 0.15);
  color: #9775fa;
}

#view-items .item-rarity-pill[data-r="전설"] {
  background: rgba(255, 169, 77, 0.15);
  color: #ffa94d;
}

#view-items .items-info-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.3;
}

#view-items .item-price-tag {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
  background: transparent;
  padding: 0;
  border: 0;
}

#view-items .items-info-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

#view-items .item-extra:empty {
  display: none;
}

#view-items .item-set-detail {
  display: grid;
  gap: 2px;
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 10px 12px;
}

#view-items .item-set-detail span {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

#view-items .item-set-detail strong {
  font-size: 13.5px;
  color: var(--text);
}

#view-items .item-set-detail small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

#view-items .unlock-personality {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

#view-items .unlock-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

#view-items .unlock-samples span {
  font-size: 12px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  padding: 4px 10px;
  color: var(--muted);
}

#view-items .item-voice-preview {
  align-self: flex-start;
}

#view-items #itemActionArea {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

#view-items #itemActionArea > .btn {
  width: 100%;
  height: 44px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

#view-items #itemActionArea .need-short {
  order: 0;
  flex: none;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  align-self: stretch;
  white-space: normal;
}

#view-items #itemActionArea .need-short:empty {
  display: none;
}

#view-items #itemActionArea .need-short s {
  color: var(--dim);
}

#view-items #itemActionArea .item-ach-lock {
  flex: none;
  order: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

#view-items #itemActionArea .item-ach-lock b {
  color: var(--text);
}

#view-items #itemActionArea .item-ach-lock svg,
#view-items #itemActionArea .item-ach-lock .ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: none;
  margin-top: 2px;
}

#view-items #itemActionArea .item-req-list {
  flex: none;
  order: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}

#view-items #itemActionArea .item-req-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 2px;
  border-bottom: 1px solid var(--line-subtle);
}

#view-items #itemActionArea .item-req-list li span {
  color: var(--dim);
}

#view-items #itemActionArea .item-set-offer {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 10px;
}

#view-items #itemActionArea .item-set-offer .item-set-pieces {
  order: 0;
  flex: none;
  max-width: none;
  grid-column: 1 / -1;
}

#view-items #itemActionArea .item-set-offer #btnBuySet {
  height: 36px;
  font-size: 13px;
  width: auto;
  padding: 0 14px;
  border-radius: var(--r-md);
}

#view-items #itemActionArea .item-set-price {
  font-size: 12.5px;
  white-space: nowrap;
}

#view-items #itemActionArea .item-set-price s {
  color: var(--dim);
}

#view-items #itemActionArea .item-set-price b {
  color: var(--gold);
}

#view-items #itemActionArea .item-set-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 8px;
  border-radius: var(--r-full);
  justify-self: start;
  white-space: nowrap;
}

#view-items .item-set-pieces {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#view-items .item-set-pieces li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 150ms;
}

#view-items .item-set-pieces li:hover {
  background: var(--bg-hover);
}

#view-items .item-set-pieces li.picked {
  background: var(--accent-dim);
}

#view-items .item-set-pieces li.owned span {
  color: var(--muted);
}

#view-items .item-set-piece-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-items .item-set-piece-name small {
  font-size: 11px;
  color: var(--dim);
  margin-right: 4px;
}

#view-items .item-set-piece-price {
  font-size: 12.5px;
  color: var(--gold);
  white-space: nowrap;
  flex: none;
}

#view-items .item-set-pieces li.owned .item-set-piece-price {
  color: var(--muted);
}

#view-items #itemActionArea .set-detail-pieces {
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 4px;
}

#view-items .items-tryon-slots {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-items .tryon-slots-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#view-items .tryon-slots-head b {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

#view-items .tryon-set-fx {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

#view-items .tryon-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

#view-items .tryon-chip {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms, background-color 150ms;
}

#view-items .tryon-chip small {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
}

#view-items .tryon-chip.trying {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

#view-items .tryon-chip.trying small {
  color: var(--accent);
}

#view-items .tryon-chip[disabled] {
  cursor: default;
  opacity: 1;
  pointer-events: none;
}

#view-items .tryon-chip-price {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
}

#view-items .tryon-chip-price.owned {
  color: var(--muted);
}

#view-items .tryon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#view-items .tryon-actions .btn {
  height: 30px;
  font-size: 12.5px;
  padding: 0 10px;
  border-radius: 8px;
  white-space: nowrap;
}

#view-items .items-detail-panel.empty .items-info-box h3:empty {
  display: none;
}

/* ── 7. 내 꾸미기 칸 (Inventory Pane) ── */
#view-items .inv-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  min-width: 0;
}

#view-items .inv-wrap {
  padding: 0;
  min-width: 0;
}

#view-items .inv-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

#view-items .inv-summary b {
  color: var(--text);
  font-weight: 700;
}

#view-items .inv-summary .inv-reset {
  flex: none;
  white-space: nowrap;
}

#view-items .inv-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  margin: 0;
  padding: 0;
}

#view-items .inv-tabs::-webkit-scrollbar {
  display: none;
}

#view-items .inv-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: border-color 150ms, background-color 150ms, color 150ms;
}

#view-items .inv-tab b {
  margin-left: 4px;
  color: var(--dim);
  font-weight: 700;
}

#view-items .inv-tab.on {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--text-bright);
}

#view-items .inv-tab.on b {
  color: var(--accent);
}

#view-items .inv-sections,
#view-items .inv-sections.all {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

#view-items .inv-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  min-width: 0;
}

#view-items .inv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

#view-items .inv-section-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
}

#view-items .inv-section-head h3 small {
  font-size: 12.5px;
  color: var(--dim);
  margin-left: 4px;
  font-weight: 600;
}

#view-items .inv-cur {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-items .inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

#view-items .inv-fav {
  position: absolute;
  top: 8px;
  left: 8px;
  right: auto;
  z-index: 5;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  color: var(--dim);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: color 150ms, background-color 150ms;
}

#view-items .inv-fav svg,
#view-items .inv-fav .ico {
  width: 14px;
  height: 14px;
}

#view-items .inv-fav:hover {
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.55);
}

#view-items .inv-fav[aria-pressed="true"],
#view-items .inv-card.fav .inv-fav {
  color: var(--gold);
}

#view-items .inv-fav[aria-pressed="true"] svg,
#view-items .inv-fav[aria-pressed="true"] .ico,
#view-items .inv-card.fav .inv-fav svg,
#view-items .inv-card.fav .inv-fav .ico {
  fill: currentColor;
}

#view-items .inv-card .item-set-tag {
  top: 8px;
  right: 8px;
  left: auto;
  bottom: auto;
}

#view-items .inv-card-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
  width: 100%;
  box-sizing: border-box;
}

#view-items .inv-card-actions .btn {
  flex: 1 1 0%;
  height: 30px;
  font-size: 12.5px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#view-items .inv-card-actions .inv-play {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
}

#view-items .inv-card-actions .inv-play svg,
#view-items .inv-card-actions .inv-play .ico {
  width: 12px;
  height: 12px;
}

#view-items .inv-card.inv-missing {
  opacity: 0.45;
  cursor: default;
}

#view-items .inv-card.inv-missing:hover {
  transform: none;
  border-color: var(--line);
}

#view-items .inv-more {
  align-self: flex-start;
  white-space: nowrap;
}

#view-items .inv-set-rule {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

#view-items .inv-empty {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#view-items .inv-empty p {
  margin: 0 0 10px;
}

#view-items .inv-empty .btn {
  white-space: nowrap;
}

#view-items .inv-tts-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 6px;
}

#view-items .inv-tts-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

#view-items .inv-tts-card p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ── 8. 반응형 미디어 쿼리 ── */
@media (max-width: 1180px) {
  #view-items .shop-body {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
  }
}

@media (max-width: 860px) {
  #view-items .shop-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #view-items .shop-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #view-items .shop-wallet {
    margin-left: auto;
  }

  #view-items .items-toolbar {
    flex-wrap: wrap;
  }

  #view-items .items-search {
    order: 5;
    flex: 1 1 100%;
    width: auto;
    margin-left: 0;
  }

  #view-items .shop-body {
    grid-template-columns: 1fr;
  }

  #view-items .items-grid,
  #view-items .items-grid.sets,
  #view-items .inv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #view-items .items-detail-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 60;
    max-height: 82vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.6);
    transform: translateY(calc(100% + 24px));
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }

  #view-items .items-detail-panel.sheet-open {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }

  #view-items .items-detail-panel::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: var(--r-full);
    background: var(--line-strong);
    z-index: 2;
  }

  #view-items .items-sheet-close {
    display: grid;
    place-items: center;
    position: sticky;
    top: 10px;
    align-self: flex-end;
    margin: 10px 10px -46px 0;
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--line-strong);
    color: var(--text);
    z-index: 3;
    cursor: pointer;
    padding: 0;
  }

  #view-items .items-sheet-close svg,
  #view-items .items-sheet-close .ico {
    width: 18px;
    height: 18px;
  }

  #view-items .items-preview-box {
    padding-top: 26px;
  }
}

@media (max-width: 400px) {
  #view-items .shop-tabs .items-cat-btn {
    padding: 0 10px;
    font-size: 13.5px;
  }

  #view-items .items-cat-btn.shop-special {
    padding: 0 12px;
  }

  #view-items .items-cat-btn.shop-special[data-cat="subGift"] .cat-count {
    display: none;
  }

  #view-items .item-card .item-thumb-box {
    width: 72px;
    height: 72px;
  }

  #view-items .set-card .item-thumb-box {
    width: 84px;
    height: 84px;
  }
}

/* ── 상점 개편 끝 ── */

/* ── 상점 개편 검수 고침(Claude) ── */
/* 옛 규칙(1439px 이하 .items-detail-panel order:-1)이 오른쪽 칸을 첫 칸(넓은 쪽)으로 끌어와 목록이 오른쪽 좁은 칸에 들어갔다 */
#view-items .items-detail-panel { order: 0; margin: 0; }
/* 칸이 창 높이를 넘으면 안쪽 칸들이 줄어들며 잘렸다(미리보기 채팅이 반쯤 가려짐). 줄이지 말고 칸 전체를 스크롤 */
#view-items .items-detail-panel > * { flex-shrink: 0; }
/* 옛 #itemActionArea(align-items:center)가 조건 목록·세트 조각을 가운데 좁게 모았다. 칸 너비로 편다 */
#view-items #itemActionArea { align-items: stretch; flex-wrap: nowrap; }
/* 옛 규칙 order:-1 이 "N 스쿱 부족해요"를 구매 버튼 위로 올렸다. 버튼 아래 한 줄로 */
#view-items #itemActionArea .need-short { order: 0; align-self: center; white-space: normal; text-align: center; }
#view-items #itemActionArea .need-short:not(.on-state):not(:has(s)) { color: #ff8787; }
#view-items #itemActionArea .item-set-pieces { max-width: none; }
/* 세트 안내 상자: "세트" 글자를 왼쪽 가운데가 아니라 위에 작은 머리로 */
#view-items .item-set-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#view-items .item-set-detail span { padding: 0; background: none; border: 0; }
/* 도구줄이 숨는 칸(뽑기·구독권·내 꾸미기)은 본문이 탭 밑줄에 붙었다 */
#view-items .items-toolbar[hidden] + .shop-body { margin-top: 18px; }
#view-items .inv-pane { margin-top: 0; }
/* 내 꾸미기: 옛 align-items:start 때문에 칸이 카드 한 장 너비로 줄어 카드가 세로로만 쌓였다 */
#view-items .inv-sections { align-items: stretch; }
#view-items .inv-wrap { padding: 0; margin: 0; }
#view-items .inv-tts-card { margin: 0; }
/* 지갑 내역: 한 줄에 60px씩 차지해 다섯 줄만 보였다. 이름과 메모를 한 줄로 */
#view-items #itemsLog ul { gap: 0; }
#view-items .scoop-log li { padding: 7px 4px; }
#view-items .scoop-log-what { flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; }
#view-items .scoop-log-what b { display: inline; flex: none; }
#view-items .scoop-log-what small { display: inline; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 아무것도 안 고른 오른쪽 칸: 안내 한 줄에 빈 칸이 크게 남았다 */
#view-items .items-detail-panel.empty .items-info-box { padding-top: 14px; padding-bottom: 14px; min-height: 0; }
/* 미리보기 테두리 그림이 칸 위쪽에 닿아 잘려 보였다 */
#view-items .items-preview-box { padding-top: 34px; }
/* 휴대폰: 옛 규칙(.items-toolbar column·stretch)이 등급·정렬·체크를 한 줄에 하나씩 가운데 세워 네 줄이 됐다 */
@media (max-width: 860px) {
  #view-items .items-toolbar { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  #view-items .items-toolbar .items-search { align-self: stretch; }
  /* 뽑기·구독권·지갑을 한 줄에(넘치면 지갑만 다음 줄) */
  #view-items .shop-head-actions { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  #view-items .shop-head-actions { gap: 6px; }
  #view-items .items-cat-btn.shop-special { padding: 0 10px; }
  #view-items .shop-wallet { padding: 0 10px; }
  #view-items .shop-wallet b { font-size: 14px; }
  #view-items .shop-wallet-unit { display: none; }
  #view-items .scoop-log li { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; }
  #view-items .scoop-log-when { font-size: 11px; white-space: nowrap; }
  #view-items .scoop-log-what small { display: none; }
}
/* 옛 배치 상자(.items-view-layout)가 주던 좌우 여백이 없어져 카드가 사이드바 선에 붙었다. 다른 화면과 같은 --view-gutter */
#view-items .shop-tabs,
#view-items .items-toolbar,
#view-items .items-log,
#view-items .shop-body { margin-left: var(--view-gutter, 28px); margin-right: var(--view-gutter, 28px); }
#view-items .shop-body { padding-bottom: 32px; }
/* 옛 1100px 이하 규칙(.items-toolbar column)이 1024px에서 도구줄을 세로로 세웠다. 넓든 좁든 가로 한 줄(좁으면 줄바꿈) */
#view-items .items-toolbar { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
/* 1024px(사이드바가 남아 본문 776px)에서 분류 탭 끝 "내 꾸미기"가 잘렸다 */
@media (max-width: 1180px) { #view-items .shop-tabs .items-cat-btn { padding: 0 9px; } #view-items .shop-tabs-sep { margin: 0 4px; } }
/* 내 꾸미기 칸 탭은 넓은 화면에서 줄바꿈(가로 스크롤에 숨지 않게) */
@media (min-width: 861px) { #view-items .inv-tabs { flex-wrap: wrap; overflow: visible; } }
/* ── 상점 개편 검수 고침 끝 ── */

/* ── 사이드바 빈칸에 오늘의 미션·팁(2026-10-01 사장님: "여긴 왜 또 비어있어?", "원래 빈칸자리에 팁이랑 미션 후원 적혀있지 않았어?") ──
   같은 날 01:12에 미션을 방송 화면으로, 팁을 "방송이 꺼져 있어요" 밑으로 옮겼더니 내 채널 카드와 아래 버튼 묶음 사이가 통째로 비었다.
   미션 카드는 줄마다 한 줄(이름 … 진행·보상)로 줄여 넣고, 팁 칸(.side-tip-slot)이 남는 높이를 모두 차지한다(왼쪽 강조 막대도 같이 길어진다).
   칸은 내용 크기를 갖지 않아(container-type: size) 사이드바를 넘치게 만들 수 없다. 높이에 맞춰 보이는 줄 수를 줄이고(끝은 …),
   한 줄도 안 들어가면 팁부터 숨긴다. 아래 버튼 묶음은 그대로 맨 아래에 붙고 내 채널을 접어도 안 움직인다(팁 칸이 대신 늘었다 줄었다 한다) */
.side-tip-slot { flex: 1 1 0; min-height: 0; container-type: size; display: flex; flex-direction: column; }
.side-tip-slot > .side-card.tip { flex: 1 1 auto; min-height: 0; overflow: hidden; padding-top: 7px; padding-bottom: 7px; }
.side-tip-slot > .side-card.tip::before { top: 8px; bottom: 8px; }
.side-tip-text { margin: 0; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
/* 한 줄 17.25px(11.5px × 1.5) + 위아래 여백·테두리 16px. 남는 높이에 온전히 들어가는 줄 수만 보인다 */
@container (height < 33.25px) { .side-tip-slot > .side-card.tip { display: none; } }
@container (33.25px <= height < 50.5px) { .side-tip-text { -webkit-line-clamp: 1; } }
@container (50.5px <= height < 67.75px) { .side-tip-text { -webkit-line-clamp: 2; } }
@container (67.75px <= height < 85px) { .side-tip-text { -webkit-line-clamp: 3; } }
@container (85px <= height < 102.25px) { .side-tip-text { -webkit-line-clamp: 4; } }
@container (102.25px <= height < 119.5px) { .side-tip-text { -webkit-line-clamp: 5; } }
@container (119.5px <= height < 136.75px) { .side-tip-text { -webkit-line-clamp: 6; } }
@container (136.75px <= height < 154px) { .side-tip-text { -webkit-line-clamp: 7; } }
@container (154px <= height < 171.25px) { .side-tip-text { -webkit-line-clamp: 8; } }
@container (171.25px <= height < 188.5px) { .side-tip-text { -webkit-line-clamp: 9; } }
.quest-card .quest-row { padding: 2px 0; }
.quest-card .quest-hint { margin-top: 4px; }
/* 관리자 입구: 버튼 묶음에서 빼고 채널 이름 줄 오른쪽에 작게(사장님: 관리자도 다른 사용자와 같은 화면을 보고 싶다). 줄 높이는 그대로 */
.side-user-row { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
.side-user-row > .side-user { flex: 1 1 auto; min-width: 0; }
.side-admin { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--dim); text-decoration: none; white-space: nowrap; }
.side-admin .ico { width: 12px; height: 12px; }
.side-admin:hover, .side-admin:focus-visible { color: var(--text-bright); background: var(--bg-3); }
.side-admin[hidden] { display: none; }
@media (max-width: 960px) { .side-tip-slot, .side-user-row { display: none; } }
/* 창이 낮으면(860px 이하) 간격·버튼 여백을 줄여 미션 카드까지 사이드바 안에 들어가게(넘침·안쪽 스크롤 없이). 팁은 남는 만큼만 */
@media (min-width: 961px) and (max-height: 860px) {
  .side { gap: 5px; }
  .menu-item { padding-top: 4px; padding-bottom: 4px; }
  .side-card { padding-top: 8px; padding-bottom: 8px; }
  .side-logout { padding-top: 5px; padding-bottom: 5px; }
  .side-user { padding-top: 2px; padding-bottom: 2px; }
  .side-legal { padding-top: 0; }
  .side-legal a { min-height: 28px; }
}
