:root {
  color-scheme: light;
  font-family: "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-bg: #f6f7fb;
  --color-surface: rgba(255, 255, 255, 0.85);
  --color-border: rgba(120, 130, 180, 0.25);
  --color-text: #0f172a;
  --color-muted: #5b6275;
  --color-primary: #2563eb;
  --color-primary-soft: rgba(37, 99, 235, 0.12);
  --color-accent: #60a5fa;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-medium: 0 18px 40px rgba(79, 114, 205, 0.15);
}

body.theme-dark {
  color-scheme: dark;
  --color-bg: #0b1120;
  --color-surface: rgba(15, 23, 42, 0.9);
  --color-border: rgba(148, 163, 184, 0.28);
  --color-text: #e2e8f0;
  --color-muted: #94a3b8;
  --color-primary: #60a5fa;
  --color-primary-soft: rgba(96, 165, 250, 0.2);
  --color-accent: #93c5fd;
  --shadow-medium: 0 18px 40px rgba(2, 6, 23, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-background {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 45%),
              radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.25), transparent 55%);
  pointer-events: none;
  z-index: -2;
}

body.theme-dark .app-background {
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 45%),
              radial-gradient(circle at 12% 24%, rgba(15, 118, 110, 0.3), transparent 60%);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(246, 247, 251, 0.78);
  border-bottom: 1px solid var(--color-border);
}

body.theme-dark .site-header {
  background: rgba(15, 23, 42, 0.88);
  border-bottom-color: rgba(148, 163, 184, 0.28);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-logo {
  display: inline-block;
  height: 52px;
  width: auto;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.brand-text {
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.site-nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

.site-nav a:hover::after,
.site-nav a.primary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.site-nav .primary {
  color: var(--color-primary);
  font-weight: 600;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.theme-toggle .theme-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon {
  display: inline-block;
}

.theme-toggle .icon-moon path {
  fill: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.6);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.4);
  outline-offset: 2px;
}

.theme-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(37, 99, 235, 0.26));
  color: #0f172a;
}

body.theme-dark .theme-toggle {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.62);
  color: var(--color-accent);
  box-shadow: none;
}

body.theme-dark .theme-toggle:hover,
body.theme-dark .theme-toggle:focus-visible {
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.45);
  border-color: rgba(148, 163, 184, 0.55);
}

body.theme-dark .theme-toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(15, 118, 110, 0.35));
  color: var(--color-text);
}

body.theme-dark .theme-toggle .icon-moon {
  display: none;
}

body.theme-dark .theme-toggle .icon-sun {
  display: inline-block;
}

.logout {
  color: #ef4444;
  font-weight: 600;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 0.85rem;
  color: var(--color-primary);
}

.site-main {
  flex: 1;
  padding: 4.5rem 0 3.5rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.hero-copy .eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.6rem;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}

.hero-copy h1 span {
  color: var(--color-primary);
}

.hero-copy p {
  margin: 0 0 1.6rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.login-state {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.hero-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-border);
  display: grid;
  gap: 1.4rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

.metric .value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-primary);
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.status-list .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.6rem;
}

.status-list .dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.status-list .dot.down {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.status-list .status-meta {
  margin-left: 0.4rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.status-list .dot.warn {
  background: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
  margin-bottom: 3.5rem;
}

.feature-grid--authed {
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  grid-auto-flow: row;
}

@media (max-width: 980px) {
  .feature-grid--authed {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

@media (max-width: 640px) {
  .feature-grid--authed {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 0.85rem;
}

body.theme-dark .feature-card {
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.5);
}

.feature-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.feature-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.5;
}

.feature-card .status-meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.feature-link {
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.feature-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.feature-link:hover::after {
  transform: translateX(4px);
}

.quick-links {
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
}

body.theme-dark .quick-links {
  background: rgba(15, 23, 42, 0.88);
}

.quick-links h2 {
  margin-top: 0;
  margin-bottom: 1.4rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.quick-card {
  display: grid;
  gap: 0.4rem;
  padding: 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark .quick-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.5);
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.14);
}

body.theme-dark .quick-card:hover {
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.55);
}

.quick-card .icon {
  font-size: 1.4rem;
}

.quick-card strong {
  font-size: 1rem;
}

.quick-card span:last-child {
  color: var(--color-muted);
  font-size: 0.9rem;
}

body.theme-dark .log-output {
  background: rgba(2, 6, 23, 0.85);
  color: #f8fafc;
}

.results-path code {
  background: rgba(37, 99, 235, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.panel ol {
  padding-left: 1.2rem;
  margin: 0;
  color: var(--color-muted);
  line-height: 1.5;
}

.link-btn {
  border: none;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: var(--color-primary);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.auth-copy {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
}

body.theme-dark .auth-copy {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
}

.auth-copy h1 {
  margin: 0 0 1rem;
  font-size: 2rem;
}

.auth-copy p {
  margin: 0 0 1.4rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.auth-tips {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.auth-panel {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
}

body.theme-dark .auth-panel {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55);
}

.auth-panel h2 {
  margin: 0 0 1.5rem;
}

.auth-form {
  display: grid;
  gap: 1.2rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 130, 180, 0.35);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

body.theme-dark input {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--color-text);
}

body.theme-dark input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-dark input:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.helper {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.helper a {
  color: var(--color-primary);
  font-weight: 600;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #b91c1c;
}

body.theme-dark .alert {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.page-header {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 2.4rem;
}

.page-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.page-lead {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 720px;
}

.notice-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.4rem);
}

.notice-card {
  position: relative;
  padding-left: 1.6rem;
}

.notice-card header {
  display: grid;
  gap: 0.35rem;
}

.notice-body {
  display: grid;
  gap: 0.75rem;
  color: var(--color-muted);
  line-height: 1.55;
}

.notice-body ul {
  margin: 0;
  padding-left: 1.2rem;
}

.notice-body li {
  margin-bottom: 0.35rem;
}

.page-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-primary);
  font-weight: 600;
}

.notice-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.35rem;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
}

.notice-badge.soft {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.notice-card.critical {
  border-left: 4px solid #f97316;
}

.notice-card.critical .notice-badge {
  background: rgba(249, 115, 22, 0.16);
  color: #ea580c;
}

.notice-card.info {
  border-left: 4px solid #3b82f6;
}

.notice-card.info .notice-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.notice-card.support {
  border-left: 4px solid #22c55e;
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.6rem 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  background: rgba(246, 247, 251, 0.9);
}

body.theme-dark .site-footer {
  background: rgba(15, 23, 42, 0.9);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.data-explorer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0 3rem;
}

.explorer-head {
  background: linear-gradient(135deg, var(--color-surface), rgba(96, 165, 250, 0.08));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-medium);
}

.data-explorer .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0 0 0.3rem;
}

.data-explorer h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.data-explorer .lede {
  margin: 0;
  color: var(--color-muted);
}

.explorer-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-medium);
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  align-items: end;
}

