/* Optional "Windows 98" skin (designs Win98-Main / Select / Play / Report /
   Mobile). Active only when <html data-skin="win98">; every rule below is
   scoped to that attribute so the default look is untouched.
   Extra chrome lives in index.html as [hidden] elements (.w98-title,
   .w98-menu, .w98-status, #w98-task, #w98-desk) that this file reveals. */

/* ================================================================ tokens */
html[data-skin="win98"] {
  --w-raised: inset -1px -1px #0A0A0A, inset 1px 1px #FFFFFF, inset -2px -2px #808080, inset 2px 2px #DFDFDF;
  --w-window: inset -1px -1px #0A0A0A, inset 1px 1px #DFDFDF, inset -2px -2px #808080, inset 2px 2px #FFFFFF;
  --w-sunken: inset -1px -1px #FFFFFF, inset 1px 1px #808080, inset -2px -2px #DFDFDF, inset 2px 2px #0A0A0A;
  --w-pressed: inset -1px -1px #FFFFFF, inset 1px 1px #0A0A0A, inset -2px -2px #DFDFDF, inset 2px 2px #808080;
  --w-field: inset 1px 1px #808080, inset -1px -1px #FFFFFF;
  --w-chip: inset 1px 1px #808080, inset -1px -1px #DFDFDF;
  --w-tbar: linear-gradient(90deg, #000080, #1084D0);
  --w-pbar: linear-gradient(90deg, #5A5A5A, #A8A8A8);
  --w-up: #D40000; --w-dn: #0000FF;        /* up / down text on white & gray */
  --note-up: #FF4040; --note-dn: #4C8CFF;  /* up / down on black (notes, candles) */
  --sans: 'Gulim', '굴림', 'Nanum Gothic', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --mono: 'GulimChe', '굴림체', 'Nanum Gothic Coding', 'JetBrains Mono', ui-monospace, monospace;
  --display: var(--sans);
  /* desktop */
  --bg: #008080;
  /* canvas palette (highway.js readTheme() reads these from <html>) */
  --text: #FFFFFF; --dim: #A0A0A0; --soft: #C0C0C0; --ac: #FFFF00; --ok: #00FFFF;
  --panel2: #808080; --line: #808080;
  --up: var(--w-up); --dn: var(--w-dn);
  --hw-bg: #000000; --hw-bg-clear: rgba(0, 0, 0, 0);
  --hw-grid: rgba(255, 255, 255, 0.05); --hw-grid-major: rgba(255, 255, 255, 0.16);
  --hw-mid: rgba(255, 255, 255, 0.35); --hw-line: #FFFFFF; --hw-line-ahead: rgba(255, 255, 255, 0.5);
  --hw-ref: rgba(255, 255, 0, 0.4); --hw-chord: rgba(255, 255, 255, 0.5); --hw-glow: rgba(255, 255, 255, 0.6);
  --hw-axis: rgba(0, 0, 0, 0.92); --hw-candle-bg: #000000; --hw-up-text: #FF8080; --hw-ac-soft: rgba(255, 255, 0, 0.45);
}
html[data-skin="win98"][data-colors="us"] { --w-up: #008000; --w-dn: #D40000; --note-up: #00D060; --note-dn: #FF4040; }

/* HTML surfaces: black on Win98 gray */
html[data-skin="win98"] :is(.screen, dialog, .toast, #w98-task, #w98-desk),
html[data-skin="win98"] #scr-play {
  --bg: #C0C0C0; --panel: #C0C0C0; --panel2: #C0C0C0; --panel3: #C0C0C0; --raise: #C0C0C0; --sel: #000080;
  --line: #808080; --line2: #808080; --text: #000000; --text2: #000000; --dim: #404040; --soft: #404040; --mute: #808080;
  --ac: #000080; --ok: #007000; --mint: #007000; --sky: #000080; --warn: #8A5A00; --bad: #C00000; --ink: #000000; --well: #E8E8E8;
  --up: var(--w-up); --dn: var(--w-dn);
  color: #000; font-family: var(--sans); font-size: 12px;
}
/* canvases on black read --up/--dn/--ac from these screens */
html[data-skin="win98"] #scr-title { --up: var(--note-up); --dn: var(--note-dn); }
html[data-skin="win98"] #scr-select { --up: var(--note-up); --dn: var(--note-dn); --ac: #FFFF00; }
html[data-skin="win98"] #scr-result { --text2: #404040; --line2: #000000; --mute: #808080; }
html[data-skin="win98"] #scr-play { --ac: #8A5A00; --soft: #404040; --dim: #606060; --hw-bg: #000000; --hw-bg-clear: rgba(0, 0, 0, 0); }
html[data-skin="win98"] :is(.t-how, .t-tape, .t-head, .topbar, .watch, .d-head, .tf-row, .stats, .ticket) { --up: var(--w-up); --dn: var(--w-dn); --ac: #000080; }

html[data-skin="win98"] body { background: #008080; }
html[data-skin="win98"] button { font-family: var(--sans); }
html[data-skin="win98"] kbd { border: 0; background: none; color: inherit; font-family: var(--mono); font-size: 11px; padding: 0; }

/* ================================================================ common chrome */
html[data-skin="win98"] .w98-title {
  flex: none; height: 18px; display: flex; align-items: center; gap: 4px; padding: 0 2px 0 3px;
  background: var(--w-tbar); color: #fff; font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden;
}
html[data-skin="win98"] .w98-title > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html[data-skin="win98"] .w98-ico {
  flex: none; display: block; width: 16px; height: 16px; background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16'/%3E%3Crect x='2' y='3' width='1' height='10' fill='%23FF4040'/%3E%3Crect x='1' y='5' width='3' height='5' fill='%23FF4040'/%3E%3Crect x='6' y='5' width='1' height='9' fill='%234C8CFF'/%3E%3Crect x='5' y='7' width='3' height='4' fill='%234C8CFF'/%3E%3Crect x='10' y='1' width='1' height='11' fill='%23FF4040'/%3E%3Crect x='9' y='2' width='3' height='7' fill='%23FF4040'/%3E%3Crect x='13' y='9' width='2' height='2' fill='%23FFFF00'/%3E%3C/svg%3E");
}
html[data-skin="win98"] .w98-ico.doc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h10l4 4v12H0z' fill='%23fff'/%3E%3Cpath d='M0 0h10l4 4v12H0zM1 1v14h12V5H9V1z' fill-rule='evenodd'/%3E%3Crect x='3' y='7' width='8' height='1' fill='%23C00000'/%3E%3Crect x='3' y='9' width='7' height='1' fill='%23000080'/%3E%3Crect x='3' y='11' width='8' height='1' fill='%23000080'/%3E%3C/svg%3E");
}
html[data-skin="win98"] .w98-ico.bin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 32' shape-rendering='crispEdges'%3E%3Crect x='4' y='2' width='20' height='4' fill='%23C0C0C0' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M5 8h18l-2 22H7z' fill='%23DFDFDF' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M11 12v14M14 12v14M17 12v14' stroke='%23808080' stroke-width='2'/%3E%3C/svg%3E");
}
html[data-skin="win98"] .w98-ico.big { width: 32px; height: 32px; }
html[data-skin="win98"] .w98-wb { flex: none; display: block; width: 16px; height: 14px; background: #C0C0C0 no-repeat center; box-shadow: var(--w-raised); }
html[data-skin="win98"] .w98-wb.min { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7' shape-rendering='crispEdges'%3E%3Crect x='1' y='5' width='6' height='2'/%3E%3C/svg%3E"); }
html[data-skin="win98"] .w98-wb.max { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h9v9H0zM1 2v6h7V2z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
html[data-skin="win98"] .w98-wb.res { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cpath d='M2 0h7v6H8V2H2zM0 3h7v6H0zM1 5v3h5V5z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
html[data-skin="win98"] .w98-wb.x { margin-left: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7'%3E%3Cpath d='M0 0h2l2 2 2-2h2L5 3.5 8 7H6L4 5 2 7H0l3-3.5z'/%3E%3C/svg%3E"); }

html[data-skin="win98"] .w98-menu { flex: none; height: 20px; display: flex; align-items: center; font-size: 12px; white-space: nowrap; overflow: hidden; }
html[data-skin="win98"] .w98-menu span { padding: 2px 7px; }

html[data-skin="win98"] .w98-status { flex: none; height: 20px; display: flex; gap: 2px; padding-top: 2px; font-size: 11px; white-space: nowrap; overflow: hidden; }
html[data-skin="win98"] .w98-status span { display: flex; align-items: center; padding: 0 8px; box-shadow: var(--w-field); }
html[data-skin="win98"] .w98-status span:first-child { flex: 1; min-width: 0; overflow: hidden; }

/* screens become windows on the teal desktop, above a taskbar */
html[data-skin="win98"] .screen { bottom: 28px; }
html[data-skin="win98"] :is(#scr-title, #scr-select, #scr-play, #scr-result).active { background: #C0C0C0; box-shadow: var(--w-window); padding: 3px; }

/* taskbar */
html[data-skin="win98"] #w98-task {
  position: fixed; left: 0; right: 0; bottom: 0; height: 28px; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 2px 2px 0;
  background: #C0C0C0; box-shadow: inset 0 1px #DFDFDF, inset 0 2px #FFFFFF; font-size: 12px; white-space: nowrap;
}
html[data-skin="win98"] .w98-start { flex: none; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 7px 0 4px; box-shadow: var(--w-raised); font-weight: 800; }
html[data-skin="win98"] .w98-sep { flex: none; width: 2px; height: 20px; margin: 0 2px; border-left: 1px solid #808080; border-right: 1px solid #FFFFFF; }
html[data-skin="win98"] .w98-cur {
  flex: 0 1 230px; min-width: 0; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 6px; overflow: hidden;
  background: #E4E4E4; box-shadow: var(--w-pressed); font-weight: 700;
}
html[data-skin="win98"] .w98-cur-t { overflow: hidden; text-overflow: ellipsis; }
html[data-skin="win98"] #app:has(#scr-title.active) .w98-cur-t::after { content: 'RHYTHM STOCK 98 - 개장 벨'; }
html[data-skin="win98"] #app:has(#scr-select.active) .w98-cur-t::after { content: 'RHYTHM STOCK 98 - [종목 선택]'; }
html[data-skin="win98"] #app:has(#scr-play.active) .w98-cur-t::after { content: 'RHYTHM STOCK 98 - [차트 하이웨이]'; }
html[data-skin="win98"] #app:has(#scr-result.active) .w98-cur-t::after { content: '거래 확인서 - 인쇄 미리 보기'; }
html[data-skin="win98"] .w98-tray { flex: none; margin-left: auto; height: 22px; display: flex; align-items: center; gap: 8px; padding: 0 8px; box-shadow: var(--w-field); }
html[data-skin="win98"] .w98-ime { width: 16px; height: 14px; display: flex; align-items: center; justify-content: center; background: #000080; color: #fff; font-size: 10px; font-weight: 700; font-style: normal; }
html[data-skin="win98"] .w98-vol { display: block; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M1 5h3l4-4v12L4 9H1z'/%3E%3Cpath d='M10 4c1.5 1.5 1.5 4.5 0 6M11.5 2.5c2.5 2.5 2.5 6.5 0 9' fill='none' stroke='%23000'/%3E%3C/svg%3E"); }

/* desktop icons beside the floating title / report windows */
html[data-skin="win98"] #w98-desk { position: fixed; left: 14px; top: 20px; width: 80px; display: none; flex-direction: column; gap: 22px; color: #fff; font-size: 12px; }
@media (min-width: 1360px) and (min-height: 700px) {
  html[data-skin="win98"] #app:has(#scr-title.active, #scr-result.active) #w98-desk { display: flex; }
}
html[data-skin="win98"] .w98-di { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
html[data-skin="win98"] .w98-di b { font-weight: 400; line-height: 1.3; padding: 1px 3px; }
html[data-skin="win98"] .w98-di.on b { background: #000080; outline: 1px dotted #FFFF00; }

/* generic controls */
html[data-skin="win98"] input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 13px; height: 13px; margin: 0; border: 0; border-radius: 0;
  background: #fff no-repeat center; box-shadow: var(--w-sunken); cursor: pointer;
}
html[data-skin="win98"] input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M0 3l2 2 5-5v2L2 7 0 5z'/%3E%3C/svg%3E"); }
html[data-skin="win98"] input[type="range"] { -webkit-appearance: none; appearance: none; height: 24px; margin: 0; background: transparent; cursor: pointer; }
html[data-skin="win98"] input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #FFFFFF, inset 2px 2px #0A0A0A; }
html[data-skin="win98"] input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 20px; margin-top: -8px; border-radius: 0; background: #C0C0C0; box-shadow: var(--w-raised); border: 0; }
html[data-skin="win98"] input[type="range"]:focus-visible { outline: 1px dotted #000; }
html[data-skin="win98"] input[type="range"]::-moz-range-track { height: 4px; border-radius: 0; background: #fff; box-shadow: inset 1px 1px #808080, inset 2px 2px #0A0A0A; }
html[data-skin="win98"] input[type="range"]::-moz-range-progress { background: transparent; }
html[data-skin="win98"] input[type="range"]::-moz-range-thumb { width: 11px; height: 20px; border-radius: 0; background: #C0C0C0; box-shadow: var(--w-raised); border: 0; }
html[data-skin="win98"] .chk { font-size: 12px; gap: 6px; }
html[data-skin="win98"] .chk small { color: #404040; font-size: 11px; }
html[data-skin="win98"] .chk input { width: 13px; height: 13px; }

html[data-skin="win98"] :is(.halt-btns button, .r-btns button, .dlg-btns button, .small-btn, .key-btns button) {
  border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised); font-weight: 400;
}
html[data-skin="win98"] :is(.halt-btns button, .r-btns button, .dlg-btns button, .small-btn, .key-btns button, .open-btn, .ghost-btn, .tf-row button, .buy-btn, .icon-btn, .pause-btn, .p-pads button):active { box-shadow: var(--w-pressed); }
html[data-skin="win98"] button.primary { background: #C0C0C0 !important; color: #000 !important; border-color: transparent !important; outline: 1px solid #000; outline-offset: 0; font-weight: 700 !important; }
html[data-skin="win98"] button.primary kbd { color: #000; }

/* ================================================================ title (Win98-Main) */
html[data-skin="win98"] #scr-title {
  top: 24px; bottom: 56px; left: max(0px, calc((100% - 1184px) / 2)); right: max(0px, calc((100% - 1184px) / 2));
}
html[data-skin="win98"] .t-head { order: 10; flex: none; height: 20px; padding: 2px 0 0; gap: 0; border: 0; }
html[data-skin="win98"] .t-head .brand { display: none; }
html[data-skin="win98"] .t-status { flex: 1; min-width: 0; gap: 2px; height: 100%; font-family: var(--sans); font-size: 11px; color: #000; }
html[data-skin="win98"] .t-status > span { display: flex; align-items: center; gap: 4px; padding: 0 8px; box-shadow: var(--w-field); }
html[data-skin="win98"] .t-status b { color: #000; font-weight: 400; }
html[data-skin="win98"] .t-status b.open { color: #A00000; font-weight: 700; }
html[data-skin="win98"] .t-status .w98-msg { display: flex; flex: 1; min-width: 0; overflow: hidden; }
html[data-skin="win98"] #t-clock { font-family: var(--mono); }

html[data-skin="win98"] .t-main {
  flex: 1 0 auto; min-height: 340px; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 10px;
  padding: 8px 6px 0; border-top: 1px solid #808080; box-shadow: inset 0 1px #FFFFFF;
}
html[data-skin="win98"] .t-hero {
  gap: 26px; padding: 44px 42px; justify-content: center; color: #fff;
  background: linear-gradient(180deg, #0000B0 0%, #000050 100%); box-shadow: var(--w-sunken);
}
html[data-skin="win98"] .t-kicker { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; color: #FFFF00; }
html[data-skin="win98"] .t-h1 { font-family: 'Nanum Gothic', var(--sans); font-size: clamp(44px, 5.8vw, 84px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; text-shadow: 4px 4px 0 #000; color: #fff; }
html[data-skin="win98"] .t-lead { font-size: 17px; line-height: 1.7; max-width: 460px; color: #fff; }
html[data-skin="win98"] .t-btns { gap: 10px; }
html[data-skin="win98"] :is(.open-btn, .ghost-btn) {
  height: 44px; padding: 0 16px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised);
  justify-content: center; gap: 8px;
}
html[data-skin="win98"] .open-btn { min-width: 170px; outline: 1px solid #000; font-size: 15px; font-weight: 800; }
html[data-skin="win98"] .open-btn:hover { filter: none; }
html[data-skin="win98"] .t-key { border: 0; padding: 0; font-family: var(--sans); font-size: 11px; font-weight: 400; }
html[data-skin="win98"] .ghost-btn { min-width: 130px; font-size: 14px; font-weight: 400; }
html[data-skin="win98"] .ghost-btn:hover { border: 0; }
html[data-skin="win98"] .ghost-btn[aria-pressed="true"] { color: #000; box-shadow: var(--w-pressed); background: #E4E4E4; }
html[data-skin="win98"] .ghost-btn[aria-pressed="true"] .t-onoff { background: #000080; color: #fff; border-radius: 0; }
html[data-skin="win98"] :is(.open-btn, .ghost-btn, .buy-btn, .tf-row button, .diff):focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

html[data-skin="win98"] .t-card {
  height: auto; min-height: 300px; align-self: stretch; border: 0; border-radius: 0; padding: 3px; overflow: hidden;
  background: #C0C0C0; box-shadow: var(--w-raised);
}
html[data-skin="win98"] .t-card::before { content: ''; position: absolute; left: 3px; right: 3px; top: 21px; bottom: 3px; background: #000; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .t-card-head {
  position: static; height: 16px; align-items: center; padding: 0 4px; background: var(--w-pbar); color: #fff;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
}
html[data-skin="win98"] #t-sym::before { content: '미리보기 - '; }
html[data-skin="win98"] #t-chg { position: absolute; top: 34px; right: 18px; z-index: 1; font-family: var(--mono); font-size: 12px; }
html[data-skin="win98"] .t-card-foot { top: 3px; bottom: auto; right: 8px; height: 16px; display: flex; align-items: center; color: #fff; font-family: var(--sans); font-size: 11px; }
html[data-skin="win98"] #title-chart { top: 58px; height: calc(100% - 104px); }
html[data-skin="win98"] .t-card::after { top: 46px; bottom: 44px; background: #fff; }
html[data-skin="win98"] .t-now { bottom: 22px; padding: 1px 4px; background: #fff; color: #000; font-family: var(--mono); font-weight: 700; }

html[data-skin="win98"] .t-how {
  position: relative; margin: 14px 6px 0; padding: 16px 12px 12px; gap: 16px;
  border: 1px solid #808080; box-shadow: 1px 1px 0 #FFFFFF, inset 1px 1px 0 #FFFFFF;
}
html[data-skin="win98"] .t-how::before { content: '게임 방법'; position: absolute; left: 8px; top: -8px; padding: 0 4px; background: #C0C0C0; font-size: 12px; }
html[data-skin="win98"] .t-step { position: relative; border: 0; padding: 0 0 0 24px; gap: 4px; }
html[data-skin="win98"] .t-step::before { content: ''; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; background: #fff; box-shadow: inset -1px -1px #0A0A0A, inset 1px 1px #808080; }
html[data-skin="win98"] .t-step.s-up::before { background: var(--w-up); box-shadow: inset -1px -1px #0A0A0A, inset 1px 1px #FFFFFF; }
html[data-skin="win98"] .t-step.s-dn::before { background: var(--w-dn); box-shadow: inset -1px -1px #0A0A0A, inset 1px 1px #FFFFFF; }
html[data-skin="win98"] .t-step.s-ac::before { background: #FFFF00; box-shadow: inset -1px -1px #0A0A0A, inset 1px 1px #FFFFFF; }
html[data-skin="win98"] .t-step b { font-size: 13px; }
html[data-skin="win98"] .t-step span { font-size: 12px; line-height: 1.5; color: #000; }

html[data-skin="win98"] .t-tape {
  height: 26px; margin: 10px 6px 10px; padding: 0 4px 0 2px; gap: 22px; border: 0;
  background: #fff; box-shadow: var(--w-sunken); font-family: var(--mono); font-size: 12px;
}
html[data-skin="win98"] .t-tape-tag { height: 20px; display: flex; align-items: center; margin-left: 1px; padding: 0 8px; border-radius: 0; background: #000080; color: #fff; font-weight: 700; }
html[data-skin="win98"] .t-disc { color: #606060; font-family: var(--sans); }

/* ================================================================ select (Win98-Select) */
html[data-skin="win98"] #scr-select.active { overflow-x: hidden; }
html[data-skin="win98"] .topbar {
  position: relative; z-index: 1; flex-wrap: wrap; align-items: center; gap: 6px 6px; padding: 4px 6px 0;
  background: none; border: 0; border-top: 1px solid #808080; box-shadow: inset 0 1px #FFFFFF;
}
html[data-skin="win98"] .topbar::before { content: ''; flex: none; width: 3px; height: 22px; box-shadow: inset -1px -1px #808080, inset 1px 1px #FFFFFF; }
html[data-skin="win98"] .topbar .brand { display: none; }
html[data-skin="win98"] .w98-lbl { display: block; white-space: nowrap; }
html[data-skin="win98"] .search { margin-left: 0; width: 320px; height: 22px; padding: 0 4px; gap: 4px; border: 0; border-radius: 0; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .search:focus-within { border: 0; }
html[data-skin="win98"] .search-ico { display: none; }
html[data-skin="win98"] .search input { color: #000; font-family: var(--mono); font-size: 12px; }
html[data-skin="win98"] .search input::placeholder { color: #808080; }
html[data-skin="win98"] .icon-btn {
  order: 1; width: auto; height: 22px; padding: 0 8px; gap: 4px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised);
}
html[data-skin="win98"] .icon-btn svg { width: 14px; height: 14px; }
html[data-skin="win98"] .w98-txt { display: inline; }
html[data-skin="win98"] .clock {
  order: 2; margin-left: auto; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 8px;
  background: #fff; box-shadow: var(--w-chip); color: #000; font-family: var(--mono); font-size: 12px;
}
html[data-skin="win98"] .clock::before { content: '●'; color: #008000; }
html[data-skin="win98"] .tabs {
  order: 9; flex: 0 0 100%; height: 22px; display: flex; align-items: flex-end; gap: 0; padding: 0 0 0 2px; margin-top: 2px;
  background: none; border: 0; border-radius: 0; overflow: visible;
}
html[data-skin="win98"] .tabs button {
  height: 19px; padding: 0 14px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; font-size: 12px; font-weight: 400;
  box-shadow: inset 1px 1px #FFFFFF, inset 2px 2px #DFDFDF, inset -1px 0 #0A0A0A, inset -2px 0 #808080;
}
html[data-skin="win98"] .tabs button:hover { color: #000; }
html[data-skin="win98"] .tabs button.on { position: relative; height: 22px; margin-bottom: -2px; background: #C0C0C0; color: #000; font-weight: 700; }
html[data-skin="win98"] .tabs button .cnt { color: #000; font-family: var(--mono); }
html[data-skin="win98"] .sel-grid { margin: 0 6px 4px; padding: 10px; gap: 10px; grid-template-columns: 330px minmax(0, 1fr) 330px; background: #C0C0C0; box-shadow: var(--w-raised); }
html[data-skin="win98"] #scr-select .panel { background: none; border: 0; border-radius: 0; }
html[data-skin="win98"] .watch { gap: 4px; }
html[data-skin="win98"] .watch .panel-head { padding: 0; border: 0; font-size: 12px; }
html[data-skin="win98"] .watch .panel-head b { font-size: 12px; font-weight: 400; }
html[data-skin="win98"] .watch .panel-head b::after { content: '(W)'; }
html[data-skin="win98"] .panel-head .hint { color: #404040; font-family: var(--sans); font-size: 12px; }
html[data-skin="win98"] .watch-list { padding: 2px; gap: 0; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .watch-list li { padding: 7px 5px; border: 0; border-radius: 0; border-bottom: 1px dotted #C0C0C0; }
html[data-skin="win98"] .watch-list li:hover { background: none; }
html[data-skin="win98"] .watch-list li.on { background: #000080; color: #fff; border-color: #000080; outline: 1px dotted #FFFF00; outline-offset: -2px; }
html[data-skin="win98"] .w-name { font-size: 13px; }
html[data-skin="win98"] .w-sym { color: #606060; font-size: 10px; }
html[data-skin="win98"] .w-chg { font-size: 12px; }
html[data-skin="win98"] .w-grade { color: #000080; font-size: 11px; }
html[data-skin="win98"] .watch-list li.on :is(.w-sym, .w-chg, .w-del) { color: #fff !important; }
html[data-skin="win98"] .watch-list li.on .w-grade { color: #FFFF00; }

html[data-skin="win98"] .detail { padding: 0; gap: 8px; }
html[data-skin="win98"] .d-sub { color: #404040; font-size: 11px; }
html[data-skin="win98"] .d-name { font-family: 'Nanum Gothic', var(--sans); font-size: 30px; font-weight: 800; }
html[data-skin="win98"] .d-price { min-height: 48px; justify-content: center; gap: 3px; padding: 4px 10px; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] #d-price { font-size: 24px; line-height: 1; }
html[data-skin="win98"] .d-chg { font-size: 12px; font-weight: 400; }
html[data-skin="win98"] .tf-row { gap: 4px; }
html[data-skin="win98"] .tf-row button {
  height: 26px; padding: 0 14px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised);
  font-size: 12px; font-weight: 400;
}
html[data-skin="win98"] .tf-row button.on { background: #E4E4E4; color: #000; box-shadow: var(--w-pressed); font-weight: 700; }
html[data-skin="win98"] .tf-row button.live { border: 0; color: #000; }
html[data-skin="win98"] .tf-row button.live.on { border: 0; color: var(--w-up); background: #E4E4E4; }
html[data-skin="win98"] .tf-row button:disabled { opacity: 1; color: #808080; text-shadow: 1px 1px 0 #FFFFFF; }
html[data-skin="win98"] .chart-box { border: 0; border-radius: 0; background: #000; box-shadow: var(--w-sunken); }
html[data-skin="win98"] #preview { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
html[data-skin="win98"] .np-head { color: #C0C0C0; }
html[data-skin="win98"] .np-strip { border-radius: 0; background: #101010; box-shadow: inset 1px 1px #404040, inset -1px -1px #202020; }
html[data-skin="win98"] .chart-msg { color: #C0C0C0; }
html[data-skin="win98"] .stats { gap: 8px; }
html[data-skin="win98"] .stat { padding: 0; gap: 3px; border: 0; border-radius: 0; }
html[data-skin="win98"] .stat .k { color: #000; font-size: 11px; }
html[data-skin="win98"] .stat .v, html[data-skin="win98"] .stat .vol-bar {
  height: 24px; display: flex; align-items: center; padding: 0 6px; margin: 0; background: #fff; box-shadow: var(--w-sunken); font-size: 13px;
}
html[data-skin="win98"] .stat .v.sans { font-size: 12px; }
html[data-skin="win98"] .stat .vol-bar { gap: 2px; padding: 0 6px; }
html[data-skin="win98"] .vol-bar i { height: 10px; border-radius: 0; background: #D8D8D8; }
html[data-skin="win98"] .vol-bar i.on { background: #000080; }
html[data-skin="win98"] .stat.wide { color: #404040; }

html[data-skin="win98"] .ticket { gap: 10px; padding: 3px 3px 6px; background: #C0C0C0 !important; box-shadow: var(--w-raised); }
html[data-skin="win98"] .ticket .panel-head { height: 18px; padding: 0 4px; border: 0; background: var(--w-tbar); color: #fff; }
html[data-skin="win98"] .ticket .panel-head b { font-size: 12px; }
html[data-skin="win98"] .ticket .panel-head .hint { color: #fff; font-family: var(--mono); font-size: 12px; }
html[data-skin="win98"] .ticket > :not(.panel-head) { margin: 0 8px; }
html[data-skin="win98"] .tk-sec { position: relative; gap: 4px; margin-top: 6px !important; padding: 12px 8px 8px; border: 1px solid #808080; box-shadow: 1px 1px 0 #FFFFFF, inset 1px 1px 0 #FFFFFF; }
html[data-skin="win98"] .tk-label { position: absolute; left: 6px; top: -8px; padding: 0 4px; background: #C0C0C0; color: #000; font-size: 12px; font-weight: 400; }
html[data-skin="win98"] .diff-list { gap: 2px; }
html[data-skin="win98"] .diff { gap: 10px; padding: 7px 6px; border: 0; border-radius: 0; background: none; color: #000; }
html[data-skin="win98"] .diff:hover { border: 0; }
html[data-skin="win98"] .diff::before {
  content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #fff;
  box-shadow: inset -1px -1px #FFFFFF, inset 1px 1px #808080, inset -2px -2px #DFDFDF, inset 2px 2px #0A0A0A;
}
html[data-skin="win98"] .diff.on { padding: 7px 6px; border: 0; background: none; outline: 1px dotted #000; outline-offset: -1px; }
html[data-skin="win98"] .diff.on::before { background: radial-gradient(circle, #000 0 2px, #fff 2.5px); }
html[data-skin="win98"] .diff .ico { width: 22px; gap: 2px; }
html[data-skin="win98"] .diff .ico i { border-radius: 0; background: var(--w-up); }
html[data-skin="win98"] .diff .ico i.u2 { opacity: 1; background: #FF8080; }
html[data-skin="win98"] .diff .ico i.d2 { opacity: 1; background: #8080FF; }
html[data-skin="win98"] .diff .ico i.d { background: var(--w-dn); }
html[data-skin="win98"] .diff .ico i.m { background: #C0A000; }
html[data-skin="win98"] .diff .t { font-size: 14px; }
html[data-skin="win98"] .diff .s { color: #404040; font-size: 11px; }
html[data-skin="win98"] .diff .c { color: #000; font-size: 11px; }
html[data-skin="win98"] .diff.on .c { color: #000; font-weight: 700; }
html[data-skin="win98"] .field { gap: 4px; }
html[data-skin="win98"] .field-row { font-size: 12px; }
html[data-skin="win98"] .field-row span { color: #000; }
html[data-skin="win98"] .field-row b { color: #000; }
html[data-skin="win98"] .slider {
  height: 30px; background: linear-gradient(90deg, #000 0 1px, transparent 1px) 5px 100% / calc((100% - 11px) / 10) 4px repeat-x;
}
html[data-skin="win98"] .slider::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #FFFFFF, inset 2px 2px #0A0A0A; }
html[data-skin="win98"] .slider::-webkit-slider-thumb { width: 11px; height: 20px; margin-top: -8px; border-radius: 0; background: #C0C0C0; box-shadow: var(--w-raised); }
html[data-skin="win98"] .slider:focus-visible::-webkit-slider-thumb { box-shadow: var(--w-raised), 0 0 0 1px #000; }
html[data-skin="win98"] .ticket .chk { gap: 6px; font-size: 12px; }
html[data-skin="win98"] .ticket .chk input { width: 13px; height: 13px; }
html[data-skin="win98"] .ticket .chk small { font-size: 11px; color: #404040; }
html[data-skin="win98"] .best { position: relative; margin-top: 6px !important; padding: 12px 10px 10px; border: 1px solid #808080; border-radius: 0; box-shadow: 1px 1px 0 #FFFFFF, inset 1px 1px 0 #FFFFFF; }
html[data-skin="win98"] .best-k { position: absolute; left: 6px; top: -8px; padding: 0 4px; background: #C0C0C0; color: #000; font-size: 12px; }
html[data-skin="win98"] .best-v { font-size: 12px; }
html[data-skin="win98"] .best-v.none { color: #404040; }
html[data-skin="win98"] .best-g { flex: none; width: 40px; height: 34px; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: var(--w-sunken); color: #000080; font-family: 'Nanum Gothic', var(--sans); font-size: 20px; }
html[data-skin="win98"] .best-g.none { color: #808080; }
html[data-skin="win98"] .buy-btn {
  height: 58px; border: 0; border-radius: 0; outline: 1px solid #000; background: #C0C0C0; color: #000; box-shadow: var(--w-raised); gap: 12px;
}
html[data-skin="win98"] .buy-btn::before {
  content: ''; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M8 1l7 9H11v5H5v-5H1z' fill='%23D40000' stroke='%23000'/%3E%3C/svg%3E");
}
html[data-skin="win98"] .buy-btn b { padding: 2px 4px; outline: 1px dotted #000; font-size: 18px; font-weight: 800; }
html[data-skin="win98"] .buy-btn .kb { border: 0; padding: 0; font-size: 11px; }
html[data-skin="win98"] .buy-btn:not(:disabled):hover { filter: none; }
html[data-skin="win98"] .buy-btn:disabled { opacity: 1; color: #808080; text-shadow: 1px 1px 0 #FFFFFF; }
html[data-skin="win98"] .buy-btn:disabled b { outline: 0; }
html[data-skin="win98"] .keys-help { margin-bottom: 0 !important; color: #000; font-size: 11px; }
html[data-skin="win98"] #scr-select .w98-status { margin: 0; }

/* ================================================================ result (Win98-Report) */
html[data-skin="win98"] #scr-result {
  top: 22px; bottom: 52px; left: max(0px, calc((100% - 1240px) / 2)); right: max(0px, calc((100% - 1240px) / 2));
}
html[data-skin="win98"] #scr-result.active { display: flex; flex-direction: column; overflow: hidden; }
html[data-skin="win98"] .w98-rtool { flex: none; height: 30px; display: flex; align-items: center; gap: 4px; padding: 0 4px; overflow: hidden; white-space: nowrap; }
html[data-skin="win98"] .w98-rtool i { height: 22px; display: flex; align-items: center; padding: 0 10px; box-shadow: var(--w-raised); font-style: normal; color: #808080; text-shadow: 1px 1px 0 #FFFFFF; }
html[data-skin="win98"] .report {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px; gap: 0; align-items: center;
  background: #808080; box-shadow: var(--w-sunken);
}
html[data-skin="win98"] :is(.r-head, .r-grid) { width: min(1060px, 100%); background: #fff; }
html[data-skin="win98"] .r-head {
  flex: none; padding: 28px 36px 14px; box-shadow: 5px 5px 0 #000;
  background: linear-gradient(#000, #000) 36px calc(100% - 4px) / calc(100% - 72px) 1px no-repeat,
              linear-gradient(#000, #000) 36px calc(100% - 7px) / calc(100% - 72px) 1px no-repeat, #fff;
}
html[data-skin="win98"] .r-kicker { color: #000; font-family: var(--mono); font-size: 12px; }
html[data-skin="win98"] .r-title { font-family: 'Nanum Gothic', var(--sans); font-size: 32px; font-weight: 800; }
html[data-skin="win98"] .r-title small { color: #404040; font-size: 14px; }
html[data-skin="win98"] .badge { border-radius: 0; font-size: 13px; font-weight: 700; padding: 5px 10px; color: #000080; }
html[data-skin="win98"] .badge.b-fc { color: #007000; }
html[data-skin="win98"] .badge.b-beat { color: #000080; }
html[data-skin="win98"] :is(.badge.b-new, .badge.b-fail) { color: #C00000; }
html[data-skin="win98"] .r-grid {
  flex: 1 0 auto; min-height: 460px; padding: 14px 36px 18px; gap: 16px 22px; grid-template-rows: auto minmax(0, 1fr) auto; box-shadow: 5px 5px 0 #000;
}
html[data-skin="win98"] .r-grid::after {
  content: 'RHYTHM STOCK 98 · 게임용으로 재구성한 시세 · 투자 조언이 아닙니다'; grid-column: 1 / -1;
  padding-top: 8px; border-top: 1px solid #000; color: #404040; font-size: 10px;
}
html[data-skin="win98"] .r-grid .panel { padding: 0; gap: 8px; background: none; border: 0; border-radius: 0; }
html[data-skin="win98"] .r-grid .r-grade { border: 1px solid #000; padding: 20px !important; gap: 18px !important; }
html[data-skin="win98"] .r-label { color: #000; font-size: 12px; font-weight: 700; padding-bottom: 4px; border-bottom: 1px solid #000; }
html[data-skin="win98"] .r-grade .r-label { border: 0; font-size: 13px; }
html[data-skin="win98"] .r-label .hint { color: #000; font-weight: 400; }
html[data-skin="win98"] .stamp { --g: #C00000 !important; width: 200px; height: 200px; border: 7px double var(--g); opacity: 0.9; }
html[data-skin="win98"] .stamp span { font-weight: 700; }
html[data-skin="win98"] .stamp .grade { font-family: 'Nanum Gothic', var(--sans); font-weight: 800; font-size: 92px; }
html[data-skin="win98"] .stamp[data-len="3"] .grade { font-size: 66px; }
html[data-skin="win98"] .r-acc { font-size: 18px; }
html[data-skin="win98"] .r-new { color: #404040; font-size: 12px; }
html[data-skin="win98"] .r-serial { color: #404040; }
html[data-skin="win98"] .r-value { font-size: 32px; }
html[data-skin="win98"] .r-ret { font-size: 16px; font-weight: 700; }
html[data-skin="win98"] .r-vs { padding-top: 8px; border-top: 1px dashed #808080; color: #000; font-size: 12px; }
html[data-skin="win98"] .j-list { gap: 9px; }
html[data-skin="win98"] .j-row { grid-template-columns: 56px minmax(0, 1fr) 40px; gap: 10px; font-size: 13px; }
html[data-skin="win98"] .j-row .bar { height: 12px; padding: 1px; border: 1px solid #000; border-radius: 0; background: #fff; }
html[data-skin="win98"] .j-row .bar i { background: #C0C0C0; }
html[data-skin="win98"] .j-row.j0 .bar i { background: #000080; }
html[data-skin="win98"] .j-row.j1 .bar i { background: #007000; }
html[data-skin="win98"] .j-row.j2 .bar i { background: #808080; }
html[data-skin="win98"] .j-foot { color: #404040; font-size: 11px; }
html[data-skin="win98"] .r-tfoot { color: #404040; font-size: 11px; }
html[data-skin="win98"] .small-btn { height: 26px; color: #000; font-size: 12px; }
html[data-skin="win98"] .small-btn:hover { background: #C0C0C0; }
html[data-skin="win98"] #scr-result .r-btns { flex: none; width: calc(100% + 32px); margin: 16px -16px -16px; padding: 9px 8px; gap: 8px; background: #C0C0C0; }
html[data-skin="win98"] #scr-result .r-btns button { height: 32px; min-width: 140px; padding: 0 14px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; font-size: 13px; font-weight: 400; }
html[data-skin="win98"] #scr-result .r-btns button.primary { min-width: 160px; font-weight: 700; }

/* ================================================================ play (Win98-Play) */
html[data-skin="win98"] #scr-play.active {
  grid-template-columns: 248px minmax(0, 1fr) 400px;
  grid-template-rows: 18px 20px 30px 52px minmax(0, 1fr) 68px 161px 21px;
  grid-template-areas:
    "w98t w98t w98t" "w98m w98m w98m" "mkt mkt mkt" "head head head"
    "left hw right" "left bot right" "left cdl right" "tick tick tick";
  gap: 2px;
}
html[data-skin="win98"] #scr-play .w98-title { grid-area: w98t; }
html[data-skin="win98"] #scr-play .w98-menu { grid-area: w98m; margin-top: -2px; }

/* toolbar (market strip) */
html[data-skin="win98"] .p-mkt { gap: 4px; padding: 0 4px; background: none; border: 0; border-top: 1px solid #808080; box-shadow: inset 0 1px #FFFFFF; font-family: var(--sans); font-size: 11px; }
html[data-skin="win98"] .p-mkt::before { content: ''; flex: none; width: 3px; height: 20px; box-shadow: inset -1px -1px #808080, inset 1px 1px #FFFFFF; }
html[data-skin="win98"] .pm-brand { display: none; }
html[data-skin="win98"] .w98-tools { flex: none; display: flex; gap: 4px; padding-right: 6px; margin-right: 2px; border-right: 1px solid #FFFFFF; box-shadow: 1px 0 #808080 inset; box-shadow: none; }
html[data-skin="win98"] .w98-tools i { height: 22px; display: flex; align-items: center; padding: 0 7px; box-shadow: var(--w-raised); font-style: normal; }
html[data-skin="win98"] .w98-tools i.on { background: #E0E0E0; box-shadow: var(--w-pressed); font-weight: 700; }
html[data-skin="win98"] .pm-badge { height: 20px; display: flex; align-items: center; padding: 0 6px; border-radius: 0; background: #000080; color: #fff; font-weight: 700; }
html[data-skin="win98"] .pm-badge.replay { background: #808080; color: #fff; }
html[data-skin="win98"] .pm-idx { gap: 4px; }
html[data-skin="win98"] .pm-idx > span { height: 20px; align-items: center; gap: 5px; padding: 0 6px; background: #fff; box-shadow: var(--w-chip); }
html[data-skin="win98"] .pm-idx .n { color: #404040; }
html[data-skin="win98"] .pm-idx b, html[data-skin="win98"] .pm-idx .c-up, html[data-skin="win98"] .pm-idx .c-dn { font-family: var(--mono); }
html[data-skin="win98"] .pm-status { color: #000; }
html[data-skin="win98"] .pm-clock { height: 20px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: #fff; box-shadow: var(--w-chip); color: #000; font-weight: 700; }
html[data-skin="win98"] .pm-clock::before { content: '●'; color: #008000; }

/* quote header */
html[data-skin="win98"] .p-head { gap: 10px; padding: 0 8px; background: #C0C0C0; border: 0; box-shadow: var(--w-raised); }
html[data-skin="win98"] .ph-name { gap: 4px; }
html[data-skin="win98"] .ph-name > div { align-items: center; gap: 6px; }
html[data-skin="win98"] .ph-name b { font-size: 15px; font-weight: 800; }
html[data-skin="win98"] #ph-sym { order: -1; height: 21px; display: flex; align-items: center; padding: 0 6px; background: #fff; box-shadow: var(--w-sunken); color: #000; font-size: 12px; font-weight: 700; }
html[data-skin="win98"] #ph-meta { color: #404040; }
html[data-skin="win98"] .ph-price { width: 150px; height: 42px; justify-content: center; align-items: flex-end; padding: 0 8px; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .ph-price b { font-size: 22px; }
html[data-skin="win98"] .ph-price span { font-size: 11px; }
html[data-skin="win98"] .ph-stats { gap: 0; padding: 2px; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .ph-stats > div { gap: 0; }
html[data-skin="win98"] .ph-stats span { padding: 2px 8px; background: #ECECEC; border-right: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0; color: #404040; }
html[data-skin="win98"] .ph-stats b { padding: 3px 8px 2px; text-align: right; border-right: 1px solid #E4E4E4; }
html[data-skin="win98"] .ph-pf-l { color: #000; }
html[data-skin="win98"] #ph-pf { height: 22px; display: flex; align-items: center; padding: 0 8px; background: #fff; box-shadow: var(--w-sunken); font-size: 14px; }

/* panels: raised frame + title strip + sunken body (pseudo-element) */
html[data-skin="win98"] :is(.p-left > section, .ob, .tp, .fl, .p-candle, .p-hw) {
  position: relative; isolation: isolate; padding: 3px; border: 0 !important; background: #C0C0C0; box-shadow: var(--w-raised);
}
html[data-skin="win98"] :is(.p-left > section, .ob, .tp, .fl, .p-candle, .p-hw)::after {
  content: ''; position: absolute; z-index: -1; left: 3px; right: 3px; top: 21px; bottom: 3px; background: #fff; box-shadow: var(--w-sunken);
}
html[data-skin="win98"] :is(.p-candle, .p-hw)::after { background: #000; }
html[data-skin="win98"] :is(.pl-h, .ps-headr, .pc-head) {
  flex: none; height: 16px; margin: 0 0 2px; padding: 0 4px; gap: 8px; align-items: center; border: 0;
  background: var(--w-pbar); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden;
}
html[data-skin="win98"] :is(.pl-h, .ps-headr, .pc-head) b { font-size: 11px; font-weight: 700; }
html[data-skin="win98"] :is(.pl-h, .ps-headr, .pc-head) span { color: #fff; font-size: 11px; }
html[data-skin="win98"] .ps-headr .live { color: #fff; }
html[data-skin="win98"] .p-hw::before {
  content: '차트 하이웨이 — 판정선 · 노트는 오른쪽에서 들어옵니다'; display: flex; align-items: center; height: 16px; padding: 0 4px;
  background: var(--w-tbar); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden;
}
html[data-skin="win98"] #play { inset: 23px 5px 5px; width: calc(100% - 10px); height: calc(100% - 28px); }

/* left column */
html[data-skin="win98"] .p-left { gap: 2px; background: none; border: 0; }
html[data-skin="win98"] .p-left > section { gap: 6px; padding: 3px 3px 7px; }
html[data-skin="win98"] .p-left > section > :not(.pl-h) { margin: 0 6px; }
html[data-skin="win98"] .pl-h + * { margin-top: 4px !important; }
html[data-skin="win98"] .pl-foot { color: #404040; }
html[data-skin="win98"] .inv-row span { color: #000; }
html[data-skin="win98"] .inv-bar { border-radius: 0; background: #E8E8E8; box-shadow: inset 1px 1px #808080; }
html[data-skin="win98"] .inv-bar i { border-radius: 0; }
html[data-skin="win98"] .inv-bar::after { background: #808080; }
html[data-skin="win98"] #str-svg { box-sizing: border-box; height: 48px; background: #000; border: 2px solid; border-color: #808080 #FFFFFF #FFFFFF #808080; }
html[data-skin="win98"] #str-base { stroke: #808080; }
html[data-skin="win98"] #str-line { stroke: var(--note-up); }
html[data-skin="win98"] #str-line.dn { stroke: var(--note-dn); }
html[data-skin="win98"] .str-bar { height: 10px; padding: 1px; border-radius: 0; background: var(--w-dn); box-shadow: var(--w-field); }
html[data-skin="win98"] .str-lbl .c-up { color: #A00000; }
html[data-skin="win98"] .str-lbl .c-dn { color: #0000C0; }
html[data-skin="win98"] .rel-row { border-bottom: 1px dotted #C0C0C0; }
html[data-skin="win98"] .rel-row > div:first-child span { color: #606060; }
html[data-skin="win98"] .feed-rows { gap: 0; }
html[data-skin="win98"] .feed-row { padding: 4px 5px; border-radius: 0; border-bottom: 1px dotted #A0A0A0; }
html[data-skin="win98"] .feed-row.ahead { background: #FFFFE1; }
html[data-skin="win98"] .feed-row .t { color: #606060; }
html[data-skin="win98"] .feed-row .k { border-radius: 0; }
html[data-skin="win98"] .feed-row .a { border-radius: 0; background: #000080; color: #fff; }
html[data-skin="win98"] #scr-play .pl-feed .pl-h .c-ac { font-size: 0; color: #fff; }
html[data-skin="win98"] #scr-play .pl-feed .pl-h .c-ac::before { content: '노란 줄 = 곧 판정선'; font-size: 11px; }

/* bottom bar */
html[data-skin="win98"] .p-bot {
  grid-template-columns: minmax(150px, 220px) minmax(0, 268px) minmax(0, 1fr) 96px; gap: 12px; padding: 3px 10px;
  background: #C0C0C0; border: 0; box-shadow: var(--w-raised);
}
html[data-skin="win98"] .pb-margin { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
html[data-skin="win98"] .pb-ml { display: contents; }
html[data-skin="win98"] #pb-mlabel { order: 1; color: #000; font-size: 11px; }
html[data-skin="win98"] .pb-gauge { order: 2; height: 14px; padding: 2px; border-radius: 0; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] #pb-mval { order: 3; font-size: 11px; }
html[data-skin="win98"] .pb-gauge i { border-radius: 0; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
html[data-skin="win98"] .pb-chips { order: 4; grid-column: 1 / -1; gap: 7px; }
html[data-skin="win98"] .pb-chips span { display: flex; align-items: center; gap: 3px; padding: 0; border: 0; border-radius: 0; background: none; color: #606060; font-size: 11px; }
html[data-skin="win98"] .pb-chips span::before { content: ''; flex: none; width: 11px; height: 11px; background: #fff no-repeat center; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .pb-chips span.on { border: 0; background: none; color: #000; }
html[data-skin="win98"] .pb-chips span.on::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M0 3l2 2 5-5v2L2 7 0 5z'/%3E%3C/svg%3E"); }
html[data-skin="win98"] .pb-judges div { height: 40px; justify-content: center; padding: 3px 6px; border-radius: 0; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .pb-judges span { color: #404040; }
html[data-skin="win98"] .pb-judges b { line-height: 1; }
html[data-skin="win98"] .pbc-top { color: #000; }
html[data-skin="win98"] #pb-combo { font-size: 18px; color: #000; }
html[data-skin="win98"] .pbc-sess { color: #000; }
html[data-skin="win98"] .pbc-bar { height: 12px; padding: 2px; border-radius: 0; background: #fff; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .pbc-bar i { border-radius: 0; background: #000080; }
html[data-skin="win98"] .pause-btn { width: auto; height: 36px; gap: 6px; padding: 0 6px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised); }

/* 1-minute candles */
html[data-skin="win98"] .p-candle { background: #C0C0C0; }
html[data-skin="win98"] .pc-lg { color: #fff; }
html[data-skin="win98"] .pc-prog { color: #fff; }
html[data-skin="win98"] .pc-pbar { height: 6px; border-radius: 0; background: #808080; }
html[data-skin="win98"] #pc-pfill { border-radius: 0; background: #DFDFDF; }
html[data-skin="win98"] #pc-pnow { background: #FFFF00; }
html[data-skin="win98"] .lg-ma5 { background: #FFFF00; }
html[data-skin="win98"] .lg-ma20 { background: #C0C0C0; }
html[data-skin="win98"] .lg-vwap { border-top-color: #00FFFF !important; }
html[data-skin="win98"] #pc-cv { margin: 2px 2px 2px; width: calc(100% - 4px); }

/* right column */
html[data-skin="win98"] .p-right { gap: 2px; grid-template-rows: minmax(0, 1fr) 148px auto; background: none; border: 0; }
html[data-skin="win98"] .ob { border-right: 0; }
html[data-skin="win98"] .ob-rows, html[data-skin="win98"] .tp-rows { margin: 0 2px; }
html[data-skin="win98"] .ob-row { border-bottom: 1px solid #F0F0F0; padding: 0 6px; }
html[data-skin="win98"] .ob-row.a, html[data-skin="win98"] .ob-row.b { background: none; }
html[data-skin="win98"] .ob-row.a i { background: rgba(0, 0, 255, 0.12); }
html[data-skin="win98"] .ob-row.b i { background: rgba(212, 0, 0, 0.12); }
html[data-skin="win98"] .ob-row .pc { color: #606060; }
html[data-skin="win98"] .ob-row .q { color: #000; }
html[data-skin="win98"] .ob-row.now { outline: 0; background: #000080; }
html[data-skin="win98"] .ob-row.now :is(b, span) { color: #fff !important; }
html[data-skin="win98"] .ob-row.now i { background: rgba(255, 255, 255, 0.18); }
html[data-skin="win98"] .ob-tot { margin: 0 2px 2px; padding: 3px 6px; border-top: 1px solid #808080; }
html[data-skin="win98"] .ob-lim { color: #404040; }
html[data-skin="win98"] .tp-colh, html[data-skin="win98"] .fl-colh { gap: 0; height: 18px; margin: 0 2px; padding: 0; color: #000; }
html[data-skin="win98"] :is(.tp-colh, .fl-colh) > span { height: 18px; display: flex; align-items: center; justify-content: flex-end; padding: 0 4px; background: #C0C0C0; box-shadow: var(--w-raised); color: #000; font-size: 11px; }
html[data-skin="win98"] :is(.tp-colh, .fl-colh) > span:first-child { justify-content: flex-start; }
html[data-skin="win98"] .fl-colh > span:nth-child(-n+3) { justify-content: flex-start; }
html[data-skin="win98"] .tp-row span:first-child { color: #606060; }
html[data-skin="win98"] .tp-row.big.u { background: #FFE4E4; }
html[data-skin="win98"] .tp-row.big.d { background: #E4EAFF; }
html[data-skin="win98"] .fl .ps-headr { padding: 0 4px; }
html[data-skin="win98"] .fl-row:not(.fl-colh) { margin: 0 2px; padding: 0 6px; }
html[data-skin="win98"] .fl-row > :nth-child(1), html[data-skin="win98"] .fl-row > :nth-child(6) { color: #606060; }
html[data-skin="win98"] .fl-empty { color: #404040; }
html[data-skin="win98"] .pos { position: relative; gap: 6px; padding: 3px 3px 6px; border: 0; background: #C0C0C0; box-shadow: var(--w-raised); }
html[data-skin="win98"] .pos::before { content: '잔고'; height: 16px; display: flex; align-items: center; padding: 0 4px; background: var(--w-pbar); color: #fff; font-size: 11px; font-weight: 700; }
html[data-skin="win98"] .pos::after { content: '수수료·세금 미반영'; position: absolute; top: 3px; right: 7px; height: 16px; display: flex; align-items: center; color: #fff; font-size: 11px; }
html[data-skin="win98"] .pos-cards { gap: 6px; padding: 0 4px; }
html[data-skin="win98"] .pos-cards div { padding: 0; gap: 2px; border-radius: 0; background: none; }
html[data-skin="win98"] .pos-cards span { color: #000; font-size: 11px; }
html[data-skin="win98"] .pos-cards b { height: 20px; display: flex; align-items: center; justify-content: flex-end; padding: 0 5px; background: #fff; box-shadow: var(--w-sunken); font-size: 12px; }
html[data-skin="win98"] .pos-foot { padding: 0 4px; color: #000; }

/* news tape → status bar */
html[data-skin="win98"] .p-tick { gap: 2px; background: none; border: 0; font-size: 11px; }
html[data-skin="win98"] .pt-tag { padding: 0 8px; background: #000080; color: #fff; font-weight: 700; }
html[data-skin="win98"] .pt-win { box-shadow: var(--w-field); }
html[data-skin="win98"] .pt-run .sys { color: #404040; }

/* circuit-breaker dialog */
html[data-skin="win98"] .overlay { background: rgba(0, 0, 0, 0.25); backdrop-filter: none; }
html[data-skin="win98"] .halt { padding: 3px 3px 14px; border: 0; border-radius: 0; background: #C0C0C0; box-shadow: var(--w-window), 2px 2px 0 rgba(0, 0, 0, 0.5); color: #000; }
html[data-skin="win98"] .halt-tag { height: 18px; display: flex; align-items: center; padding: 0 4px; background: var(--w-tbar); color: #fff; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0; text-align: left; }
html[data-skin="win98"] .halt h2 { margin: 16px 12px 4px; font-size: 20px; }
html[data-skin="win98"] .halt p { margin: 0 12px 14px; color: #000; }
html[data-skin="win98"] .halt-btns { gap: 6px; padding: 0 14px; }
html[data-skin="win98"] .halt-btns button { padding: 7px; }

/* ---------------------------------------------------------------- play: narrower desktops (mirrors play.css) */
@media (max-width: 1360px) {
  html[data-skin="win98"] #scr-play.active { grid-template-columns: 224px minmax(0, 1fr) 360px; }
}
@media (max-width: 1180px) {
  html[data-skin="win98"] #scr-play.active { grid-template-columns: 0 minmax(0, 1fr) 340px; column-gap: 0; }
  html[data-skin="win98"] .p-right { margin-left: 2px; }
  html[data-skin="win98"] .p-bot { grid-template-columns: minmax(120px, 180px) minmax(0, 240px) minmax(0, 1fr) 44px; }
  html[data-skin="win98"] .pause-btn .w98-txt { display: none; }
  html[data-skin="win98"] .w98-tools { display: none; }
}
@media (max-width: 960px) {
  html[data-skin="win98"] #scr-play.active { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: 18px 20px 30px 52px minmax(0, 1fr) 68px 140px 21px; }
}
@media (max-height: 760px) and (min-width: 601px) {
  html[data-skin="win98"] #scr-play.active { grid-template-rows: 18px 20px 30px 52px minmax(0, 1fr) 68px 0 21px; row-gap: 2px; }
  html[data-skin="win98"] .p-right { grid-template-rows: minmax(0, 1fr) 0 auto; }
}

/* ---------------------------------------------------------------- title / select / report: narrower */
@media (max-width: 1240px) {
  html[data-skin="win98"] :is(#scr-title, #scr-result) { inset: 0 0 28px 0; }
}
@media (max-width: 1280px) {
  html[data-skin="win98"] .sel-grid { grid-template-columns: 280px minmax(0, 1fr) 300px; }
  html[data-skin="win98"] .search { width: 240px; }
}
@media (max-width: 1100px) {
  html[data-skin="win98"] .sel-grid { grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 8px; padding: 8px; }
  html[data-skin="win98"] .t-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html[data-skin="win98"] .t-hero { padding: 32px 28px; }
  html[data-skin="win98"] .r-head, html[data-skin="win98"] .r-grid { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 960px) {
  html[data-skin="win98"] .t-main { grid-template-columns: minmax(0, 1fr); }
  html[data-skin="win98"] .t-card { height: 360px; }
  html[data-skin="win98"] .sel-grid { grid-template-columns: 260px minmax(0, 1fr); }
  html[data-skin="win98"] .ticket { display: grid; }
  html[data-skin="win98"] .ticket > .tk-sec { margin-left: 8px; }
}
@media (max-width: 760px) {
  html[data-skin="win98"] .sel-grid { display: flex; padding: 8px; }
  html[data-skin="win98"] .ticket { display: flex; }
  html[data-skin="win98"] .ticket > :not(.panel-head) { margin: 0 8px !important; }
  html[data-skin="win98"] .tk-sec { margin-top: 6px !important; }
  html[data-skin="win98"] .search { order: 0; flex: 1 1 160px; width: auto; }
  html[data-skin="win98"] .w98-lbl { display: none; }
  html[data-skin="win98"] .report { padding: 8px; }
  html[data-skin="win98"] .r-head, html[data-skin="win98"] .r-grid { padding-left: 16px; padding-right: 16px; }
  html[data-skin="win98"] #scr-result .r-btns { width: calc(100% + 16px); margin: 8px -8px -8px; }
  html[data-skin="win98"] .w98-rtool { display: none; }
}
@media (max-width: 600px) {
  html[data-skin="win98"] .w98-menu { display: none; }
  html[data-skin="win98"] .t-hero { padding: 24px 18px; gap: 18px; }
  html[data-skin="win98"] .t-h1 { font-size: 48px; }
  html[data-skin="win98"] .t-lead { font-size: 15px; }
  html[data-skin="win98"] .t-card { height: 280px; }
  html[data-skin="win98"] .t-how { padding: 16px 10px 10px; gap: 12px 10px; }
  html[data-skin="win98"] .t-tape { height: auto; min-height: 26px; padding: 4px 4px 4px 2px; gap: 6px 14px; }
  html[data-skin="win98"] .t-status .w98-msg, html[data-skin="win98"] .t-upbit { display: none !important; }
  html[data-skin="win98"] .open-btn { flex: 1; }
  html[data-skin="win98"] .w98-cur { flex: 1 1 auto; }
  html[data-skin="win98"] .clock { display: none; }
}

/* ---------------------------------------------------------------- play: phone portrait (Win98-Mobile) */
@media (max-width: 600px) {
  html[data-skin="win98"] #scr-play.active {
    grid-template-columns: minmax(0, 1fr) 78px;
    grid-template-rows: 18px 22px 56px 32px 18px 42px minmax(0, 1fr) 36px 100px 20px;
    grid-template-areas: "w98t w98t" "mkt mkt" "head head" "stats stats" "inv inv" "feed feed" "hw book" "bot bot" "pads tape" "tick tick";
  }
  html[data-skin="win98"] #scr-play.active.long-px { grid-template-columns: minmax(0, 1fr) 124px; }
  html[data-skin="win98"] #scr-play .w98-title .w98-wb:not(.x) { display: none; }
  html[data-skin="win98"] .w98-tools, html[data-skin="win98"] .p-mkt::before { display: none; }
  html[data-skin="win98"] .p-mkt { gap: 3px; padding: 0; border: 0; box-shadow: none; font-size: 10px; }
  html[data-skin="win98"] .pm-badge { height: 18px; padding: 0 5px; font-size: 10px; line-height: 18px; }
  html[data-skin="win98"] .pm-idx > span { height: 18px; padding: 0 5px; gap: 4px; }
  html[data-skin="win98"] .pm-clock { height: 18px; padding: 0 5px; }

  html[data-skin="win98"] #scr-play.active::before { background: #C0C0C0; box-shadow: var(--w-raised); }
  html[data-skin="win98"] .p-head { box-shadow: none; background: none; }
  html[data-skin="win98"] .ph-name { margin: 7px 0 0 8px; }
  html[data-skin="win98"] .ph-name b { font-size: 14px; }
  html[data-skin="win98"] #ph-sym { height: 19px; font-size: 11px; }
  html[data-skin="win98"] .ph-price { width: auto; height: 22px; margin: 0 0 5px 8px; padding: 0 5px; align-items: center; }
  html[data-skin="win98"] .ph-price b { font-size: 16px; }
  html[data-skin="win98"] .ph-price span { font-size: 10px; }
  html[data-skin="win98"] .ph-pf { margin-right: 58px; }
  html[data-skin="win98"] #ph-pf { height: 20px; padding: 0 5px; font-size: 13px; }
  html[data-skin="win98"] .ph-pf-m { color: #000; }
  html[data-skin="win98"] .ph-pause { width: 44px; height: 44px; margin-right: 6px; padding: 0; }
  html[data-skin="win98"] .ph-stats { gap: 0; padding: 2px; border: 0; background: #fff; box-shadow: var(--w-sunken); align-items: stretch; }
  html[data-skin="win98"] .ph-stats span { padding: 1px 4px; font-size: 9px; }
  html[data-skin="win98"] .ph-stats b { padding: 1px 4px; font-size: 11px; }
  html[data-skin="win98"] .p-minv { gap: 2px; padding: 0; border: 0; }
  html[data-skin="win98"] .p-minv > span { flex: 1; height: 100%; align-items: center; justify-content: space-between; padding: 0 5px; box-shadow: var(--w-field); }
  html[data-skin="win98"] .p-minv > span.l { flex: none; color: #000; }
  html[data-skin="win98"] .p-minv .n { color: #000; }
  html[data-skin="win98"] .p-mfeed { padding: 2px 6px; border: 0; background: #FFFFE1; box-shadow: var(--w-sunken); }
  html[data-skin="win98"] .p-mfeed .t { color: #404040; }
  html[data-skin="win98"] .p-mfeed .k { border-radius: 0; }
  html[data-skin="win98"] .p-mfeed .a { border-radius: 0; background: #000080; color: #fff; }

  html[data-skin="win98"] .p-hw { padding: 2px; box-shadow: var(--w-sunken); background: #000; }
  html[data-skin="win98"] .p-hw::before, html[data-skin="win98"] .p-hw::after { display: none; }
  html[data-skin="win98"] #play { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
  html[data-skin="win98"] :is(.ob, .tp) { padding: 2px; border: 0; background: #fff; box-shadow: var(--w-sunken); }
  html[data-skin="win98"] :is(.ob, .tp)::after { display: none; }
  html[data-skin="win98"] .ob .ps-headr { height: 18px; margin: 0; padding: 0 4px; background: #C0C0C0; box-shadow: var(--w-raised); color: #000; }
  html[data-skin="win98"] .tp .ps-headr { height: 16px; margin: 0; padding: 0 4px; background: #C0C0C0; box-shadow: var(--w-raised); color: #000; }
  html[data-skin="win98"] :is(.ob, .tp) .ps-headr :is(b, span) { color: #000; font-size: 0; }
  html[data-skin="win98"] :is(.ob, .tp) .ps-headr :is(b, span)::before { font-size: 10px; font-weight: 400; }
  html[data-skin="win98"] .ob-rows, html[data-skin="win98"] .tp-rows { margin: 0; }
  html[data-skin="win98"] .ob-row { padding: 0 3px; }
  html[data-skin="win98"] .ob-tot { margin: 0; padding: 3px; }
  html[data-skin="win98"] .p-bot { grid-template-columns: 88px auto minmax(0, 1fr); gap: 5px; padding: 0 6px; border: 0; }
  html[data-skin="win98"] .pb-margin { grid-template-columns: auto auto; gap: 3px 4px; }
  html[data-skin="win98"] #pb-mlabel, html[data-skin="win98"] #pb-mval { font-size: 9px; }
  html[data-skin="win98"] #pb-mval { order: 2; justify-self: end; }
  html[data-skin="win98"] .pb-gauge { order: 3; grid-column: 1 / -1; height: 10px; }
  html[data-skin="win98"] .pb-judges { gap: 3px; }
  html[data-skin="win98"] .pb-judges div { width: 46px; height: 28px; padding: 2px 4px; background: #fff; box-shadow: var(--w-sunken); }
  html[data-skin="win98"] .pb-judges span { font-size: 8px; }
  html[data-skin="win98"] .pb-judges b { font-size: 12px; }
  html[data-skin="win98"] .p-pads { gap: 8px; padding: 4px 5px; }
  html[data-skin="win98"] .p-pads button { border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-raised); }
  html[data-skin="win98"] .p-pads button small { color: #000; }
  html[data-skin="win98"] .p-pads button.on { background: #A8A8A8; color: #000; box-shadow: var(--w-pressed); padding-top: 2px; }
  html[data-skin="win98"] .p-pads button.on :is(b, small) { color: inherit; }
  html[data-skin="win98"] .p-pads button.on b { color: var(--c); }
  html[data-skin="win98"] .p-pads button.on span { outline: 1px dotted #000; padding: 0 3px; }
  html[data-skin="win98"] .p-tick { font-size: 11px; }
  html[data-skin="win98"] .pt-tag { padding: 0 6px; }
}

/* ================================================================ settings dialog, toast */
html[data-skin="win98"] dialog { padding: 3px; border: 0; border-radius: 0; background: #C0C0C0; color: #000; box-shadow: var(--w-window), 2px 2px 0 rgba(0, 0, 0, 0.5); }
html[data-skin="win98"] dialog::backdrop { background: rgba(0, 0, 0, 0.2); }
html[data-skin="win98"] .settings { padding: 0 0 10px; }
html[data-skin="win98"] .settings h3 { height: 18px; display: flex; align-items: center; margin: 0 0 12px; padding: 0 4px; background: var(--w-tbar); color: #fff; font-size: 12px; }
html[data-skin="win98"] .set-grid { gap: 10px 16px; padding: 0 10px; }
html[data-skin="win98"] .set-grid > label { font-size: 12px; font-weight: 400; gap: 4px; }
html[data-skin="win98"] .set-grid label small { color: #404040; }
html[data-skin="win98"] .set-grid select { height: 22px; padding: 0 2px; border: 0; border-radius: 0; background: #fff; color: #000; box-shadow: var(--w-sunken); }
html[data-skin="win98"] .rng b { font-family: var(--mono); font-weight: 400; }
html[data-skin="win98"] .keys-set { font-weight: 400; font-size: 12px; }
html[data-skin="win98"] .keys-set small { color: #404040; }
html[data-skin="win98"] .key-btns button { min-width: 96px; padding: 6px 10px; font-size: 11px; text-align: left; }
html[data-skin="win98"] .key-btns button b { font-family: var(--mono); font-size: 16px; }
html[data-skin="win98"] .key-btns button.wait { color: #000080; box-shadow: var(--w-pressed); }
html[data-skin="win98"] .dlg-btns { margin-top: 14px; padding: 0 10px; }
html[data-skin="win98"] .dlg-btns button { min-width: 75px; height: 23px; padding: 0 12px; }
html[data-skin="win98"] .toast { border: 1px solid #000; border-radius: 0; background: #FFFFE1; color: #000; font-size: 12px; padding: 6px 10px; bottom: 40px; }
