/* ==========================================================================
   새 디자인(2026-11 UI 개편) 공용 색·부품
   [2026-11-18 추가] 시안(라일락 + 진보라 강조, 라이트/다크)의 색 값을 그대로 옮김.
   왜: 페이지마다 색과 버튼 모양을 따로 적으면 다시 흩어진다. 새 화면은 여기 변수(--qb-*)와
       부품 클래스(.qb-*)만 쓰고, 색을 바꿀 때는 이 파일의 변수만 고친다.
   다크모드: <html data-theme="dark">일 때 아래 [data-theme="dark"] 값으로 바뀜
            (테마를 정하는 곳은 public/js/theme.js — 저장한 선택 → 없으면 컴퓨터 설정)
   이 파일만 추가한 시점에는 어느 화면도 .qb-* 를 쓰지 않아 화면 변화 없음.
   옛 변수(style.css의 --bg-*, --text-*, --brand-* 등)는 아직 옛 화면이 쓰므로 그대로 둠.
   ========================================================================== */

:root {
  /* ── 바탕 ── */
  --qb-bg: #f7f2ff;            /* 페이지 바탕 */
  --qb-surface: #ffffff;       /* 카드·창 */
  --qb-soft: #ece2fb;          /* 연보라 칸 (보조 버튼, 정렬 묶음 바탕) */
  --qb-soft-strong: #d6c4f3;   /* 연보라 칸 위에 한 단계 진하게 */
  --qb-hero: #e5d8fa;          /* 페이지 맨 위 큰 배너 */
  --qb-pale: #f3edfd;          /* 아주 연한 보라 (목록 줄, 순위 줄) */
  --qb-line: #e3d8f6;          /* 테두리·구분선 */
  --qb-lav: #c7b0e3;           /* 로고 연보라 (진행 막대, 점선 테두리) */

  /* ── 글자 ── */
  --qb-ink: #2b1f4a;           /* 본문 */
  --qb-sub: #574878;           /* 보조 설명 */
  --qb-head: #392562;          /* 제목 (로고 진보라) */

  /* ── 주요 버튼 (화면마다 할 일 하나) ── */
  --qb-btn: #7b5cd6;
  --qb-btn-ink: #ffffff;       /* 흰 글자 대비 4.8:1 */
  --qb-btn-edge: #5b3fb5;      /* 버튼 아래 4px 테두리 */

  /* ── 포인트 (예전 노랑 자리 → 라일락: 보라 한 계열로 맞춤) ── */
  --qb-accent: #c3b1ec;
  --qb-accent-soft: #f1ebfd;
  --qb-accent-ink: #4a2f86;

  /* ── 강조 (1등, 방 코드, 첫 정답자처럼 꼭 눈에 띄어야 하는 작은 곳) ── */
  --qb-strong: #392562;
  --qb-strong-ink: #ffffff;

  /* ── 진한 칸 (홈 "방 생성하기" 카드, 관리자 사이드 메뉴 등) ── */
  --qb-deep: #ddd0f7;
  --qb-deep-strong: #cdbdf0;
  --qb-deep-ink: #2b1f4a;
  --qb-deep-sub: #4f3f78;
  --qb-deep-acc: #392562;      /* 진한 칸 위 강조 글자 */

  /* ── 작은 상태 표시 (대기중, 준비 완료, BETA 등 — 작은 배지에만) ── */
  --qb-pink-soft: #ffe6ef;
  --qb-pink-ink: #8a2450;

  /* ── 의미 색 (정답·오답·나가기) ── */
  --qb-ok: #1d6e52;
  --qb-ok-soft: #e0f5ec;
  --qb-bad: #b3261e;
  --qb-bad-soft: #fde8e6;

  /* ── 그림자·모양·글꼴 ── */
  --qb-shadow: 0 8px 24px rgba(57, 37, 98, 0.10);
  --qb-lift-shadow: 0 12px 26px rgba(57, 37, 98, 0.20);   /* [2026-11-18] 마우스를 올려 떠오를 때 그림자 */
  --qb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);              /* 효과 움직임: 빠르게 시작해 부드럽게 멈춤 */
  --qb-radius-sm: 16px;        /* 입력칸 */
  --qb-radius-lg: 34px;        /* 큰 카드·배너 */
  --qb-font-display: 'Jua', 'Noto Sans KR', system-ui, sans-serif;  /* 제목·버튼 */
  --qb-font-body: 'Noto Sans KR', system-ui, sans-serif;            /* 본문 */
}

