/* QMoji — component + screen styles.
   Values come from the Wanted DS handoff (docs/design/qmoji-handoff/HANDOFF.md).
   Hairlines are inset box-shadows, never `border` (elevation.css). Hover paints
   an --overlay-hover scrim, never a fill change. One brand extra: QKEY gold. */

@import './fonts.css';
@import './tokens/fig-tokens.css';
@import './tokens/colors.css';
@import './tokens/typography.css';
@import './tokens/spacing.css';
@import './tokens/radius.css';
@import './tokens/elevation.css';
@import './tokens/motion.css';
@import './tokens/base.css';

:root {
  --qkey-gold: #E8A100;             /* PRD §2.3 — chip + quota numbers only */
  --qkey-gold-tint: rgba(232, 161, 0, 0.08);
  --qkey-gold-tint-strong: rgba(232, 161, 0, 0.10);
}

html, body { height: 100%; }
body {
  background: var(--surface-normal);
  overscroll-behavior-y: none;
}

/* ── 타이포 유틸 (시안 JSX의 실측값 그대로) ─────────────────────── */
.t-title28 { font-weight: 700; font-size: 28px; line-height: 1.358; letter-spacing: -0.0236em; color: var(--label-strong-c); }
.t-title24 { font-weight: 700; font-size: 24px; line-height: 1.334; letter-spacing: -0.023em;  color: var(--label-strong-c); }
.t-title22 { font-weight: 700; font-size: 22px; line-height: 1.334; letter-spacing: -0.023em;  color: var(--label-strong-c); }
.t-title20 { font-weight: 700; font-size: 20px; line-height: 1.4;   letter-spacing: -0.012em;  color: var(--label-strong-c); }
.t-head17  { font-weight: 700; font-size: 17px; line-height: 1.412; color: var(--label-strong-c); }
.t-body15  { font-weight: 500; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c); }
.t-body15-strong { font-weight: 600; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c); }
.t-body14  { font-weight: 500; font-size: 14px; line-height: 1.429; letter-spacing: 0.014em; color: var(--label-alternative-c); }
.t-body14-strong { font-weight: 600; font-size: 14px; line-height: 1.429; letter-spacing: 0.014em; color: var(--label-normal-c); }
.t-label13 { font-weight: 500; font-size: 13px; line-height: 1.385; letter-spacing: 0.019em; color: var(--label-alternative-c); }
.t-label13-strong { font-weight: 600; font-size: 13px; line-height: 1.385; letter-spacing: 0.019em; color: var(--label-normal-c); }
.t-cap12   { font-weight: 500; font-size: 12px; line-height: 1.334; letter-spacing: 0.025em; color: var(--label-assistive-c); }
.t-mono11  { font-family: var(--font-family-mono); font-size: 11px; color: var(--label-assistive-c); }

/* ── 셸 (반응형의 축) ───────────────────────────────────────────── */
.q-app { min-height: 100dvh; display: flex; flex-direction: column; }

.q-topnav {
  position: sticky; top: 0; z-index: 20; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  height: 52px; padding: 0 8px;
  background: var(--surface-normal);
}
.q-topnav-title {
  flex: 1; text-align: center;
  font-weight: 600; font-size: 16px; line-height: 1.45; letter-spacing: 0.005em;
  color: var(--label-strong-c);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 타이틀 중앙 유지용 — 좌우 최소 40px. 텍스트 버튼(로그인 등)은 잘리지 않게 내용폭까지 확장 */
.q-topnav-slot { min-width: 40px; flex-shrink: 0; display: flex; justify-content: center; white-space: nowrap; }
.q-topnav-slot .q-btn { width: auto; }   /* 트레일링 로그인 버튼이 40px에 갇혀 '로그'만 보이던 짤림 수정 */

.q-pcbar { display: none; }

.q-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.q-panel { width: 100%; padding: 4px 20px calc(96px + env(safe-area-inset-bottom)); }
.q-panel-header { padding: 4px 0 16px; display: flex; flex-direction: column; gap: 14px; }

.q-actionarea {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 8px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface-normal);
  box-shadow: inset 0 1px 0 0 rgba(112, 115, 124, 0.08);
}

