/* ── Tap Drill Size Chart & Calculator ───────────────────────────────── */
:root {
  --accent:    #c8a05a;                 /* HSS / brass tone */
  --accent-lo: rgba(200,160,90,.22);
  --ok:        #3ddc84;
  --warn:      #f5c842;
  --bad:       #ff5555;
  --cool:      #4fc3f7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); min-height: 100vh; padding: 0 16px;
}
#app { max-width: 1140px; margin: 0 auto; }

/* ── Header / controls (site.css does not define these) ─────────────── */
header { text-align: center; padding: 4px 0; }
header h1 {
  font-size: 1.8rem; font-weight: 700;
  background: linear-gradient(120deg, #c8a05a 0%, #f0d9a8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.subtitle { color: var(--text-dim); font-size: 0.85rem; margin-top: 3px; }

.controls-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 12px 16px; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.ctrl-group { display: flex; align-items: center; gap: 8px; }
.ctrl-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); white-space: nowrap; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface2);
  color: var(--text); text-decoration: none; font-size: 0.8rem; font-weight: 600;
  transition: border-color .18s, background .18s;
}
.btn-link:hover { border-color: var(--accent); background: var(--bg); }
.btn-guide:hover { filter: brightness(1.1); }

.pill-tabs { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px; border: none; background: transparent; color: var(--text-dim);
  border-radius: 6px; cursor: pointer; font-size: 0.81rem; font-weight: 600;
  transition: background .18s, color .18s, box-shadow .18s;
  min-height: 44px; display: inline-flex; align-items: center;
}
.pill.active { background: var(--accent); color: #1a1a2e; box-shadow: 0 0 12px var(--accent-lo); }
.pill:hover:not(.active) { background: var(--surface2); color: var(--text); }
.pill-tabs-sm .pill { padding: 6px 12px; min-height: 36px; font-size: 0.76rem; }

.btn {
  padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 0.84rem; font-weight: 600; min-height: 44px;
  transition: filter .18s, box-shadow .18s, opacity .18s;
}
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #1a1a2e; }
.btn-primary:not(:disabled):hover { filter: brightness(1.12); box-shadow: 0 0 12px var(--accent-lo); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }

/* ── Layout ─────────────────────────────────────────────────────────── */
.main-layout { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.panel { display: flex; flex-direction: column; gap: 14px; }
.panel[hidden] { display: none; }

.card-title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); font-weight: 700; margin-bottom: 10px;
}
.card-foot { font-size: 0.74rem; color: var(--text-dim); margin-top: 10px; line-height: 1.5; }

/* ── Find box ───────────────────────────────────────────────────────── */
.find-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.find-label {
  display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); font-weight: 700; margin-bottom: 8px;
}
.find-box { display: flex; gap: 8px; }
.find-input {
  flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text);
  font-family: var(--mono); font-size: 1rem; font-weight: 700; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.find-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lo); }
.find-input::placeholder { color: var(--text-dim); font-weight: 400; }

.find-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.find-suggest:empty { display: none; }
.sug {
  padding: 6px 12px; border: 1px dashed var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text-dim); font-size: 0.76rem;
  font-family: var(--mono); cursor: pointer; min-height: 34px;
}
.sug:hover { border-color: var(--accent); color: var(--text); border-style: solid; }

.find-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.find-chips-lbl { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; margin-right: 2px; }
.chip {
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text-dim); font-family: var(--mono);
  font-size: 0.78rem; font-weight: 700; cursor: pointer; min-height: 36px;
  transition: border-color .18s, color .18s, background .18s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); color: #1a1a2e; border-color: var(--accent); }
.chip-sm { font-size: 0.72rem; padding: 6px 11px; font-family: var(--font); font-weight: 600; }

/* ── Answer card ────────────────────────────────────────────────────── */
.result-wrap { display: flex; flex-direction: column; gap: 14px; }
.result-wrap[hidden] { display: none; }

