:root {
  --bg: #050a12;
  --glass: rgba(10, 18, 30, 0.72);
  --glass2: rgba(18, 30, 46, 0.7);
  --line: rgba(150, 190, 230, 0.15);
  --line2: rgba(150, 190, 230, 0.28);
  --txt: #e6eef6;
  --dim: #8ea2b7;
  --acc: #66d9ff;
  --yel: #ffd479;
  --c0: #5fd0ff;
  --c1: #7dff9a;
  --c2: #ff9f5a;
  --kr: #ff5d8f;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--txt); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(120% 90% at 50% 30%, #0b1828 0%, #050a12 60%, #03060a 100%); }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; outline: none; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
button { font-family: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.panel { position: fixed; background: var(--glass); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 44px rgba(0,0,0,0.38); z-index: 5; }
.pill { background: rgba(255,255,255,0.05); border: 1px solid var(--line2); border-radius: 99px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; transition: background .15s, border-color .15s; }
.pill:hover { background: rgba(102,217,255,0.12); border-color: rgba(102,217,255,0.5); }
.pill.sm { padding: 4px 10px; font-size: 11.5px; }
.pill.acc { background: linear-gradient(135deg, rgba(102,217,255,0.28), rgba(102,217,255,0.08)); border-color: rgba(102,217,255,0.6); color: #dff6ff; }
.x { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.04); font-size: 19px; line-height: 1; z-index: 3; }
.x:hover { background: rgba(255,255,255,0.12); }

/* brand */
#brand { position: fixed; left: 24px; top: 18px; z-index: 6; pointer-events: none; text-shadow: 0 2px 18px rgba(0,0,0,0.7); max-width: calc(100vw - 420px); }
#brand .kicker { font-size: 11.5px; color: var(--acc); letter-spacing: 0.06em; font-weight: 600; }
#brand h1 { margin: 3px 0 0; font-size: 36px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 15%, #9fdcff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#brand .sub { font-size: 13px; color: var(--dim); margin-top: 4px; font-weight: 500; }
#brand .sub span { opacity: 0.7; }

/* hero counter */
#hero { left: 18px; top: 116px; width: 318px; padding: 14px 16px 12px; }
.cnt-l { font-size: 12.5px; color: var(--dim); font-weight: 600; letter-spacing: 0.02em; }
.cnt { display: flex; align-items: baseline; gap: 4px; margin: 2px 0 2px; }
.cnt b { font-family: var(--mono); font-size: 50px; font-weight: 400; letter-spacing: -0.04em; line-height: 1; color: #fff;
  text-shadow: 0 0 26px rgba(102,217,255,0.45); }
.cnt span { font-size: 18px; color: #cfe6f7; font-weight: 700; }
.cnt2 { font-size: 13px; color: #cfdbe7; }
.cnt2 b { font-family: var(--mono); color: var(--yel); font-size: 15px; font-weight: 400; }
.types { margin-top: 10px; display: grid; gap: 3px; }
.ty { display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; font-size: 12.5px; text-align: left; opacity: 0.45; transition: opacity .15s, background .15s; }
.ty.on { opacity: 1; }
.ty:hover { background: rgba(255,255,255,0.05); border-color: var(--line); }
.ty .sh { display: none; }
.ty em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 12px; color: #d8e6f2; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.t0 { background: var(--c0); box-shadow: 0 0 8px var(--c0); }
.dot.t1 { background: var(--c1); box-shadow: 0 0 8px var(--c1); }
.dot.t2 { background: var(--c2); box-shadow: 0 0 8px var(--c2); }
.pulse-l { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); padding: 3px 6px; }
.ring { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #fff; display: inline-block; animation: pr 2s infinite; flex: none; }
@keyframes pr { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.asof { margin-top: 8px; font-size: 10.5px; color: var(--dim); line-height: 1.5; }

/* top bar */
#topbar { position: fixed; right: 18px; top: 16px; z-index: 7; display: flex; gap: 8px; align-items: center; }
.lang { display: flex; align-items: center; gap: 2px; background: var(--glass); border: 1px solid var(--line2); border-radius: 99px; padding: 3px 6px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lang button { background: none; border: 0; padding: 3px 7px; font-size: 12.5px; font-weight: 600; color: var(--dim); border-radius: 99px; }
.lang button.on { color: #06131f; background: var(--acc); }
.lang span { color: var(--line2); font-size: 11px; }
#topbar .pill { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* side */
#side { right: 18px; top: 62px; width: 336px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; padding: 12px; }
.search { position: relative; }
.search input { width: 100%; background: rgba(0,0,0,0.25); border: 1px solid var(--line2); border-radius: 10px; color: var(--txt); padding: 9px 12px; font-size: 13.5px; font-family: var(--sans); outline: none; }
.search input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(102,217,255,0.15); }
.qres { position: absolute; left: 0; right: 0; top: 42px; background: #0b1624; border: 1px solid var(--line2); border-radius: 10px; z-index: 9; max-height: 260px; overflow: auto; }
.qres button { display: flex; width: 100%; gap: 8px; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; font-size: 12.5px; }
.qres button:hover { background: rgba(102,217,255,0.1); }
.qres .none { padding: 10px; color: var(--dim); font-size: 12.5px; }
.tabs { display: flex; gap: 4px; margin: 10px 0 8px; background: rgba(0,0,0,0.2); padding: 3px; border-radius: 10px; }
.tab { flex: 1; background: none; border: 0; padding: 6px 4px; font-size: 12.5px; font-weight: 600; color: var(--dim); border-radius: 8px; }
.tab.on { background: rgba(102,217,255,0.16); color: #e8f8ff; }
.tabp { display: none; overflow: auto; min-height: 0; scrollbar-width: thin; }
.tabp.on { display: block; }
.grp { padding: 9px 2px; border-top: 1px solid var(--line); }
.grp:first-child { border-top: 0; padding-top: 2px; }
.lbl { font-size: 12px; color: var(--dim); margin-bottom: 6px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.lbl b { color: var(--txt); font-weight: 400; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12px; }
.chip.on { background: rgba(102,217,255,0.18); border-color: rgba(102,217,255,0.6); color: #e8f8ff; }
.chip i { font-style: normal; color: var(--dim); font-family: var(--mono); font-size: 11px; margin-left: 3px; }
select { width: 100%; background: rgba(0,0,0,0.25); color: var(--txt); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 9px; font-family: var(--sans); font-size: 13px; }
select option { background: #0b1624; }
.tog { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; cursor: pointer; }
.tog input { accent-color: var(--kr); margin-top: 2px; }
.krbox { margin-top: 8px; display: grid; gap: 4px; }
.kr-row { display: flex; align-items: center; gap: 8px; font-size: 12px; background: rgba(255,93,143,0.07); border: 1px solid rgba(255,93,143,0.22); border-radius: 8px; padding: 5px 8px; }
.kr-row b { margin-left: auto; font-family: var(--mono); font-weight: 400; }
.kr-row button { background: none; border: 0; padding: 0; text-decoration: underline dotted; text-underline-offset: 3px; font-size: 12px; text-align: left; }

.bars { display: grid; gap: 3px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; background: none; border: 0; border-radius: 8px; padding: 5px 6px; text-align: left; font-size: 12.5px; }
.bar:hover, .bar.on { background: rgba(102,217,255,0.08); }
.bar .bb { grid-column: 1 / 3; height: 5px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; display: flex; }
.bar .bb i { display: block; height: 100%; }
.bar em { font-style: normal; font-family: var(--mono); font-size: 12px; color: #d8e6f2; }
.bar.kr { background: rgba(255,93,143,0.08); outline: 1px solid rgba(255,93,143,0.3); }
.bar.kr span { color: #ffd0de; font-weight: 700; }
.feedhead { font-size: 11.5px; padding: 0 4px 6px; line-height: 1.5; }
.feed { display: grid; gap: 2px; }
.fd { display: grid; grid-template-columns: 10px 1fr auto; gap: 1px 8px; align-items: center; background: none; border: 0; border-radius: 8px; padding: 6px 6px; text-align: left; font-size: 12.5px; }
.fd:hover { background: rgba(102,217,255,0.08); }
.fd b { font-family: var(--mono); font-weight: 400; }
.fd small { grid-column: 2 / 4; color: var(--dim); font-size: 11.5px; }
.fd em { font-style: normal; color: var(--yel); font-size: 11.5px; }

/* float panel */
#fp { right: 18px; top: 62px; bottom: 18px; width: 470px; overflow: hidden; display: flex; flex-direction: column; z-index: 8; }
.fp-top { position: relative; height: 0; }
.grab { display: none; }
#fpBody { overflow-y: auto; overflow-x: hidden; padding: 16px 18px 20px; scrollbar-width: thin; flex: 1; }
.fh .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255,255,255,0.05); }
.fh h2 { margin: 8px 0 2px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.fh h2 span { font-family: var(--mono); font-weight: 400; letter-spacing: -0.02em; }
.fh .who { font-size: 13px; color: #cfdbe7; }
.fh .who .kr { color: #ffb3c9; font-weight: 700; }
.status { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(125,255,154,0.08); border: 1px solid rgba(125,255,154,0.25); color: #c9ffd6; }
.status.old { background: rgba(255,212,121,0.08); border-color: rgba(255,212,121,0.3); color: #ffe7b0; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 12px; }
.fact { background: var(--glass2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.fact .k { font-size: 11px; color: var(--dim); font-weight: 600; }
.fact .v { font-size: 13.5px; margin-top: 1px; overflow-wrap: anywhere; }
.fact .v .mono { font-size: 13px; }
.fact .s { font-size: 11px; color: var(--dim); margin-top: 1px; overflow-wrap: anywhere; }
.fact.w { grid-column: 1 / 3; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acts .pill { padding: 8px 14px; font-size: 13px; }
.sec { margin-top: 18px; }
.sec h3 { font-size: 14px; margin: 0 0 2px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sec h3 small { font-weight: 500; color: var(--dim); font-size: 11.5px; }
.sec .note { font-size: 11.5px; color: var(--dim); line-height: 1.5; margin: 3px 0 6px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; background: rgba(0,0,0,0.2); border-radius: 9px; padding: 3px; margin: 6px 0; }
.seg button { background: none; border: 0; padding: 4px 9px; font-size: 12px; font-weight: 600; border-radius: 7px; color: var(--dim); }
.seg button.on { background: rgba(102,217,255,0.18); color: #e8f8ff; }
.cv { position: relative; }
.cv canvas { width: 100%; display: block; border-radius: 8px; }
.cv .rd { position: absolute; pointer-events: none; background: rgba(5,12,20,0.88); border: 1px solid var(--line2); border-radius: 7px; padding: 4px 7px; font-size: 11px; font-family: var(--mono); white-space: nowrap; transform: translate(-50%, -115%); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bgcg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bgcg .cv { background: rgba(0,0,0,0.12); border-radius: 8px; }

/* tooltip */
.tip { position: fixed; z-index: 20; pointer-events: none; background: rgba(5,12,20,0.92); border: 1px solid var(--line2); border-radius: 9px; padding: 6px 9px; font-size: 12px; line-height: 1.45; transform: translate(12px, -50%); white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.tip b { font-family: var(--mono); font-weight: 400; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(2,6,10,0.55); display: flex; align-items: center; justify-content: center; padding: 18px; }
.mbox { position: relative; max-width: 760px; width: 100%; max-height: calc(100vh - 36px); overflow: auto; padding: 22px 26px; line-height: 1.65; font-size: 13.5px; }
.mbox h2 { margin: 0 0 4px; font-size: 21px; }
.mbox h3 { font-size: 14.5px; margin: 18px 0 4px; color: #dff3ff; }
.mbox p, .mbox li { color: #cfdbe7; }
.mbox ul { padding-left: 18px; margin: 4px 0; }
.mbox table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 6px 0; }
.mbox td, .mbox th { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.mbox th { color: var(--dim); font-weight: 600; white-space: nowrap; }
.mbox .cite { font-size: 12px; background: rgba(255,255,255,0.04); border-left: 3px solid var(--acc); padding: 8px 10px; border-radius: 4px; }
.mbox a { color: var(--acc); }

#credit { position: fixed; left: 20px; bottom: 12px; z-index: 4; font-size: 10.5px; color: rgba(160,180,200,0.6); max-width: calc(100vw - 520px); line-height: 1.5; }
#err { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 99; background: #a1223a; color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 12px; max-width: 90vw; }
#loading { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--dim); }
.spin { width: 18px; height: 18px; border: 2px solid rgba(102,217,255,0.2); border-top-color: var(--acc); border-radius: 50%; animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* dive */
#dive { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
#dive > * { pointer-events: auto; }
#dive .ruler, #dive .phase, #dive .dvread { pointer-events: none; }
.dv-head { position: absolute; left: 22px; top: 16px; right: 22px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none !important; }
.dv-head > div { pointer-events: none; text-shadow: 0 2px 14px rgba(0,0,0,0.8); }
.dv-head .kicker { font-size: 11.5px; color: var(--acc); font-weight: 600; letter-spacing: 0.05em; }
.dv-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 800; }
.dv-head h2 span { font-family: var(--mono); font-weight: 400; }
.x.big { position: relative; right: auto; top: auto; width: 40px; height: 40px; font-size: 24px; background: var(--glass); pointer-events: auto; }
.ruler { position: absolute; left: 0; top: 0; bottom: 0; width: 90px; }
.ruler div { white-space: nowrap; position: absolute; left: 18px; font-family: var(--mono); font-size: 11.5px; color: rgba(220,236,250,0.85); transform: translateY(-50%); display: flex; align-items: center; gap: 6px; text-shadow: 0 1px 6px #000; }
.ruler div::after { content: ""; width: 26px; height: 1px; background: rgba(220,236,250,0.5); }
.ruler div.park { color: var(--yel); }
.ruler div.park::after { background: var(--yel); width: 40px; }
.phase { position: absolute; left: 50%; top: 82px; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 14px rgba(0,0,0,0.9); width: min(640px, 90vw); }
.phase b { display: block; font-size: 20px; font-weight: 800; }
.phase span { display: block; font-size: 13px; color: #cfe1f0; margin-top: 3px; }
.dvread { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); font-size: 13px; color: #e8f4ff; background: rgba(4,10,18,0.55); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; white-space: nowrap; }
.dvprof { position: absolute; right: 22px; top: 90px; width: 190px; height: 300px; background: rgba(4,10,18,0.5); border: 1px solid var(--line); border-radius: 12px; }
.dv-bot { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(900px, calc(100vw - 32px)); background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dv-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dv-ctrl .seg { margin: 0; }
.dv-cb { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 11px; }
.dv-cb canvas { width: 140px; height: 9px; border-radius: 3px; }
.tl { position: relative; height: 44px; margin-top: 10px; cursor: pointer; }
.tl .ph { position: absolute; top: 0; height: 22px; border-radius: 5px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); font-size: 11px; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; color: var(--dim); }
.tl .ph.on { background: rgba(102,217,255,0.2); border-color: rgba(102,217,255,0.55); color: #fff; }
.tl .cur { position: absolute; top: -3px; width: 2px; height: 28px; background: var(--yel); box-shadow: 0 0 8px var(--yel); border-radius: 1px; }
.tl .clock { position: absolute; top: 27px; left: 0; right: 0; font-family: var(--mono); font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; }

@media (max-width: 1100px) {
  #fp { width: 420px; }
  #credit { max-width: calc(100vw - 460px); }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  #brand { left: 14px; top: 12px; max-width: calc(100vw - 150px); }
  #brand .kicker { font-size: 10.5px; }
  #brand h1 { font-size: 25px; }
  #brand .sub { font-size: 11.5px; }
  #brand .sub span { display: none; }
  #topbar { right: 10px; top: 10px; flex-direction: column; align-items: flex-end; gap: 6px; }
  #topbar .pill { padding: 4px 10px; font-size: 11.5px; }
  #hero { left: 10px; right: 10px; top: auto; bottom: 122px; width: auto; padding: 9px 12px 8px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: end; }
  #side.open ~ #hero, body.sheet #hero { display: none; }
  .cnt-l { grid-column: 1 / 3; font-size: 11.5px; }
  .cnt b { font-size: 34px; }
  .cnt span { font-size: 14px; }
  .cnt2 { font-size: 11.5px; padding-bottom: 5px; }
  .types { grid-column: 1 / 3; grid-template-columns: 1fr 1fr 1fr; gap: 2px; margin-top: 6px; }
  .ty { font-size: 11.5px; padding: 3px 4px; gap: 5px; }
  .ty .lg { display: none; } .ty .sh { display: inline; }
  .ty em { font-size: 11px; }
  .pulse-l { display: none; }
  .asof { grid-column: 1 / 3; margin-top: 4px; font-size: 9.5px; }
  #side { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 52vh; border-radius: 16px 16px 0 0; padding: 10px 12px 8px; }
  #side .tabp { display: none; }
  #side.open .tabp.on { display: block; }
  #side:not(.open) .tab.on { background: none; color: var(--dim); }
  #fp { left: 0; right: 0; width: auto; top: auto; bottom: 0; height: 64vh; border-radius: 16px 16px 0 0; }
  #fp.full { height: calc(100vh - 60px); }
  .grab { display: block; position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 70px; height: 18px; background: none; border: 0; z-index: 3; }
  .grab::before { content: ""; display: block; margin: 6px auto; width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); }
  #fpBody { padding: 18px 14px 20px; }
  .fh h2 { font-size: 22px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .bgcg { grid-template-columns: 1fr 1fr; }
  #credit { display: none; }
  .mbox { padding: 18px 16px; font-size: 13px; }
  .tip { display: none; }
  .phase { top: 70px; }
  .phase b { font-size: 16px; }
  .phase span { font-size: 12px; }
  .dvread { top: 128px; font-size: 11.5px; }
  .dvprof { right: 10px; top: auto; bottom: 150px; width: 120px; height: 180px; }
  .dv-head { left: 14px; right: 12px; top: 12px; }
  .dv-head h2 { font-size: 18px; }
  .ruler div { left: 8px; font-size: 10.5px; }
  .ruler div::after { width: 14px; }
  .dv-bot { bottom: 10px; padding: 8px 10px 10px; }
  .dv-cb { margin-left: 0; }
  .tl .ph { font-size: 9.5px; }
  #dvClk2 { display: none; }
}

body.diving #brand, body.diving #hero, body.diving #side, body.diving #fp, body.diving #credit, body.diving #topbar, body.diving #tip { display: none !important; }