[data-theme="dark"] {
  --qb-bg: #141022;
  --qb-surface: #1f1833;
  --qb-soft: #2a2145;
  --qb-soft-strong: #3a2e5e;
  --qb-hero: #231a3c;
  --qb-pale: #1c1630;
  --qb-line: #362c58;
  --qb-lav: #4e3d7a;

  --qb-ink: #f2edff;
  --qb-sub: #b8abda;
  --qb-head: #e6dbff;

  /* 다크에서는 주요 버튼이 밝은 라일락 + 어두운 글자 */
  --qb-btn: #c3b1ec;
  --qb-btn-ink: #1e1538;
  --qb-btn-edge: #9b84d1;

  --qb-accent: #c3b1ec;
  --qb-accent-soft: #2d2350;
  --qb-accent-ink: #ddd0ff;

  --qb-strong: #e6dbff;
  --qb-strong-ink: #21143d;

  --qb-deep: #3b2f63;
  --qb-deep-strong: #4a3d78;
  --qb-deep-ink: #f2edff;
  --qb-deep-sub: #cfc3ef;
  --qb-deep-acc: #e6dbff;

  --qb-pink-soft: #3a1f2e;
  --qb-pink-ink: #ffc9dc;

  --qb-ok: #86dcb8;
  --qb-ok-soft: #16352b;
  --qb-bad: #ff9d94;
  --qb-bad-soft: #3c1e25;

  --qb-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --qb-lift-shadow: 0 12px 28px rgba(0, 0, 0, 0.50);
}

/* ==========================================================================
   부품 — 시안에 반복해서 나오는 모양
   이름 규칙: .qb-부품, 변형은 .qb-부품--변형 (예: .qb-btn.qb-btn--soft)
   ========================================================================== */

/* 페이지 틀: 가운데 정렬 + 최대 너비 (모바일에서도 깨지지 않게 고정 너비 대신 max-width) */
.qb-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
  box-sizing: border-box;
}

/* 제목 글꼴 */
.qb-display {
  font-family: var(--qb-font-display);
  font-weight: 400;
  color: var(--qb-head);
}

/* ── 버튼: 알약 모양. 기본은 주요 버튼 ── */
.qb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;            /* 누르기 쉬운 크기 (44px 이상) */
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: var(--qb-btn);
  color: var(--qb-btn-ink);
  font-family: var(--qb-font-display);
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  position: relative;           /* 대표 버튼의 빛 지나가는 효과(::after)를 버튼 안에 가두기 */
  overflow: hidden;
  transition: transform 0.2s var(--qb-ease), box-shadow 0.2s var(--qb-ease), filter 0.2s ease, border-bottom-width 0.1s ease;
}
/* [2026-11-18 효과] 사용자 요청 "버튼·카드가 심심하지 않게": 마우스를 올리면 살짝 떠오르고, 누르면 쑥 들어감 */
.qb-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--qb-lift-shadow); filter: brightness(1.05); }
.qb-btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); box-shadow: none; }
.qb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.qb-btn:focus-visible { outline: 3px solid var(--qb-lav); outline-offset: 2px; }
/* 화면의 대표 버튼: 아래 테두리로 눌리는 느낌 */
.qb-btn--main { border-bottom: 4px solid var(--qb-btn-edge); }
/* 대표 버튼: 누르면 아래 테두리가 얇아져 실제로 눌리는 느낌, 마우스를 올리면 빛이 한 번 지나감 */
.qb-btn--main:active:not(:disabled) { border-bottom-width: 1px; transform: translateY(3px); }
.qb-btn--main::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.qb-btn--main:hover:not(:disabled)::after { left: 130%; transition: left 0.6s ease; }
.qb-btn--soft { background: var(--qb-soft); color: var(--qb-head); }
.qb-btn--accent { background: var(--qb-accent); color: #392562; }
.qb-btn--danger { background: var(--qb-bad-soft); color: var(--qb-bad); }
.qb-btn--ghost { background: transparent; color: var(--qb-head); border: 2px dashed var(--qb-lav); }
.qb-btn--lg { min-height: 54px; padding: 0 28px; font-size: 19px; }
.qb-btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.qb-btn--block { display: flex; width: 100%; }
/* 아이콘만 있는 동그란 버튼 (aria-label 필수) */
.qb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--qb-soft);
  color: var(--qb-head);
  cursor: pointer;
  transition: transform 0.2s var(--qb-ease), background 0.2s ease;
}
/* [2026-11-18 효과] 아이콘 버튼(닫기 등): 마우스를 올리면 살짝 커지며 진해짐 */
.qb-icon-btn:hover { transform: scale(1.08); background: var(--qb-soft-strong); }
.qb-icon-btn:active { transform: scale(0.94); }