/* PC: 중앙 560px 패널, 인라인 헤더, CTA는 흐름 내 (PRD §2.2) */
@media (min-width: 768px) {
  body { background: var(--surface-alternative); }
  .q-topnav { display: none; }
  .q-pcbar {
    position: sticky; top: 0; z-index: 20; flex-shrink: 0;
    display: flex; align-items: center; gap: 12px;
    height: 60px; padding: 0 24px;
    background: var(--surface-normal);
    box-shadow: inset 0 -1px 0 0 rgba(112, 115, 124, 0.16);
  }
  .q-pcbar-brand { font-weight: 700; font-size: 18px; line-height: 1.445; letter-spacing: -0.002em; color: var(--label-strong-c); }
  .q-pcbar-spacer { flex: 1; }
  .q-scroll { display: flex; justify-content: center; }
  .q-panel { max-width: 560px; padding: 24px 0 48px; }
  .q-panel-header { padding: 0 0 20px; }
  .q-actionarea {
    position: static; padding: 0; margin-top: 28px;
    background: transparent; box-shadow: none;
  }
  .t-title28 { font-size: 32px; line-height: 1.375; letter-spacing: -0.0253em; }
  .t-title22 { font-size: 24px; }
  .t-title20 { font-size: 22px; }
}

/* ── 아이콘 ─────────────────────────────────────────────────────── */
.q-ic { display: inline-flex; flex-shrink: 0; vertical-align: middle; }
.q-ic svg { width: 100%; height: 100%; display: block; }

/* ── 버튼 (WDS Button) ──────────────────────────────────────────── */
.q-btn {
  appearance: none; border: 0; cursor: pointer; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-family-base); white-space: nowrap;
  border-radius: var(--radius-lg, 10px);
  transition: background var(--duration-fast) var(--easing-standard);
}
.q-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: transparent; pointer-events: none;
  transition: background var(--duration-fast) var(--easing-standard);
}
.q-btn:not(:disabled):hover::after { background: var(--overlay-hover); }
.q-btn:not(:disabled):active::after { background: var(--overlay-pressed); }
.q-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.q-btn--large  { height: 52px; padding: 0 24px; font-weight: 600; font-size: 16px; letter-spacing: 0.005em; }
.q-btn--medium { height: 40px; padding: 0 16px; font-weight: 600; font-size: 14px; letter-spacing: 0.014em; }
.q-btn--full { width: 100%; }
.q-btn--icononly { width: 52px; padding: 0; flex-shrink: 0; }

.q-btn--primary { background: var(--primary); color: #fff; }
.q-btn--primary:disabled { background: var(--interaction-disabled); color: var(--label-assistive-c); cursor: default; }
.q-btn--assistive { background: var(--fill-base); color: var(--label-normal-c); }
.q-btn--assistive:disabled { background: var(--interaction-disabled); color: var(--label-assistive-c); cursor: default; }
.q-btn--outlined { background: transparent; color: var(--label-normal-c); box-shadow: var(--border-neutral); }
.q-btn--outlined:disabled { color: var(--label-disable-c); cursor: default; }
.q-btn--outlined:disabled::after { background: transparent !important; }

.q-textbtn {
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 4px 6px;
  display: inline-flex; align-items: center; gap: 2px;
  font-family: var(--font-family-base); font-weight: 600; font-size: 13px;
  letter-spacing: 0.019em; color: var(--primary); border-radius: 6px;
}
.q-textbtn--assistive { color: var(--label-alternative-c); }
.q-textbtn:hover { text-decoration: underline; }
.q-textbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.q-iconbtn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  width: 40px; height: 40px; border-radius: 999px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--label-normal-c);
}
.q-iconbtn:hover { background: var(--overlay-hover); }
.q-iconbtn:active { background: var(--overlay-pressed); }
.q-iconbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Pressable 카드 (선택형 타일) ──────────────────────────────── */
.q-press {
  appearance: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  background: var(--surface-normal); border-radius: 12px; position: relative;
  font-family: var(--font-family-base);
  box-shadow: var(--border-neutral);
  transition: box-shadow var(--duration-fast) var(--easing-standard);
}
.q-press::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: transparent; pointer-events: none;
  transition: background var(--duration-fast) var(--easing-standard);
}
.q-press[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--primary); }
.q-press:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 768px) {
  .q-press:not([aria-pressed="true"]):hover { box-shadow: var(--border-normal); }
  .q-press:not([aria-pressed="true"]):hover::after { background: var(--overlay-hover); }
}

/* ── 구독 상태 칩 (골드가 fill로 허용된 유일한 곳) ─────────────── */
.q-planchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--qkey-gold-tint-strong);
  box-shadow: inset 0 0 0 1px var(--qkey-gold);
  white-space: nowrap;
}
@media (min-width: 768px) { .q-planchip { padding: 8px 14px; } }
.q-planchip .sep { width: 1px; height: 12px; background: rgba(232, 161, 0, 0.35); }
.q-planchip b { color: var(--qkey-gold); font-weight: 700; }

