/* ══════════════════════════════════════════════════════════════
   SEMIX — style.css
   흰 바탕 + 파란색, 반도체 거래 보드 콘셉트
   ══════════════════════════════════════════════════════════════ */

:root {
  --paper:   #FFFFFF;
  --wafer:   #F3F6FB;
  --wafer-2: #E9EFF8;
  --blue:    #1747C7;
  --blue-d:  #0F3497;
  --blue-l:  #E7EEFC;
  --trace:   #8FB0F0;
  --ink:     #0A1F4D;
  --text:    #24324F;
  --muted:   #5A6781;
  --line:    #DDE4F0;
  --buy:     #1747C7;
  --sell:    #0B7A54;
  --sell-l:  #E3F4EC;
  --up:      #0B7A54;
  --down:    #C23B3B;
  --gold:    #B88A1E;
  --gold-l:  #FBF3DF;
  --danger:  #C23B3B;
  --danger-l:#FBEAEA;
  --ok:      #0B7A54;
  --ok-l:    #E3F4EC;
  --warn:    #8A5A00;
  --warn-l:  #FFF6E0;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --wrap: 1180px;
  --gut:  24px;
  --head-h: 68px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
          "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh"] body { word-break: normal; }
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--trace); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
[hidden] { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--blue); padding: 0 10px; }
.btn-danger { background: #fff; border-color: #EBC4C4; color: var(--danger); }
.btn-danger:hover { background: var(--danger-l); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #086244; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Header ──────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px);
}
.head-in { display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.logo { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none !important; flex: none; }
.logo-mark { width: 30px; height: 30px; }
.logo-word { font-weight: 800; font-size: 21px; letter-spacing: .06em; }
.logo-word b { color: var(--blue); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--text); font-weight: 600; font-size: 15px; padding: 8px 12px;
  border-radius: 8px; text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--wafer); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--blue-l); }
.head-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-pick { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text);
}
.lang-btn:hover { border-color: var(--blue); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 30px rgba(10,31,77,.12); display: none; z-index: 60;
}
.lang-pick.open .lang-menu { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
  border-radius: 6px; cursor: pointer; font-size: 14px;
}
.lang-menu button:hover, .lang-menu button[aria-checked="true"] { background: var(--blue-l); color: var(--blue); }
.acct-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.grade-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--trace); }
.grade-dot.prime { background: var(--gold); }
.menu-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.drawer { display: none; }

@media (max-width: 960px) {
  .nav { display: none; }
  .head-in { gap: 12px; justify-content: space-between; }
  .menu-toggle { display: inline-flex; }
  .acct-btn { display: none; }
  .drawer {
    display: block; position: fixed; inset: var(--head-h) 0 0 0; background: #fff; z-index: 49;
    padding: 12px var(--gut) 32px; overflow-y: auto; transform: translateY(-8px); opacity: 0;
    pointer-events: none; transition: opacity .18s, transform .18s;
  }
  body.drawer-open .drawer { opacity: 1; transform: none; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }
  .drawer a.d-link {
    display: flex; align-items: center; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line);
    color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none;
  }
  .drawer a.d-link .icon { color: var(--blue); }
  .drawer .btn { margin-top: 20px; }
}
@media (max-width: 420px) {
  :root { --gut: 16px; }
  .logo-word { font-size: 19px; }
  .lang-btn span.lang-label { display: none; }
}