.selector-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
}

.selector-grid select,
.selector-grid input {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text);
}

body.theme-dark .selector-grid select,
body.theme-dark .selector-grid input {
  background: rgba(15, 23, 42, 0.65);
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.actions-row .hint {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.preview-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.calendar-body {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
}

body.theme-dark .calendar-body {
  background: rgba(15, 23, 42, 0.6);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.calendar-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.calendar-grid {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.cal-week {
  display: grid;
  grid-auto-rows: 12px;
  grid-auto-flow: row;
  gap: 2px;
}

.cal-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--color-border);
}

.cal-has {
  background: #22c55e;
  border-color: rgba(34, 197, 94, 0.6);
}

.cal-none {
  background: rgba(148, 163, 184, 0.25);
  border-color: rgba(148, 163, 184, 0.4);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  color: var(--color-text);
}

.chip--ok {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #0f5132;
}

.chip--warn {
  border-color: rgba(234, 179, 8, 0.5);
  background: rgba(234, 179, 8, 0.15);
  color: #92400e;
}

.chip--muted {
  color: var(--color-muted);
  background: rgba(148, 163, 184, 0.14);
}

.data-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.meta-panel {
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
  background: rgba(96, 165, 250, 0.08);
}

.meta-panel .meta-hint {
  margin: 0;
  color: var(--color-muted);
}

.preview-body {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  min-height: 160px;
}

body.theme-dark .preview-body {
  background: rgba(15, 23, 42, 0.6);
}

.placeholder {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.table-scroller {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  max-height: 420px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.data-table thead {
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 1;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
}

.alert-warn {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.5);
  color: #92400e;
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.preview-meta .small {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.alpha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.6rem;
}

.alpha-grid--inputs {
  grid-template-columns: 1fr;
}

.alpha-grid--results {
  grid-template-columns: 2fr 1fr 1fr;
}

@media (max-width: 1024px) {
  .alpha-grid--results {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.alpha-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-medium);
  display: grid;
  gap: 1rem;
}

.alpha-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.alpha-form {
  display: grid;
  gap: 1rem;
}

.alpha-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.alpha-switch {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(37, 99, 235, 0.08);
}

.alpha-switch input {
  width: auto;
}

.alpha-editor {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.03);
  min-height: 320px;
  overflow: hidden;
}

.alpha-status {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.alpha-status[data-tone="busy"] {
  color: #2563eb;
}

.alpha-status[data-tone="error"] {
  color: #dc2626;
}

.alpha-status[data-tone="ok"] {
  color: #16a34a;
}

.alpha-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.alpha-actions--editor {
  justify-content: flex-start;
}

.alpha-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.alpha-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.alpha-field-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.alpha-editor-card .alpha-pill {
  border: 1px solid var(--color-border);
  background: rgba(37, 99, 235, 0.08);
}

.alpha-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.alpha-result-card canvas {
  width: 100%;
}

.alpha-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem 1rem;
  margin: 0;
}

.alpha-stats dt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.alpha-stats dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
}

.alpha-warnings {
  list-style: none;
  margin: 0;
  padding-left: 0;
  color: var(--color-muted);
  display: grid;
  gap: 0.35rem;
}

.alpha-warnings .muted {
  color: var(--color-muted);
}

.alpha-log-body {
  display: grid;
  gap: 0.6rem;
}

.alpha-preview {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.alpha-preview code {
  background: rgba(37, 99, 235, 0.1);
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.alpha-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-dialog {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-medium);
  width: min(720px, 92%);
  max-height: 80vh;
  overflow: auto;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.alpha-download-status {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.alpha-download-log {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  font-size: 0.9rem;
  max-height: 220px;
  overflow: auto;
}

[x-cloak] {
  display: none !important;
}

@media (max-width: 960px) {
  .hero,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .site-main {
    padding-top: 3rem;
  }

  .hero-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .theme-toggle {
    width: 100%;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