/* ── 스텝퍼 ─────────────────────────────────────────────────────── */
.q-stepper-mobile { display: flex; gap: 4px; }
.q-stepper-mobile span { flex: 1; height: 3px; border-radius: 999px; background: var(--fill-strong-c); }
.q-stepper-mobile span.on { background: var(--primary); }
.q-stepper-pc { display: none; }
@media (min-width: 768px) {
  .q-stepper-mobile { display: none; }
  .q-stepper-pc { display: flex; align-items: center; gap: 8px; }
  .q-stepper-pc .st { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; line-height: 1.385; letter-spacing: 0.019em; color: var(--label-assistive-c); }
  .q-stepper-pc .st .n { width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; background: var(--fill-strong-c); color: #fff; font-size: 11px; font-weight: 700; }
  .q-stepper-pc .st.past { color: var(--label-alternative-c); }
  .q-stepper-pc .st.now { color: var(--primary); font-weight: 600; }
  .q-stepper-pc .st.past .n, .q-stepper-pc .st.now .n { background: var(--primary); }
  .q-stepper-pc .link { width: 16px; height: 1px; background: var(--line-normal); }
}

/* ── 카드·리스트·구분선 ─────────────────────────────────────────── */
.q-card { border-radius: 12px; background: var(--surface-normal); box-shadow: var(--border-neutral); }
.q-card--pad { padding: 16px; }
.q-card--list { padding: 0 14px; }
.q-divider { height: 1px; background: var(--line-alternative); }
.q-listcell { display: flex; align-items: center; gap: 10px; padding: 13px 0; }
.q-listcell .lbl { flex-shrink: 0; font-weight: 500; font-size: 14px; letter-spacing: 0.014em; color: var(--label-alternative-c); }
.q-listcell .val { flex: 1; text-align: right; font-weight: 600; font-size: 14px; letter-spacing: 0.014em; color: var(--label-normal-c); }

/* ── ContentBadge ───────────────────────────────────────────────── */
.q-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 6px;
  font-weight: 600; font-size: 12px; line-height: 1.334; letter-spacing: 0.025em;
  background: var(--fill-base); color: var(--label-alternative-c);
}
.q-badge--xs { padding: 2px 6px; font-size: 11px; }
.q-badge--positive  { background: var(--green-95, #E8F8EE);       color: var(--status-positive-c); }
.q-badge--blue      { background: var(--blue-95, #EAF2FE);        color: var(--primary); }
.q-badge--negative  { background: var(--red-95, #FEECEC);         color: var(--status-negative-c); }
.q-badge--violet    { background: var(--violet-95, #F1EEFE);      color: var(--accent-violet-c); }
.q-badge--redorange { background: var(--red-orange-95, #FEEEEA);  color: var(--accent-red-orange); }

/* ── 스켈레톤 (시머 없음 — HANDOFF §6) ─────────────────────────── */
.q-skel { border-radius: 6px; background: var(--fill-base); }
.q-skel--rect { background: var(--fill-alt); }

/* ── 스피너 ─────────────────────────────────────────────────────── */
.q-spin {
  display: inline-block; border-radius: 50%;
  border: 2.5px solid var(--fill-strong-c); border-top-color: var(--primary);
  animation: q-rot 0.8s linear infinite;
}
.q-spin--lg { border-width: 4px; }
@keyframes q-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .q-spin { animation-duration: 2.4s; } }

/* ── 인풋 ───────────────────────────────────────────────────────── */
.q-field { display: flex; flex-direction: column; gap: 8px; }
.q-field .flabel { font-weight: 600; font-size: 14px; line-height: 1.429; letter-spacing: 0.014em; color: var(--label-neutral-c); }
.q-input-wrap {
  display: flex; padding: 11px 14px; border-radius: 10px;
  background: var(--surface-normal); box-shadow: var(--border-neutral);
  transition: box-shadow var(--duration-fast) var(--easing-standard);
}
.q-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--primary); }
.q-input-wrap input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: var(--font-family-base); font-weight: 500; font-size: 15px;
  line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c);
}
.q-input-wrap input::placeholder { color: var(--label-assistive-c); }

/* ── 안내 행 (ⓘ + 텍스트) ──────────────────────────────────────── */
.q-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; }
.q-note .q-ic { margin-top: 1px; color: var(--label-assistive-c); }
.q-note p { margin: 0; font-weight: 500; font-size: 12px; line-height: 1.5; letter-spacing: 0.025em; color: var(--label-assistive-c); }

/* ── 토스트 ─────────────────────────────────────────────────────── */
.q-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: flex-start; gap: 8px;   /* 2026-09-10: 두 줄 토스트에서 아이콘 상단 정렬 */
  width: max-content;
  max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 12px;
  background: var(--surface-inverse); color: var(--label-inverse);
  font-weight: 500; font-size: 14px; line-height: 1.45; letter-spacing: 0.014em;
  word-break: keep-all; overflow-wrap: anywhere; text-align: left;   /* 어절 단위 줄바꿈 — 단어 중간 개행 방지 */
  box-shadow: var(--shadow-strong);
  opacity: 0; translate: 0 6px;
  transition: opacity var(--duration-normal) var(--easing-standard), translate var(--duration-normal) var(--easing-standard);
  pointer-events: none;
}
.q-toast.show { opacity: 1; translate: 0 0; }
.q-toast .q-ic { color: var(--status-positive-c); flex-shrink: 0; margin-top: 1px; }
.q-toast--negative .q-ic { color: var(--status-negative-c); }
@media (min-width: 768px) { .q-toast { bottom: 32px; } }

/* ── 딤·바텀시트·다이얼로그 ────────────────────────────────────── */
.q-dimmer {
  position: fixed; inset: 0; z-index: 50; background: var(--surface-dimmer);
  opacity: 0; transition: opacity var(--duration-normal) var(--easing-standard);
}
.q-dimmer.show { opacity: 1; }
.q-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  border-radius: 20px 20px 0 0; background: var(--surface-elevated);
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  translate: 0 100%;
  transition: translate var(--duration-slow) var(--easing-standard);
}
.q-sheet.show { translate: 0 0; }
.q-sheet .grab { width: 40px; height: 4px; border-radius: 999px; background: var(--fill-strong-c); align-self: center; margin: 4px 0 8px; }
@media (min-width: 768px) {
  .q-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 420px; translate: -50% -46%; opacity: 0; border-radius: 20px;
    padding: 24px 24px 20px;
    transition: opacity var(--duration-normal) var(--easing-standard), translate var(--duration-normal) var(--easing-standard);
  }
  .q-sheet.show { translate: -50% -50%; opacity: 1; }
  .q-sheet .grab { display: none; }
}
.q-alert {
  position: fixed; left: 50%; top: 50%; translate: -50% -46%; z-index: 55;
  width: min(92vw, 340px); border-radius: 16px; background: var(--surface-elevated);
  padding: 24px 20px 16px; display: flex; flex-direction: column; gap: 8px;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--easing-standard), translate var(--duration-normal) var(--easing-standard);
}
.q-alert.show { opacity: 1; translate: -50% -50%; }
.q-alert .acts { display: flex; gap: 8px; margin-top: 12px; }
.q-warnring {
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--status-cautionary-c) 12%, transparent);
  color: var(--status-cautionary-c); margin-bottom: 4px;
}

