:root {
  --bg: #070a0f;
  --alt: #0b1018;
  --surface: #111824;
  --surface2: #172131;
  --ink: #e8f1fa;
  --muted: #8ca0ba;
  --line: #213047;
  --cyan: #36d7e8;
  --cyan-rgb: 54, 215, 232;
  --amber: #f4a038;
  --amber-rgb: 244, 160, 56;
  --accent: #36d7e8;
  --f-sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(54, 215, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 215, 232, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.72;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; }
p { margin: 0; }
.th-wrap { width: min(1180px, 100% - 44px); margin: 0 auto; }

/* Nav */
.th-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 10, 15, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.th-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; }
.th-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 15.5px; }
.th-mark { color: var(--cyan); font-family: var(--f-mono); }
.th-links { display: flex; gap: 22px; font-size: 13.5px; color: var(--muted); }
.th-links a { text-decoration: none; transition: color .15s; }
.th-links a:hover { color: var(--cyan); }

/* Buttons */
.th-btn-cyan {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; background: var(--cyan); color: #051017;
  border: 1px solid var(--cyan); text-decoration: none; cursor: pointer;
  font-weight: 800; font-size: 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: filter .16s, transform .16s;
}
.th-btn-cyan:hover { filter: brightness(1.08); transform: translateY(-1px); }
.th-btn-sm { padding: 8px 16px; font-size: 13px; }
.th-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; background: rgba(17, 24, 36, 0.85); color: var(--ink);
  border: 1px solid var(--line); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 14px;
}
.th-btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.th-btn-amber {
  padding: 10px 18px; background: rgba(var(--amber-rgb), 0.14); color: var(--amber);
  border: 1px solid var(--amber); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.th-btn-amber:hover { background: var(--amber); color: #0b0e14; }

/* Hero */
.th-hero { position: relative; padding: 54px 0 64px; border-bottom: 1px solid var(--line); overflow: hidden; }
.th-hero-bg { position: absolute; inset: 0; opacity: 0.18; pointer-events: none; }
.th-hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.7); }
.th-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,10,15,0.96) 0%, rgba(7,10,15,0.78) 60%, rgba(7,10,15,0.94) 100%);
}
.th-hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 40px; align-items: center;
}
.th-hero-left { display: grid; gap: 18px; }
.th-status-strip {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  padding: 5px 12px; background: rgba(var(--cyan-rgb), 0.08); border: 1px solid rgba(var(--cyan-rgb), 0.35);
  font-family: var(--f-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.06em;
}
.th-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.th-title { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.18; }
.th-sub { color: var(--muted); font-size: 15.5px; max-width: 560px; }
.th-quote {
  padding: 12px 16px; background: rgba(17, 24, 36, 0.88);
  border: 1px solid var(--line); color: var(--ink); font-size: 14.5px;
}
.th-ticker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.th-tick { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); }
.th-tick span { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.th-tick b { display: block; font-size: 13.5px; color: var(--cyan); margin-top: 2px; }
.th-cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* Hero Monitor */
.th-monitor {
  background: rgba(14, 20, 30, 0.95); border: 1px solid rgba(var(--cyan-rgb), 0.42);
  padding: 14px; display: grid; gap: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.th-mon-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; color: var(--cyan);
}
.th-dot { width: 8px; height: 8px; background: var(--amber); display: inline-block; }
.th-rank-pill {
  padding: 2px 9px; background: rgba(var(--amber-rgb), 0.16); border: 1px solid var(--amber);
  color: var(--amber); font-family: var(--f-mono); font-size: 11.5px; font-weight: 700;
}
.th-mon-view { position: relative; overflow: hidden; border: 1px solid var(--line); background: #090d14; }
.th-mon-view img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: top center; }
.th-scanline {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(54,215,232,0.04) 0px, rgba(54,215,232,0.04) 1px, transparent 2px, transparent 5px);
}
.th-mon-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(7, 10, 15, 0.94));
  display: grid; gap: 2px;
}
.th-mon-overlay b { font-size: 20px; }
.th-mon-overlay span { font-size: 13px; color: var(--cyan); }
.th-mon-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.th-target-pill {
  flex: 1 1 auto; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.th-target-pill.is-active, .th-target-pill:hover {
  border-color: var(--cyan); color: var(--cyan); background: rgba(var(--cyan-rgb), 0.1);
}

/* Sections */
.th-sec { padding: 68px 0; }
.th-sec-alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.th-head { display: grid; gap: 6px; margin-bottom: 28px; }
.th-head h2 { font-size: clamp(24px, 2.5vw, 30px); }
.th-head p { color: var(--muted); max-width: 640px; }
.th-head-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.th-head-bar .th-head { margin-bottom: 0; }
.th-amber { font-family: var(--f-mono); font-size: 12px; color: var(--amber); font-weight: 700; }
.th-mono-cyan { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); }
.th-mono-muted { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

/* Briefing & Directive */
.th-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.th-metric { padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.th-metric dt { font-family: var(--f-mono); font-size: 11.5px; color: var(--cyan); margin-bottom: 4px; }
.th-metric dd { margin: 0; font-size: 14.5px; font-weight: 600; }
.th-brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 28px; align-items: start; }
.th-prose { display: grid; gap: 14px; color: var(--muted); font-size: 15px; }
.th-directive {
  background: var(--surface); border: 1px solid rgba(var(--cyan-rgb), 0.35);
  padding: 24px; display: grid; gap: 14px;
}
.th-dir-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--cyan); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.th-directive h3 { font-size: 20px; }
.th-directive p { color: var(--muted); font-size: 14px; }
.th-dlist { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.th-drow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.th-drow dt { color: var(--amber); font-weight: 700; }
.th-drow dd { margin: 0; color: var(--ink); }
.th-dir-foot { font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }

/* Subject Cards */
.th-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.th-filter {
  padding: 7px 14px; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.th-filter.is-active, .th-filter:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(var(--cyan-rgb), 0.1); }
.th-subj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.th-subj-card {
  text-align: left; padding: 0; background: var(--surface); border: 1px solid var(--line);
  color: inherit; font: inherit; cursor: pointer; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: border-color .18s, transform .18s;
}
.th-subj-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.th-subj-card[hidden] { display: none; }
.th-subj-img { position: relative; }
.th-subj-img img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; }
.th-subj-img .th-rank-pill { position: absolute; top: 10px; left: 10px; background: rgba(7, 10, 15, 0.88); }
.th-scan-tag {
  position: absolute; bottom: 10px; right: 10px; padding: 3px 8px;
  background: rgba(7, 10, 15, 0.88); border: 1px solid rgba(var(--cyan-rgb), 0.5);
  color: var(--cyan); font-family: var(--f-mono); font-size: 11px;
}
.th-subj-body { padding: 14px 16px 18px; display: grid; gap: 4px; }
.th-subj-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.th-subj-top h3 { font-size: 19px; }
.th-subj-top span { font-family: var(--f-mono); font-size: 11.5px; color: var(--cyan); }
.th-subj-role { color: var(--muted); font-size: 12.8px; }
.th-subj-line { color: var(--ink); font-size: 13.5px; margin-top: 4px; }

