﻿@import url("design/tokens.css");
@import url("design/home-stage.css");
@import url("design/ui-refine.css");
/* ISSUE QUEST 화면. STAR·ECON 스타일은 불러오지 않는다. */
:root{
  --font:var(--jq-font);
  --bg:var(--jq-bg);
  --bg-2:var(--jq-bg-2);
  --surface:var(--jq-surface);
  --surface-2:var(--jq-surface-2);
  --line:var(--jq-line);
  --text:var(--jq-text);
  --muted:var(--jq-muted);
  --faint:var(--jq-faint);
  --sand:var(--jq-sand);
  --ink:var(--jq-ink);
  --t:var(--jq-t);
  --a:var(--jq-a);
  --r:var(--jq-r);
  --s:var(--jq-s);
  --bad:var(--jq-s);
  --shadow:var(--jq-shadow);
}
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  font-size:calc(16px * var(--jq-type-scale));
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
}
button{ font-family:inherit; color:inherit; }
#issuequest{
  width:min(880px, 100%);
  margin:0 auto;
  padding:24px 16px 48px;
}
.screen{ display:none; }
.screen.active{ display:block; }
.preview{
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid var(--t);
  border-radius:12px;
  color:var(--t);
  font-size:calc(14px * var(--jq-type-scale));
  font-weight:700;
  line-height:1.5;
  text-align:center;
  word-break:keep-all;
  overflow-wrap:break-word;
}
.hero{ text-align:center; margin-bottom:0; }
.eyebrow{
  margin:0 0 8px;
  font-size:calc(12px * var(--jq-type-scale));
  font-weight:700;
  letter-spacing:.12em;
  color:var(--s, #a45662);
}
.logo{
  margin:0;
  font-size:calc(28px * var(--jq-type-scale));
  line-height:1.2;
  letter-spacing:.04em;
}
.logo .q{ color:var(--s, #a45662); }
.lead{ margin:8px 0 0; color:var(--muted); font-size:calc(15px * var(--jq-type-scale)); }
.block{ margin:0 0 20px; }
.label{
  margin:0 0 8px;
  font-size:calc(12px * var(--jq-type-scale));
  font-weight:700;
  letter-spacing:.08em;
  color:var(--muted);
}
.choices-row, .diff-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.pick{
  min-height:48px;
  margin:0;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:transparent;
  color:var(--muted);
  font-size:calc(15px * var(--jq-type-scale));
  font-weight:700;
  cursor:pointer;
}
.pick.on{
  border-color:var(--t);
  color:var(--ink);
  background:var(--t);
}
.how{
  text-align:left;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px 18px;
}
.how summary{
  min-height:44px;
  cursor:pointer;
  font-weight:700;
  color:var(--sand);
}
.how p{ margin:8px 0 0; color:var(--muted); }
.how:not([open]) > :not(summary){ display:none; }
.ticket{
  margin:0 0 16px;
  padding:16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
}
.ticket p{ margin:0 0 6px; }
.ticket p:last-child{ margin:0; }
.fine{ color:var(--faint); font-size:calc(14px * var(--jq-type-scale)); }
.best{ color:var(--r); font-weight:700; }
.start, .next, .again{
  width:100%;
  min-height:48px;
  margin:0 0 8px;
  border:0;
  border-radius:12px;
  background:var(--t);
  color:var(--ink);
  font-size:calc(16px * var(--jq-type-scale));
  font-weight:700;
  cursor:pointer;
}
.start:disabled{ opacity:.45; cursor:default; }
.link{
  display:inline-block;
  min-height:44px;
  margin:4px 12px 0 0;
  padding:8px 0;
  border:0;
  background:none;
  color:var(--muted);
  font-size:calc(14px * var(--jq-type-scale));
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.hud{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:16px;
}
.hud div{
  min-width:0;
  padding:10px 12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
}
.hud span{ display:block; color:var(--faint); font-size:calc(12px * var(--jq-type-scale)); font-weight:700; }
.hud strong{ font-size:calc(18px * var(--jq-type-scale)); }
.prompt-card{
  margin:0 0 14px;
  padding:16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
}
#play.is-boss .prompt-card{ border-color:var(--a); }
.type-label{
  margin:0 0 6px;
  color:var(--t);
  font-size:calc(12px * var(--jq-type-scale));
  font-weight:700;
  letter-spacing:.08em;
}
#play.is-boss .type-label{ color:var(--a); }
.prompt{ margin:0; font-size:calc(18px * var(--jq-type-scale)); font-weight:700; line-height:1.45; word-break:keep-all; overflow-wrap:break-word; }
.context{ margin:10px 0 0; color:var(--muted); word-break:keep-all; overflow-wrap:break-word; }
.match{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.card-btn, .option{
  width:100%;
  min-height:48px;
  margin:0 0 8px;
  padding:12px 14px;
  text-align:left;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--bg-2);
  font-size:calc(16px * var(--jq-type-scale));
  line-height:1.4;
  word-break:keep-all;
  overflow-wrap:break-word;
  cursor:pointer;
}
.card-btn.sel, .option:focus-visible{ border-color:var(--a); outline:2px solid var(--a); outline-offset:2px; background:color-mix(in srgb, var(--a) 10%, #fff); }
.card-btn:active, .option:active{ transform:translateY(1px); }
.card-btn.used{ color:var(--sand); opacity:.72; }
.option.good, .card-btn.good{ border-color:var(--r); color:var(--r); background:color-mix(in srgb, var(--r) 10%, #fff); }
.option.bad, .card-btn.bad{ border-color:var(--bad); color:var(--bad); background:color-mix(in srgb, var(--bad) 8%, #fff); }
.option:disabled, .card-btn:disabled{ cursor:default; }
.explain{
  margin:8px 0;
  padding:14px 16px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
  font-size:calc(15px * var(--jq-type-scale));
  line-height:1.55;
}
.flash-ok{ animation:pop .35s ease; }
.flash-bad{ animation:nudge .28s ease; }
@keyframes pop{
  40%{ transform:scale(1.02); }
}
@keyframes nudge{
  30%{ transform:translateX(-2px); }
  70%{ transform:translateX(2px); }
}
@media (prefers-reduced-motion: reduce){
  .flash-ok, .flash-bad{ animation:none; }
  .card-btn:active, .option:active{ transform:none; }
}
#play.is-boss .prompt-card{
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--a) 35%, transparent);
}
#play.is-boss .type-label::before{ content:"마지막 · "; }
.hud div:nth-child(4) strong{ color:var(--sand); }
.result-score{
  margin:0;
  font-size:calc(44px * var(--jq-type-scale));
  line-height:1.2;
  color:var(--sand);
}
#result .again{
  box-shadow:0 8px 18px rgba(70,55,35,.1);
}
@media (min-width:700px){
  .logo{ font-size:calc(34px * var(--jq-type-scale)); }
  .hud{ grid-template-columns:repeat(4, 1fr); }
  .match{ grid-template-columns:1fr 1fr; }
  .start, .next, .again{ width:auto; min-width:180px; }
}
@media (max-width:380px){
  .logo{ font-size:calc(30px * var(--jq-type-scale)); }
  #issuequest{ padding:16px 12px 32px; }
}
.econ-visual{
  margin:0 0 14px;
  padding:14px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  color:var(--text);
}
.econ-visual[hidden]{ display:none; }
.econ-visual figure{ margin:0; }
.econ-visual-kicker{
  display:block;
  margin:0 0 2px;
  color:var(--faint);
  font-size:calc(12px * var(--jq-type-scale));
  font-weight:700;
}
.econ-visual-title{
  display:block;
  font-size:calc(16px * var(--jq-type-scale));
  line-height:1.4;
  word-break:keep-all;
  overflow-wrap:break-word;
}
.econ-visual-note{
  margin:8px 0 0;
  color:var(--muted);
  font-size:calc(13px * var(--jq-type-scale));
  line-height:1.45;
  word-break:keep-all;
  overflow-wrap:break-word;
}
.econ-visual-list{ list-style:none; margin:10px 0 0; padding:0; }
.econ-visual-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:2px 10px;
  align-items:end;
  margin:0 0 10px;
}
.econ-visual-label,
.econ-visual-value{
  min-width:0;
  font-size:calc(15px * var(--jq-type-scale));
  line-height:1.35;
  overflow-wrap:anywhere;
}
.econ-visual-value{ font-weight:700; font-variant-numeric:tabular-nums; text-align:right; }
.econ-visual-track{
  grid-column:1 / -1;
  height:calc(12px * var(--jq-type-scale));
  min-height:10px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
}
.econ-visual-bar{
  display:block;
  height:100%;
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(20,22,28,.28) 3px, rgba(20,22,28,.28) 5px),
    var(--t);
}
.econ-visual-bar.is-neg{
  background:
    repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(20,22,28,.28) 3px, rgba(20,22,28,.28) 5px),
    var(--bad);
}

.match-hint{
  margin:0 0 10px;
  color:var(--muted);
  font-size:calc(14px * var(--jq-type-scale));
  line-height:1.45;
  word-break:keep-all;
}
.card-btn{
  -webkit-user-select:none;
  user-select:none;
  touch-action:manipulation;
}
.card-btn.sel{
  border-color:var(--sand);
  background:rgba(230, 211, 179, .12);
  box-shadow:inset 0 0 0 1px var(--sand);
}
.card-btn.used{
  border-style:dashed;
  opacity:.92;
}
.card-btn.drag-over{
  border-color:var(--r);
  background:rgba(122, 201, 167, .12);
}
.card-btn[aria-pressed="true"]{ border-color:var(--sand); }
.home-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-top:0;
}
#home .jq-home-cta .start,
#home .start{
  width:min(100%, 260px);
  min-height:52px;
  margin:0;
  border:0;
  border-radius:14px;
  background:var(--a);
  color:#fff;
  box-shadow:0 10px 22px rgba(141, 106, 46, .22);
}
#home .jq-home-cta .start:hover,
#home .start:hover{
  background:#7a5c28;
}
.hint{ display:none; }
.text-link{
  min-height:44px;
  padding:8px 4px;
  border:0;
  background:none;
  color:var(--muted);
  font:inherit;
  font-size:calc(14px * var(--jq-type-scale));
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.field-panel{ width:min(640px, 100%); margin:20px auto 0; }
.pick.on{
  border-color:color-mix(in srgb, var(--a) 45%, var(--line));
  color:var(--text);
  background:color-mix(in srgb, var(--a) 10%, #fff);
}