/* ── Page heads / sections ───────────────────────────────── */
.page-head { background: var(--wafer); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); }
.page-head p { margin-top: 10px; color: var(--muted); max-width: 62ch; }
.section { padding: 64px 0; }
.section.soft { background: var(--wafer); }
.section-title { font-size: clamp(22px, 3vw, 28px); }
.section-lead { color: var(--muted); margin-top: 8px; max-width: 62ch; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--wafer-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--wafer-2) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 78% 50%, #000 15%, transparent 72%);
          mask-image: radial-gradient(ellipse 55% 75% at 78% 50%, #000 15%, transparent 72%);
}
.hero-in {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 8px;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 58px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.12;
}
.hero-sub { margin-top: 20px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-facts div { font-size: 14px; color: var(--muted); }
.hero-facts strong { display: block; font-size: 20px; color: var(--ink); }
.hero-art { position: relative; display: flex; justify-content: center; padding: 10px 0 0; }
.hero-art .glow {
  position: absolute; width: 72%; aspect-ratio: 1; top: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(23,71,199,.16), rgba(23,71,199,0) 68%);
}
.hero-chip {
  position: relative; width: min(100%, 470px); height: auto;
  filter: drop-shadow(0 28px 30px rgba(10,31,77,.22));
}
/* 칩에서 Now Trading 띠로 내려오는 회로선 */
.traces { position: relative; height: 56px; pointer-events: none; }
.traces svg { position: absolute; right: 10%; bottom: 0; width: 46%; height: 100%; }
.traces path { fill: none; stroke: var(--trace); stroke-width: 1.5; }
.traces circle { fill: var(--blue); }
.traces .flow { stroke: var(--blue); stroke-dasharray: 6 120; animation: flow 3.2s linear infinite; }
@keyframes flow { from { stroke-dashoffset: 126; } to { stroke-dashoffset: 0; } }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 8px; padding-top: 28px; }
  .hero-art { order: -1; }
  .hero-chip { width: min(70%, 300px); }
  .traces { height: 36px; }
  .traces svg { right: 50%; transform: translateX(50%); width: 60%; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
  .hero-facts strong { font-size: 16px; }
  .hero-facts div { font-size: 12.5px; line-height: 1.4; }
}

