:root {
  --bg-0: #040812;
  --bg-1: #0a1428;
  --bg-2: #101d35;
  --line: rgba(242, 210, 154, 0.24);
  --line-soft: rgba(137, 184, 255, 0.24);
  --text: #f7f3ea;
  --sub: #c8d8ee;
  --gold: #f2d29a;
  --ok: #a4ffd6;
  --warn: #ffe3ad;
  --err: #ffd8e3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Pretendard Variable", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(980px 620px at 12% -14%, rgba(76, 120, 230, 0.3), transparent 62%),
    radial-gradient(880px 520px at 88% -6%, rgba(242, 210, 154, 0.16), transparent 58%),
    linear-gradient(162deg, var(--bg-0), var(--bg-1) 44%, var(--bg-2));
  overflow-x: hidden;
}

body[data-theme="graphite"] {
  --bg-0: #06090e;
  --bg-1: #0d131f;
  --bg-2: #181f2d;
  --line: rgba(207, 214, 231, 0.22);
  --line-soft: rgba(207, 214, 231, 0.14);
  --gold: #d3dae8;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 116px 116px;
  opacity: 0.12;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.96), transparent 84%);
}

body::after {
  background: radial-gradient(circle at center, transparent 0, rgba(0, 0, 0, 0.24) 62%, rgba(0, 0, 0, 0.6) 100%);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 18px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-mini {
  text-decoration: none;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-ghost,
.btn-primary {
  min-height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  border-color: rgba(242, 210, 154, 0.34);
  color: #fff8ee;
  background: linear-gradient(135deg, rgba(201, 146, 50, 0.96), rgba(139, 96, 29, 0.92));
  box-shadow: 0 12px 30px rgba(68, 46, 10, 0.28);
}

.hero,
.signal-panel,
.workspace-panel,
.service-nav,
.policy-panel,
.hub-grid-panel,
.delivery-panel,
.bridge-panel {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(8, 17, 34, 0.84), rgba(6, 14, 28, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  margin-top: 14px;
}

.hero::before,
.signal-panel::before,
.workspace-panel::before,
.service-nav::before,
.policy-panel::before,
.hub-grid-panel::before,
.delivery-panel::before,
.bridge-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(124deg, rgba(242, 210, 154, 0.06), transparent 34%, rgba(125, 178, 255, 0.05));
}

.hero-inner,
.signal-inner,
.workspace-inner,
.nav-inner,
.policy-inner,
.hub-inner,
.delivery-inner,
.bridge-inner {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 800;
}

.service-title {
  margin: 10px 0 0;
  color: #fff3dc;
  font-size: clamp(34px, 4vw, 58px);
  font-family: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;
  line-height: 1.02;
}

.service-subtitle-title {
  font-size: clamp(28px, 3vw, 40px);
}

.service-subtitle {
  margin: 10px 0 0;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.7;
}

.hero-grid,
.delivery-grid,
.bridge-grid,
.hub-grid {
  display: grid;
  gap: 10px;
}

.hero-grid {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delivery-grid {
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bridge-grid {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-grid {
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-card,
.delivery-card,
.bridge-card,
.hub-card,
.visual-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(18, 31, 58, 0.88), rgba(8, 16, 33, 0.84));
  padding: 14px;
}

.meta-title,
.delivery-title,
.bridge-title,
.hub-name,
.visual-title {
  margin: 8px 0 0;
  color: #fff3de;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.meta-copy,
.delivery-copy,
.bridge-copy,
.hub-sub,
.visual-copy,
.policy-copy,
.signal-copy {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.62;
  color: var(--sub);
}

.visual-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chip-row,
.tag-row,
.nav-chip-row,
.runtime-toolbar,
.meta-chip-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.tag,
.nav-chip,
.status-pill,
.meta-chip,
.runtime-chip {
  border-radius: 999px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #dae4f3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.status-pill {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
}

.status-ok {
  color: var(--ok);
  border-color: rgba(117, 227, 172, 0.48);
  background: rgba(18, 85, 56, 0.46);
}

.status-warn {
  color: var(--warn);
  border-color: rgba(255, 213, 106, 0.48);
  background: rgba(88, 59, 10, 0.46);
}

.status-err {
  color: var(--err);
  border-color: rgba(255, 148, 174, 0.48);
  background: rgba(98, 28, 50, 0.52);
}

.signal-head,
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.signal-title {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.module-notice {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}

.module-runtime {
  margin-top: 10px;
}

.module-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-grid.single {
  grid-template-columns: 1fr;
}

.module-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(14, 24, 43, 0.86), rgba(8, 14, 26, 0.82));
  padding: 12px;
}

.module-title-small {
  margin: 0;
  color: #f6ecd8;
  font-size: 15px;
  font-weight: 700;
}

.field {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 11px;
  color: #cfdaf0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 10, 20, 0.72);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.btn-row,
.check-row,
.toggle-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.action-btn {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(242, 210, 154, 0.42);
  background: linear-gradient(135deg, rgba(201, 146, 50, 0.92), rgba(139, 96, 29, 0.88));
  color: #fff8ec;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
}

.action-btn.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f3fb;
}

.action-btn.danger {
  border-color: rgba(255, 142, 167, 0.5);
  background: rgba(124, 22, 50, 0.72);
}

.result-box,
.data-list,
.table-shell {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(4, 8, 16, 0.62);
  padding: 10px;
}

.result-box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.58;
  color: #d5deef;
}

.data-list {
  display: grid;
  gap: 8px;
}

.data-item {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
}

.data-item-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.data-item-copy {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--sub);
}

.data-item-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  font-size: 10px;
  color: #d4deef;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 6px;
  text-align: left;
}

.table th {
  color: #d3def2;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table td {
  color: #edf2fb;
}

.empty-state {
  color: #9aa8c4;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.runtime-log-shell {
  margin-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 12px;
}

.runtime-log {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.runtime-log li {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 7px 9px;
  font-size: 11px;
  color: #cfdbf1;
}

.hub-card {
  color: #f0f5ff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.orb-stage {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 4px auto 10px;
  display: grid;
  place-items: center;
}

.orb-stage::before,
.orb-stage::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: ripple 7.2s ease-out infinite;
}

.orb-stage::before {
  inset: 12%;
}

.orb-stage::after {
  inset: -4%;
  border-color: rgba(124, 174, 255, 0.14);
  animation-delay: 1.7s;
}

.orb {
  width: 58%;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), rgba(242, 210, 154, 0.58) 24%, rgba(80, 123, 214, 0.3) 58%, rgba(7, 14, 31, 0.14) 78%, transparent 82%),
    radial-gradient(circle at 60% 72%, rgba(26, 45, 92, 0.66), rgba(8, 15, 34, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 42px rgba(242, 210, 154, 0.2),
    0 0 122px rgba(96, 149, 255, 0.18),
    inset -18px -26px 42px rgba(0, 0, 0, 0.34);
  animation: orbPulse 6.2s ease-in-out infinite;
}

@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  30% {
    opacity: 0.28;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -6px, 0) scale(1.03);
  }
}

@media (max-width: 1100px) {
  .hub-grid,
  .delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .hero-inner,
  .hero-grid,
  .bridge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 20px 12px 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    justify-content: stretch;
  }

  .hero,
  .signal-panel,
  .workspace-panel,
  .service-nav,
  .policy-panel,
  .hub-grid-panel,
  .delivery-panel,
  .bridge-panel {
    border-radius: 22px;
  }

  .hero-inner,
  .signal-inner,
  .workspace-inner,
  .nav-inner,
  .policy-inner,
  .hub-inner,
  .delivery-inner,
  .bridge-inner {
    padding: 16px 14px;
  }

  .hub-grid,
  .delivery-grid,
  .bridge-grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
