/* 오늘의 양자 / Quantum Today — reader UI + card circuit styles (stage C). Every selector is scoped under .kt-qtm (prefix kt-qtm-).
   Dark mode: html.kt-dark (site theme switch) — the preview page sets the same class. No external fonts/requests. */
.kt-qtm{
  box-sizing:border-box;color:var(--q-fg);background:var(--q-bg);border:1px solid var(--q-line);border-radius:16px;
  padding:16px;margin:1.5em 0;line-height:1.6;font-size:16px;max-width:760px;overflow-wrap:anywhere}
.kt-qtm *,.kt-qtm *::before,.kt-qtm *::after{box-sizing:border-box}
.kt-qtm-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* header */
.kt-qtm-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-size:14px;color:var(--q-muted);margin-bottom:8px}
.kt-qtm-corner{font-weight:800;color:var(--q-teal);font-size:16px}
.kt-qtm-aha{display:inline-block;background:var(--q-yellow);color:#2a2100;font-weight:800;border-radius:999px;padding:0 10px}
.kt-qtm-brand{flex-basis:100%;font-size:13px}
.kt-qtm-intro{margin:.2em 0 .6em;color:var(--q-muted)}
.kt-qtm-title{font-size:1.3rem;line-height:1.4;margin:.2em 0 .4em;font-weight:800;color:var(--q-fg)}
.kt-qtm-prompt{font-weight:600;margin:.4em 0}
.kt-qtm-rules{margin:.4em 0 .8em;padding-left:1.2em;color:var(--q-fg)}
.kt-qtm-rules li{margin:.15em 0}
/* circuit figure */
.kt-qtm-fig{margin:12px 0;padding:10px;background:var(--q-soft);border-radius:12px;direction:ltr}
.kt-qtm-figs{display:grid;grid-template-columns:1fr;gap:10px}
@media (min-width:700px){.kt-qtm-figs-2{grid-template-columns:1fr 1fr}}
.kt-qtm-cell{min-width:0}
.kt-qtm-cname{font-weight:800;color:var(--q-purple);font-size:15px;margin:0 0 2px}
.kt-qtm-stage{position:relative;width:100%;max-width:520px;margin:0 auto}
.kt-qtm-stage svg,.kt-qtm-svg{display:block;width:100%;height:auto}
.kt-qtm-ctext{font-size:14px;color:var(--q-muted);margin:6px 0 0;direction:auto}
.kt-qtm-diagram{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;white-space:pre-wrap;margin:6px 0 0;direction:ltr}
.kt-qtm-goal{display:inline-block;margin:8px 0 0;padding:4px 12px;border-radius:999px;background:var(--q-purple-soft);color:var(--q-purple);font-weight:700}
/* hit areas over the svg (slots / editable ops) */
.kt-qtm-hit{position:absolute;transform:translate(-50%,-50%);min-width:48px;min-height:48px;border:0;border-radius:10px;background:transparent;
  cursor:pointer;padding:0;color:transparent;touch-action:manipulation}
.kt-qtm-hit:focus-visible{outline:3px solid var(--q-focus);outline-offset:2px}
.kt-qtm-hit.kt-qtm-armed{box-shadow:0 0 0 3px var(--q-yellow) inset}
.kt-qtm-hit[disabled]{cursor:default}
/* palette + choices */
.kt-qtm-ptitle{font-size:14px;color:var(--q-muted);margin:10px 0 4px}
.kt-qtm-palette{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}
.kt-qtm-chip{min-height:48px;min-width:64px;padding:6px 14px;border-radius:12px;border:2px solid var(--q-line);background:var(--q-bg);color:var(--q-fg);
  font:inherit;font-weight:700;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;display:inline-flex;align-items:center;gap:8px}
.kt-qtm-chip .kt-qtm-chipg{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 6px;border-radius:8px;color:#fff;font-weight:800;font-size:15px;background:var(--q-purple)}
.kt-qtm-chip[data-gate=H] .kt-qtm-chipg{background:#5536c9}.kt-qtm-chip[data-gate=X] .kt-qtm-chipg{background:#0b6f6b}.kt-qtm-chip[data-gate=Z] .kt-qtm-chipg{background:#a82d63}
.kt-qtm-chip[data-gate=RY] .kt-qtm-chipg{background:#2c5cba}.kt-qtm-chip[data-gate=RZ] .kt-qtm-chipg{background:#86520a}
.kt-qtm-chip[aria-pressed=true]{border-color:var(--q-purple);box-shadow:0 0 0 3px var(--q-purple-soft);}
.kt-qtm-chip[aria-pressed=true]::after{content:"\2713";font-weight:900;color:var(--q-purple)}
.kt-qtm-chip:focus-visible,.kt-qtm-btn:focus-visible,.kt-qtm-choice:focus-visible{outline:3px solid var(--q-focus);outline-offset:2px}
.kt-qtm-chip[disabled]{opacity:.5;cursor:default}
.kt-qtm-help{font-size:13.5px;color:var(--q-muted);margin:4px 0}
.kt-qtm-choices{display:grid;gap:8px;margin:8px 0;padding:0;list-style:none}
.kt-qtm-choice{width:100%;min-height:48px;text-align:left;padding:10px 14px;border-radius:12px;border:2px solid var(--q-line);background:var(--q-bg);color:var(--q-fg);font:inherit;cursor:pointer;display:flex;gap:10px;align-items:center}
.kt-qtm-choice[aria-pressed=true]{border-color:var(--q-purple);background:var(--q-purple-soft)}
.kt-qtm-choice[aria-pressed=true] .kt-qtm-mark::before{content:"\25C9"}
.kt-qtm-mark::before{content:"\25CB";font-size:18px;color:var(--q-purple)}
.kt-qtm-choice.kt-qtm-right{border-color:var(--q-ok);background:var(--q-ok-bg)}
.kt-qtm-choice.kt-qtm-right .kt-qtm-tag::after{content:attr(data-ok)}
.kt-qtm-tag{margin-left:auto;font-size:13px;font-weight:800;color:var(--q-ok)}
/* actions */
.kt-qtm-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 6px}
.kt-qtm-btn{min-height:48px;padding:8px 16px;border-radius:12px;border:2px solid var(--q-teal);background:var(--q-bg);color:var(--q-teal);font:inherit;font-weight:800;cursor:pointer}
.kt-qtm-btn-main{background:var(--q-teal);color:#fff}
html.kt-dark .kt-qtm-btn-main{color:#06201e}
.kt-qtm-btn[disabled]{opacity:.45;cursor:default}
.kt-qtm-btn-sm{min-height:44px;padding:6px 12px;font-size:14px;border-color:var(--q-line);color:var(--q-fg)}
/* feedback */
.kt-qtm-status{min-height:1.6em;margin:8px 0;padding:0;font-weight:700}
.kt-qtm-status.kt-qtm-ok{color:var(--q-ok);background:var(--q-ok-bg);padding:10px 12px;border-radius:10px}
.kt-qtm-status.kt-qtm-ok::before{content:"\2714  "}
.kt-qtm-status.kt-qtm-no{color:var(--q-bad);background:var(--q-bad-bg);padding:10px 12px;border-radius:10px}
.kt-qtm-status.kt-qtm-no::before{content:"\21BA  "}
.kt-qtm-status.kt-qtm-info{background:var(--q-soft);padding:10px 12px;border-radius:10px}
.kt-qtm-hintbox{background:var(--q-soft);border-left:4px solid var(--q-yellow);padding:8px 12px;border-radius:8px;margin:8px 0}
.kt-qtm-result{margin:10px 0}
.kt-qtm-rname{font-weight:800;margin:8px 0 2px;color:var(--q-purple)}
.kt-qtm-bars{display:grid;gap:4px;margin:4px 0}
.kt-qtm-bar{display:grid;grid-template-columns:3.2em 1fr 4.2em;align-items:center;gap:8px;font-size:14px}
.kt-qtm-bit{font-family:ui-monospace,Menlo,Consolas,monospace;font-weight:800;direction:ltr}
.kt-qtm-track{height:18px;background:var(--q-soft);border:1px solid var(--q-line);border-radius:6px;overflow:hidden}
.kt-qtm-fill{display:block;height:100%;background:repeating-linear-gradient(135deg,var(--q-purple) 0 8px,#7b62e6 8px 12px);width:0;transition:width .35s ease}
.kt-qtm-pct{text-align:right;font-variant-numeric:tabular-nums;font-weight:700}
.kt-qtm-note{font-size:13.5px;color:var(--q-muted)}
.kt-qtm-why{margin-top:12px;border-top:1px dashed var(--q-line);padding-top:10px}
.kt-qtm-why h3,.kt-qtm-more h3{font-size:1.05rem;margin:.2em 0 .3em}
.kt-qtm-more{margin-top:12px;background:var(--q-soft);border-radius:12px;padding:10px 12px}
.kt-qtm-shots{font-size:14px;margin-top:6px}
.kt-qtm-share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.kt-qtm-share input{flex:1 1 200px;min-height:44px;font:inherit;font-size:14px;padding:6px 10px;border:1px solid var(--q-line);border-radius:8px;background:var(--q-bg);color:var(--q-fg)}
/* answer details (server rendered, readable without JS) */
.kt-qtm-ans,.kt-qtm-hints{margin:12px 0;border:1px solid var(--q-line);border-radius:12px;padding:0 12px;background:var(--q-bg)}
.kt-qtm-ans>summary,.kt-qtm-hints>summary{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:800;color:var(--q-teal)}
.kt-qtm-ans[open],.kt-qtm-hints[open]{padding-bottom:10px}
.kt-qtm-table{border-collapse:collapse;width:100%;font-size:14px;margin:8px 0}
.kt-qtm-table th,.kt-qtm-table td{border:1px solid var(--q-line);padding:4px 8px;text-align:left;vertical-align:top}
.kt-qtm-table td.kt-qtm-yes{font-weight:800;color:var(--q-ok)}
.kt-qtm-src{font-size:14px;padding-left:1.2em}
.kt-qtm-foot{font-size:13.5px;color:var(--q-muted);border-top:1px solid var(--q-line);margin-top:14px;padding-top:10px}
.kt-qtm-foot a,.kt-qtm a{color:var(--q-teal)}
.kt-qtm-ghost{position:fixed;z-index:99999;pointer-events:none;transform:translate(-50%,-50%) scale(1.05);opacity:.92}
/* JS on/off */
.kt-qtm .kt-qtm-js{display:none}
.kt-qtm.kt-qtm-on .kt-qtm-js{display:block}
.kt-qtm.kt-qtm-on .kt-qtm-nojs{display:none}
@media (max-width:420px){.kt-qtm{padding:12px;border-radius:12px}.kt-qtm-title{font-size:1.18rem}.kt-qtm-btn{flex:1 1 auto}}
@media (prefers-reduced-motion:reduce){.kt-qtm *{transition:none!important;animation:none!important}.kt-qtm-ghost{transform:translate(-50%,-50%)}}
.kt-qtm-related{margin-top:10px;font-size:14px}
