/*
 * 현물시장(/stocks/)의 2000년대 공공기관 증권전산망 테마를 선물시장에
 * 적용한다. 거래 로직과 DOM 식별자는 유지하고 시각 체계와 정보 밀도만
 * 통일한다.
 */

:root {
  color-scheme: light;
  --bg: #fff;
  --bg-elevated: #f5f5f5;
  --surface: #fff;
  --surface-2: #f8f8f8;
  --surface-3: #eef3f5;
  --surface-hover: #f3f7f8;
  --line: #c9c9c9;
  --line-soft: #d7d7d7;
  --text: #333;
  --text-2: #555;
  --muted: #777;
  --faint: #999;
  --accent: #0b6f9f;
  --accent-bright: #17688f;
  --accent-soft: #e8f2f6;
  --long: #d71920;
  --long-soft: #fff0f0;
  --short: #125aa7;
  --short-soft: #eef5ff;
  --good: #25835f;
  --good-soft: #edf8f2;
  --warning: #9a6a13;
  --warning-soft: #fffdeb;
  --danger: #c3272f;
  --danger-soft: #fff0f0;
  --violet: #6c5b99;
  --cyan: #26748b;
  --radius: 0;
  --radius-sm: 0;
  --shadow: none;
  --font: "돋움", Dotum, "굴림", Gulim, Arial, sans-serif;
  --chart-grid: #dce3e7;
  --chart-label: #777;
  --chart-point-ring: #fff;
}

html {
  min-width: 320px;
  background: #e9e9e9;
  scroll-behavior: auto;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 1px, transparent 1px 4px),
    #e9e9e9;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}

button,
input {
  color-scheme: light;
  font-family: var(--font);
}

input::placeholder {
  color: #999;
}

* {
  scrollbar-color: #a8b5bb #f1f1f1;
  scrollbar-width: thin;
}

::selection {
  background: #cce6f2;
  color: #222;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #e89a2f;
  outline-offset: 1px;
}

.skip-link {
  left: 50%;
  top: -40px;
  border-radius: 0;
  padding: 5px 10px;
  background: #333;
  color: #fff;
  font-size: 11px;
  transform: translateX(-590px);
}

.skip-link:focus {
  top: 0;
}

.site-header,
.ticker-strip,
.page {
  width: min(1200px, 100%);
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  border-right: 1px solid #d0d0d0;
  border-left: 1px solid #d0d0d0;
}

.site-header {
  position: relative;
  top: auto;
  z-index: 200;
  height: auto;
  border-bottom: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.legacy-system-banner {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 20px;
  border-top: 1px solid #d8cf9a;
  border-bottom: 1px solid #d8cf9a;
  background: #fffce6;
  color: #6f6234;
  font-size: 11px;
}

.legacy-system-banner span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legacy-system-banner i {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: #e7902c;
  transform: rotate(45deg);
}

.legacy-utility {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  background: #fff;
  color: #777;
  font-size: 11px;
}

.legacy-utility span,
.legacy-utility a {
  position: relative;
  padding: 0 9px;
  color: #777;
  text-decoration: none;
}

.legacy-utility span + span::before,
.legacy-utility a::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 1px;
  height: 9px;
  background: #ccc;
}

.header-inner {
  width: calc(100% - 40px);
  max-width: none;
  height: 70px;
  margin: 0 auto;
  padding: 0;
  gap: 18px;
}

.brand {
  min-width: max-content;
  gap: 10px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  width: 46px;
  height: 46px;
}

.brand-copy {
  line-height: 1.12;
}