/* ── 홈 히어로 (reeded liquid glass) ────────────────────────────── */
.q-hero {
  position: relative; overflow: hidden; border-radius: 20px;
  min-height: 300px; display: flex; align-items: stretch;
  /* WebGL 불가 폴백: 같은 팔레트의 정적 그라데이션 */
  background: linear-gradient(115deg, #EAF2FE 0%, #F7F7F8 38%, #dbe7ff 70%, #cfd6f5 100%);
  box-shadow: var(--border-alternative);
}
.q-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.q-hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(247,247,248,0.90) 0%, rgba(247,247,248,0.45) 52%, rgba(247,247,248,0) 78%);
}
.q-hero-content {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
  padding: 28px 24px;
}
@media (min-width: 768px) {
  .q-hero { min-height: 340px; }
  .q-hero-content { padding: 36px 32px; max-width: 62%; }
}

/* ── 홈 ─────────────────────────────────────────────────────────── */
.q-packrow { display: flex; gap: 12px; align-items: center; padding: 12px; width: 100%; }
.q-packrow .thumb {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--fill-base);
  color: var(--label-alternative-c);
}
.q-packrow.locked .thumb { opacity: 0.5; }
.q-packrow .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.q-packrow .meta .nm { font-weight: 600; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-packrow.locked .meta .nm { color: var(--label-alternative-c); }
.q-quota-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px;
  border-radius: 12px; background: var(--qkey-gold-tint); margin-bottom: 16px;
}
.q-quota-banner .q-ic { color: var(--qkey-gold); }
.q-empty, .q-error {
  display: grid; place-items: center; text-align: center; gap: 10px;
  padding: 48px 20px; border-radius: 16px; background: var(--surface-normal);
}
.q-empty { box-shadow: var(--border-alternative); }
.q-empty .q-ic { color: var(--label-assistive-c); }
.q-error { box-shadow: var(--border-neutral); padding: 56px 20px; gap: 12px; }
.q-error .q-ic { color: var(--status-negative-c); }
.q-sectionhead { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.q-sectionhead .ttl { font-weight: 700; font-size: 16px; line-height: 1.45; letter-spacing: 0.005em; color: var(--label-strong-c); }

/* ── 사진 선택 ──────────────────────────────────────────────────── */
.q-seg { display: flex; padding: 3px; border-radius: 10px; background: var(--fill-base); gap: 2px; }
.q-seg button {
  appearance: none; border: 0; cursor: pointer; flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; border-radius: 8px; background: transparent;
  font-family: var(--font-family-base); font-weight: 600; font-size: 14px;
  letter-spacing: 0.014em; color: var(--label-alternative-c);
  transition: background var(--duration-fast) var(--easing-standard);
}
.q-seg button[aria-pressed="true"] { background: var(--surface-normal); color: var(--label-normal-c); box-shadow: var(--shadow-emphasize); }
.q-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.q-dropzone {
  border-radius: 16px; min-height: 220px;
  display: grid; place-items: center; text-align: center;
  padding: 24px; background: var(--fill-alt); box-shadow: var(--border-neutral);
  transition: background var(--duration-fast) var(--easing-standard), box-shadow var(--duration-fast) var(--easing-standard);
}
.q-dropzone.dragging { background: rgba(0, 102, 255, 0.04); box-shadow: inset 0 0 0 2px var(--primary); }
.q-dropzone.haspic { background: var(--surface-normal); }
.q-dropzone .inner { display: grid; place-items: center; gap: 10px; }
.q-dropzone .q-ic { color: var(--label-assistive-c); }
.q-dropzone .preview {
  width: 96px; height: 96px; border-radius: 999px; object-fit: cover;
  box-shadow: var(--border-neutral);
}
.q-dropzone .btnrow { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 768px) { .q-dropzone { min-height: 260px; } }

/* ── 스타일 선택 ────────────────────────────────────────────────── */
.q-stylegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .q-stylegrid { grid-template-columns: repeat(4, 1fr); } }
.q-stylecard { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.q-stylecard .art { aspect-ratio: 1 / 1; border-radius: 8px; background: var(--fill-base); display: grid; place-items: center; color: var(--label-alternative-c); position: relative; overflow: hidden; }
/* 2026-08-31: 세로 커버 이미지가 1:1 칸을 밀어내 크게 삐져나오던 것 수정 —
   이미지를 absolute로 칸에 꽉 채워 object-fit:cover 크롭 강제 (아이콘은 그대로 중앙정렬) */
.q-stylecard .art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-press[aria-pressed="true"] .q-stylecard .art { color: var(--primary); }
.q-stylecard .nm { display: flex; align-items: center; gap: 4px; min-height: 20px; }

/* ── 문구 입력 ──────────────────────────────────────────────────── */
.q-phrasegrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 768px) { .q-phrasegrid { grid-template-columns: repeat(2, 1fr); } }
.q-phraserow {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; background: var(--surface-normal); box-shadow: var(--border-neutral);
  transition: box-shadow var(--duration-fast) var(--easing-standard);
}
.q-phraserow:focus-within { box-shadow: inset 0 0 0 1px var(--primary); }
.q-phraserow .idx {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--fill-base);
  font-weight: 700; font-size: 12px; color: var(--label-alternative-c);
}
.q-phraserow input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: var(--font-family-base); font-weight: 500; font-size: 15px;
  line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c);
}
.q-phraserow .cnt { flex-shrink: 0; font-family: var(--font-family-mono); font-size: 11px; color: var(--label-assistive-c); }
.q-phraserow .cnt.max { color: var(--status-negative-c); }
.q-phraserow.bad, .q-phraserow.bad:focus-within { box-shadow: inset 0 0 0 1px var(--status-negative-c); }
.q-phraserow.bad .cnt { color: var(--status-negative-c); }

