/* Title / symbol select / trade report screens.
   Colours come from custom properties so a skin (html[data-skin="…"]) can
   replace them wholesale; the design palette below only applies when no skin
   is active. */

:root {
  --text2: #b4bed3;
  --line2: #2a3550;
  --panel3: #0d1220;
  --raise: #1a2236;
  --sel: #141b2d;
  --ink: #0b0d12;
  --mint: #4de0b0;
  --sky: #7cb6ff;
  --warn: #ff9f6b;
  --bad: #ff4d67;
  --mute: #5c6477;
  --display: 'Space Grotesk', var(--sans);
}
:root:not([data-skin]) :is(#scr-title, #scr-select, #scr-result, #dlg-settings) {
  --bg: #07090f;
  --panel: #0b0f1a;
  --panel2: #141b2d;
  --line: #1c2436;
  --text: #e9eef8;
  --dim: #8b97af;
  --ac: #ffd84d;
}
:root:not([data-skin]):not([data-colors="us"]) :is(#scr-title, #scr-select, #scr-result) {
  --up: #ff4d67;
  --dn: #4c93ff;
}

.brand { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; display: flex; gap: 6px; white-space: nowrap; }

/* ================================================================= title */

#scr-title.active { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; background: var(--bg); color: var(--text); }
.t-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 64px; border-bottom: 1px solid var(--line); }
.t-head .brand { font-size: 20px; gap: 8px; }
.t-status { display: flex; gap: 28px; font-family: var(--mono); font-size: 13px; color: var(--dim); white-space: nowrap; }
.t-status b { color: var(--text); }
.t-status b.open { color: var(--up); }

.t-main { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 56px 64px 0; }
.t-hero { display: flex; flex-direction: column; justify-content: center; gap: 28px; min-width: 0; }
.t-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.24em; color: var(--ac); }
.t-h1 { margin: 0; font-size: clamp(52px, 7.8vw, 112px); line-height: 1.02; font-weight: 900; letter-spacing: -0.04em; }
.t-lead { margin: 0; font-size: 20px; line-height: 1.65; color: var(--text2); max-width: 520px; word-break: keep-all; }
.t-btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.open-btn {
  height: 60px; padding: 0 32px; border: 0; border-radius: 12px; background: var(--ac); color: var(--ink);
  font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 12px; white-space: nowrap;
}
.open-btn:hover { filter: brightness(1.06); }
.t-key { font-family: var(--mono); font-size: 12px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 6px; padding: 2px 8px; }
.ghost-btn {
  height: 60px; padding: 0 24px; border: 1px solid var(--line2); border-radius: 12px; background: transparent; color: var(--text);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.ghost-btn:hover { border-color: var(--dim); }
.ghost-btn[aria-pressed="true"] { border-color: var(--ac); color: var(--ac); }
.t-onoff { font-family: var(--mono); font-size: 11px; font-weight: 800; }
.t-onoff:empty { display: none; }
.ghost-btn[aria-pressed="true"] .t-onoff { background: var(--ac); color: var(--ink); border-radius: 4px; padding: 1px 6px; }

.t-card { position: relative; align-self: center; height: 520px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); overflow: hidden; min-width: 0; }
.t-card-head { position: absolute; left: 24px; top: 20px; right: 24px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
#title-chart { position: absolute; left: 0; right: 0; top: 70px; width: 100%; height: calc(100% - 120px); }
.t-card::after { content: ''; position: absolute; left: 150px; top: 60px; bottom: 50px; width: 2px; background: var(--text); }
.t-now { position: absolute; left: 151px; bottom: 22px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--text); }
.t-card-foot { position: absolute; right: 24px; bottom: 20px; font-family: var(--mono); font-size: 12px; color: var(--dim); }

