:root {
  --label: #f5f5f7;
  --label-2: rgba(235, 235, 245, 0.62);
  --label-3: rgba(235, 235, 245, 0.32);
  --sep: rgba(255, 255, 255, 0.08);
  --fill: rgba(118, 118, 128, 0.18);
  --fill-2: rgba(118, 118, 128, 0.28);
  --glass: rgba(22, 22, 26, 0.62);
  --blue: #0a84ff;
  --svc: #64d2ff;
  --xfer: #bf5af2;
  --cli: #ff9f0a;
  --green: #30d158;
  --yellow: #ffd60a;
  --red: #ff453a;
  --r: 18px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* .row sets display: flex, which would otherwise override hidden */
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--label);
  font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
.num, .row input, .list .v, #now, .opt b, .hero b { font-variant-numeric: tabular-nums; }

#cesium { position: fixed; inset: 0; }
.cesium-viewer-bottom { left: 50% !important; transform: translateX(-50%); bottom: 2px !important; opacity: 0.35; }
.cesium-credit-logoContainer, .cesium-credit-textContainer { font-size: 9px !important; }

/* Glass */
.card, .topbar .seg, .pill, .timebar, .legend {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.topbar { position: fixed; top: 14px; left: 0; right: 0; display: flex; justify-content: center; align-items: center;
  pointer-events: none; z-index: 3; }
.topbar > * { pointer-events: auto; }
.brand { position: absolute; left: 22px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.pill { position: absolute; right: 22px; padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--label-2); }
.pill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px;
  background: var(--label-3); vertical-align: 1px; }
.pill.live::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill.demo::before { background: var(--yellow); }

.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--fill); gap: 2px; }
.topbar .seg { border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--label-2); padding: 5px 16px; border-radius: 8px;
  cursor: pointer; font-weight: 500; transition: background .2s, color .2s; }