/* ── 카드 ── */
.qb-card {
  background: var(--qb-surface);
  border-radius: var(--qb-radius-lg);
  padding: 26px 28px;
  box-shadow: var(--qb-shadow);
  color: var(--qb-ink);
}
.qb-card--soft { background: var(--qb-soft); box-shadow: none; }
.qb-card--pale { background: var(--qb-pale); box-shadow: none; }
.qb-card--accent { background: var(--qb-accent-soft); color: var(--qb-accent-ink); box-shadow: none; }
.qb-card--deep { background: var(--qb-deep); color: var(--qb-deep-ink); box-shadow: none; }
/* [2026-11-18 효과] 누를 수 있는 카드(홈 카드·퀴즈 카드·공개방 카드)에 붙이는 이름: 마우스를 올리면 떠오름.
   공지 창처럼 누르는 카드가 아닌 곳은 떠오르면 어색해서 .qb-card 전체가 아니라 이 이름을 붙인 카드만 */
.qb-card--hover,
.quiz-card,
.room-card {
  transition: transform 0.25s var(--qb-ease), box-shadow 0.25s var(--qb-ease);
}
.qb-card--hover:hover,
.quiz-card:hover,
.room-card:not(.playing):hover {
  transform: translateY(-6px);
  box-shadow: var(--qb-lift-shadow);
}
/* 처음 화면이 뜰 때 아래에서 살짝 올라오며 나타남. --qb-delay로 순서대로 (홈 카드 등) */
@keyframes qb-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
/* backwards: 끝난 뒤에는 애니메이션이 손을 떼야 마우스 올림 효과(transform)가 먹힘 (both로 하면 끝 상태가 계속 덮어써 카드가 안 떠오름) */
.qb-rise { animation: qb-rise 0.5s var(--qb-ease) backwards; animation-delay: var(--qb-delay, 0s); }
/* 페이지 맨 위 큰 배너 */
.qb-hero {
  background: var(--qb-hero);
  border-radius: 36px;
  padding: 44px 48px;
}

/* ── 배지: 작은 알약 글자 ── */
.qb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--qb-font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  background: var(--qb-soft);
  color: var(--qb-head);
}
.qb-badge--surface { background: var(--qb-surface); }
.qb-badge--accent { background: var(--qb-accent-soft); color: var(--qb-accent-ink); }
.qb-badge--pink { background: var(--qb-pink-soft); color: var(--qb-pink-ink); }
.qb-badge--ok { background: var(--qb-ok-soft); color: var(--qb-ok); }
.qb-badge--bad { background: var(--qb-bad-soft); color: var(--qb-bad); }