.t-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 40px 64px 32px; }
.t-step { border-top: 2px solid var(--text); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-step.s-up { border-top-color: var(--up); }
.t-step.s-dn { border-top-color: var(--dn); }
.t-step.s-ac { border-top-color: var(--ac); }
.t-step b { font-size: 16px; }
.t-step span { font-size: 14px; color: var(--dim); line-height: 1.6; word-break: keep-all; }

.t-tape {
  flex: none; height: 44px; display: flex; align-items: center; gap: 40px; padding: 0 64px; background: var(--panel3); border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; white-space: nowrap; overflow: hidden;
}
.t-tape-tag { flex: none; color: var(--ink); background: var(--ac); padding: 3px 10px; border-radius: 4px; font-weight: 800; }
.t-tape-run { flex: 0 1 auto; min-width: 0; display: flex; gap: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.t-tape-run span { flex: none; }
.t-disc { flex: none; color: var(--dim); }

/* ================================================================= select */

#scr-select.active { display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.topbar { flex: none; display: flex; align-items: center; gap: 24px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px; min-width: 0; }
.tabs button { flex: none; white-space: nowrap; height: 36px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 14px; font-weight: 600; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--raise); color: var(--text); font-weight: 800; }
.tabs button .cnt { font-family: var(--mono); font-weight: 400; color: var(--dim); margin-left: 6px; }
.tabs button:not(.on) .cnt { display: none; }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; height: 40px; width: 340px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.search:focus-within { border-color: var(--line2); }
.search-ico { flex: none; color: var(--dim); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-family: var(--mono); font-size: 13px; }
.search input::placeholder { color: var(--dim); }
.clock { font-family: var(--mono); font-size: 13px; color: var(--dim); white-space: nowrap; }
.icon-btn { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel3); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }

.sel-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr) 330px; gap: 16px; padding: 16px 24px 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; min-height: 0; min-width: 0; }
.panel-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head b { font-size: 14px; }
.panel-head .hint { font-size: 12px; }