/* ── Now Trading 띠 ─────────────────────────────────────── */
.ticker { background: var(--ink); color: #fff; }
.ticker-in { display: flex; align-items: center; gap: 18px; height: 56px; }
.ticker-label {
  display: flex; align-items: center; gap: 9px; flex: none; font-weight: 800; font-size: 14px;
  letter-spacing: .02em; color: #fff; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.18); height: 28px;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #4C8DFF; position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #4C8DFF;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.ticker-view { position: relative; flex: 1; min-width: 0; height: 56px; overflow: hidden; }
.ticker-list { list-style: none; margin: 0; padding: 0; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.ticker-list li {
  height: 56px; display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden;
  font-size: 15px;
}
.ticker-list .t-item { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ticker-list .t-qty { color: #A9B9DA; flex: none; }
.ticker-more { flex: none; color: #CFE0FF; font-size: 14px; font-weight: 600; }
.ticker-more:hover { color: #fff; }
@media (max-width: 640px) {
  .ticker-in { gap: 12px; }
  .ticker-label { padding-right: 12px; font-size: 13px; }
  .ticker-label .tl-text { display: none; }
  .ticker-more { display: none; }
  .ticker-list li { font-size: 14px; }
}

/* ── Tags ────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; flex: none; white-space: nowrap;
}
.tag-buy  { background: var(--blue-l); color: var(--buy); }
.tag-sell { background: var(--sell-l); color: var(--sell); }
.ticker .tag-buy  { background: #2552D0; color: #fff; }
.ticker .tag-sell { background: #0E8A61; color: #fff; }
.tag-on   { background: var(--ok-l); color: var(--ok); }
.tag-off  { background: #EEF0F4; color: #8790A3; }
.tag-prime { background: var(--gold-l); color: var(--gold); }
.tag-member { background: var(--blue-l); color: var(--blue); }
.tag-wait { background: var(--warn-l); color: var(--warn); }
.tag-no   { background: var(--danger-l); color: var(--danger); }

/* ── 오늘의 시세 보드 ────────────────────────────────────── */
.board-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.panel-head h2 .icon, .panel-head h3 .icon { color: var(--blue); }
.asof { font-size: 13px; color: var(--muted); }
.price-rows { list-style: none; margin: 0; padding: 0; }
.price-rows li {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 92px; gap: 14px; align-items: center;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.price-rows li:first-child { border-top: 0; }
.pin { width: 12px; height: 6px; border-radius: 2px; background: #C9D3E4; }
.price-rows .p-name { font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.price-rows .p-basis { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.price-rows .p-val { font-weight: 800; color: var(--ink); text-align: right; white-space: nowrap; }
.price-rows .p-chg { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.chg-up { color: var(--up); } .chg-down { color: var(--down); } .chg-flat { color: var(--muted); }
.empty { color: var(--muted); padding: 28px 8px; text-align: center; }
.news-mini { list-style: none; margin: 0; padding: 0; }
.news-mini li { border-top: 1px solid var(--line); }
.news-mini li:first-child { border-top: 0; }
.news-mini a { display: flex; gap: 14px; padding: 13px 0; color: var(--text); text-decoration: none; align-items: baseline; }
.news-mini a:hover .n-title { color: var(--blue); }
.news-mini .n-date { flex: none; font-size: 13px; color: var(--muted); width: 84px; }
.news-mini .n-title { font-weight: 600; min-width: 0; }
.panel-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .board-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px 18px; }
  .price-rows li { grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 12px; }
  .price-rows .pin { grid-row: 1 / 3; }
  .price-rows .p-name { grid-row: 1 / 3; }
  .price-rows .p-val { grid-column: 3; grid-row: 1; }
  .price-rows .p-chg { grid-column: 3; grid-row: 2; font-size: 13px; }
}

/* ── Member vs Prime ─────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.tier { padding: 28px; }
.tier + .tier { border-left: 1px solid var(--line); background: linear-gradient(180deg, #FFFDF7, #fff 40%); }
.tier h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.tier .t-price { margin-top: 8px; color: var(--muted); }
.tier .t-price strong { color: var(--ink); font-size: 22px; }
.tier ul { list-style: none; margin: 20px 0 0; padding: 0; }
.tier li { display: flex; gap: 10px; padding: 9px 0; align-items: flex-start; }
.tier li .icon { color: var(--blue); margin-top: 3px; }
.tier li.off { color: #9AA3B5; }
.tier li.off .icon { color: #C2C9D6; }
.tier .btn { margin-top: 22px; }
@media (max-width: 720px) {
  .tiers { grid-template-columns: 1fr; }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--line); }
  .tier { padding: 22px 18px; }
}

/* ── Email band ──────────────────────────────────────────── */
.join-band { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.join-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 0 40px rgba(255,255,255,.04), 0 0 0 80px rgba(255,255,255,.03);
}
.join-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 56px var(--gut); }
.join-band h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); }
.join-band p { color: #D6E2FF; margin-top: 10px; }
.join-form { display: flex; gap: 10px; background: #fff; padding: 6px; border-radius: 999px; }
.join-form input {
  flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; font-size: 16px; background: transparent; color: var(--ink);
}
.join-note { font-size: 13px; color: #C5D5FA; margin-top: 10px; padding-left: 18px; }
@media (max-width: 760px) {
  .join-in { grid-template-columns: 1fr; gap: 20px; padding: 44px var(--gut); }
}
@media (max-width: 420px) {
  .join-form { flex-direction: column; border-radius: var(--r); padding: 8px; }
  .join-form input { height: 46px; }
}

/* ── Tables (deals etc.) ─────────────────────────────────── */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable th {
  text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--wafer);
  padding: 13px 18px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dtable td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable .c-item { font-weight: 700; color: var(--ink); }
.dtable tr.ended td { color: #9AA3B5; background: #FAFBFD; }
.dtable tr.ended .c-item { color: #9AA3B5; font-weight: 600; }
.dtable tr.ended .tag-buy, .dtable tr.ended .tag-sell { background: #EEF0F4; color: #9AA3B5; }
.dtable .c-n { width: 52px; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .dtable thead { display: none; }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; }
  .dtable tr:last-child { border-bottom: 0; }
  .dtable td { padding: 0; border: 0; background: transparent !important; }
  .dtable td.c-n { display: none; }
  .dtable td.c-kind { grid-column: 1; }
  .dtable td.c-item { grid-column: 1 / 4; grid-row: 2; }
  .dtable td.c-qty { grid-column: 1 / 4; grid-row: 3; color: var(--muted); font-size: 14px; }
  .dtable td.c-state { grid-column: 3; grid-row: 1; justify-self: end; }
  .dtable td.c-kind + td.c-item { min-width: 0; }
  .dtable tr.ended { background: #FAFBFD; }
}

/* ── Notice / callout ────────────────────────────────────── */
.callout { display: flex; gap: 14px; align-items: flex-start; border-radius: var(--r); padding: 16px 18px; font-size: 15px; }
.callout .icon { margin-top: 2px; }
.callout-info { background: var(--blue-l); color: #183A86; }
.callout-warn { background: var(--warn-l); color: var(--warn); }
.callout-danger { background: var(--danger-l); color: #8E2424; }
.callout-ok { background: var(--ok-l); color: #075C3F; }
.callout strong { color: inherit; }

/* ── Forms ───────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field > label, .field-label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.field .opt { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 4px; }
.field .req { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,71,199,.12); }
.input[readonly] { background: var(--wafer); color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.err { font-size: 13.5px; color: var(--danger); margin-top: 8px; font-weight: 600; min-height: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: 0; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
details.more { border: 1px solid var(--line); border-radius: var(--r); padding: 0 16px; margin-bottom: 18px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
details.more summary .icon { transition: transform .2s; color: var(--muted); }
details.more[open] summary .icon { transform: rotate(180deg); }

/* ── Auth card (로그인 · 가입 · 인증번호) ──────────────────── */
.auth-wrap { min-height: calc(100vh - var(--head-h)); background: var(--wafer); padding: 48px var(--gut) 72px; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px; }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.auth-card .sub { color: var(--muted); margin-top: 8px; margin-bottom: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--wafer); border-radius: 999px; padding: 4px; margin-bottom: 26px; }
.auth-tabs button { border: 0; background: none; height: 40px; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(10,31,77,.1); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #fff; border-color: var(--line); color: var(--ink); width: 100%; }
.btn-google:hover { border-color: #9DB1D8; }
.btn-google svg { width: 18px; height: 18px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 14px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .auth-wrap { padding: 20px 12px 48px; }
  .auth-card { padding: 28px 20px; border-radius: 16px; }
  .auth-card h1 { font-size: 25px; }
}

/* 인증번호 화면 (PayPal 스타일) */
.otp-email {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #F4F6F9; border-radius: 16px; padding: 14px 16px; margin-bottom: 24px; min-width: 0;
}
.otp-email span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.otp-email button { border: 0; background: none; color: var(--blue); font-weight: 700; cursor: pointer; flex: none; padding: 4px; }
.otp-mark { width: 40px; height: 40px; margin-bottom: 14px; }
.otp-title { font-size: 30px !important; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
.otp-to { display: flex; align-items: center; gap: 10px; margin: 18px 0 16px; font-size: 15px; min-width: 0; }
.otp-to span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otp-edit {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--blue-l); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.otp-edit .icon { width: 16px; height: 16px; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-boxes input {
  width: 100%; aspect-ratio: 1 / 1.05; min-height: 48px; max-height: 66px; text-align: center;
  font-size: 22px; font-weight: 600; border: 1.5px solid transparent; border-radius: 10px;
  background: #ECEFF3; color: var(--ink); outline: none; padding: 0; caret-color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.otp-boxes input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(23,71,199,.12); }
.otp-boxes.bad input { border-color: var(--danger); background: #fff; }
.otp-resend { display: inline-block; margin: 16px 0 22px; font-size: 15px; background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-weight: 600; }
.otp-resend[disabled] { color: var(--muted); cursor: default; }
.btn-xl { min-height: 52px; font-size: 16px; }
.otp-block + .otp-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.otp-block .otp-label { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--ink); }
@media (max-width: 380px) { .otp-boxes { gap: 6px; } .otp-boxes input { font-size: 20px; } .otp-title { font-size: 26px !important; } }

/* ── Club page ───────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan {
  position: relative; display: block; border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:hover { border-color: #9DB1D8; }
.plan.sel, .plan:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,71,199,.1); }
.plan .p-len { font-weight: 700; color: var(--ink); font-size: 17px; }
.plan .p-amt { font-size: 32px; font-weight: 800; color: var(--ink); margin-top: 6px; letter-spacing: -0.02em; }
.plan .p-amt small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.plan .p-per { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.plan .p-save { position: absolute; top: 14px; right: 14px; }
.plan .m-save { display: none; }
@media (max-width: 720px) { .plan .m-save { display: inline-flex; } }
@media (max-width: 720px) {
  .plans { grid-template-columns: 1fr; gap: 10px; }
  .plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "len amt" "per amt"; align-items: center; gap: 2px 12px; padding: 16px 18px; }
  .plan .p-len { grid-area: len; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; white-space: nowrap; }
  .plan .p-per { grid-area: per; margin: 0; }
  .plan .p-amt { grid-area: amt; margin: 0; font-size: 26px; white-space: nowrap; }
  .plan .p-save { position: static; grid-area: per; justify-self: end; display: none; }
  .plan .p-len .tag { font-size: 12px; }
}
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { position: relative; padding: 0 0 30px 52px; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-l); color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.step::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 6px; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step.done::before { background: var(--blue); color: #fff; content: "✓"; }
.step.locked { opacity: .45; pointer-events: none; }
.step h3 { font-size: 18px; margin-bottom: 12px; padding-top: 4px; }
@media (max-width: 560px) { .step { padding-left: 42px; } .step::before { width: 30px; height: 30px; } .step::after { left: 14px; top: 36px; } .step h3 { font-size: 17px; padding-top: 3px; } }
.wallet-box {
  display: flex; align-items: center; gap: 10px; background: var(--wafer); border: 1px dashed #B9C7E2; border-radius: var(--r);
  padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14.5px; color: var(--ink);
  word-break: break-all;
}
.wallet-box code { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 14px 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.status-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: #fff; }

/* ── Mypage ──────────────────────────────────────────────── */
.mp-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.mp-side { position: sticky; top: calc(var(--head-h) + 20px); }
.member-card {
  border-radius: var(--r-lg); padding: 22px; color: #fff; background: var(--ink);
  background-image: radial-gradient(circle at 100% 0, rgba(76,141,255,.35), transparent 55%);
  min-width: 0;
}
.member-card.prime { background-color: #2A2210; background-image: radial-gradient(circle at 100% 0, rgba(232,190,90,.35), transparent 55%); }
.member-card .mc-grade { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.member-card .mc-mail { margin-top: 6px; color: #C2CEE8; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card.prime .mc-mail { color: #E6D6AE; }
.member-card .mc-exp { margin-top: 18px; font-size: 13.5px; color: #C2CEE8; }
.member-card .mc-exp strong { display: block; font-size: 16px; color: #fff; }
.mp-nav { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.mp-nav a { padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 600; text-decoration: none; }
.mp-nav a:hover { background: var(--wafer); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; margin-bottom: 20px; min-width: 0; scroll-margin-top: calc(var(--head-h) + 16px); }
.card > h2 { font-size: 19px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.card > h2 .icon { color: var(--blue); }
.list-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.list-table th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list-table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-side { position: static; }
  .mp-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .mp-nav a { white-space: nowrap; background: var(--wafer); }
  .card { padding: 20px 16px; }
}
@media (max-width: 640px) {
  .list-table.stack thead { display: none; }
  .list-table.stack, .list-table.stack tbody, .list-table.stack tr, .list-table.stack td { display: block; width: 100%; }
  .list-table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .list-table.stack tr:last-child { border-bottom: 0; }
  .list-table.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .list-table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 13px; flex: none; }
  .list-table.stack td > * { text-align: right; min-width: 0; }
}

/* ── Letter page ─────────────────────────────────────────── */
.news-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.news-list li + li { border-top: 1px solid var(--line); }
.news-list a {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 22px; color: var(--text); text-decoration: none;
}
.news-list a:hover { background: var(--wafer); }
.news-list a:hover .nl-title { color: var(--blue); }
.news-list .nl-date { font-weight: 700; color: var(--ink); font-size: 15px; }
.news-list .nl-day { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.news-list .nl-title { font-weight: 600; font-size: 16px; }
.news-list .nl-lock { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 13px; }
@media (max-width: 600px) {
  .news-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px; }
  .news-list .nl-date { grid-column: 1; font-size: 13.5px; }
  .news-list .nl-day { display: inline; margin-left: 6px; }
  .news-list .nl-title { grid-column: 1; grid-row: 2; }
  .news-list .nl-lock { grid-row: 1 / 3; grid-column: 2; }
  .news-list .nl-lock span { display: none; }
}
.letter { max-width: 780px; margin: 0 auto; }
.letter-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.letter h1 { font-size: clamp(24px, 3.6vw, 34px); }
.letter-langs { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.letter-langs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.letter-langs button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.letter-body { margin-top: 28px; font-size: 17px; line-height: 1.8; color: var(--text); white-space: pre-line; }
.letter-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.gate { text-align: center; max-width: 520px; margin: 0 auto; padding: 48px 24px; }
.gate .icon-lg { margin: 0 auto 14px; color: var(--blue); width: 40px; height: 40px; }
.gate h2 { font-size: 22px; }
.gate p { color: var(--muted); margin-top: 10px; }
.gate .btns { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ── Modal / toast ───────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,31,77,.42); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 28px; text-align: center; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal .icon-lg { margin: 0 auto 12px; color: var(--blue); width: 36px; height: 36px; }
.modal h2 { font-size: 21px; }
.modal p { color: var(--muted); margin-top: 8px; }
.modal .btns { display: flex; gap: 10px; margin-top: 22px; }
.modal .btns .btn { flex: 1; }
@media (max-width: 380px) { .modal .btns { flex-direction: column; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 120; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 14px; font-weight: 600; font-size: 15px; width: max-content; max-width: min(440px, calc(100% - 32px)); line-height: 1.45;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* ── Footer ──────────────────────────────────────────────── */
.site-foot { background: var(--wafer); border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.foot-brand p { color: var(--muted); margin-top: 12px; max-width: 34ch; }
.foot-h { font-weight: 800; color: var(--ink); font-size: 14px; margin-bottom: 12px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list li { margin-bottom: 9px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.foot-list .icon { width: 17px; height: 17px; color: var(--blue); }
.foot-list a, .foot-list span { color: var(--text); overflow-wrap: anywhere; }
.foot-list .k { color: var(--muted); flex: none; }
.foot-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ── Admin ───────────────────────────────────────────────── */
.admin-body { background: var(--wafer); }
.admin-top { background: var(--ink); color: #fff; }
.admin-top .head-in { height: 60px; }
.admin-top .logo { color: #fff; }
.admin-top .logo-word b { color: #7FA6FF; }
.admin-top .who { color: #AFC0E4; font-size: 14px; margin-left: auto; order: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.admin-tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-tabs .wrap { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-tabs button {
  border: 0; background: none; padding: 16px 14px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 8px;
}
.admin-tabs button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.admin-tabs .badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.admin-main { padding-top: 28px; padding-bottom: 64px; }
.admin-top .logo-img { width: 30px; height: 30px; }
.admin-top .who + .btn { margin-left: 0 !important; }
@media (max-width: 640px) { .admin-top .who + .btn { margin-left: auto !important; } }
@media (max-width: 640px) {
  .admin-top .who { display: none; }
  .admin-top .head-in { gap: 8px; }
  .admin-top .btn-sm { padding: 0 10px; font-size: 13px; }
  .admin-top .logo-sub { display: none; }
  .a-actions .btn { flex: 1 1 auto; }
}
.a-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 12px; min-width: 0; }
.a-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-item-head .a-title { font-weight: 800; color: var(--ink); font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.a-item-head .a-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.a-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 18px; margin-top: 12px; font-size: 14px; }
.a-meta div { min-width: 0; overflow-wrap: anywhere; }
.a-meta span { color: var(--muted); display: block; font-size: 12.5px; }
.a-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.a-actions .select { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.a-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.a-filter .input { max-width: 280px; min-height: 40px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.price-editor { width: 100%; border-collapse: collapse; }
.price-editor td { padding: 4px; }
.price-editor .input { min-height: 40px; padding: 7px 10px; font-size: 14.5px; }
.lang-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .lang-cols { grid-template-columns: 1fr; } }
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.file-pick .fname { color: var(--muted); overflow-wrap: anywhere; min-width: 0; }

/* ── Motion preferences ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── 약관·개인정보 ── */
.lb { display: none; }
html:lang(ko) .lb-ko, html:lang(en) .lb-en, html:lang(zh) .lb-zh { display: block; }
.legal { max-width: 760px; color: var(--ink); line-height: 1.75; font-size: 15px; overflow-wrap: anywhere; }
.legal h2 { font-size: 18px; margin: 30px 0 8px; }
.legal p { margin: 8px 0; }
.legal ul { margin: 8px 0; padding-left: 20px; list-style: disc; }
.legal li { margin: 4px 0; }
.legal a { color: var(--blue); }
.foot-legal { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.foot-legal a { color: inherit; }
.foot-legal a:hover { color: var(--blue); }