/* ── 생성 확인 ──────────────────────────────────────────────────── */
.q-quotacard {
  border-radius: 14px; background: var(--qkey-gold-tint); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.q-quotacard .q-ic { color: var(--qkey-gold); }
.q-quotacard .nums { text-align: right; }
.q-quotacard .nums .big { font-weight: 700; font-size: 20px; line-height: 1.4; letter-spacing: -0.012em; color: var(--qkey-gold); }
.q-quotacard .nums .sm { font-weight: 600; font-size: 12px; line-height: 1.334; letter-spacing: 0.025em; color: var(--qkey-gold); }
.q-bullets { margin: 14px 0 0; padding-left: 18px; font-weight: 500; font-size: 12px; line-height: 1.7; letter-spacing: 0.025em; color: var(--label-assistive-c); }

/* ── 생성 대기 ──────────────────────────────────────────────────── */
.q-gen-head { display: grid; place-items: center; gap: 8px; padding: 20px 0 24px; text-align: center; }
@media (min-width: 768px) { .q-gen-head { padding: 24px 0 28px; } }
.q-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.q-progress .track { flex: 1; height: 6px; border-radius: 999px; background: var(--fill-strong-c); overflow: hidden; }
.q-progress .fill { width: 0%; height: 100%; border-radius: 999px; background: var(--primary); transition: width 120ms linear; }
.q-progress .pct { font-family: var(--font-family-mono); font-size: 12px; color: var(--label-alternative-c); width: 38px; text-align: right; }
.q-pipe { border-radius: 14px; background: var(--surface-normal); box-shadow: var(--border-neutral); padding: 4px 14px; }
.q-pipe .row { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.q-pipe .stat { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; }
.q-pipe .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--fill-strong-c); }
.q-pipe .nm { font-weight: 500; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-assistive-c); }
.q-pipe .row.active .nm { font-weight: 600; color: var(--label-normal-c); }
.q-pipe .row.done .nm { color: var(--label-normal-c); }
.q-pipe .eng {
  font-family: var(--font-family-mono); font-size: 10px; letter-spacing: 0.04em;
  padding: 2px 5px; border-radius: 4px; background: var(--fill-alt); color: var(--label-assistive-c);
}
.q-pipe .row.active .eng, .q-pipe .row.done .eng { background: var(--fill-base); color: var(--label-alternative-c); }
.q-pipe .stagebar { margin-top: 8px; height: 3px; border-radius: 999px; background: var(--fill-strong-c); overflow: hidden; }
.q-pipe .stagebar .fill { width: 0%; height: 100%; background: var(--primary); transition: width 120ms linear; }
.q-pipe .donetag { font-family: var(--font-family-mono); font-size: 11px; color: var(--label-assistive-c); }
.q-pipe .stat .ok { color: var(--status-positive-c); }