.watch { display: flex; flex-direction: column; overflow: hidden; }
.watch-list { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; min-height: 0; }
.watch-list li { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 60px 64px; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.watch-list li:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.watch-list li.on { background: var(--sel); border-color: var(--ac); }
.w-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.w-name { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sym { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-spark { width: 60px; height: 28px; display: block; }
.w-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
.w-chg { font-family: var(--mono); font-size: 13px; font-weight: 800; white-space: nowrap; }
.w-grade { font-family: var(--mono); font-size: 10px; font-weight: 800; color: var(--ac); min-height: 12px; display: flex; align-items: center; gap: 4px; }
.w-del { background: none; border: 0; color: var(--dim); font-size: 12px; padding: 0 2px; }
.w-del:hover { color: var(--text); }

.detail { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.d-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.d-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.d-sub { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.d-name { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; font-family: var(--mono); }
#d-price { font-size: 34px; font-weight: 800; }
.d-chg { font-size: 14px; font-weight: 600; }
.tf-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tf-row button {
  height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text2);
  font-family: var(--mono); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tf-row button small { font: inherit; }
.tf-row button:not(:disabled):hover { border-color: var(--line2); }
.tf-row button.on { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 8%, transparent); color: var(--ac); font-weight: 800; }
.tf-row button.live { border: 1px dashed var(--line2); color: var(--dim); }
.tf-row button.live.on { border-style: solid; border-color: var(--up); color: var(--up); background: color-mix(in srgb, var(--up) 8%, transparent); }
.tf-row button:disabled { opacity: 0.35; cursor: default; }
.chart-box { position: relative; flex: 1; min-height: 200px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
#preview { position: absolute; inset: 0; width: 100%; height: 100%; }
.np { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.np-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--dim); white-space: nowrap; }
.np-head span { overflow: hidden; text-overflow: ellipsis; }
#np-state { font-family: var(--mono); }
.np-strip { position: relative; height: 56px; border-radius: 8px; background: var(--panel3); overflow: hidden; }
#preview-notes { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--dim); font-size: 14px; pointer-events: none; line-height: 1.6; white-space: pre-line; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .k { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-family: var(--mono); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v.sans { font-family: var(--sans); font-size: 16px; line-height: 1.4; }
.stat.wide { grid-column: 1 / -1; color: var(--dim); font-size: 12px; line-height: 1.6; }
.vol-bar { display: flex; gap: 2px; margin-top: 4px; }
.vol-bar i { flex: 1; height: 6px; border-radius: 1px; background: var(--line); }
.vol-bar i.on { background: var(--ac); }

.ticket { display: flex; flex-direction: column; gap: 18px; padding-bottom: 20px; overflow-x: hidden; overflow-y: auto; }
.ticket > :not(.panel-head) { margin: 0 18px; }
.tk-sec { display: flex; flex-direction: column; gap: 10px; }
.tk-label { font-size: 12px; color: var(--dim); font-weight: 600; }
.diff-list { display: flex; flex-direction: column; gap: 10px; }
.diff {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
}
.diff:hover { border-color: var(--line2); }
.diff.on { border: 1.5px solid var(--ac); padding: 11.5px 13.5px; background: color-mix(in srgb, var(--ac) 6%, transparent); }
.diff .ico { flex: none; width: 26px; display: flex; flex-direction: column; gap: 3px; }
.diff .ico i { display: block; height: 4px; border-radius: 2px; background: var(--up); }
.diff .ico.l2 i { height: 6px; }
.diff .ico i.d { background: var(--dn); }
.diff .ico i.u2 { opacity: 0.6; }
.diff .ico i.d2 { background: var(--dn); opacity: 0.6; }
.diff .ico i.m { background: #FFC94D; }
.diff .ico.l5 { gap: 2px; }
.diff .ico.l5 i { height: 3px; }
.diff .tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.diff .t { font-size: 16px; font-weight: 800; }
.diff .s { font-size: 12px; color: var(--dim); }
.diff .c { flex: none; font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.diff.on .c { color: var(--ac); font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; justify-content: space-between; font-size: 13px; }
.field-row span { color: var(--dim); }
.field-row b { font-family: var(--mono); color: var(--text); }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; --pct: 50%; }
.slider:focus { outline: none; }
.slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(var(--ac), var(--ac)) 0 0 / var(--pct) 100% no-repeat, var(--line); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--text); border: 0; }
.slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 45%, transparent); }
.slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.slider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ac); }
.slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 0; }
.ticket .chk { gap: 10px; font-size: 14px; }
.ticket .chk input { width: 18px; height: 18px; margin: 0; }
.ticket .chk small { font-size: 12px; }
.best { padding: 14px; border: 1px dashed var(--line2); border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.best-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.best-k { font-size: 12px; color: var(--dim); }
.best-v { font-family: var(--mono); font-size: 13px; }
.best-v.none { font-family: var(--sans); color: var(--dim); }
.best-g { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--ac); }
.best-g.none { color: var(--line2); }
.buy-btn {
  flex: none; margin-top: auto !important; height: 72px; border: 0; border-radius: 14px; background: var(--up); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.buy-btn b { font-size: 22px; font-weight: 900; }
.buy-btn .kb { font-family: var(--mono); font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 6px; padding: 2px 8px; }
.buy-btn:not(:disabled):hover { filter: brightness(1.08); }
.buy-btn:disabled { opacity: 0.4; cursor: default; }
.keys-help { font-size: 12px; color: var(--dim); line-height: 1.7; }
.keys-help .touch { display: none; }
@media (pointer: coarse) { .keys-help .touch { display: inline; } }

/* ================================================================= result */

#scr-result.active { display: block; overflow-x: hidden; overflow-y: auto; background: var(--bg); color: var(--text); }
.report { min-height: 100%; padding: 48px 96px; display: flex; flex-direction: column; gap: 24px; }
.r-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.r-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.r-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em; color: var(--ac); }
.r-title { margin: 0; font-size: 40px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; }
.r-title small { font-family: var(--mono); font-size: 16px; font-weight: 400; color: var(--dim); letter-spacing: 0; margin-left: 10px; white-space: nowrap; }
.r-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 14px; font-weight: 800; padding: 6px 12px; border: 2px solid currentColor; border-radius: 6px; white-space: nowrap; color: var(--ac); }
.badge.b-fail { color: var(--bad); }
.badge.b-fc { color: var(--mint); }
.badge.b-beat { color: var(--sky); }
.badge.b-ap, .badge.b-new { color: var(--ac); }