.answer-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 0 22px rgba(200,160,90,.10);
}
.answer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.answer-thread { font-size: 1.5rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.answer-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 3px; }
.btn-copy { padding: 7px 14px; min-height: 36px; font-size: 0.76rem; flex-shrink: 0; }

.answer-main {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px;
}
.answer-big {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.ab-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); font-weight: 700; }
.ab-val {
  font-family: var(--mono); font-size: 1.85rem; font-weight: 800; color: var(--accent);
  line-height: 1.15; word-break: break-word;
}
.answer-big-sec .ab-val { color: var(--cool); font-size: 1.5rem; }
.ab-alt { font-family: var(--mono); font-size: 0.8rem; color: var(--text-dim); }
.answer-note {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px;
  background: rgba(245,200,66,.10); border: 1px solid rgba(245,200,66,.32);
  font-size: 0.77rem; color: var(--text); line-height: 1.55;
}
.answer-note[hidden] { display: none; }

/* ── Engagement card ────────────────────────────────────────────────── */
.eng-card, .series-card, .detail-card, .strength-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.slider-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.sim-slider-label { flex-shrink: 0; min-width: 90px; font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }
.sim-slider {
  flex: 1; min-width: 80px; -webkit-appearance: none; appearance: none; height: 6px;
  background: rgba(255,255,255,.12); border-radius: 3px; outline: none;
  border: 1px solid rgba(255,255,255,.1);
}
.sim-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent-lo), rgba(255,255,255,.12));
}
.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 8px var(--accent-lo); border: 2px solid rgba(255,255,255,.2);
}
.sim-slider::-moz-range-track {
  height: 6px; border-radius: 3px; border: none;
  background: linear-gradient(to right, var(--accent-lo), rgba(255,255,255,.12));
}
.sim-slider::-moz-range-thumb {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.2);
  border-radius: 50%; background: var(--accent); cursor: pointer;
}
.stepper {
  display: flex; align-items: center; gap: 0; min-width: 160px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg); height: 36px;
}
.stepper-btn {
  width: 36px; height: 36px; border: none; background: var(--surface2);
  color: var(--text-dim); font-size: 1.1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.stepper-btn:hover { background: var(--accent-lo); color: var(--text); }
.stepper-btn:active { background: var(--accent); color: #1a1a2e; }
.stepper-val {
  flex: 1; font-family: var(--mono); font-size: 0.85rem; font-weight: 700;
  color: var(--accent); padding: 0 8px; white-space: nowrap; text-align: center; line-height: 36px;
}
.stepper-unit { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; padding-right: 10px; white-space: nowrap; }

.eng-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.eng-readout { margin-top: 12px; }

.readout-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.readout-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.75rem; color: var(--text-dim);
}
.readout-badge strong { font-family: var(--mono); color: var(--text); font-size: 0.82rem; }
.rb-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Four-series grid ───────────────────────────────────────────────── */
.series-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.series-cell {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.series-cell.is-best { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-lo); }
.sc-series { font-size: 0.66rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); font-weight: 700; }
.sc-label { font-family: var(--mono); font-size: 1.15rem; font-weight: 800; color: var(--text); word-break: break-word; }
.sc-mm { font-family: var(--mono); font-size: 0.74rem; color: var(--text-dim); }
.sc-eng { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; margin-top: 2px; }
.e-ideal  { color: var(--ok); }
.e-usable { color: var(--cool); }
.e-tight  { color: var(--bad); }
.e-loose  { color: var(--warn); }