/* ── 결과 ───────────────────────────────────────────────────────── */
.q-resultgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .q-resultgrid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.q-cut { display: flex; flex-direction: column; gap: 6px; }
.q-cut .frame {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  background: var(--fill-base); box-shadow: var(--border-neutral);
  display: grid; place-items: center; color: var(--label-alternative-c);
}
.q-cut .wm {
  position: absolute; right: 6px; bottom: 6px;
  font-family: var(--font-family-mono); font-size: 9px; letter-spacing: 0.06em;
  color: rgba(55, 56, 60, 0.28);
}
.q-cut .regen {
  position: absolute; right: 6px; top: 6px;
  appearance: none; border: 0; cursor: pointer;
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(112, 115, 124, 0.16); backdrop-filter: blur(64px);
  color: var(--label-normal-c);
}
.q-cut .regen:disabled { color: var(--label-disable-c); cursor: default; }
.q-cut .regen:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (min-width: 768px) {
  .q-cut .regen { opacity: 0; transition: opacity var(--duration-fast) var(--easing-standard); }
  .q-cut:hover .regen, .q-cut .regen:focus-visible { opacity: 1; }
}
.q-cut .cap {
  font-weight: 500; font-size: 12px; line-height: 1.334; letter-spacing: 0.025em;
  color: var(--label-alternative-c); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 요금제 ─────────────────────────────────────────────────────── */
.q-plangrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 768px) { .q-plangrid { grid-template-columns: repeat(2, 1fr); } }
.q-plancard { padding: 16px; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.q-plancard .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-plancard .price { display: flex; align-items: baseline; gap: 2px; }
.q-plancard .feats { display: flex; flex-direction: column; gap: 6px; }
.q-plancard .feats .f { display: flex; gap: 6px; align-items: flex-start; }
.q-plancard .feats .f .q-ic { color: var(--label-assistive-c); margin-top: 2px; }
.q-press[aria-pressed="true"] .q-plancard .feats .f .q-ic { color: var(--primary); }
.q-trialcard { margin-top: 12px; border-radius: 12px; background: var(--fill-alt); padding: 14px; }

/* ── 통신사 결제 ────────────────────────────────────────────────── */
.q-carriergrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .q-carriergrid { grid-template-columns: repeat(4, 1fr); } }
.q-carriercell { padding: 20px 12px; text-align: center; font-weight: 600; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c); }
.q-press[aria-pressed="true"] .q-carriercell { color: var(--primary); }
.q-paysummary {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; background: var(--fill-alt);
}
.q-paysummary .q-ic { color: var(--label-alternative-c); }
.q-otp { display: flex; gap: 8px; justify-content: center; position: relative; cursor: text; }
.q-otp .cell {
  width: 44px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-normal); box-shadow: var(--border-neutral);
  font-weight: 700; font-size: 22px; color: var(--label-normal-c);
  transition: box-shadow var(--duration-fast) var(--easing-standard);
}
@media (min-width: 768px) { .q-otp .cell { width: 52px; height: 60px; } }
.q-otp .cell.caret { box-shadow: inset 0 0 0 1px var(--primary); }
.q-otp.failed .cell { box-shadow: inset 0 0 0 1px var(--status-negative-c); }
.q-otp input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; border: 0; }
.q-payfail {
  display: flex; gap: 8px; align-items: flex-start; padding: 12px;
  border-radius: 10px; background: var(--red-95, #FEECEC);
}
.q-payfail .q-ic { color: var(--status-negative-c); }

/* ── 심사 타임라인 ──────────────────────────────────────────────── */
.q-timeline { border-radius: 14px; background: var(--surface-normal); box-shadow: var(--border-neutral); padding: 16px; }
.q-tl { display: flex; gap: 12px; }
.q-tl .rail { display: flex; flex-direction: column; align-items: center; width: 24px; flex-shrink: 0; }
.q-tl .mark { width: 24px; height: 24px; display: grid; place-items: center; }
.q-tl .mark .live { width: 12px; height: 12px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.16); }
.q-tl .mark .idle { width: 8px; height: 8px; border-radius: 999px; background: var(--fill-strong-c); }
.q-tl .rail .bar { flex: 1; width: 2px; min-height: 28px; background: var(--fill-strong-c); border-radius: 999px; }
.q-tl.done .rail .bar { background: var(--status-positive-c); }
.q-tl .body { padding-bottom: 18px; }
.q-tl:last-child .body { padding-bottom: 0; }
.q-tl .body .nm { font-weight: 500; font-size: 15px; line-height: 1.467; letter-spacing: 0.010em; color: var(--label-normal-c); }
.q-tl.pending .body .nm { color: var(--label-assistive-c); }
.q-tl.active .body .nm, .q-tl.fail .body .nm { font-weight: 600; }
.q-tl .body .ds { font-weight: 500; font-size: 12px; line-height: 1.334; letter-spacing: 0.025em; color: var(--label-assistive-c); margin-top: 2px; }
.q-tl .mark .ok { color: var(--status-positive-c); }
.q-tl .mark .bad { color: var(--status-negative-c); }
.q-rejectcard {
  margin-top: 12px; border-radius: 12px; background: var(--red-95, #FEECEC);
  padding: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.q-rejectcard .q-ic { color: var(--status-negative-c); margin-top: 1px; }

/* ── 구독 관리 / 잠금 ───────────────────────────────────────────── */
.q-lockhero {
  display: grid; place-items: center; gap: 10px; text-align: center;
  padding: 32px 20px; border-radius: 16px; background: var(--surface-normal);
  box-shadow: var(--border-neutral);
}
@media (min-width: 768px) { .q-lockhero { padding: 40px 20px; } }
.q-lockhero .ring { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; background: var(--fill-base); color: var(--label-alternative-c); }
.q-goldring { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: var(--qkey-gold-tint-strong); color: var(--qkey-gold); }

/* ── 반응형 표시 유틸 ───────────────────────────────────────────── */
@media (min-width: 768px) { .mobile-only { display: none; } }

/* ── 접근성 유틸 ────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ── #1849 공통 하단 (사업자 정보) ──────────────────────────────── */
.q-foot { background: var(--surface-alternative); box-shadow: inset 0 1px 0 0 rgba(112, 115, 124, 0.08); }
.q-foot-inner { max-width: 560px; margin: 0 auto; padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); }
body.q-has-cta .q-foot-inner { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }   /* 모바일 하단 고정 버튼에 가리지 않게 */
.q-foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 14px; }
.q-foot-links a { font-weight: 500; font-size: 13px; line-height: 1.385; color: var(--label-normal-c); text-decoration: none; }
.q-foot-links a strong { font-weight: 700; }
.q-foot-info { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.q-foot-info > div { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; line-height: 1.5; letter-spacing: 0.025em; }
.q-foot-info dt { flex-shrink: 0; font-weight: 600; color: var(--label-normal-c); }
.q-foot-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--label-alternative-c); }
.q-foot-info a { color: inherit; text-decoration: none; }
.q-foot-copy { margin: 12px 0 0; font-size: 11px; line-height: 1.4; color: var(--label-assistive-c); }
@media (min-width: 768px) {
  .q-foot-inner { padding: 28px 0 40px; }
  body.q-has-cta .q-foot-inner { padding-bottom: 40px; }   /* PC 는 버튼이 흐름 안 */
}