.r-grid { flex: 1 0 auto; min-height: 560px; display: grid; grid-template-columns: 380px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.r-grid .panel { border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.r-label { font-size: 13px; color: var(--dim); font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.r-label .hint { font-size: 12px; font-family: var(--sans); }
.r-grade { grid-row: span 2; position: relative; align-items: center; justify-content: center; text-align: center; gap: 22px !important; padding: 32px 32px 48px !important; }
.r-grade .r-label { font-size: 14px; }
.stamp {
  --g: var(--ac);
  width: 240px; height: 240px; border: 8px solid var(--g); border-radius: 50%; color: var(--g);
  display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-8deg);
  animation: stamp 0.45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; margin-right: -0.3em; }
.stamp .grade { font-family: var(--display); font-weight: 700; font-size: 108px; line-height: 1; letter-spacing: -0.05em; margin: 4px 0; }
.stamp[data-len="3"] .grade { font-size: 80px; margin: 10px 0; }
.stamp[data-grade="A"] { --g: var(--mint); }
.stamp[data-grade="BBB"] { --g: var(--sky); }
.stamp[data-grade="BB"], .stamp[data-grade="B"] { --g: var(--text2); }
.stamp[data-grade="CCC"] { --g: var(--warn); }
.stamp[data-grade="D"] { --g: var(--bad); }
@keyframes stamp { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.r-acc { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.r-new { font-size: 13px; color: var(--dim); min-height: 18px; margin-top: -12px; }
.r-serial { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.r-value { font-family: var(--mono); font-size: 42px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.r-ret { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.r-vs { display: flex; gap: 8px 24px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line2); font-size: 14px; color: var(--dim); }
.r-vs b { font-family: var(--mono); }
.j-list { display: flex; flex-direction: column; gap: 12px; }
.j-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: 14px; }
.j-row .bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.j-row .bar i { display: block; height: 100%; background: var(--mute); }
.j-row.j0 .bar i { background: var(--ac); }
.j-row.j1 .bar i { background: var(--mint); }
.j-row.j2 .bar i { background: var(--text2); }
.j-row .n { font-family: var(--mono); text-align: right; }
.j-foot { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.r-cv { position: relative; flex: 1; min-height: 120px; }
.r-cv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-tfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; font-size: 12px; color: var(--dim); }
.small-btn { height: 36px; padding: 0 14px; border: 1px solid var(--ac); border-radius: 8px; background: transparent; color: var(--ac); font-size: 13px; font-weight: 800; white-space: nowrap; }
.small-btn:hover { background: color-mix(in srgb, var(--ac) 8%, transparent); }
#scr-result .r-btns { display: flex; justify-content: flex-end; gap: 12px; }
#scr-result .r-btns button { height: 56px; min-width: 180px; padding: 0 20px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel3); color: var(--text); font-size: 17px; font-weight: 800; }
#scr-result .r-btns button.primary { min-width: 200px; border: 0; background: var(--ac); color: var(--ink); font-weight: 900; }

/* ================================================================= responsive */

@media (max-width: 1280px) {
  .t-head { padding: 24px 40px; }
  .t-main { padding: 44px 40px 0; gap: 40px; }
  .t-how { padding: 36px 40px 28px; }
  .t-tape { padding: 0 40px; }
  .t-lead { font-size: 18px; }
  .sel-grid { grid-template-columns: 280px minmax(0, 1fr) 300px; }
  .search { width: 260px; }
  .topbar { gap: 16px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report { padding: 40px 48px; }
  .r-value { font-size: 34px; }
  .r-grid { grid-template-columns: 340px minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .t-card { height: 440px; }
  .clock { display: none; }
  .sel-grid { grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 12px; padding: 12px 16px 16px; }
  .topbar { padding: 14px 16px; }
  .watch-list li { grid-template-columns: minmax(0, 1fr) 40px 62px; gap: 8px; padding: 10px; }
  .w-spark { width: 40px; }
  .detail { padding: 18px; }
  .d-name { font-size: 30px; }
  #d-price { font-size: 28px; }
  .tf-row button { padding: 0 12px; }
  .ticket { gap: 14px; }
  .ticket > :not(.panel-head) { margin: 0 14px; }
  .diff { gap: 10px; padding: 10px 12px; }
  .diff.on { padding: 9.5px 11.5px; }
  .report { padding: 32px 40px; gap: 18px; }
  .r-title { font-size: 32px; }
  .r-grid { grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 500px; }
  .r-grid .panel { padding: 18px 20px; }
  .r-serial { left: 16px; right: 16px; bottom: 16px; font-size: 10px; }
  .stamp { width: 200px; height: 200px; border-width: 7px; }
  .stamp .grade { font-size: 88px; }
  .stamp[data-len="3"] .grade { font-size: 66px; }
  .r-value { font-size: 30px; }
}
@media (max-width: 960px) {
  .r-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 300px; }
  .r-grade { grid-row: span 2; }
  #scr-select.active { overflow-y: auto; }
  .sel-grid { flex: 1 0 auto; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: 620px auto; }
  .ticket { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; padding-bottom: 18px; overflow: visible; }
  .ticket > .panel-head { grid-column: 1 / -1; }
  .ticket > .tk-sec { grid-row: span 5; }
  .ticket > :not(.panel-head) { margin: 0; }
  .ticket > .tk-sec { margin-left: 18px; }
  .ticket > :not(.panel-head):not(.tk-sec) { margin-right: 18px; }
  .buy-btn { margin-top: 0 !important; }
}
@media (max-width: 960px) {
  .t-main { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
  .t-card { height: 360px; align-self: stretch; }
  .t-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-tape { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .t-tape-run { flex: 1 1 0; }
  .t-disc { width: 100%; font-size: 11px; white-space: normal; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .topbar .brand { flex: 1; }
  .tabs { order: 4; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs button { padding: 0 12px; }
  .search { order: 5; width: 100%; margin-left: 0; }
  .sel-grid { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 20px; }
  .watch-list { max-height: 260px; }
  .detail { padding: 16px; gap: 14px; }
  .d-head { flex-wrap: wrap; align-items: flex-start; }
  .d-price { align-items: flex-start; }
  .d-name { font-size: 28px; white-space: normal; }
  #d-price { font-size: 26px; }
  .chart-box { flex: none; height: 300px; }
  .ticket { display: flex; align-items: stretch; padding-bottom: 18px; }
  .ticket > :not(.panel-head) { margin: 0 18px !important; }
  .buy-btn { margin-top: 0 !important; }
  .report { padding: 28px 16px; gap: 18px; }
  .r-title { font-size: 28px; }
  .r-title small { display: block; margin: 4px 0 0; font-size: 13px; }
  .r-grid { display: flex; flex-direction: column; min-height: 0; }
  .r-grade { padding: 28px 20px 48px !important; }
  .stamp { width: 200px; height: 200px; border-width: 7px; }
  .stamp .grade { font-size: 88px; }
  .stamp[data-len="3"] .grade { font-size: 66px; }
  .r-value { font-size: 30px; }
  .r-chart, .r-timing { height: 240px; }
  #scr-result .r-btns button { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
  .t-head { padding: 16px; }
  .t-head .brand { font-size: 17px; }
  .t-status { gap: 14px; font-size: 12px; }
  .t-upbit { display: none; }
  .t-main { padding: 28px 16px 0; gap: 28px; }
  .t-hero { gap: 20px; }
  .t-h1 { font-size: 56px; }
  .t-lead { font-size: 16px; }
  .open-btn { flex: 1; justify-content: center; height: 56px; padding: 0 20px; }
  .ghost-btn { height: 56px; padding: 0 18px; }
  .t-card { height: 280px; border-radius: 16px; }
  .t-card::after { left: 90px; }
  .t-now { left: 91px; }
  .t-card-head { left: 16px; right: 16px; top: 16px; }
  .t-card-foot { right: 16px; }
  .t-how { padding: 28px 16px 24px; gap: 18px 12px; }
  .t-step b { font-size: 14px; }
  .t-step span { font-size: 12px; }
  .t-tape { padding: 10px 16px; gap: 16px; font-size: 12px; }
  .t-tape-run { gap: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-row { gap: 6px; }
  .tf-row button { padding: 0 10px; }
  .tf-row button small { display: none; }
  .r-btns { flex-direction: column-reverse; }
  .r-vs { gap: 6px 16px; }
}