.seg button.on { background: rgba(255, 255, 255, 0.16); color: var(--label); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.seg.small button { padding: 4px 10px; font-size: 12px; }

.card { position: fixed; top: 64px; bottom: 76px; width: 320px; border-radius: var(--r); padding: 18px 16px 18px;
  overflow-y: auto; z-index: 2; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.left { left: 16px; }
.right { right: 16px; width: 348px; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; margin: 0 2px 14px; }
h2 { font-size: 12px; font-weight: 600; color: var(--label-2); margin: 0 4px 7px; }
.group { margin-bottom: 18px; }
.group .seg { display: flex; margin-bottom: 8px; }
.group .seg button { flex: 1; }
.foot { margin: 7px 4px 0; font-size: 11.5px; color: var(--label-3); }

/* Grouped inset list (iOS Settings style) */
.list { background: rgba(255, 255, 255, 0.045); border-radius: 12px; overflow: hidden; }
.list + .list { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; color: var(--label); }
.list > * + * { border-top: 0.5px solid var(--sep); }
.row input, .row select { flex: 1; min-width: 0; background: transparent; border: 0; text-align: right; color: var(--label-2);
  padding: 8px 0; outline: none; }
.row input:focus { color: var(--label); }
.row select { appearance: none; cursor: pointer; }
.row select option { background: #1c1c1e; }
.row em { font-style: normal; color: var(--label-3); min-width: 20px; font-size: 12px; }
.row.search input { text-align: left; color: var(--label); font-size: 14px; }
.row.file { cursor: pointer; color: var(--blue); }
.row.file input { position: absolute; opacity: 0; width: 1px; }
.lookup { border: 0; background: none; color: var(--blue); cursor: pointer; padding: 6px 0; font-weight: 500; }
.found:empty { display: none; }
.found { padding: 9px 12px; font-size: 12px; color: var(--label-2); line-height: 1.5; }
.found .name { color: var(--label); font-weight: 600; font-size: 13px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.tag.lo { background: rgba(255, 214, 10, 0.16); color: var(--yellow); }
.tag.hi { background: rgba(48, 209, 88, 0.16); color: var(--green); }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

.primary { width: 100%; height: 44px; border: 0; border-radius: 12px; background: var(--blue); color: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: filter .2s, transform .1s; }
.primary:hover { filter: brightness(1.1); }
.primary:active { transform: scale(0.99); }
.primary:disabled { background: var(--fill-2); color: var(--label-3); cursor: default; filter: none; transform: none; }
.progress { margin-top: 10px; }
.progress .track { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.progress .bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--blue); border-radius: 2px; transition: transform .5s; }
.progress .txt { margin-top: 6px; font-size: 11.5px; color: var(--label-2); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-radius: 6px; }

/* Search */
.sat-search { position: relative; margin-bottom: 6px; }
.sat-search input { width: 100%; height: 36px; border: 0; border-radius: 10px; padding: 0 12px 0 34px; color: var(--label);
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50%;
  outline: none; }
.sat-search input::placeholder { color: var(--label-3); }
.sat-search input:focus { box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.6); }
.results { position: absolute; z-index: 5; left: 0; right: 0; top: 40px; max-height: 320px; overflow-y: auto; border-radius: 12px;
  background: rgba(30, 30, 34, 0.96); border: 0.5px solid rgba(255, 255, 255, 0.12); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.results button { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 12px;
  border: 0; background: none; text-align: left; cursor: pointer; }
.results button + button { border-top: 0.5px solid var(--sep); }
.results button:hover, .results button.active { background: rgba(10, 132, 255, 0.22); }
.results .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .meta { color: var(--label-3); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.results .none { padding: 10px 12px; color: var(--label-3); font-size: 12px; }
.hint { margin: 0 4px 14px; }

/* Satellite card (click on the globe or a search result) */
.satcard { position: fixed; z-index: 4; width: 264px; padding: 14px 14px 12px; border-radius: 16px;
  background: rgba(22, 22, 26, 0.78); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 0.5px solid rgba(255, 255, 255, 0.12); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-zone { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--svc); }
.sc-close { border: 0; background: var(--fill); width: 22px; height: 22px; border-radius: 50%; color: var(--label-2); cursor: pointer; font-size: 10px; }
.sc-name { margin: 4px 0 2px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.sc-sub { margin: 0 0 10px; font-size: 11.5px; color: var(--label-3); }
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sc-grid div { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 7px 9px; }
.sc-grid span { display: block; font-size: 10.5px; color: var(--label-3); }
.sc-grid b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-actions { display: flex; gap: 6px; margin-top: 10px; }
.sc-actions button { flex: 1; height: 32px; border: 0; border-radius: 9px; font-weight: 600; font-size: 12px; cursor: pointer; }
.sc-actions [data-slot="svc"] { background: rgba(100, 210, 255, 0.18); color: var(--svc); }
.sc-actions [data-slot="cli"] { background: rgba(255, 159, 10, 0.18); color: var(--cli); }
.sc-actions button:hover { filter: brightness(1.25); }
.sc-focus { width: 100%; height: 30px; margin-top: 6px; border: 0; border-radius: 9px; background: var(--fill);
  color: var(--label); font-size: 12px; font-weight: 500; cursor: pointer; }
.sc-focus:hover { background: var(--fill-2); }

/* Camera centred on a satellite: zoom and rotate around it */
.focus { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center;
  gap: 10px; padding: 5px 6px 5px 14px; border-radius: 999px; font-size: 12px; color: var(--label);
  background: rgba(10, 132, 255, 0.22); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 0.5px solid rgba(10, 132, 255, 0.5); }
.focus button { border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, 0.14); color: var(--label);
  font-size: 12px; cursor: pointer; }

/* Results */
.notice { display: flex; gap: 9px; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; font-size: 12px;
  line-height: 1.45; background: rgba(255, 214, 10, 0.09); color: rgba(255, 236, 160, 0.92); }
.notice::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); color: #000;
  font-weight: 800; font-size: 11px; display: grid; place-items: center; margin-top: 1px; }
.notice.info { background: rgba(10, 132, 255, 0.1); color: rgba(190, 220, 255, 0.92); }
.notice.info::before { content: "i"; background: var(--blue); color: #fff; }
.notice.err { background: rgba(255, 69, 58, 0.12); color: #ffb3ad; }
.notice.err::before { background: var(--red); color: #fff; }
#warnings { margin-bottom: 10px; }
#warnings:empty { display: none; }

.opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 9px 12px;
  cursor: pointer; transition: background .15s; }
.opt:hover { background: rgba(255, 255, 255, 0.04); }
.opt.sel { background: rgba(10, 132, 255, 0.18); }
.opt .rev { font-weight: 600; white-space: nowrap; }
.opt .rev small { display: block; font-weight: 400; color: var(--label-3); font-size: 11px; }
.opt .meta { color: var(--label-2); font-size: 12px; }
.opt .meta .bar { height: 3px; border-radius: 2px; background: var(--fill); margin-top: 5px; overflow: hidden; }
.opt .meta .bar i { display: block; height: 100%; background: var(--xfer); border-radius: 2px; }
.opt b { font-size: 15px; font-weight: 600; text-align: right; }
.opt b small { display: block; font-size: 11px; font-weight: 400; color: var(--label-3); }
.opt.fail { cursor: default; color: var(--red); }

.hero:empty { display: none; }
.hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.hero div { background: rgba(255, 255, 255, 0.045); border-radius: 12px; padding: 10px 11px; }
.hero span { display: block; font-size: 11px; color: var(--label-2); }
.hero b { display: block; font-size: 19px; font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; }
.hero b small { font-size: 11px; font-weight: 500; color: var(--label-2); margin-left: 2px; }

.plan .empty { color: var(--label-3); margin: 4px; }
.burn { background: rgba(255, 255, 255, 0.045); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; }
.burn .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.burn .hd b { font-weight: 600; }
.burn .hd span { font-size: 11px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.burn .big { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.burn .big small { font-size: 12px; color: var(--label-2); font-weight: 500; margin-left: 3px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; margin-top: 6px; }
.kv span:nth-child(odd) { color: var(--label-3); }
.kv span:nth-child(even) { text-align: right; color: var(--label-2); font-variant-numeric: tabular-nums; }
.list .kvrow { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 12.5px; }
.list .kvrow span:first-child { color: var(--label-2); }
.list .kvrow .v { color: var(--label); }
.list .kvrow .v.good { color: var(--green); }

.export { display: flex; gap: 8px; }
.export button { flex: 1; height: 36px; border: 0; border-radius: 10px; background: var(--fill); color: var(--blue);
  font-weight: 600; cursor: pointer; }
.export button:disabled { color: var(--label-3); cursor: default; }

/* Time bar */
.timebar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 720px));
  min-width: 380px; display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 8px; border-radius: 14px; z-index: 2; }
#play { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill-2); cursor: pointer; font-size: 11px; flex: none; }
#scrub { flex: 1; accent-color: var(--blue); height: 4px; }
#now { font-size: 12px; color: var(--label-2); white-space: nowrap; }

.legend { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; padding: 6px 12px;
  border-radius: 999px; font-size: 11.5px; color: var(--label-2); z-index: 1; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legend .svc { background: var(--svc); box-shadow: 0 0 6px var(--svc); }
.legend .xfer { background: var(--xfer); box-shadow: 0 0 6px var(--xfer); }
.legend .cli { background: var(--cli); box-shadow: 0 0 6px var(--cli); }
.legend .man { background: #fff; }

@media (max-width: 1100px) {
  html, body { overflow: auto; }
  #cesium { position: relative; height: 62vh; display: block; }
  .card { position: static; width: auto; margin: 12px 16px; }
  .topbar { position: absolute; }
  .brand, .legend { display: none; }
  .timebar { position: absolute; top: calc(62vh - 58px); bottom: auto; width: calc(100% - 32px); min-width: 0; }
}