/* ── 입력칸 ── */
.qb-input {
  box-sizing: border-box;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid var(--qb-line);
  border-radius: var(--qb-radius-sm);
  background: var(--qb-bg);
  color: var(--qb-ink);
  font-family: var(--qb-font-body);
  font-size: 16px;
}
.qb-input:focus { outline: none; border-color: var(--qb-btn); }
.qb-input::placeholder { color: var(--qb-sub); opacity: 0.8; }
textarea.qb-input { min-height: 96px; padding: 14px 18px; resize: vertical; }
.qb-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--qb-sub);
}

/* ── 알약 묶음 (정렬·탭·유형 고르기): 선택된 것만 채워짐 ── */
.qb-segment {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--qb-soft);
}
.qb-segment > button {
  margin: 0;                     /* 옛 기본 버튼 규칙(style.css)의 오른쪽 여백 5px 막기 — 이 버튼들은 class가 없어서 그 규칙에 걸림 */
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--qb-head);
  font-family: var(--qb-font-display);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
/* [2026-11-18 효과] 고르지 않은 칸도 마우스를 올리면 살짝 칠해짐 */
.qb-segment > button:hover { background: var(--qb-soft-strong); }
.qb-segment > button[aria-pressed="true"],
.qb-segment > button[aria-selected="true"],
.qb-segment > button.active {   /* .active: 예전 스크립트(quizzes.js 정렬 등)가 붙이는 이름 */
  background: var(--qb-btn);
  color: var(--qb-btn-ink);
}

/* ── 맨 위 줄: 로고 + 메뉴 ── */
.qb-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;               /* 좁은 화면에서는 메뉴가 아래로 내려감 */
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
.qb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--qb-font-display);
  font-size: 28px;
  color: var(--qb-head);
}
.qb-logo img { display: block; width: 44px; height: 44px; }
/* [2026-11-18] 로고 그림은 오른쪽 위에 작은 거품이 있어 말풍선 몸통이 그림 칸의 아래쪽에 치우쳐 있음
   → 글자 옆에 두면 살짝 내려가 보여서(사용자 지적) 그림만 위로 올려 몸통과 글자 높이를 맞춤 */
.qb-logo img { position: relative; top: -3px; }
.qb-logo img { transition: transform 0.3s var(--qb-ease); }
.qb-logo:hover img { transform: rotate(-8deg) scale(1.06); }
.qb-nav { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── 다크모드 전환 버튼 (layout.hbs #theme-toggle, 모든 페이지) ──
   [2026-11-18] 예전: 왼쪽 위(top 80px) 64px 흰 원 + 이모지(🌙/☀️) → 새 화면 제목을 가렸음.
   지금: 오른쪽 아래 48px 원 + 선 아이콘. 지금 테마의 아이콘만 보임(해=라이트, 달=다크).
   끌어서 옮긴 위치는 예전처럼 localStorage 'theme-toggle-pos'에 저장(layout.hbs 스크립트가 left/top을 직접 넣음) */
.qb-theme-toggle {
  position: fixed;
  left: 20px;   /* [2026-11-25 변경] 기본 위치 오른쪽 아래 → 왼쪽 아래 (사용자 결정: PC · 휴대폰 모두 왼쪽 아래가 기본). 끌어서 옮긴 위치는 그대로 기억 */
  bottom: 20px;
  z-index: 9000;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--qb-line);
  border-radius: 50%;
  background: var(--qb-surface);
  color: var(--qb-head);
  box-shadow: var(--qb-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.qb-theme-toggle.dragging { cursor: grabbing; }
/* [2026-11-18 효과] 마우스를 올리면 그림자가 진해지고 해·달 아이콘이 살짝 돎 (버튼 자체는 끌어서 옮기므로 위치는 안 움직임) */
.qb-theme-toggle { transition: box-shadow 0.2s ease; }
.qb-theme-toggle svg { transition: transform 0.4s var(--qb-ease); }
.qb-theme-toggle:hover { box-shadow: var(--qb-lift-shadow); }
.qb-theme-toggle:hover svg { transform: rotate(25deg) scale(1.1); }
.qb-theme-toggle:focus-visible { outline: 3px solid var(--qb-lav); outline-offset: 2px; }
.qb-theme-toggle .qb-theme-toggle__moon { display: none; }
[data-theme="dark"] .qb-theme-toggle .qb-theme-toggle__sun { display: none; }
[data-theme="dark"] .qb-theme-toggle .qb-theme-toggle__moon { display: block; }

/* ── 공용 알림 창 (.qb-dialog > .qb-dialog__box): 어두운 바탕 + 가운데 둥근 흰 칸 + 아이콘 원 ──
   [2026-11-18 새 디자인] 광고 차단 안내(layout.hbs), 게임방 예/아니오 확인(room.js showCustomConfirm)이 같이 씀.
   보이기: 스크립트가 style.display = 'flex' (광고 차단) 또는 만들어 붙임(확인 창) */
.qb-dialog {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(20, 12, 40, 0.6);
}
.qb-dialog__box {
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 30px 26px;
  border-radius: 34px;
  background: var(--qb-surface);
  color: var(--qb-ink);
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}
.qb-dialog__box h2 { margin: 0; font-size: 24px; color: var(--qb-head); }
.qb-dialog__box p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--qb-sub); }
/* [2026-11-19] 단어 중간에서 줄이 끊기지 않게 ("사용해주세"+"요." 방지 — 새 알림창 qbAlert의 긴 안내에서 보임) */
.qb-dialog__box p { word-break: keep-all; overflow-wrap: anywhere; }
.qb-dialog__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--qb-accent-soft);
  color: var(--qb-accent-ink);
  font-size: 28px;
}
.qb-dialog__icon--bad { background: var(--qb-bad-soft); color: var(--qb-bad); }
.qb-dialog__note { font-size: 12px !important; }
.qb-dialog__buttons { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }

/* ── [2026-11-27 새 기능] 서버 초기화 시간 (public/js/maintenance.js) ──
   .qb-mt-warn: 04:55 방 안 미리 알림 띠 (화면 위 가운데, 게임은 계속 — 화면을 막지 않음)
   .qb-mt-kick: 04:58 중단 안내 창 — 정답 창 · 다른 알림 창보다 위에 보이게 가장 높은 층 */
.qb-mt-warn {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 12px 14px 12px 18px;
  border-radius: 18px;
  background: var(--qb-surface);
  color: var(--qb-ink);
  border: 2px solid var(--qb-bad);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  font-size: 15px;
  word-break: keep-all;
}
.qb-mt-warn > .qb-ico { color: var(--qb-bad); flex: none; }
.qb-mt-warn b { color: var(--qb-bad); }
.qb-mt-warn__close {
  flex: none;
  border: 0;
  border-radius: 12px;
  padding: 6px 12px;
  background: var(--qb-bad-soft);
  color: var(--qb-bad);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.qb-mt-kick { z-index: 2147483000; }

/* 화면에는 안 보이고 화면 읽기 프로그램만 읽는 글자 (입력칸 이름표 등) */
.qb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* [2026-11-20 CSS 정리] 화면·스크립트 어디에서도 쓰지 않는 아이콘 6개 삭제: layer-group, download, stop-circle, play-circle, forward, backward */
/* ── 공용 선 아이콘 (.qb-ico .qb-ico--이름) ──
   [2026-11-18 새 디자인] 내 퀴즈 관리·관리자 화면이 쓰던 Font Awesome(외부 CDN 아이콘 글꼴, 약 100KB)을 대신함.
   글자 크기(1em)와 글자색(currentColor)을 따라가서 <i class="fas fa-trash"> 자리에 <i class="qb-ico qb-ico--trash">로 바꾸면 됨.
   그림은 여기 한 곳에만 있음 (화면 템플릿·스크립트 어디서나 같은 이름으로 씀). 새 아이콘이 필요하면 아래 목록에 추가 */
.qb-ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: var(--qb-ico) center / contain no-repeat;
  mask: var(--qb-ico) center / contain no-repeat;
}
.qb-ico--spinner { animation: spin 0.8s linear infinite; }   /* 처리 중 표시 (spin: style.css) */
.qb-ico--trash { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E"); }
.qb-ico--plus { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.qb-ico--plus-circle { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.qb-ico--save { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11l3 3v13H5z'/%3E%3Cpath d='M8 4v5h7V4M8 20v-6h8v6'/%3E%3C/svg%3E"); }
.qb-ico--lightbulb { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.qb-ico--times { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.qb-ico--file { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4'/%3E%3C/svg%3E"); }
.qb-ico--cloud-upload { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17V9M8.5 12.5L12 9l3.5 3.5'/%3E%3Cpath d='M7 19a5 5 0 0 1-.6-9.96A6 6 0 0 1 18 9a4 4 0 0 1 0 10'/%3E%3C/svg%3E"); }
.qb-ico--arrow-left { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.qb-ico--spinner { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'/%3E%3C/svg%3E"); }
.qb-ico--search { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E"); }
.qb-ico--edit { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E"); }
.qb-ico--cut { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.6 7.6L20 18M8.6 16.4L20 6'/%3E%3C/svg%3E"); }
.qb-ico--chevron-down { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.qb-ico--list { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.qb-ico--inbox { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1 3h6l1-3h5'/%3E%3Cpath d='M5 5h14l2 8v6H3v-6z'/%3E%3C/svg%3E"); }
.qb-ico--exclamation-triangle { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E"); }
.qb-ico--clock { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.qb-ico--check-circle { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.qb-ico--check { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.qb-ico--user { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
.qb-ico--sign-out { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M14 8l4 4-4 4M18 12H8'/%3E%3C/svg%3E"); }
.qb-ico--shield { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3C/svg%3E"); }
.qb-ico--question-circle { --qb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 .9-1 1.7v.5M12 17h.01'/%3E%3C/svg%3E"); }

/* [2026-11-18 효과] 움직임 줄이기를 켠 사용자(운영체제 설정)에게는 떠오름·빛·나타남 효과를 끔 */
@media (prefers-reduced-motion: reduce) {
  .qb-btn, .qb-icon-btn, .qb-card--hover, .quiz-card, .room-card, .qb-rise, .qb-theme-toggle { transition: none !important; animation: none !important; }
  .qb-btn--main::after { display: none; }
  .qb-btn:hover, .qb-card--hover:hover, .quiz-card:hover, .room-card:hover { transform: none !important; }
}

/* ==========================================================================
   [2026-11-19 휴대폰 화면] 공용 머리글: 로고와 메뉴 버튼을 한 줄에 (예전에는 버튼이 로고 아래 줄로 내려갔음), 테마 버튼 작게
   시안: 디자인 캔버스 "27 모바일 시작 화면" · "28 모바일 게임 화면". 640px 이하(휴대폰)에서만 적용, PC 화면은 그대로
   ========================================================================== */
@media (max-width: 640px) {
  .qb-header { flex-wrap: nowrap; padding: 12px 16px; gap: 10px; }
  .qb-logo { font-size: 22px; gap: 8px; }
  .qb-logo img { width: 36px; height: 36px; }
  /* [2026-11-25] 휴대폰에서는 로고 옆 "퀴즈버블" 글자를 숨기고 로고 그림만 — 위쪽 메뉴에 "랭킹" 버튼이 생겨 글자가 두 줄로 꺾였음 (사용자 요청) */
  .qb-logo span { display: none; }
  .qb-nav { flex-wrap: nowrap; gap: 6px; }
  .qb-nav .qb-btn { min-height: 38px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  .qb-theme-toggle { width: 42px; height: 42px; }
}

/* [2026-11-21 새 기능] 머리말 로그인 버튼 (views/partials/account-chip.hbs) — 긴 닉네임은 말줄임, 휴대폰에서는 아이콘만 (머리말 한 줄 유지) */
.qb-account-chip { gap: 6px; }
.qb-account-chip__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .qb-nav .qb-account-chip { width: 38px; padding: 0; justify-content: center; }
  .qb-account-chip__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* [2026-11-21 삭제] .qb-account-name-note ("내 계정 닉네임 OO(으)로 들어가요" 한 줄) — 사용자 요청으로 그 줄을 없애서 CSS도 삭제 */