.brand-copy strong {
  color: #155f82;
  font-family: "굴림", Gulim, "돋움", Dotum, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-copy span {
  margin-top: 5px;
  color: #777;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 400;
}

.header-market {
  min-width: 230px;
  height: 28px;
  margin-left: auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  border: 2px solid #1b789e;
  padding: 0 7px;
  background: #fff;
}

.header-market > span {
  grid-column: auto;
  color: #777;
  font-size: 10px;
  font-weight: 400;
}

.header-market strong,
.header-market em {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
}

.auth-area {
  min-width: max-content;
}

.login-button {
  height: 27px;
  gap: 5px;
  border: 1px solid #07567f;
  border-radius: 0;
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  transition: none;
}

.login-button svg {
  display: none;
}

.login-button:hover {
  background: linear-gradient(#0874a3, #055a82);
  filter: none;
  transform: none;
}

.user-button {
  height: 31px;
  gap: 6px;
  border: 1px solid #bbb;
  border-radius: 0;
  background: linear-gradient(#fff, #ededed);
  color: #444;
  padding: 2px 7px 2px 3px;
}

.user-button:hover {
  border-color: #5f8ca0;
  background: #eef6f9;
}

.user-avatar,
.account-avatar {
  border: 1px solid #aaa;
  border-radius: 2px;
  background: #58719a;
}

.user-avatar {
  width: 25px;
  height: 25px;
  font-size: 10px;
}

.user-copy {
  max-width: 105px;
}

.user-copy strong {
  color: #444;
  font-size: 10px;
}

.user-copy small {
  margin-top: 1px;
  color: #777;
  font-size: 8px;
}

.user-button > svg {
  width: 11px;
  height: 11px;
  color: #777;
}

.desktop-nav {
  width: 100%;
  height: 37px;
  display: block;
  border-top: 1px solid #0c608c;
  border-bottom: 1px solid #075478;
  background: linear-gradient(#1381b2 0%, #0873a4 52%, #086792 53%, #075f88 100%);
}

.desktop-nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 170px) 190px 1fr;
  padding-left: 20px;
}

.nav-button,
.nav-link {
  min-height: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .17);
  border-left: 1px solid rgba(0, 48, 78, .2);
  border-radius: 0;
  background: transparent;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 1px rgba(0, 42, 68, .45);
  transition: none;
}

.nav-button:first-child {
  border-left: 0;
}

.nav-button svg,
.nav-link svg {
  display: none;
}

.nav-button:hover,
.nav-button.active,
.nav-link:hover {
  background: linear-gradient(#08638f, #064f76);
  color: #fff;
  text-decoration: none;
}

.ticker-strip {
  height: 27px;
  border-top: 0;
  border-bottom: 1px solid #d1d1d1;
  background: #f6f6f6;
}

.ticker-inner {
  width: 100%;
  max-width: none;
  padding: 0 20px;
  gap: 22px;
  color: #555;
  font-size: 10px;
}

.ticker-status i,
.quote-live i,
.chart-source i {
  width: 5px;
  height: 5px;
  border-radius: 0;
  background: #999;
  box-shadow: none !important;
  transform: rotate(45deg);
}

.ticker-status.live i,
.quote-live.live i,
.chart-source i {
  background: #37916c;
}

.ticker-item::before {
  height: 10px;
  margin-right: 15px;
  background: #ccc;
}

.ticker-item strong,
.ticker-item em {
  font-size: 10px;
}

.ticker-placeholder {
  height: 8px;
  border-radius: 0;
  background: linear-gradient(90deg, #e5e5e5, #f2f2f2, #e5e5e5);
}

.page {
  min-height: 620px;
  padding: 10px 20px 35px;
  background: #fff;
}

.legacy-page-heading {
  min-height: 57px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #4a849f;
  padding: 0 2px 8px;
}

.legacy-page-heading span {
  display: block;
  margin-bottom: 4px;
  color: #888;
  font-size: 10px;
}

.legacy-page-heading h1 {
  margin: 0;
  color: #333;
  font-family: "굴림", Gulim, sans-serif;
  font-size: 18px;
}

.legacy-page-heading p {
  margin: 0;
  color: #777;
  font-size: 11px;
}

.legacy-page-heading p strong {
  color: #17688f;
}

.service-notice {
  min-height: 34px;
  margin: 8px 0;
  gap: 7px;
  border: 1px solid #d9d0a3;
  border-radius: 0;
  background: #fffdeb;
  padding: 6px 9px;
  color: #6c633d;
}

.service-notice.error {
  border-color: #d8a8a8;
  background: #fff2f2;
}

.notice-icon {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
  color: #9a6a13;
}

.notice-icon svg {
  width: 15px;
  height: 15px;
}

.service-notice strong {
  color: #4d472d;
  font-size: 11px;
}

.service-notice p {
  margin-top: 0;
  color: #6c633d;
  font-size: 10px;
}

.service-notice > button {
  border-left: 1px solid #d9d0a3;
  border-radius: 0;
  background: transparent;
  color: #756929;
  padding: 3px 8px;
  font-size: 10px;
}

.view {
  animation: none;
}

.trading-layout {
  grid-template-columns: 238px minmax(460px, 1fr) 286px;
  gap: 8px;
}

.panel {
  border: 1px solid #c9c9c9;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.watchlist-panel,
.order-panel {
  top: 8px;
}

.watchlist-panel,
.chart-panel,
.order-panel {
  overflow: hidden;
}

.panel-heading,
.order-heading {
  min-height: 32px;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid #0b5d84;
  padding: 0 9px;
  background: linear-gradient(#1684b7, #076892);
}

.panel-heading .eyebrow,
.order-heading .eyebrow {
  display: none;
}

.panel-heading h2,
.order-heading h2 {
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px #064263;
}

.market-state,
.order-market-chip {
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #e8f7ff;
  font-size: 10px;
  font-weight: 400;
}

.market-state i {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: #f2b33f;
  transform: rotate(45deg);
}

.market-state.open,
.market-state.closed,
.order-market-chip.open,
.order-market-chip.closed {
  background: transparent;
  color: #fff;
}

.market-state.open i {
  background: #8cdb9d;
  box-shadow: none;
}

.market-state.closed i {
  background: #f2b33f;
}

.index-card {
  width: calc(100% - 16px);
  margin: 8px 8px 7px;
  border: 1px solid #155a7c;
  border-radius: 0;
  background: linear-gradient(135deg, #266f91, #164e6b);
  padding: 9px 10px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .16);
}

.index-card-top small {
  color: #dceef5;
  font-size: 9px;
  font-weight: 400;
}

.index-card-top strong {
  margin-top: 2px;
  color: #fff;
  font-size: 10px;
}

.index-symbol {
  width: 26px;
  height: 26px;
  border-radius: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.index-symbol svg {
  width: 14px;
  height: 14px;
}

.index-card-value {
  margin-top: 7px;
}

.index-card-value strong {
  color: #fff;
  font-size: 17px;
}

.index-card-value em {
  font-size: 10px;
}

.watchlist-label {
  border-top: 1px solid #d5d5d5;
  border-bottom: 1px solid #d5d5d5;
  padding: 4px 9px;
  background: #f5f5f5;
  color: #777;
  font-size: 9px;
  font-weight: 400;
}

.instrument-list {
  padding: 0 8px 7px;
}

.instrument-row {
  min-height: 51px;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 7px;
  border: 0;
  border-top: 1px dotted #ccc;
  border-radius: 0;
  padding: 6px 2px;
}

.instrument-row:first-child {
  border-top: 0;
}

.instrument-row:hover {
  background: #f5f8f9;
}

.instrument-row.active {
  border-color: #ccc;
  background: #e8f2f6;
}

.commodity-icon,
.quote-identity .commodity-icon {
  width: 29px;
  height: 29px;
  border: 1px solid #cad6dc;
  border-radius: 2px;
  background: linear-gradient(#fff, #e8eef1);
  color: #37677b;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 9px;
}

.commodity-icon.gold,
.commodity-icon.oil {
  background: linear-gradient(#fff, #e8eef1);
  color: #37677b;
}

.instrument-name strong {
  font-size: 12px;
}

.instrument-name small,
.instrument-values em {
  margin-top: 2px;
  color: #777;
  font-size: 9px;
}

.instrument-values strong {
  color: #333;
  font-size: 11px;
}

.instrument-values .sparkline {
  display: none;
}

.instrument-skeleton {
  height: 46px;
  border-radius: 0;
  background: linear-gradient(90deg, #eee, #fafafa, #eee);
}

.market-rule-note {
  margin: 0 8px 8px;
  border-top: 1px solid #d4d4d4;
  padding: 8px 2px 0;
  color: #777;
}

.market-rule-note svg {
  width: 14px;
  height: 14px;
}

.market-rule-note p {
  font-size: 9px;
}

.market-workspace {
  gap: 8px;
}

.quote-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 12px;
  padding: 0 12px 7px;
}

.quote-header::before {
  content: "상품 시세정보";
  grid-column: 1 / -1;
  height: 32px;
  display: flex;
  align-items: center;
  margin: 0 -12px 10px;
  border-bottom: 1px solid #c5d4db;
  padding: 0 10px;
  background: linear-gradient(#f9fbfc, #e7eef2);
  color: #285d76;
  font-size: 12px;
  font-weight: 700;
}

.quote-identity {
  gap: 9px;
}

.quote-title-row {
  gap: 5px;
}

.quote-title-row h1 {
  color: #333;
  font-size: 16px;
}

.symbol-chip,
.paused-chip {
  min-height: 16px;
  border: 1px solid #c9d5da;
  border-radius: 0;
  padding: 1px 4px;
  background: #f2f6f7;
  color: #555;
  font-size: 8px;
  font-weight: 400;
}

.paused-chip {
  border-color: #dbc98e;
  background: #fff9df;
  color: #7b641b;
}

.quote-identity p {
  margin-top: 3px;
  color: #777;
  font-size: 9px;
}

.quote-live {
  color: #888;
  font-size: 9px;
}

.quote-price-row {
  min-height: 66px;
  align-items: flex-end;
  border-top: 1px dotted #ccc;
  padding: 8px 12px 7px;
}

.quote-price {
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 27px;
  line-height: 1.1;
}

.quote-change {
  margin-top: 3px;
  font-size: 10px;
}

.bid-ask {
  gap: 10px;
  padding-bottom: 2px;
}

.bid-ask span {
  min-width: 72px;
}

.bid-ask small {
  color: #777;
  font-size: 8px;
}

.bid-ask strong {
  color: #333;
  font-size: 10px;
}

.bid-ask > i {
  height: 23px;
  background: #ccc;
}

.chart-toolbar {
  height: 35px;
  border-top: 1px solid #d4d4d4;
  border-bottom: 1px solid #d4d4d4;
  padding: 4px 10px;
  background: #f6f6f6;
}

.range-tabs {
  gap: 2px;
}

.range-tabs button {
  min-width: 44px;
  height: 25px;
  border: 1px solid #c6c6c6;
  border-radius: 0;
  background: #fff;
  padding: 0 7px;
  color: #666;
  font-size: 9px;
}

.range-tabs button:hover,
.range-tabs button.active {
  border-color: #24769b;
  background: linear-gradient(#3d92b7, #14709a);
  color: #fff;
}

.chart-source {
  color: #888;
  font-size: 9px;
}

.chart-wrap {
  height: 300px;
  margin: 5px 7px 0;
  background: #fff;
}

.chart-tooltip {
  min-width: 110px;
  border: 1px solid #777;
  border-radius: 0;
  background: #fffff4;
  color: #333;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .12);
  padding: 6px 8px;
  backdrop-filter: none;
}

.chart-tooltip time {
  color: #777;
}

.chart-loading {
  background: rgba(255, 255, 255, .7);
}

.chart-loading span {
  width: 5px;
  height: 5px;
  border-radius: 0;
  background: #17688f;
}

.chart-empty {
  color: #777;
}

.chart-empty strong {
  color: #555;
}

.chart-stats {
  min-height: 50px;
  gap: 0;
  border-top: 0;
  padding: 5px 10px 10px;
}

.chart-stats span {
  min-width: 0;
  justify-content: flex-start;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #d4d4d4;
  border-left: 0;
  padding: 7px 8px;
  background: #fafafa;
}

.chart-stats span:first-child {
  border-left: 1px solid #d4d4d4;
}

.chart-stats span + span {
  border-left: 0;
}

.chart-stats small {
  color: #777;
  font-size: 9px;
}

.chart-stats strong {
  color: #333;
  font-size: 10px;
}

.position-strip {
  min-height: 68px;
  border-top: 2px solid #4a849f;
}

.position-strip-empty {
  min-height: 66px;
  gap: 9px;
  padding: 9px 12px;
}

.position-empty-icon {
  width: 31px;
  height: 31px;
  border: 1px solid #cad6dc;
  border-radius: 2px;
  background: #eef3f5;
  color: #37677b;
}

.position-empty-icon svg {
  width: 15px;
  height: 15px;
}

.position-strip-empty strong {
  color: #333;
  font-size: 11px;
}

.position-strip-empty p {
  color: #777;
  font-size: 9px;
}

.position-strip-empty button,
.secondary-button,
.primary-button {
  min-height: 29px;
  border: 1px solid #aaa;
  border-radius: 0;
  background: linear-gradient(#fff, #e6e6e6);
  color: #444;
  padding: 0 9px;
  font-size: 9px;
}

.active-position-strip {
  min-height: 66px;
  padding: 9px 12px;
}

.strip-position-name em,
.position-side-chip,
.trade-action {
  border-radius: 0;
  padding: 2px 5px;
  font-size: 8px;
}

.strip-position-name em.long,
.position-side-chip.long {
  border: 1px solid #e4a4a6;
  background: #fff0f0;
  color: #b71820;
}

.strip-position-name em.short,
.position-side-chip.short {
  border: 1px solid #a7bfdd;
  background: #eef5ff;
  color: #125aa7;
}

.market-info-grid {
  gap: 0;
}

.info-card {
  min-height: 51px;
  gap: 7px;
  border: 1px solid #d4d4d4;
  border-left: 0;
  border-radius: 0;
  background: #fafafa;
  padding: 7px 8px;
}

.info-card:first-child {
  border-left: 1px solid #d4d4d4;
}

.info-icon {
  width: 27px;
  height: 27px;
  border: 1px solid #cad6dc;
  border-radius: 2px;
  background: #eef3f5 !important;
  color: #37677b !important;
}

.info-icon svg {
  width: 13px;
  height: 13px;
}

.info-card small {
  color: #777;
  font-size: 8px;
}

.info-card strong {
  color: #333;
  font-size: 9px;
}

.order-panel {
  padding-bottom: 9px;
}

.order-quote {
  gap: 5px;
  border-top: 0;
  border-bottom: 1px solid #d4d4d4;
  padding: 8px 10px;
  background: #f7f7f7;
}

.order-quote small {
  color: #777;
  font-size: 9px;
}

.order-quote strong {
  color: #333;
  font-size: 10px;
}

#openOrderForm {
  padding: 10px 10px 0;
}

.field-group + .field-group {
  margin-top: 12px;
}

.field-group > label,
.field-label-row label {
  color: #555;
  font-size: 10px;
}

.field-label-row {
  margin-bottom: 5px;
}

.field-label-row small {
  color: #888;
  font-size: 8px;
}

.side-toggle {
  gap: 0;
  margin-top: 5px;
}

.side-toggle button {
  min-height: 40px;
  gap: 5px;
  border: 1px solid #bbb;
  border-radius: 0;
  background: linear-gradient(#fafafa, #e3e3e3);
  color: #666;
  transition: none;
}

.side-toggle button + button {
  border-left: 0;
}

.side-toggle button svg {
  display: none;
}

.side-toggle button strong {
  font-size: 10px;
}

.side-toggle button small {
  color: inherit;
  font-size: 8px;
}

.side-toggle .long.active {
  border-color: #a51d25;
  background: linear-gradient(#e9545b, #c92a32);
  color: #fff;
}

.side-toggle .short.active {
  border-color: #154c85;
  background: linear-gradient(#3e82c8, #1e5d9d);
  color: #fff;
}

.stepper {
  height: 33px;
  grid-template-columns: 34px 1fr 34px;
  border: 1px solid #aaa;
  border-radius: 0;
  background: #fff;
}

.stepper button,
.stepper button:hover {
  border-radius: 0;
  background: linear-gradient(#fff, #e5e5e5);
  color: #333;
  font-size: 15px;
}

.stepper > div {
  border-color: #ccc;
}

.stepper input {
  background: #fff;
  color: #333;
  font-size: 11px;
}

.stepper span {
  color: #777;
  font-size: 8px;
}

.leverage-options {
  gap: 3px;
}

.leverage-options button {
  height: 27px;
  border: 1px solid #bbb;
  border-radius: 0;
  background: linear-gradient(#fff, #ededed);
  color: #555;
  font-size: 9px;
}

.leverage-options button:hover,
.leverage-options button.active {
  border-color: #24769b;
  background: linear-gradient(#3d92b7, #14709a);
  color: #fff;
}

.leverage-warning {
  height: 2px;
  margin-top: 5px;
  border-radius: 0;
  background: #ddd;
}

.leverage-warning span {
  border-radius: 0;
}

.order-preview {
  margin-top: 11px;
  border: 1px solid #d1d1d1;
  border-radius: 0;
  background: #f8f8f8;
  padding: 5px 8px;
}

.order-preview > div {
  min-height: 24px;
}

.order-preview > div + div {
  border-top: 1px dotted #ccc;
}

.order-preview span {
  color: #666;
  font-size: 9px;
}

.order-preview strong {
  color: #333;
  font-size: 9px;
}

.order-status {
  min-height: 25px;
  margin: 7px 1px 5px;
  color: #777;
  font-size: 8px;
}

.order-submit {
  height: 38px;
  border: 1px solid #a51d25;
  border-radius: 0;
  background: linear-gradient(#e95159, #c72831);
  font-size: 11px;
  transition: none;
}

.order-submit.short {
  border-color: #154c85;
  background: linear-gradient(#4387cb, #1e5e9f);
}

.order-submit:hover:not(:disabled) {
  filter: none;
  transform: none;
}

.order-submit:disabled {
  border-color: #aaa;
  background: linear-gradient(#ddd, #bbb);
  color: #777;
  opacity: 1;
}

.close-position-box {
  margin: 10px 10px 0;
  border: 1px solid #b9ccd5;
  border-radius: 0;
  background: #eef5f8;
  padding: 10px;
}

.close-box-title > span,
.close-position-grid small {
  color: #666;
}

.close-box-title em {
  border-radius: 0;
}

.close-position-grid span {
  border: 1px solid #d3d3d3;
  border-radius: 0;
  background: #fff;
}

.close-position-box > button {
  height: 31px;
  border: 1px solid #07567f;
  border-radius: 0;
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
}

.order-risk {
  margin: 9px 10px 5px;
  color: #888;
}

.order-risk p {
  font-size: 8px;
}

.page-title {
  min-height: 65px;
  border-bottom: 2px solid #4a849f;
  padding: 4px 2px 8px;
}

.page-title .eyebrow {
  display: none;
}

.page-title h1 {
  color: #333;
  font-family: "굴림", Gulim, sans-serif;
  font-size: 18px;
}

.page-title p {
  color: #777;
  font-size: 10px;
}

.secondary-button svg {
  width: 12px;
  height: 12px;
}

.primary-button {
  border-color: #07567f;
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
}

.guest-state {
  min-height: 310px;
  padding: 30px;
}

.guest-icon {
  width: 44px;
  height: 44px;
  border: 1px solid #9fb4bd;
  border-radius: 2px;
  background: #eaf2f5;
  color: #2d647b;
}

.guest-icon svg {
  width: 21px;
  height: 21px;
}

.guest-state h2 {
  margin-top: 12px;
  color: #333;
  font-size: 13px;
}

.guest-state p {
  margin: 4px 0 12px;
  color: #777;
  font-size: 10px;
}

.guest-state button {
  height: 29px;
  border: 1px solid #07567f;
  border-radius: 0;
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
  padding: 0 12px;
  font-size: 10px;
}

.summary-grid {
  gap: 0;
  margin-top: 8px;
}

.summary-card,
.summary-card.primary {
  min-height: 88px;
  border: 1px solid #d3d3d3;
  border-left: 0;
  border-radius: 0;
  background: #fafafa;
  padding: 12px;
}

.summary-card:first-child {
  border-left: 1px solid #d3d3d3;
}

.summary-card small {
  color: #777;
  font-size: 9px;
}

.summary-card strong {
  margin-top: 5px;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 17px;
}

.summary-card > span {
  margin-top: 4px;
  color: #888;
  font-size: 8px;
}

.portfolio-panel {
  margin-top: 8px;
}

.panel-section-heading {
  min-height: 46px;
  border-bottom: 1px solid #aaa;
  border-top: 2px solid #4a849f;
  padding: 8px 11px;
  background: #eef3f5;
}

.panel-section-heading h2 {
  color: #333;
  font-size: 12px;
}

.panel-section-heading p {
  color: #777;
  font-size: 9px;
}

.portfolio-positions {
  gap: 7px;
  padding: 9px;
}

.portfolio-position-card {
  border: 1px solid #d1d1d1;
  border-radius: 0;
  background: #fafafa;
  padding: 10px;
}

.portfolio-position-head h3 {
  color: #333;
  font-size: 11px;
}

.portfolio-position-head small,
.portfolio-position-pnl small,
.position-detail-grid small {
  color: #777;
}

.portfolio-position-pnl {
  margin-top: 10px;
}

.portfolio-position-pnl strong {
  font-size: 16px;
}

.position-detail-grid {
  margin-top: 9px;
  gap: 0;
}

.position-detail-grid span {
  border: 1px solid #d3d3d3;
  border-left: 0;
  border-radius: 0;
  background: #fff;
  padding: 6px;
}

.position-detail-grid span:nth-child(3n + 1) {
  border-left: 1px solid #d3d3d3;
}

.portfolio-empty {
  padding: 40px 15px;
  color: #777;
}

.history-panel {
  margin-top: 8px;
}

.history-summary {
  min-height: 54px;
  gap: 35px;
  border-top: 2px solid #4a849f;
  border-bottom: 1px solid #aaa;
  padding: 8px 12px;
  background: #eef3f5;
}

.history-summary small {
  color: #777;
  font-size: 9px;
}

.history-summary strong {
  margin-top: 2px;
  color: #333;
  font-size: 12px;
}

th,
td {
  border-bottom: 1px solid #ddd;
  padding: 8px 7px;
  color: #444;
  font-size: 10px;
}

th {
  border-top: 0;
  border-bottom-color: #aaa;
  background: #eef3f5;
  color: #555;
}

td small {
  color: #888;
  font-size: 8px;
}

.trade-action.open {
  border: 1px solid #9fb4bd;
  background: #eaf2f5;
  color: #2d647b;
}

.trade-action.close {
  border: 1px solid #bbb;
  background: #f2f2f2;
  color: #555;
}

.trade-action.liquidate {
  border: 1px solid #e0a6a8;
  background: #fff0f0;
  color: #b21f28;
}

.table-empty {
  color: #777;
}

.site-footer {
  min-height: 75px;
  margin-top: 18px;
  border-top: 1px solid #bbb;
  padding: 15px 2px 0;
  color: #777;
}

.site-footer strong,
.footer-links a {
  color: #666;
  font-size: 9px;
  font-weight: 400;
}

.site-footer p {
  color: #777;
  font-size: 9px;
}

.mobile-nav {
  height: 48px;
  border-top: 2px solid #075478;
  background: #fff;
  backdrop-filter: none;
}

.mobile-nav button {
  border-left: 1px solid #ccc;
  color: #666;
  font-size: 10px;
}

.mobile-nav button:first-child {
  border-left: 0;
}

.mobile-nav button svg {
  display: none;
}

.mobile-nav button.active {
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
}

dialog.modal {
  width: calc(100% - 28px);
  max-width: 440px;
  border-radius: 0;
  color: #333;
}

dialog.modal::backdrop {
  background: rgba(0, 0, 0, .52);
  backdrop-filter: none;
}

dialog.modal[open] {
  animation: none;
}

.modal-shell {
  border: 2px solid #3e7187;
  border-radius: 0;
  background: #fff;
  color: #333;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .18);
  padding: 18px;
}

.modal-close {
  top: 12px;
  right: 12px;
  width: 29px;
  height: 29px;
  border: 1px solid #aaa;
  border-radius: 0;
  background: linear-gradient(#fff, #e4e4e4);
  color: #444;
}

.modal-close:hover {
  background: #eee;
  color: #222;
}

.modal-close svg {
  width: 13px;
  height: 13px;
}

.modal-brand {
  gap: 7px;
}

.modal-brand > span {
  width: 34px;
  height: 34px;
  border: 1px solid #cad6dc;
  border-radius: 2px;
  background: #fff;
}

.modal-brand img {
  width: 31px;
  height: 31px;
}

.modal-brand strong {
  color: #285d76;
  font-size: 11px;
}

.modal-brand small {
  color: #777;
  font-size: 8px;
}

.auth-modal .modal-shell > h2,
.confirm-modal h2 {
  color: #285d76;
  font-size: 16px;
}

.auth-modal .modal-shell > h2 {
  margin-top: 17px;
}

.modal-lead,
.confirm-modal #confirmDescription {
  color: #666;
  font-size: 10px;
}

.auth-tabs {
  height: 32px;
  gap: 0;
  border: 1px solid #bbb;
  border-radius: 0;
  background: #fff;
  padding: 0;
}

.auth-tabs button {
  border-radius: 0;
  background: linear-gradient(#fff, #ededed);
  color: #666;
  font-size: 10px;
}

.auth-tabs button + button {
  border-left: 1px solid #bbb;
}

.auth-tabs button.active {
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
}

.auth-pane {
  padding-top: 11px;
}

.discord-login {
  height: 35px;
  border: 1px solid #3843c7;
  border-radius: 0;
  background: #5865f2;
  font-size: 10px;
}

.auth-benefits {
  margin-top: 9px;
  gap: 5px;
  border: 1px solid #d1d1d1;
  border-radius: 0;
  background: #fafafa;
  padding: 8px;
}

.auth-benefits span {
  color: #555;
  font-size: 9px;
}

.auth-benefits i {
  width: 17px;
  height: 17px;
  border-radius: 2px;
  background: #eaf2f5;
  color: #2d647b;
  font-size: 8px;
}

.email-form label {
  color: #555;
  font-size: 10px;
}

.input-with-icon svg {
  top: 9px;
  left: 9px;
  width: 14px;
  height: 14px;
  color: #777;
}

.email-form input,
.compact-form input {
  height: 32px;
  border: 1px solid #aaa;
  border-radius: 0;
  background: #fff;
  color: #333;
}

.input-with-icon input {
  padding-left: 30px;
}

.email-form input:focus,
.compact-form input:focus {
  border-color: #24769b;
  box-shadow: none;
}

.email-form > button:not(.text-button),
.compact-form button {
  height: 30px;
  border: 1px solid #07567f;
  border-radius: 0;
  background: linear-gradient(#1684b7, #076892);
  color: #fff;
  font-size: 10px;
}

.verify-form > p,
.auth-footnote,
.form-status,
.text-button {
  color: #777;
  font-size: 9px;
}

.account-avatar {
  width: 43px;
  height: 43px;
  border-radius: 2px;
}

.account-profile h2 {
  color: #333;
  font-size: 14px;
}

.account-profile p {
  color: #777;
}

.account-link-card,
.account-email-card {
  margin-top: 11px;
  border: 1px solid #d1d1d1;
  border-radius: 0;
  background: #fafafa;
  padding: 10px;
}

.account-link-card small,
.account-section-title small,
#emailEnrollment > p {
  color: #777;
}

.account-link-card strong,
.account-section-title strong {
  color: #333;
}

.account-link-card a {
  border: 1px solid #aaa;
  border-radius: 0;
  background: linear-gradient(#fff, #e6e6e6);
  color: #444;
}

.account-section-title em {
  border: 1px solid #bbb;
  border-radius: 0;
  background: #f2f2f2;
  color: #666;
}

.logout-button {
  height: 31px;
  margin-top: 11px;
  border: 1px solid #b57b7e;
  border-radius: 0;
  background: #fff0f0;
  color: #a91f27;
}

.confirm-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #d7a3a5;
  border-radius: 2px;
  background: #fff0f0;
}

.confirm-icon.short {
  border-color: #a7bfdd;
  background: #eef5ff;
}

.confirm-icon.close {
  border-color: #9fb4bd;
  background: #eaf2f5;
  color: #2d647b;
}

.confirm-details {
  border: 1px solid #ccc;
  border-radius: 0;
  background: #f7f7f7;
}

.confirm-details > div + div {
  border-top: 1px dotted #ccc;
}

.confirm-details span {
  color: #666;
}

.confirm-details strong {
  color: #333;
}

.confirm-risk {
  border: 1px solid #d9d0a3;
  border-radius: 0;
  background: #fffdeb;
  color: #756929;
}

.confirm-actions {
  gap: 5px;
}

.toast {
  border: 2px solid #555;
  border-radius: 0;
  background: #333;
  color: #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .18);
  padding: 9px 11px;
  animation: none;
}

.toast::before {
  border-radius: 0;
}

.toast strong {
  color: #fff;
}

.toast p {
  color: #eee;
}

@media (max-width: 1180px) {
  .trading-layout {
    grid-template-columns: 220px minmax(430px, 1fr) 270px;
  }
}

@media (max-width: 1020px) {
  .legacy-system-banner,
  .legacy-utility,
  .header-inner,
  .ticker-inner,
  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .header-inner {
    width: 100%;
  }

  .desktop-nav-inner {
    grid-template-columns: repeat(4, 1fr);
    padding-left: 0;
  }

  .trading-layout {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .order-panel {
    position: relative;
    top: auto;
    grid-column: 1 / -1;
  }

  .desktop-nav {
    display: block;
  }

  .mobile-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .legacy-system-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .legacy-system-banner span:last-child,
  .legacy-utility {
    display: none;
  }

  .header-inner {
    height: 60px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-mark img {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy span {
    font-size: 8px;
  }

  .header-market {
    display: none;
  }

  .desktop-nav {
    height: 35px;
    overflow-x: auto;
  }

  .desktop-nav-inner {
    min-width: 520px;
    grid-template-columns: repeat(4, minmax(125px, 1fr));
  }

  .nav-button,
  .nav-link {
    min-height: 33px;
    height: 33px;
    font-size: 11px;
  }

  .ticker-strip {
    height: 25px;
  }

  .ticker-inner {
    gap: 15px;
    overflow-x: auto;
  }

  .page {
    padding: 8px 8px 62px;
  }

  .legacy-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    padding: 5px 1px 7px;
  }

  .legacy-page-heading p {
    display: none;
  }

  .trading-layout {
    display: block;
  }

  .watchlist-panel,
  .order-panel {
    position: relative;
    top: auto;
    margin-bottom: 7px;
  }

  .instrument-list {
    display: flex;
    gap: 4px;
    padding: 0 7px 7px;
    overflow-x: auto;
  }

  .instrument-row {
    min-width: 165px;
    grid-template-columns: 30px 1fr;
    border: 1px solid #d1d1d1;
    padding: 6px;
  }

  .instrument-row + .instrument-row {
    border-left: 1px solid #d1d1d1;
  }

  .instrument-values {
    grid-column: 2;
    display: flex;
    gap: 7px;
    text-align: left;
  }

  .watchlist-label {
    display: none;
  }

  .market-workspace {
    margin-bottom: 7px;
  }

  .chart-wrap {
    height: 270px;
  }

  .quote-live,
  .chart-source {
    display: none;
  }

  .bid-ask {
    gap: 6px;
  }

  .bid-ask span {
    min-width: 60px;
  }

  .active-position-strip {
    grid-template-columns: 1fr 1fr;
  }

  .active-position-strip > span:nth-last-child(-n + 2) {
    display: none;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-card:nth-child(3) {
    border-left: 1px solid #d3d3d3;
  }

  .portfolio-positions {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    display: flex;
  }

  .toast-region {
    right: 10px;
    bottom: 58px;
  }
}

@media (max-width: 480px) {
  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .auth-area .login-button {
    padding: 0 8px;
  }

  .service-notice {
    align-items: flex-start;
  }

  .quote-header {
    padding-right: 9px;
    padding-left: 9px;
  }

  .quote-header::before {
    margin-right: -9px;
    margin-left: -9px;
  }

  .quote-price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .bid-ask {
    align-self: stretch;
    justify-content: flex-end;
  }

  .chart-toolbar {
    overflow-x: auto;
  }

  .range-tabs {
    min-width: max-content;
  }

  .chart-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-stats span:nth-child(3) {
    border-left: 1px solid #d4d4d4;
  }

  .market-info-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    border-top: 0;
    border-left: 1px solid #d4d4d4;
  }

  .info-card:first-child {
    border-top: 1px solid #d4d4d4;
  }

  .position-strip-empty {
    align-items: flex-start;
  }

  .position-strip-empty button {
    display: none;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .page-title .secondary-button {
    align-self: flex-end;
  }

  .footer-links {
    width: 100%;
    gap: 10px;
  }
}

/* 현물 전산망과 동일한 조밀한 활자 규칙 */
* {
  letter-spacing: 0 !important;
}
