/*
 * 拖延症診斷書 H5 小工具（2026-11-28）。
 * 純前端 5 題情境測驗 + 12 種拖延人格 + 小時毒舌／暖心診斷書圖卡（3:4 貼文 / 9:16 限時動態）。
 * 跟著網站深淺色（site.css）；所有字級 ≥ .94rem（15px），零第三方腳本。
 */
.qz-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

[data-quiz] {
  --xs-outline: #262626;
  --xs-body: #ffffff;
  --xs-shade: #efe8db;
  --xs-feature: #262626;
  --xs-cheek: #f6a393;
  --xs-cheek-o: .55;
  --xs-knob: #2dd4bf;
  --xs-tongue: #f07f72;
  --xs-shadow: #262626;
  --xs-shadow-o: .12;
  --xs-gloss-o: 0;
}

.qz-page { padding-bottom: clamp(72px, 9vw, 128px); }

.qz-hero {
  display: grid; gap: clamp(28px, 4vw, 48px);
  padding-top: clamp(36px, 5vw, 72px);
}
@media (min-width: 960px) {
  .qz-hero {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    align-items: start; column-gap: clamp(44px, 5.5vw, 80px);
  }
}

.qz-intro { display: grid; gap: 18px; }
.qz-pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 6px 14px; border-radius: 999px;
  background: var(--mint-soft); color: var(--accent);
  font-size: .94rem; font-weight: 700;
}
.qz-intro h1 {
  font-family: var(--font-display); font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  font-weight: 700; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance;
}
html[lang^="zh"] .qz-intro h1 { line-height: 1.18; letter-spacing: -.02em; }
.qz-lead { color: var(--muted); font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.6; text-wrap: pretty; }
.qz-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .94rem; font-weight: 600; }
.qz-meta span { padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--tile-edge); }
.qz-mascot-row { display: flex; align-items: center; gap: 14px; padding-top: 6px; }
.qz-mascot { width: 72px; height: 72px; flex: none; }
.qz-mascot-quote {
  position: relative; padding: 12px 16px; border-radius: 16px;
  background: var(--card); box-shadow: var(--tile-edge);
  color: var(--ink); font-size: .96rem; line-height: 1.5;
}

/* ───────── 測驗卡片與結果診斷單 ───────── */
.qz-stage { min-width: 0; }
.qz-card {
  display: grid; gap: 22px;
  padding: clamp(24px, 3.6vw, 40px);
  border-radius: var(--r-stage); background: var(--card); box-shadow: var(--tile-edge);
}
.qz-card[hidden] { display: none; }

.qz-progress { display: grid; gap: 10px; }
.qz-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .96rem; font-weight: 700; color: var(--muted); }
.qz-progress-track { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.qz-progress-bar {
  height: 100%; width: 20%; border-radius: 999px; background: var(--accent);
  transition: width .32s var(--ease-out);
}

.qz-question { font-size: clamp(1.28rem, 2.2vw, 1.65rem); font-weight: 700; line-height: 1.38; letter-spacing: -.015em; text-wrap: pretty; }

.qz-options { display: grid; gap: 12px; }
.qz-option {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 58px;
  padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 18px;
  background: var(--paper-alt); color: var(--ink); text-align: left;
  font: 600 1.02rem/1.48 var(--font); cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s var(--ease-out);
}
.qz-option:hover { border-color: var(--accent); background: color-mix(in srgb, var(--mint) 14%, var(--paper-alt)); }
.qz-option:active { transform: scale(.985); }
.qz-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.qz-option[aria-pressed="true"] { border-color: var(--accent); background: var(--mint-soft); }
.qz-option-key {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px;
  border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  color: var(--accent); font: 700 .94rem/1 var(--font-round);
}
.qz-option[aria-pressed="true"] .qz-option-key { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.qz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.qz-nav [hidden] { display: none; }

/* ───────── 診斷結果卡 ───────── */
.qz-result-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; border-bottom: 1.5px dashed var(--line);
}
.qz-code {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--mint-soft); color: var(--accent);
  font: 700 .94rem/1.2 var(--font-round);
}
.qz-badge { color: var(--muted); font-size: .96rem; font-weight: 700; }

.qz-result-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qz-result-title { font-family: var(--font-display); font-size: clamp(1.85rem, 3.4vw, 2.5rem); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; }
.qz-result-mascot { width: 76px; height: 76px; flex: none; }

.qz-symptom { color: var(--muted); font-size: 1.04rem; line-height: 1.6; }

.qz-box {
  display: grid; gap: 8px; padding: 18px 20px; border-radius: 18px;
  background: var(--paper-alt); border: 1px solid var(--line);
}
.qz-box-roast { border-left: 4px solid var(--accent); }
.qz-box-label { font-size: .94rem; font-weight: 700; color: var(--accent); }
.qz-box p { font-size: 1.02rem; line-height: 1.6; color: var(--ink); }

.qz-match {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 16px; border-radius: 14px; background: var(--fill);
  font-size: .96rem; font-weight: 600; color: var(--muted);
}
.qz-match strong { color: var(--ink); }

.qz-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-actions .btn { flex: 1 1 160px; }
.qz-actions .btn svg, .qz-sheet-actions .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── 下方延伸導流 ───────── */
.qz-more { display: grid; gap: clamp(40px, 6vw, 72px); margin-top: clamp(44px, 6vw, 72px); }
.qz-cross-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 24px 28px; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--tile-edge);
}
.qz-cross-copy { display: grid; gap: 6px; min-width: 0; }
.qz-cross-copy strong { font-size: 1.16rem; font-weight: 700; }
.qz-cross-copy span { color: var(--muted); font-size: .96rem; line-height: 1.5; }

.qz-app { display: grid; justify-items: center; gap: 18px; text-align: center; }
.qz-app h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 700; line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; }
.qz-app-mascot { width: 88px; height: 88px; }

/* ───────── 圖卡預覽面板 ───────── */
.qz-sheet {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.qz-sheet[hidden] { display: none; }
.qz-sheet-panel {
  display: grid; gap: 16px; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 22px; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--shadow);
}
.qz-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qz-sheet-head h2 { font-size: 1.2rem; font-weight: 700; }
.qz-sheet-x {
  display: grid; flex: none; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer;
}
.qz-sheet-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.qz-formats { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.qz-formats button {
  flex: 1; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: 600 .94rem/1.2 var(--font); cursor: pointer;
}
.qz-formats button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.qz-sheet-frame { display: grid; place-items: center; min-height: 0; }
.qz-sheet-image {
  display: block; width: auto; max-width: 100%; height: auto; max-height: min(58dvh, 620px);
  border-radius: 18px; box-shadow: var(--tile-edge), 0 18px 40px -22px rgba(0, 0, 0, .5);
}
.qz-sheet-hint { color: var(--muted); font-size: 1rem; text-align: center; }
.qz-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-sheet-actions .btn { flex: 1 1 140px; }
.qz-sheet-actions [hidden] { display: none; }
.qz-copy-status { color: var(--muted); font-size: .94rem; text-align: center; }
.qz-copy-status:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .qz-progress-bar, .qz-option { transition: none; }
}
@media (max-width: 560px) {
  .qz-card { padding: 22px 18px; border-radius: var(--r-tile); }
  .qz-cross-cta { padding: 20px; }
}