/* ── Detail table ───────────────────────────────────────────────────── */
.detail-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.detail-table td { padding: 7px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table tr:last-child td { border-bottom: none; }
.detail-table td:first-child { color: var(--text-dim); width: 45%; }
.detail-table td:last-child { font-family: var(--mono); font-weight: 700; color: var(--text); text-align: right; }

/* ── Chart ──────────────────────────────────────────────────────────── */
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chart-filter {
  flex: 1; min-width: 180px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text);
  font-size: 0.85rem; outline: none;
}
.chart-filter:focus { border-color: var(--accent); }
.chart-note {
  font-size: 0.76rem; color: var(--text-dim); line-height: 1.6;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 13px;
}
.chart-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px; overflow-x: auto; max-width: 100%;
}
.tap-table { width: 100%; border-collapse: collapse; font-size: 0.79rem; min-width: 760px; }
.tap-table caption { text-align: left; padding: 10px 10px 6px; font-size: 0.76rem; color: var(--text-dim); }
.tap-table th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface2); color: var(--text);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--border);
  cursor: pointer; white-space: nowrap; user-select: none;
}
.tap-table th:hover { color: var(--accent); }
.tap-table th.sorted::after { content: ' \25B4'; color: var(--accent); }
.tap-table th.sorted.desc::after { content: ' \25BE'; }
.tap-table td { padding: 7px 8px; border-bottom: 1px solid rgba(42,48,80,.55); white-space: nowrap; }
.tap-table tbody tr:hover { background: var(--surface2); }
.tap-table tbody tr.hl { background: var(--accent-lo); }
.tap-table .c-thread { font-family: var(--mono); font-weight: 700; color: var(--text); }
.tap-table .c-drill  { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.tap-table .c-num    { font-family: var(--mono); color: var(--text-dim); }
.tap-table .c-clear  { font-family: var(--mono); color: var(--cool); }
.tap-table .c-form   { font-family: var(--mono); color: var(--warn); }
.tap-table .grp td {
  background: var(--bg); color: var(--accent); font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; padding: 8px;
}

.size-index {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.size-index h3 { font-size: 0.9rem; color: var(--text); margin-bottom: 4px; }
.size-index p { font-size: 0.76rem; color: var(--text-dim); margin-bottom: 10px; line-height: 1.6; }
.si-group { margin-bottom: 12px; }
.si-group-t { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); font-weight: 700; margin-bottom: 6px; }
.si-links { display: flex; flex-wrap: wrap; gap: 5px; }
.si-links a {
  padding: 5px 9px; border: 1px solid var(--border); border-radius: 5px;
  background: var(--bg); color: var(--text-dim); font-family: var(--mono);
  font-size: 0.73rem; text-decoration: none; transition: border-color .15s, color .15s;
}
.si-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ── Reverse ────────────────────────────────────────────────────────── */
.rev-window { margin-top: 12px; }
.rev-results { display: flex; flex-direction: column; gap: 8px; }
.rev-results:empty { display: none; }
.rev-head {
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 13px 16px; font-size: 0.85rem; color: var(--text); line-height: 1.6;
}
.rev-head strong { font-family: var(--mono); color: var(--accent); font-size: 1.05rem; }
.rev-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px;
}
.rev-row:hover { border-color: var(--accent); }
.rr-thread { font-family: var(--mono); font-weight: 800; font-size: 1rem; color: var(--text); min-width: 132px; }
.rr-series { font-size: 0.72rem; color: var(--text-dim); min-width: 96px; }
.rr-eng { font-family: var(--mono); font-weight: 700; font-size: 0.9rem; min-width: 62px; text-align: right; }
.rr-bar { flex: 1; min-width: 90px; height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.rr-bar i { display: block; height: 100%; border-radius: 4px; }
.rr-verdict {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 9px; border-radius: 5px; min-width: 74px; text-align: center;
}
.v-ideal  { background: rgba(61,220,132,.15); color: var(--ok); }
.v-usable { background: rgba(79,195,247,.15); color: var(--cool); }
.v-tight  { background: rgba(255,85,85,.15); color: var(--bad); }
.v-loose  { background: rgba(245,200,66,.15); color: var(--warn); }

/* ── Canvas ─────────────────────────────────────────────────────────── */
.canvas-card {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px; position: relative; overflow-x: clip;
}
.canvas-card canvas { display: block; width: 100%; height: auto; touch-action: none; }
.canvas-hint { font-size: 0.76rem; color: var(--text-dim); text-align: center; line-height: 1.6; }
.strength-card canvas { display: block; width: 100%; height: auto; }

.ctx-menu {
  position: absolute; z-index: 100; min-width: 160px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 0; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.ctx-item {
  display: block; width: 100%; padding: 9px 16px; border: none;
  background: transparent; color: var(--text); font-size: 0.82rem;
  text-align: left; cursor: pointer; transition: background .12s;
}
.ctx-item:hover { background: var(--accent-lo); }

/* ── Learn ──────────────────────────────────────────────────────────── */
.learn-body {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  font-size: 0.86rem; line-height: 1.75; color: var(--text);
}
.learn-body h4 { font-size: 1rem; color: var(--accent); margin: 18px 0 8px; }
.learn-body h4:first-child { margin-top: 0; }
.learn-body p { margin-bottom: 11px; }
.learn-body ul, .learn-body ol { margin: 0 0 12px 20px; }
.learn-body li { margin-bottom: 6px; }
.learn-body code {
  font-family: var(--mono); background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; font-size: 0.82rem; color: var(--accent);
}
.learn-body .eq {
  display: block; background: var(--bg); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 12px 15px; margin: 12px 0; font-family: var(--mono);
  font-size: 0.88rem; color: var(--text); overflow-x: auto;
}
.learn-body table { width: 100%; border-collapse: collapse; font-size: 0.79rem; margin: 12px 0; }
.learn-body th { background: var(--surface2); padding: 8px; text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; }
.learn-body td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.learn-body .callout {
  background: rgba(200,160,90,.09); border: 1px solid var(--accent-lo);
  border-radius: 8px; padding: 12px 15px; margin: 14px 0;
}

.empty-state {
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 22px; text-align: center;
  color: var(--text-dim); font-size: 0.85rem; line-height: 1.7;
}
.empty-state[hidden] { display: none; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { padding: 0 10px; }
  header h1 { font-size: 1.4rem; }
  .subtitle { font-size: 0.78rem; }
  .controls-bar { gap: 10px; padding: 10px 12px; }
  .head-actions { margin-left: 0; width: 100%; }
  .btn-link .lbl { display: none; }
  .answer-main { grid-template-columns: 1fr; }
  .ab-val { font-size: 1.6rem; }
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .rr-thread { min-width: 108px; font-size: 0.92rem; }
  .rr-series { display: none; }
  .learn-body { padding: 14px 15px; }
}
@media (max-width: 500px) {
  header h1 { font-size: 1.2rem; }
  .pill { padding: 8px 11px; font-size: 0.75rem; }
  .find-input { font-size: 0.92rem; padding: 11px 12px; }
  .ab-val { font-size: 1.4rem; }
  .answer-thread { font-size: 1.2rem; }
  .series-grid { grid-template-columns: 1fr 1fr; }
  .sim-slider-label { min-width: 64px; font-size: 0.72rem; }
  .stepper { min-width: 132px; }
  .rev-row { gap: 8px; padding: 10px 11px; }
  .rr-bar { display: none; }
  .chart-tools .btn { flex: 1; }
  .readout-badge { font-size: 0.7rem; padding: 5px 9px; }
}

/* ── Print: the shop-floor card ─────────────────────────────────────── */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .logo-fixed, .site-nav, .controls-bar, .ad-slot, .user-guide, .seo-article,
  .site-footer, .chart-tools, .empty-state, .size-index, .share-bar,
  #panel-find, #panel-reverse, #panel-visual, #panel-learn, .cookie-notice { display: none !important; }
  #panel-chart { display: block !important; }
  header h1 { font-size: 14pt; color: #000 !important; -webkit-text-fill-color: #000; background: none; }
  .subtitle { color: #333; font-size: 8pt; }
  .chart-note { border: none; background: none; color: #333; font-size: 7pt; padding: 2pt 0; }
  .chart-wrap { border: none; padding: 0; overflow: visible; background: #fff; }
  .tap-table { font-size: 7pt; min-width: 0; }
  .tap-table th { background: #e8e8e8 !important; color: #000; border-bottom: 1px solid #000; position: static; }
  .tap-table td { border-bottom: 1px solid #ccc; color: #000; padding: 2pt 4pt; }
  .tap-table .c-drill { color: #000; font-weight: 700; }
  .tap-table .c-clear, .tap-table .c-form, .tap-table .c-num { color: #444; }
  .tap-table .grp td { background: #d8d8d8 !important; color: #000; }
  .tap-table tbody tr { page-break-inside: avoid; }
}

/* ── Practice ───────────────────────────────────────────────────────── */
.practice-bar, .quiz-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.8rem; color: var(--text-dim);
}
.practice-bar strong, .quiz-bar strong { font-family: var(--mono); color: var(--accent); }
.pr-score-wrap { margin-left: auto; }
.quiz-bar #qz-score { margin-left: auto; font-family: var(--mono); color: var(--accent); font-weight: 700; }

.practice-panel, .quiz-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.pr-prompt { text-align: center; margin-bottom: 18px; }
.pr-q { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.pr-thread { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--accent); margin: 6px 0 4px; }
.pr-sub { font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono); }
.pr-input-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-input-row .find-input { flex: 1; min-width: 150px; }
.pr-feedback {
  margin-top: 14px; padding: 12px 15px; border-radius: 8px;
  font-size: 0.83rem; line-height: 1.65;
}
.pr-feedback[hidden] { display: none; }
.pr-feedback.ok  { background: rgba(61,220,132,.10); border: 1px solid rgba(61,220,132,.35); }
.pr-feedback.bad { background: rgba(255,85,85,.10);  border: 1px solid rgba(255,85,85,.35); }

/* ── Quiz ───────────────────────────────────────────────────────────── */
.qz-question { font-size: 1.15rem; font-weight: 700; color: var(--text); text-align: center; }
.qz-sub { font-size: 0.78rem; color: var(--text-dim); text-align: center; margin: 5px 0 18px; font-family: var(--mono); }
.qz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qz-opt {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 15px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); cursor: pointer; min-height: 64px;
  transition: border-color .18s, background .18s;
}
.qz-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--surface2); }
.qz-opt:disabled { cursor: default; opacity: .75; }
.qz-opt.correct { border-color: var(--ok); background: rgba(61,220,132,.12); opacity: 1; }
.qz-opt.wrong   { border-color: var(--bad); background: rgba(255,85,85,.12); opacity: 1; }
.qo-label { font-family: var(--mono); font-size: 1.15rem; font-weight: 800; }
.qo-mm { font-family: var(--mono); font-size: 0.74rem; color: var(--text-dim); }
.qz-explain {
  margin-top: 16px; padding: 12px 15px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 0.82rem; line-height: 1.65; color: var(--text-dim);
}
.qz-explain[hidden] { display: none; }
.qz-explain strong { color: var(--accent); font-family: var(--mono); }
#qz-next { margin-top: 16px; width: 100%; }
.quiz-result { text-align: center; }
.quiz-result[hidden] { display: none; }
.qr-stars { font-size: 2.1rem; color: var(--gold); letter-spacing: .12em; }
.qr-score { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--accent); margin: 8px 0 6px; }
.qr-msg { font-size: 0.87rem; color: var(--text-dim); margin-bottom: 18px; }

@media (max-width: 500px) {
  .qz-options { grid-template-columns: 1fr; }
  .pr-thread { font-size: 1.5rem; }
}
@media print { #panel-practice, #panel-quiz { display: none !important; } }