/* Relations */
.th-rel-wrap { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.th-rel-wrap h3 { font-size: 20px; }
.th-rel-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.th-rel-row { padding: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.th-rel-pair { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.th-jump {
  padding: 3px 9px; background: rgba(var(--cyan-rgb), 0.1); border: 1px solid rgba(var(--cyan-rgb), 0.4);
  color: var(--cyan); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.th-rel-row b { display: block; font-size: 15px; margin-bottom: 3px; }
.th-rel-row p { color: var(--muted); font-size: 13.5px; }

/* Calendar */
.th-cal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.th-cal-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.th-cal-card time { font-family: var(--f-mono); font-size: 12.5px; color: var(--amber); font-weight: 700; }
.th-cal-card h4 { font-size: 16px; }
.th-cal-card p { color: var(--muted); font-size: 13.5px; }

/* Sector Switcher */
.th-sector-box { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.th-sector-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.th-sector-info { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.th-sector-info h3 { font-size: 22px; }
.th-sector-info p { color: var(--muted); font-size: 14.5px; }
.th-sector-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.th-sec-tab {
  text-align: left; padding: 10px 12px; background: var(--alt); border: 1px solid var(--line);
  color: inherit; font: inherit; cursor: pointer; display: grid; gap: 2px;
}
.th-sec-tab span { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
.th-sec-tab b { font-size: 13.5px; }
.th-sec-tab.is-active, .th-sec-tab:hover { border-color: var(--cyan); background: rgba(var(--cyan-rgb), 0.1); }
.th-sec-tab.is-active span { color: var(--cyan); }

/* Start & CLI */
.th-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.th-start-card { background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.th-start-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.th-start-body { padding: 16px 18px; display: grid; gap: 6px; }
.th-start-body h3 { font-size: 17.5px; }
.th-start-body p { color: var(--muted); font-size: 13.8px; }
.th-cli-box { background: #0a0f17; border: 1px solid var(--line); display: grid; }
.th-cli-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.th-cli-row:last-child { border-bottom: none; }
.th-cli-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.th-prompt { color: var(--cyan); font-family: var(--f-mono); font-weight: 700; }
.th-cli-main code { padding: 2px 8px; background: rgba(var(--cyan-rgb), 0.12); color: var(--cyan); font-family: var(--f-mono); font-size: 13px; }
.th-cli-desc { color: var(--muted); font-size: 13.5px; }
.th-copy {
  padding: 6px 12px; background: var(--surface2); border: 1px solid var(--line);
  color: var(--ink); font-family: var(--f-mono); font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.th-copy:hover { border-color: var(--cyan); color: var(--cyan); }

/* Footer */
.th-footer { padding: 44px 0 56px; border-top: 1px solid var(--line); }
.th-footer-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.th-pen { display: block; font-size: 19px; margin-top: 4px; }
.th-bio { color: var(--muted); font-size: 13.8px; margin-top: 4px; max-width: 460px; }

/* Appraisal Modal */
.th-modal[hidden] { display: none !important; }
.th-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.th-modal-bg { position: fixed; inset: 0; background: rgba(4, 7, 12, 0.86); backdrop-filter: blur(4px); }
.th-modal-panel {
  position: relative; z-index: 1; width: min(940px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--alt); border: 1px solid rgba(var(--cyan-rgb), 0.55); padding: 26px;
  display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: 26px;
}
.th-modal-img-wrap { position: relative; border: 1px solid var(--line); }
.th-modal-img-wrap img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; }
.th-modal-img-wrap .th-rank-pill { position: absolute; top: 12px; left: 12px; background: rgba(7,10,15,0.88); }
.th-expr-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.th-expr-btn { padding: 6px 11px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.th-expr-btn.is-active, .th-expr-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.th-modal-right { display: grid; gap: 14px; align-content: start; }
.th-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.th-modal-head h3 { font-size: 28px; margin-top: 2px; }
.th-modal-btns { display: flex; gap: 6px; }
.th-modal-bio { font-size: 14.5px; color: var(--ink); }
.th-modal-traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.th-modal-traits div { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); }
.th-modal-traits dt { font-family: var(--f-mono); font-size: 11px; color: var(--cyan); }
.th-modal-traits dd { margin: 3px 0 0; font-size: 13.5px; }
.th-weak-box { padding: 14px; background: rgba(var(--amber-rgb), 0.06); border: 1px dashed rgba(var(--amber-rgb), 0.55); display: grid; gap: 10px; }
.th-weak-body { font-size: 14px; color: #ffdfb4; line-height: 1.7; }

@media (max-width: 900px) {
  .th-hero-grid, .th-brief-grid, .th-sector-box, .th-modal-panel { grid-template-columns: 1fr; }
  .th-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-ticker { grid-template-columns: 1fr; }
  .th-links { display: none; }
}

.wt-modal[hidden] { display: none !important; }
.wt-modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 20px;
}
.wt-backdrop {
  position: fixed; inset: 0; background: rgba(8, 8, 10, 0.84);
  backdrop-filter: blur(4px);
}
.wt-shell {
  position: relative; z-index: 1; width: min(740px, 100%); max-height: 92vh;
  background: #101114; color: #f4f2ec; display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 28px 80px rgba(0,0,0,0.65);
}
.wt-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.wt-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.wt-head p { margin: 3px 0 0; font-size: 12.5px; color: rgba(244,242,236,0.66); }
.wt-close {
  background: transparent; color: #f4f2ec; border: 1px solid rgba(255,255,255,0.28);
  padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.wt-close:hover { background: rgba(255,255,255,0.12); }
.wt-strip {
  overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 10px;
}
.wt-cut { margin: 0; }
.wt-cut img { width: 100%; display: block; }
.wt-cut figcaption {
  padding: 8px 4px 0; font-size: 12.5px; color: rgba(244,242,236,0.72); text-align: center;
}
.wt-foot {
  padding: 14px 22px; border-top: 1px solid rgba(255,255,255,0.12); text-align: right;
}
.wt-play-cta {
  display: inline-block; padding: 10px 18px; background: var(--accent, #c83228); color: #fff;
  text-decoration: none; font-size: 13.5px; font-weight: 700;
}