/* ── #1849 첫 화면 소개 · 가이드/FAQ 페이지 ─────────────────────── */
.q-intro[hidden], .q-foot-links a[hidden] { display: none; }
.q-intro { background: var(--surface-normal); }
.q-intro-inner, .q-doc { max-width: 560px; margin: 0 auto; padding: 32px 20px 40px; color: var(--label-normal-c); }
.q-intro-h1, .q-doc h1 { margin: 0 0 12px; font-weight: 700; font-size: 22px; line-height: 1.364; letter-spacing: -0.023em; color: var(--label-strong-c); word-break: keep-all; }
.q-intro-h2, .q-doc h2 { margin: 32px 0 12px; font-weight: 700; font-size: 18px; line-height: 1.445; color: var(--label-strong-c); word-break: keep-all; }
.q-intro p, .q-intro li, .q-intro dd, .q-doc p, .q-doc li, .q-doc dd, .q-doc td { font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.q-intro-lead, .q-doc-lead { margin: 0; color: var(--label-alternative-c); }
.q-intro-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.q-intro-steps strong, .q-doc li strong { display: block; color: var(--label-strong-c); font-weight: 700; }
.q-intro-products { display: grid; grid-template-columns: 1fr; gap: 10px; }
.q-intro-product { padding: 16px; border-radius: 12px; background: var(--surface-alternative); }
.q-intro-product h3 { margin: 0; font-weight: 700; font-size: 16px; color: var(--label-strong-c); }
.q-intro-product .price { margin: 2px 0 6px; font-weight: 700; font-size: 17px; color: var(--primary); }
.q-intro-product p { margin: 0; font-size: 14px; color: var(--label-alternative-c); }
.q-intro-note { margin: 12px 0 0; font-size: 14px !important; color: var(--label-alternative-c); }
.q-intro-list, .q-doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.q-intro-faq, .q-doc-faq { margin: 0; }
.q-intro-faq dt, .q-doc-faq dt { margin-top: 16px; font-weight: 700; font-size: 15px; line-height: 1.5; color: var(--label-strong-c); }
.q-intro-faq dt:first-child, .q-doc-faq dt:first-child { margin-top: 0; }
.q-intro-faq dd, .q-doc-faq dd { margin: 4px 0 0; color: var(--label-alternative-c); }
.q-intro-more { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.q-intro-more a, .q-doc a:not(.q-btn) { color: var(--primary); font-weight: 600; text-decoration: none; }
/* 문서 페이지 */
.q-doc-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px;
  background: var(--surface-normal); box-shadow: inset 0 -1px 0 0 rgba(112, 115, 124, 0.16); }
.q-doc-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--label-strong-c); text-decoration: none; }
.q-doc-brand img { border-radius: 8px; }
/* #1858 일본어·중국어는 띄어쓰기가 없어 keep-all 이면 줄이 안 바뀜 */
html:lang(ja) .q-intro *, html:lang(zh) .q-intro *, html:lang(ja) .q-doc *, html:lang(zh) .q-doc * { word-break: normal; }
.q-doc-lang { margin-left: auto; margin-right: 8px; display: flex; }
.q-doc-back { font-weight: 600; font-size: 14px; color: var(--primary); text-decoration: none; }
.q-doc h2 { scroll-margin-top: 72px; }
.q-doc p { margin: 0 0 10px; }
.q-doc ul { margin-bottom: 10px; }
.q-doc-toc { margin: 20px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-alternative); display: flex; flex-direction: column; gap: 6px; }
.q-doc-toc a { font-size: 14px; }
.q-doc-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.q-doc-table th, .q-doc-table td { padding: 8px 6px; text-align: left; vertical-align: top; box-shadow: inset 0 -1px 0 0 var(--line-normal); }
.q-doc-table th { font-size: 13px; font-weight: 600; color: var(--label-alternative-c); }
.q-doc-table td { font-size: 14px !important; }
.q-doc-cta { margin: 32px 0 8px !important; }
.q-doc-cta .q-btn { width: 100%; text-decoration: none; }
.q-doc-more { font-size: 14px !important; color: var(--label-alternative-c); }
@media (min-width: 768px) {
  .q-intro { background: transparent; }
  .q-intro-inner { padding: 8px 0 48px; }
  .q-intro-products { grid-template-columns: repeat(3, 1fr); }
  .q-docpage { background: var(--surface-normal); }
  .q-doc { padding: 40px 0 56px; }
  .q-doc-bar { padding: 0 24px; }
}
