:root {
  --bg-deep: #050a11;
  --bg-surface: #0e1630;
  --bg-panel: rgba(14, 22, 48, 0.85);
  --bg-panel-border: rgba(123, 157, 255, 0.15);
  --text-primary: #f5f5fa;
  --text-secondary: #8ca0bf;
  --metal-light: #ffb87a;
  --metal-mid: #f65a3b;
  --metal-dark: #b64028;
  --circuit-glow: #4dfad2;
  --circuit-dim: #2d6572;
  --magenta-flare: #d058ff;
  --font-display: "Clash Display", system-ui, sans-serif;
  --font-body: "Satoshi", system-ui, sans-serif;
  --radius-pill: 999px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --surface-border: rgba(123, 157, 255, 0.2);
  --surface-bg: rgba(7, 20, 30, 0.82);
  --focus-ring: 0 0 0 3px rgba(84, 245, 217, 0.2);
  --active-bg-strong: linear-gradient(120deg, #4ef8d1, #8efee4);
  --active-text-strong: #001119;
  --active-border-strong: rgba(84, 245, 217, 0.96);
  --active-shadow-strong: 0 8px 22px rgba(78, 248, 209, 0.36);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at 20% 20%, rgba(77, 250, 210, 0.08), rgba(5, 10, 17, 0)),
    radial-gradient(circle at 80% 10%, rgba(208, 88, 255, 0.12), rgba(5, 10, 17, 0)),
    linear-gradient(135deg, var(--bg-deep), var(--bg-surface));
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  display: block;
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: -2;
}

main {
  width: min(1200px, 95%);
  margin: 0 auto;
  padding: 80px 0 120px;
}

.hero {
  text-align: center;
  margin-bottom: 80px;
}

.logo-creature {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  position: relative;
  filter: drop-shadow(0 0 24px rgba(255, 184, 122, 0.45));
  animation: pulse 6s ease-in-out infinite;
}

.logo-creature svg {
  width: 100%;
  height: 100%;
}

@keyframes pulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.home-hero {
  max-width: 880px;
  margin: 0 auto 56px;
  text-align: center;
}

.home-tag {
  display: inline-flex;
  margin-bottom: 18px;
}

.home-subtitle {
  max-width: 760px;
  margin: 0 auto;
}

.home-demo {
  margin: 30px auto 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-demo-label {
  color: #bad1e9;
  font-size: 0.95rem;
  text-align: left;
}

.home-demo-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.home-demo-input:focus {
  outline: none;
  border-color: rgba(84, 245, 217, 0.55);
  box-shadow: 0 0 0 3px rgba(84, 245, 217, 0.18);
}

.home-demo-chips {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.home-cta-row {
  margin-top: 28px;
  margin-bottom: 8px;
}

.home-secondary-link {
  margin-top: 6px;
}

.home-secondary-link a {
  color: #9dd7f8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(157, 215, 248, 0.45);
}

.home-secondary-link a:hover {
  color: var(--circuit-glow);
  border-bottom-color: rgba(84, 245, 217, 0.6);
}

.home-capability-grid {
  margin-bottom: 28px;
}

.home-card-example {
  color: #cde8ff;
  margin-bottom: 10px;
}

.home-security-card {
  margin-bottom: 24px;
  border: 1px solid rgba(84, 245, 217, 0.42);
  background:
    radial-gradient(circle at 10% 15%, rgba(84, 245, 217, 0.2), transparent 46%),
    radial-gradient(circle at 92% 0%, rgba(255, 184, 122, 0.2), transparent 42%),
    rgba(7, 20, 30, 0.9);
  box-shadow: 0 18px 55px rgba(84, 245, 217, 0.18);
}

.home-security-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 245, 217, 0.6);
  color: #04121a;
  background: linear-gradient(120deg, #4ef8d1, #8efee4);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}

.home-security-lead {
  color: #e7f8ff;
  font-size: 1rem;
  margin-bottom: 0.95rem;
}

.home-security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.home-security-grid article {
  border: 1px solid rgba(84, 245, 217, 0.28);
  border-radius: 14px;
  background: rgba(4, 12, 20, 0.62);
  padding: 0.82rem 0.9rem;
}

.home-security-grid h3 {
  margin: 0 0 0.3rem;
  color: #c4fff1;
  font-size: 0.96rem;
}

.home-security-grid p {
  margin: 0;
  color: #c8dff3;
  font-size: 0.88rem;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  padding: 24px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 184, 122, 0.08), rgba(77, 250, 210, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.button-row a {
  padding: 12px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(120deg, var(--metal-light), var(--metal-mid));
  box-shadow: 0 10px 25px rgba(182, 64, 40, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-row a.secondary {
  background: linear-gradient(120deg, var(--circuit-glow), #7b9dff);
  color: #04141c;
  box-shadow: 0 10px 25px rgba(77, 250, 210, 0.3);
}

.button-row a:hover {
  transform: translateY(-3px);
}

.button-row button {
  padding: 12px 32px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  background: linear-gradient(120deg, var(--metal-light), var(--metal-mid));
  color: var(--bg-deep);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 25px rgba(182, 64, 40, 0.35);
}

.button-row button.secondary {
  background: linear-gradient(120deg, var(--circuit-glow), #7b9dff);
  color: #04141c;
  box-shadow: 0 10px 25px rgba(77, 250, 210, 0.3);
}

.button-row button:hover {
  transform: translateY(-3px);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.timeline {
  border-left: 2px solid rgba(77, 250, 210, 0.35);
  padding-left: 24px;
}

.timeline-step {
  margin-bottom: 32px;
  position: relative;
}

.timeline-step::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--circuit-glow);
  background: var(--bg-deep);
  position: absolute;
  left: -32px;
  top: 6px;
  box-shadow: 0 0 12px rgba(77, 250, 210, 0.8);
}

.footer {
  margin-top: 80px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer .version {
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

nav {
  position: sticky;
  top: 0;
  backdrop-filter: blur(15px);
  background: rgba(5, 10, 17, 0.88);
  border-bottom: 1px solid rgba(255, 184, 122, 0.1);
  padding: 16px 0;
  z-index: 20;
}

.nav-shell {
  width: min(1200px, 95%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: var(--circuit-glow);
}

.nav-secondary-link {
  margin-left: auto;
  margin-right: 10px;
  color: #9db6d9;
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px dashed rgba(157, 182, 217, 0.45);
}

.nav-secondary-link:hover,
.nav-secondary-link:focus {
  color: var(--circuit-glow);
  border-bottom-color: rgba(84, 245, 217, 0.55);
}

.user-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  min-width: 200px;
  justify-content: flex-end;
}

.user-entry button,
.user-entry a {
  border: 1px solid rgba(125, 156, 255, 0.35);
  background: rgba(4, 12, 20, 0.7);
  color: var(--text-primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-entry button:hover,
.user-entry a:hover {
  border-color: var(--circuit-glow);
  color: var(--circuit-glow);
  transform: translateY(-1px);
}

.user-entry .primary {
  background: linear-gradient(120deg, var(--circuit-glow), #7b9dff);
  color: #031118;
  border: none;
  box-shadow: 0 15px 25px rgba(77, 250, 210, 0.25);
}

.user-loading {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-pending [data-user-anon] {
  display: none !important;
}

.auth-pending [data-user-auth] {
  display: none !important;
}

.auth-pending [data-user-loading] {
  display: inline-flex !important;
}

.user-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.85);
  border: 1px solid rgba(77, 250, 210, 0.5);
  cursor: pointer;
}

.user-pill .user-status {
  font-size: 0.8rem;
  color: var(--circuit-glow);
  letter-spacing: 0;
}

.user-pill .points {
  font-size: 0.8rem;
  color: var(--circuit-glow);
}

.user-menu {
  position: absolute;
  top: 46px;
  right: 0;
  background: rgba(9, 18, 32, 0.96);
  border: 1px solid rgba(123, 157, 255, 0.3);
  border-radius: 14px;
  padding: 12px;
  min-width: 200px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.user-menu.visible {
  opacity: 1;
  pointer-events: auto;
}

.user-menu a,
.user-menu button {
  display: flex;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  justify-content: space-between;
}

.user-menu a:hover,
.user-menu button:hover {
  background: rgba(77, 250, 210, 0.1);
  color: var(--circuit-glow);
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 0;
}

.lang-switch-label {
  flex-basis: 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lang-switch button {
  border: 1px solid rgba(125, 156, 255, 0.3);
  background: rgba(4, 12, 20, 0.7);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lang-switch button.active {
  border-color: var(--active-border-strong);
  background: var(--active-bg-strong);
  color: var(--active-text-strong);
  font-weight: 700;
  box-shadow: var(--active-shadow-strong);
}

.lang-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.lang-switch button:not(:disabled):hover {
  transform: translateY(-2px);
}

body.console-body .lang-switch,
body.settings-body .lang-switch,
body.user-body .lang-switch,
body.tasks-body .lang-switch,
body.points-body .lang-switch {
  display: none;
}

.core-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.core-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0.75rem 0;
}

.core-diagram {
  display: grid;
  grid-template-columns: minmax(320px, 500px) 1fr;
  gap: 2rem;
  align-items: center;
}

.core-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(7, 20, 30, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.core-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.core-summary-item p {
  margin: 0;
  font-size: 0.8rem;
  color: #8ea6bd;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.core-summary-item strong {
  font-size: 1.35rem;
  color: #fefefe;
  font-weight: 700;
}

.core-graphic-wrap {
  position: relative;
  background: rgba(5, 12, 20, 0.92);
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(84, 245, 217, 0.15);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.core-flow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.core-graphic-wrap svg {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.core-outline path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2;
}

.core-chart {
  fill: none;
  stroke-linecap: round;
}

.core-bar {
  fill: url(#coreStage);
  opacity: 0.8;
}

.core-bar--collect {
  fill: rgba(84, 245, 217, 0.6);
}

.core-bar--memory {
  fill: rgba(144, 167, 255, 0.6);
}

.core-bar--analyze {
  fill: rgba(245, 168, 255, 0.6);
}

.core-bar--act {
  fill: rgba(255, 184, 122, 0.6);
}

.core-line {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 3;
  fill: none;
}

.core-node {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(84, 245, 217, 0.4);
  stroke-width: 2;
}

.core-stage-label text {
  fill: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.core-labels text {
  fill: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.core-cards-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
}

.core-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.25rem;
  background: rgba(7, 20, 30, 0.85);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.core-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.core-card small {
  color: #8ea6bd;
}

.core-card-tag {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: #8ea6bd;
}

.core-card--collect {
  border-color: rgba(84, 245, 217, 0.3);
}

.core-card--memory {
  border-color: rgba(144, 167, 255, 0.3);
}

.core-card--analyze {
  border-color: rgba(245, 168, 255, 0.3);
}

.core-card--act {
  border-color: rgba(255, 184, 122, 0.3);
}

.core-card.active {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(84, 245, 217, 0.25);
  border-color: rgba(84, 245, 217, 0.5);
}

@media (max-width: 960px) {
  .core-diagram {
    grid-template-columns: 1fr;
  }
  .core-summary {
    grid-column: 1;
  }
  .core-cards-grid {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
}

@keyframes corePulse {
  0% {
    opacity: 0.35;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.35;
    transform: scale(0.98);
  }
}

.highlight {
  color: var(--metal-light);
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(208, 88, 255, 0.16);
  color: var(--magenta-flare);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.list-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.list-split li {
  list-style: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(77, 250, 210, 0.08);
}

.settings-page {
  width: min(1200px, 95%);
  margin: 60px auto 120px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}

.settings-nav {
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 18px;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.settings-profile {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(123, 157, 255, 0.2);
}

.settings-profile-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.settings-profile-username {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 4px 0;
}

.settings-nav nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.settings-nav a:hover,
.settings-nav a:focus {
  color: var(--text-primary);
  background: rgba(125, 156, 255, 0.15);
}

.settings-nav a.active {
  color: var(--active-text-strong);
  background: var(--active-bg-strong);
  border: 1px solid var(--active-border-strong);
  font-weight: 600;
  box-shadow: var(--active-shadow-strong);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.settings-panel {
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 18px;
  padding: 24px 28px;
  min-width: 0;
  max-width: 100%;
}

.settings-panel-header > p {
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.settings-card {
  background: rgba(6, 12, 24, 0.65);
  border: 1px solid rgba(123, 157, 255, 0.2);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.settings-card h4 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.settings-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.settings-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
  margin-bottom: 24px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
  border-radius: 10px;
  border: 1px solid rgba(123, 157, 255, 0.3);
  background: rgba(4, 10, 18, 0.7);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.settings-field textarea {
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.settings-subsection {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid rgba(123, 157, 255, 0.2);
}

.settings-subsection h4 {
  margin-bottom: 12px;
}

.settings-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(123, 157, 255, 0.12);
}

.settings-inline:last-child {
  border-bottom: none;
}

.settings-inline p {
  font-weight: 600;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(123, 157, 255, 0.3);
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: \"\";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(120deg, var(--circuit-glow), #7b9dff);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-label {
  font-size: 0.95rem;
}

.btn {
  border: 1px solid rgba(123, 157, 255, 0.5);
  border-radius: 999px;
  padding: 8px 18px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--metal-light), var(--metal-mid));
  color: #031118;
  border: none;
  box-shadow: 0 10px 20px rgba(246, 90, 59, 0.35);
}

.btn.ghost {
  background: rgba(4, 12, 20, 0.85);
}

.btn.danger {
  border-color: #f65a3b;
  color: #f65a3b;
}

.btn.inline {
  margin-left: 8px;
}

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

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 10px;
}

.settings-table th,
.settings-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(123, 157, 255, 0.15);
  text-align: left;
}

.settings-table.compact th,
.settings-table.compact td {
  padding: 6px;
}

.ops-doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ops-doc-card {
  border: 1px solid rgba(123, 157, 255, 0.22);
  border-radius: 12px;
  background: rgba(4, 10, 18, 0.72);
  padding: 12px 14px;
}

.ops-doc-card.is-pinned {
  border-color: rgba(77, 250, 210, 0.65);
  box-shadow: 0 0 0 1px rgba(77, 250, 210, 0.18) inset;
}

.ops-doc-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.ops-doc-line + .ops-doc-line {
  margin-top: 6px;
}

.ops-pin-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(123, 157, 255, 0.35);
  background: rgba(4, 10, 18, 0.85);
  color: #ffd978;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.ops-pin-btn:hover,
.ops-pin-btn:focus {
  border-color: rgba(255, 217, 120, 0.9);
}

.ops-doc-name {
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-all;
}

.ops-doc-type {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px solid rgba(123, 157, 255, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
}

.ops-doc-category {
  font-size: 0.78rem;
  color: #c8f0ff;
  border: 1px solid rgba(84, 245, 217, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(84, 245, 217, 0.08);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-doc-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-active {
  background: rgba(77, 250, 210, 0.2);
  color: var(--circuit-glow);
}

.status-badge.status-paid {
  background: rgba(84, 245, 217, 0.1);
  color: var(--circuit-glow);
}

.status-badge.status-frozen {
  background: rgba(246, 90, 59, 0.15);
  color: #f65a3b;
}

.settings-metric {
  font-size: 1.3rem;
  font-weight: 700;
}

.settings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
}

.settings-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.ops-admin-body > nav,
.ops-admin-body > .lang-switch,
.ops-login-body > nav,
.ops-login-body > .lang-switch {
  display: none;
}

.ops-admin-body main,
.ops-login-body main {
  padding-top: 36px;
}

.ops-sidebar .settings-profile {
  margin-bottom: 14px;
}

.ops-menu {
  display: grid;
  gap: 8px;
}

.ops-menu-item {
  width: 100%;
  border: 1px solid rgba(123, 157, 255, 0.25);
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.65);
  text-align: left;
  padding: 10px 12px;
  color: var(--text-primary);
  cursor: pointer;
}

.ops-menu-item:hover {
  border-color: rgba(123, 157, 255, 0.45);
}

.ops-menu-item.active {
  border-color: rgba(77, 250, 210, 0.5);
  background: rgba(77, 250, 210, 0.12);
}

.ops-menu-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.ops-menu-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.ops-sidebar-actions {
  margin-top: 14px;
}

.ops-module {
  display: none;
}

.ops-module.active {
  display: block;
}

.settings-modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 17, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.settings-modal {
  width: min(420px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 18px;
  padding: 28px;
  position: relative;
}

.settings-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.settings-form-vertical {
  display: flex;
  flex-direction: column;
}

.settings-code-row {
  display: flex;
  gap: 8px;
}

.settings-message {
  min-height: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  nav ul {
    width: 100%;
    justify-content: center;
  }

  .nav-shell {
    flex-direction: column;
    gap: 12px;
  }

  .nav-secondary-link {
    margin: 0;
  }

  .user-entry {
    width: 100%;
    justify-content: center;
  }

  main {
    padding-top: 40px;
  }
}

@media (max-width: 960px) {
  .settings-page {
    grid-template-columns: 1fr;
  }

  .settings-nav nav {
    flex-wrap: wrap;
    gap: 6px;
  }

  .settings-nav a {
    display: inline-flex;
  }

  .settings-form {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .form-actions {
    flex-wrap: wrap;
  }
}

.auth-layer {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 17, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.auth-card {
  width: min(460px, 100%);
  background: rgba(7, 16, 30, 0.95);
  border: 1px solid rgba(123, 157, 255, 0.4);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  position: relative;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(125, 156, 255, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.auth-toggle button {
  background: transparent;
  border: none;
  padding: 10px 0;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle button.active,
.auth-tabs button.active {
  background: var(--active-bg-strong);
  color: var(--active-text-strong);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 17, 25, 0.15);
}

.auth-toggle button:hover,
.auth-tabs button:hover {
  background: rgba(77, 250, 210, 0.16);
  color: #aefce8;
}

.auth-message {
  min-height: 28px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.auth-message[data-state="error"] {
  color: #ff867c;
}

.auth-message[data-state="success"] {
  color: var(--circuit-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form h3 {
  font-size: 1.3rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(3, 10, 18, 0.9);
  color: var(--text-primary);
  padding: 10px 14px;
  font: inherit;
}

.auth-form button[type="submit"],
.auth-form > button {
  margin-top: 8px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--metal-light), var(--metal-mid));
  color: var(--bg-deep);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-form p button {
  border: none;
  background: transparent;
  color: var(--circuit-glow);
  font-weight: 600;
  cursor: pointer;
}

.auth-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

[data-auth-switch].disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-auth-layer][hidden] {
  display: none;
}

.captcha-field .captcha-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.captcha-field img {
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(4, 12, 20, 0.8);
}

.captcha-field button {
  border-radius: 10px;
  border: 1px solid rgba(125, 156, 255, 0.3);
  background: rgba(4, 12, 20, 0.7);
  color: var(--text-primary);
  padding: 6px 12px;
  cursor: pointer;
}

.captcha-field button:hover {
  border-color: var(--circuit-glow);
  color: var(--circuit-glow);
}

.sms-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.sms-row label {
  flex: 1;
}

.sms-row button {
  min-width: 120px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--circuit-glow), #7b9dff);
  color: #04141c;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.sms-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-center {
  width: min(1200px, 95%);
  margin: 0 auto;
  padding: 80px 0 120px;
}

.account-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.account-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.account-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-points {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--circuit-glow);
}

.account-tier {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.account-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(77, 250, 210, 0.08);
}

.account-history small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.account-form label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.account-form input,
.account-form textarea,
.account-form select {
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(4, 12, 20, 0.9);
  color: var(--text-primary);
  padding: 10px 14px;
  font: inherit;
  width: 100%;
}

.account-form button {
  margin-top: 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--metal-light), var(--metal-mid));
  color: var(--bg-deep);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-form textarea {
  min-height: 120px;
}

.account-message {
  min-height: 20px;
  font-size: 0.85rem;
  margin-top: 12px;
}

.account-message[data-state="error"] {
  color: #ff867c;
}

.account-message[data-state="success"] {
  color: var(--circuit-glow);
}

.workspace-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 12px;
}

.workspace-preview pre {
  min-height: 120px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #d1e3f5;
}

.workspace-message {
  margin: 0;
  font-size: 0.85rem;
  color: var(--circuit-glow);
}

.console-body {
  background: radial-gradient(circle at top, rgba(84, 245, 217, 0.15), transparent 50%), #050d15;
}

.memory-console {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.console-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.console-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.capture-card,
.timeline-card,
.memory-actions,
.mother-status-card,
.status-quick {
  background: rgba(7, 20, 30, 0.85);
  border: 1px solid rgba(84, 245, 217, 0.15);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

.command-compose-card {
  position: static;
}

.capture-card header h1 {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.capture-card header p {
  color: #9ab4cc;
  margin-bottom: 1rem;
}

.timeline-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.capture-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  min-height: 130px;
  padding: 1rem 1.25rem;
  resize: vertical;
  background: rgba(0, 0, 0, 0.25);
  color: #fefefe;
  font-size: 1rem;
}

.command-mode {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.command-mode label {
  font-size: 0.84rem;
  color: #8ea6bd;
}

.command-mode select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  color: #fff;
  font-size: 0.92rem;
}

.command-mode-status {
  margin: 0;
  color: #9bc3e4;
  font-size: 0.86rem;
}

.command-template-chips {
  margin-top: 0.8rem;
  margin-bottom: 0.25rem;
}

.command-recommend {
  margin-top: 0.25rem;
}

.command-recommend-title {
  margin: 0 0 0.4rem;
  color: #9bc3e4;
  font-size: 0.86rem;
}

.command-recommend-list {
  margin-top: 0;
  margin-bottom: 0.15rem;
}

.capture-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.capture-actions .btn {
  min-width: 132px;
}

.capture-upload {
  cursor: pointer;
}

.capture-voice {
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

.capture-status {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  color: #9ab4cc;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.capture-status[data-state="success"] {
  color: var(--circuit-glow);
}

.capture-status[data-state="error"] {
  color: #f97362;
}

.capture-status[data-state="warn"] {
  color: #ffb347;
}

.capture-status .link-btn {
  align-self: flex-start;
}

.capture-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.capture-overall {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #d8e8f6;
}

.capture-overall-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.capture-refresh-btn {
  min-width: 120px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.capture-steps li {
  line-height: 1.5;
  font-size: 0.93rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.timeline-header small {
  display: block;
  margin-top: 0.5rem;
  color: #8ea6bd;
}

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

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: #cde8ff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border 0.2s, background 0.2s, color 0.2s;
}

.filter-chip.active {
  border-color: var(--active-border-strong);
  background: var(--active-bg-strong);
  color: var(--active-text-strong);
  font-weight: 700;
  box-shadow: var(--active-shadow-strong);
}

.filter-summary {
  margin: 0;
  color: #8ea6bd;
  font-size: 0.85rem;
}


.search-field input,
.ops-single-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
}

.search-field input::placeholder,
.ops-single-input::placeholder {
  color: rgba(205, 232, 255, 0.72);
}

.mother-status-card .status-list {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-list dt {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fd3f2;
}

.status-list dd {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  color: #fefefe;
}

.status-hint {
  color: #8ea6bd;
  margin: 0 0 1rem;
}

.mother-center {
  display: block;
  max-width: 980px;
}

.mother-single-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.mother-top-tab-card h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.mother-top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mother-top-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d8e8f6;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.mother-top-tabs button.active {
  border-color: var(--active-border-strong);
  background: var(--active-bg-strong);
  color: var(--active-text-strong);
  box-shadow: var(--active-shadow-strong);
}

.mother-top-tab-panels {
  margin-top: 0.9rem;
}

.mother-top-tab-panel p {
  margin: 0;
  color: #cfe2f4;
  line-height: 1.6;
}

.mother-session-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.mother-session-layout h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.mother-location-pill {
  align-self: end;
  border: 1px solid rgba(84, 245, 217, 0.2);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  color: #d8e8f6;
}

.mother-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.mother-inline-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.mother-inline-form h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.mother-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: #a8bfd5;
  font-size: 0.85rem;
}

.mother-inline-form input,
.mother-inline-form select,
.mother-inline-form textarea,
.mother-filter-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  color: #fff;
  font-size: 0.9rem;
}

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

.mother-simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.mother-simple-list li {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.mother-simple-list p {
  margin: 0;
}

.mother-simple-list small {
  color: #8ea6bd;
}

.mother-secret-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.mother-secret-item-main {
  min-width: 0;
}

.mother-secret-key {
  margin: 0;
  font-weight: 700;
  color: #e8f5ff;
  word-break: break-all;
}

.mother-secret-value {
  margin: 0.2rem 0 0;
  color: #9ec0da;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.mother-eye-btn {
  min-width: 42px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #d8e8f6;
  cursor: pointer;
}

.mother-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
}

.mother-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.mother-secret-preview {
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: #f5fbff;
}

.mother-action-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.schedule-card {
  background: rgba(7, 20, 30, 0.85);
  border: 1px solid rgba(84, 245, 217, 0.15);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.schedule-field {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: #8ea6bd;
  gap: 0.35rem;
}

.schedule-field input,
.schedule-field select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  color: #fefefe;
}

.schedule-next {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  color: #9ab4cc;
  font-size: 0.9rem;
}

.schedule-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: #7fd3f2;
}

.schedule-status[data-state="error"] {
  color: #f97362;
}

.schedule-status[data-state="success"] {
  color: var(--circuit-glow);
}

.schedule-empty {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #9ab4cc;
}

.schedule-card .btn.primary {
  justify-self: flex-start;
}

.status-quick {
  min-height: 120px;
}

.status-quick article {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.status-quick article:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.status-quick .quick-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: #7fd3f2;
  margin-bottom: 0.25rem;
}

.status-quick .quick-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fefefe;
  margin: 0;
}

.status-quick small {
  color: #8ea6bd;
}

.status-message {
  margin: 0;
  color: #9ab4cc;
}

.system-info {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  color: #9ab4cc;
}

.system-info summary {
  cursor: pointer;
  font-weight: 600;
  color: #fefefe;
  margin-bottom: 0.5rem;
}

.system-info-toggle {
  margin-top: 0.5rem;
  text-align: left;
}

.workspace-meta {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workspace-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7fd3f2;
}

.workspace-meta dd {
  margin: 0;
  color: #e9f5ff;
}

.memory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.memory-list-head {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1fr 1.35fr auto;
  gap: 0.8rem;
  margin: 0 0 0.45rem;
  padding: 0 0.2rem;
  color: #7fd3f2;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.memory-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: border 0.2s, background 0.2s;
}

.memory-list-item:hover {
  border-color: rgba(84, 245, 217, 0.4);
  background: rgba(84, 245, 217, 0.05);
}

.memory-list-item.active {
  border-color: rgba(84, 245, 217, 0.8);
  background: rgba(84, 245, 217, 0.08);
}

.memory-list-row {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1fr 1.35fr auto;
  gap: 0.8rem;
  align-items: center;
}

.memory-list-item .memory-list-status {
  color: #cce5fb;
}

.memory-list-title {
  margin: 0;
  font-weight: 600;
  color: #fefefe;
}

.memory-detail-toggle {
  padding: 0.42rem 0.9rem;
  font-size: 0.84rem;
}

.memory-list-meta {
  margin: 0.25rem 0 0;
  color: #93adc4;
  font-size: 0.9rem;
}

.memory-list-status {
  color: #8ea6bd;
  font-size: 0.85rem;
}

.memory-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  color: #7ddfff;
  font-size: 0.85rem;
}

.memory-list-detail {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6e5f7;
  font-size: 0.9rem;
  line-height: 1.5;
}

.memory-list-detail pre {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem;
  border-radius: 8px;
  overflow-x: auto;
}

.memory-list-detail strong {
  color: #fefefe;
}

.memory-console-message {
  margin-top: 1rem;
  color: #f97362;
}

.memory-empty {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: #9ab4cc;
}

.memory-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.memory-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.memory-action-buttons .btn {
  flex: 1 1 45%;
  min-width: 180px;
  justify-content: space-between;
}

.memory-action-buttons .btn small {
  display: block;
  font-size: 0.75rem;
  color: #8ea6bd;
  margin-top: 0.25rem;
}

.memory-action-hint {
  color: #8ea6bd;
  font-size: 0.85rem;
}

.memory-action-result {
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 60px;
  color: #d6e5f7;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.memory-console-minimal {
  grid-template-columns: minmax(0, 980px) minmax(280px, 340px);
  max-width: 1360px;
  justify-content: start;
  align-items: start;
  padding-top: 1.25rem;
}

.minimal-side-panels {
  gap: 1rem;
}

.minimal-side-card {
  padding: 1rem 1rem 0.9rem;
}

.minimal-side-card .timeline-header h2 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.minimal-side-view-all {
  color: #9dd7f8;
  text-decoration: none;
  border: 1px solid rgba(157, 215, 248, 0.35);
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 0.22rem 0.62rem;
  line-height: 1;
}

.minimal-side-view-all:hover {
  color: #baffef;
  border-color: rgba(84, 245, 217, 0.62);
}

.minimal-side-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.minimal-side-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.58rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 215, 248, 0.18);
  background: rgba(8, 18, 28, 0.54);
}

.minimal-side-item[data-note-preview-index] {
  cursor: pointer;
}

.minimal-side-item[data-note-preview-index]:hover {
  border-color: rgba(84, 245, 217, 0.45);
  background: rgba(9, 22, 34, 0.74);
}

.minimal-side-item strong {
  font-size: 0.86rem;
  color: #d7ebff;
  font-weight: 600;
}

.minimal-side-item .meta {
  font-size: 0.76rem;
  color: #8ea6bd;
}

.minimal-side-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.66rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(157, 215, 248, 0.35);
  color: #b8ddff;
  width: fit-content;
}

.minimal-side-badge--ai {
  border-color: rgba(130, 161, 255, 0.45);
  color: #bed1ff;
}

.minimal-side-badge--remote {
  border-color: rgba(255, 182, 131, 0.45);
  color: #ffd8b2;
}

.minimal-side-empty {
  color: #8ea6bd;
  font-size: 0.82rem;
}

.note-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 14, 0.78);
  display: grid;
  place-items: center;
  z-index: 42;
}

.note-preview-dialog {
  width: min(720px, 94vw);
  max-height: 82vh;
  overflow: auto;
  border: 1px solid rgba(84, 245, 217, 0.32);
  border-radius: 14px;
  background: rgba(6, 16, 27, 0.96);
  padding: 0.9rem 1rem 1rem;
}

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

.note-preview-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.note-preview-file {
  margin: 0 0 0.65rem;
  color: #9dd7f8;
  font-size: 0.82rem;
}

.note-preview-dialog pre {
  margin: 0;
  border: 1px solid rgba(157, 215, 248, 0.2);
  border-radius: 10px;
  background: rgba(4, 12, 20, 0.72);
  padding: 0.75rem;
  color: #d9ecff;
  font-size: 0.84rem;
  white-space: pre-wrap;
}

.minimal-hero-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1.1rem;
  border-color: rgba(84, 245, 217, 0.28);
  background:
    radial-gradient(circle at 10% 12%, rgba(84, 245, 217, 0.14), transparent 42%),
    rgba(7, 20, 30, 0.9);
}

.minimal-secretary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 1rem;
}

.minimal-secretary-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(141, 159, 182, 0.5);
  background: rgba(8, 18, 28, 0.8);
  color: #8d9fb6;
  box-shadow: inset 0 0 16px rgba(141, 159, 182, 0.16);
}

.minimal-secretary-avatar svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.minimal-secretary-avatar .secretary-shield {
  stroke-width: 3.2;
}

.minimal-secretary-avatar .secretary-check {
  stroke-width: 4;
}

.minimal-secretary-avatar[data-state="online"] {
  color: #4ef8a6;
  border-color: rgba(78, 248, 166, 0.75);
  box-shadow: 0 0 20px rgba(78, 248, 166, 0.28), inset 0 0 12px rgba(78, 248, 166, 0.2);
}

.minimal-secretary-avatar[data-state="offline"] {
  color: #ff5f5f;
  border-color: rgba(255, 95, 95, 0.82);
  box-shadow: 0 0 20px rgba(255, 95, 95, 0.24), inset 0 0 12px rgba(255, 95, 95, 0.18);
}

.minimal-secretary p {
  margin: 0;
  color: #9bc3e4;
  font-size: 0.85rem;
}

.minimal-mother-mini-actions {
  display: flex;
  gap: 0.45rem;
}

.mini-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #d8ebff;
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.mini-icon-btn:hover {
  border-color: rgba(84, 245, 217, 0.62);
  color: #baffef;
}

.mini-icon-btn[data-mother-lock-toggle][aria-pressed="true"] {
  border-color: rgba(255, 95, 95, 0.82);
  color: #ffc8c8;
  background: rgba(255, 95, 95, 0.14);
}

.minimal-hero-main h1 {
  margin: 0.25rem 0 0.9rem;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.minimal-input {
  min-height: 132px;
  border-color: rgba(84, 245, 217, 0.28);
}

.minimal-actions {
  margin-top: 0.9rem;
}

.minimal-actions .btn {
  min-width: 140px;
}

.minimal-mother-state {
  margin: 0.8rem 0 0.2rem;
  color: #cde8ff;
  font-size: 0.92rem;
}

.minimal-mother-hint {
  margin: 0 0 0.55rem;
  color: #8ea6bd;
  font-size: 0.84rem;
}

.minimal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.95rem;
  margin-bottom: 0.7rem;
}

.minimal-links a {
  color: #9dd7f8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(157, 215, 248, 0.42);
  font-size: 0.82rem;
}

.minimal-links a:hover {
  color: var(--circuit-glow);
  border-bottom-color: rgba(84, 245, 217, 0.65);
}

.minimal-history {
  margin-top: 0.25rem;
}

.mother-help-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 14, 0.76);
  display: grid;
  place-items: center;
  z-index: 40;
}

.mother-help-dialog {
  width: min(460px, 92vw);
  border: 1px solid rgba(84, 245, 217, 0.32);
  border-radius: 14px;
  padding: 1rem 1rem 0.9rem;
  background: rgba(6, 16, 27, 0.96);
}

.mother-help-dialog h3 {
  margin: 0 0 0.6rem;
}

.mother-help-dialog p {
  margin: 0 0 0.55rem;
  color: #b9d4ea;
  font-size: 0.9rem;
}

.memory-console-ignite {
  position: relative;
  isolation: isolate;
}

.memory-console-ignite::before,
.memory-console-ignite::after {
  content: "";
  position: fixed;
  inset: auto auto 8% 6%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(56px);
}

.memory-console-ignite::before {
  background: rgba(84, 245, 217, 0.2);
  animation: igniteFloat 9s ease-in-out infinite;
}

.memory-console-ignite::after {
  inset: 16% 8% auto auto;
  background: rgba(130, 161, 255, 0.16);
  animation: igniteFloat 11s ease-in-out infinite reverse;
}

@keyframes igniteFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-14px) scale(1.04);
  }
}

.ignite-card {
  border: 1px solid rgba(84, 245, 217, 0.3);
  background:
    radial-gradient(circle at 8% 14%, rgba(84, 245, 217, 0.14), transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(255, 184, 122, 0.14), transparent 46%),
    rgba(7, 20, 30, 0.88);
}

.ignite-head h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
}

.ignite-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.ignite-stats article {
  border: 1px solid rgba(84, 245, 217, 0.22);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
  background: rgba(4, 14, 22, 0.6);
}

.ignite-input {
  min-height: 148px;
  border-color: rgba(84, 245, 217, 0.35);
  box-shadow: inset 0 0 0 1px rgba(84, 245, 217, 0.08);
}

.ignite-input:focus {
  outline: none;
  border-color: rgba(84, 245, 217, 0.75);
  box-shadow: 0 0 0 3px rgba(84, 245, 217, 0.16), 0 10px 26px rgba(84, 245, 217, 0.16);
}

.ignite-chips .filter-chip {
  border-color: rgba(84, 245, 217, 0.3);
}

.ignite-actions {
  align-items: center;
}

.ignite-actions .ignite-cta {
  min-width: 180px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 28px rgba(84, 245, 217, 0.32);
}

.trophy-stream {
  border-color: rgba(130, 161, 255, 0.3);
}

.trophy-stream .memory-list-item {
  border-color: rgba(130, 161, 255, 0.25);
}

.trophy-stream .memory-list-item.active {
  border-color: rgba(84, 245, 217, 0.72);
  box-shadow: 0 10px 24px rgba(84, 245, 217, 0.14);
}

.mother-character-card {
  position: sticky;
  top: 84px;
  border-color: rgba(84, 245, 217, 0.34);
  background:
    radial-gradient(circle at 85% 0%, rgba(84, 245, 217, 0.12), transparent 45%),
    rgba(7, 20, 30, 0.9);
}

.mother-character-card h2 {
  font-size: 1.2rem;
  line-height: 1.35;
}

.mother-card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .memory-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .memory-list-head {
    display: none;
  }

  .memory-list-row {
    grid-template-columns: 1fr;
    gap: 0.38rem;
  }

  .console-main {
    order: 1;
  }

  .console-side {
    order: 2;
  }

  .mother-character-card {
    position: static;
  }

  .ignite-stats {
    grid-template-columns: 1fr;
  }

  .minimal-hero-card {
    grid-template-columns: 1fr;
  }

  .minimal-secretary {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 0.8rem;
  }

  .memory-console-minimal {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
  }
}

.auth-page-container {
  width: min(1100px, 95%);
  margin: 60px auto 100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.auth-hero {
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.auth-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.auth-hero ul {
  list-style: none;
  padding-left: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-page {
  background: rgba(7, 16, 30, 0.95);
  border: 1px solid rgba(123, 157, 255, 0.4);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(125, 156, 255, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.auth-tabs button {
  background: transparent;
  border: none;
  padding: 12px 0;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
}

.auth-page .auth-message {
  min-height: 28px;
  margin-bottom: 16px;
}

.auth-page .auth-form[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .auth-page-container {
    grid-template-columns: 1fr;
  }
}
.quick-actions-card {
  background: rgba(7, 20, 30, 0.85);
  border: 1px solid rgba(84, 245, 217, 0.15);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.quick-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-pill {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #fefefe;
  transition: border 0.2s, background 0.2s;
}

.action-pill:hover {
  border-color: rgba(84, 245, 217, 0.4);
  background: rgba(84, 245, 217, 0.08);
}

.action-pill strong {
  display: block;
  font-weight: 600;
}

.action-pill small {
  display: block;
  color: #8ea6bd;
  font-size: 0.8rem;
}

.action-pill ul {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  color: #9ab4cc;
  font-size: 0.8rem;
}

.action-pill ul li {
  margin: 0.15rem 0;
}

.action-icon {
  font-size: 1.4rem;
}

.mission-card {
  gap: 1rem;
}

.mission-header small {
  color: #8ea6bd;
  display: block;
}

.mission-group {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
}

.mission-group + .mission-group {
  margin-top: 0.6rem;
}

.mission-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: #8ea6bd;
}

.mission-group-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #fefefe;
}

.mission-group-header small {
  color: #6c829c;
}

.mission-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mission-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mission-item:last-child {
  border-bottom: none;
}

.mission-title {
  margin: 0;
  font-weight: 600;
}

.mission-item small {
  color: #8ea6bd;
}

.mission-status {
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fefefe;
  white-space: nowrap;
  display: inline-flex;
  gap: 0.25rem;
}

.mission-status--cooldown {
  background: rgba(138, 180, 248, 0.16);
  color: #a6caff;
}

.mission-status--urgent {
  background: rgba(255, 117, 117, 0.14);
  color: #ff9b9b;
}

.mission-status--progress {
  background: rgba(78, 248, 209, 0.16);
  color: #4ef8d1;
}

.mission-board-link {
  align-self: flex-end;
  font-weight: 600;
  color: #4ef8d1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.mission-board-link:hover {
  text-decoration: underline;
}

.skill-gallery-body {
  background: #05060a;
}

.skill-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skill-hero {
  background: radial-gradient(circle at top, rgba(78, 248, 209, 0.18), rgba(7, 11, 23, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  color: #f6f6f9;
}

.skill-hero h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.skill-hero p {
  color: rgba(246, 246, 249, 0.8);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
}

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

.skill-filter-group {
  background: rgba(13, 19, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  color: #f5f6fc;
}

.skill-filter-group--search {
  grid-column: 1 / -1;
}

.skill-search-field {
  display: block;
}

.skill-search-field input {
  width: min(520px, 100%);
}

.skill-filter-group p {
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.skill-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-filter-buttons button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #e2e6ff;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.skill-filter-buttons button.active {
  background: var(--active-bg-strong);
  border-color: var(--active-border-strong);
  color: var(--active-text-strong);
  font-weight: 700;
  box-shadow: var(--active-shadow-strong);
}

.skill-filter-buttons button:hover {
  background: rgba(78, 248, 209, 0.18);
  border-color: rgba(78, 248, 209, 0.9);
  color: #bafde9;
}

.skill-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.75rem;
  align-items: flex-start;
}

.skill-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.skill-group-title {
  grid-column: 1 / -1;
  margin: 0.2rem 0 0.1rem;
  color: #8cd9ff;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skill-card {
  background: rgba(11, 15, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.25rem;
  color: #f6f7ff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease;
}

.skill-card:hover,
.skill-card.active {
  border-color: rgba(78, 248, 209, 0.7);
  transform: translateY(-3px);
}

.skill-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.skill-card p {
  margin: 0;
  color: rgba(246, 247, 255, 0.75);
  font-size: 0.95rem;
}

.skill-card .skill-card-usecase {
  color: #d7ffe8;
  font-size: 0.86rem;
  line-height: 1.4;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 0.6rem;
}

.skill-card .skill-card-actions {
  display: flex;
  justify-content: flex-end;
}

.skill-card .skill-card-actions button {
  border: 1px solid rgba(130, 161, 255, 0.45);
  background: rgba(130, 161, 255, 0.13);
  color: #cdd8ff;
  border-radius: 999px;
  padding: 0.34rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.skill-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(239, 241, 255, 0.85);
}

.skill-tag--ai {
  border-color: rgba(255, 179, 71, 0.7);
  color: #ffb347;
}

.skill-tag--local {
  border-color: rgba(78, 248, 209, 0.7);
  color: #4ef8d1;
}

.skill-tag--remote {
  border-color: rgba(123, 157, 255, 0.75);
  color: #8aa9ff;
}

.skill-detail {
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  color: #f1f4ff;
  position: sticky;
  top: 110px;
}

.skill-detail__header h2 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.skill-detail__highlight {
  font-size: 0.95rem;
  color: rgba(240, 243, 255, 0.75);
  margin-bottom: 1rem;
}

.skill-detail__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-meta-pill {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.skill-detail__result {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  margin-top: 1rem;
}

.skill-detail__result h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.skill-detail__result p {
  margin: 0;
  color: rgba(241, 243, 255, 0.82);
  font-size: 0.92rem;
}

.skill-detail__steps {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.skill-detail__steps h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.skill-detail__steps ol {
  padding-left: 1.25rem;
  margin: 0;
  color: rgba(243, 244, 255, 0.85);
  line-height: 1.4;
}

.skill-detail__cta {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-detail__cta button {
  border-radius: 999px;
  border: none;
  padding: 0.85rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #05060a;
  background: linear-gradient(120deg, #4ef8d1, #82a1ff);
  box-shadow: 0 8px 24px rgba(78, 248, 209, 0.25);
}

.skill-detail__cta .secondary {
  border-radius: 999px;
  border: 1px solid rgba(130, 161, 255, 0.5);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #cfd8ff;
  background: rgba(130, 161, 255, 0.13);
  cursor: pointer;
}

.skill-detail__cta small {
  color: rgba(241, 243, 255, 0.7);
  font-size: 0.85rem;
}

.skill-detail__empty {
  text-align: center;
  color: rgba(244, 245, 255, 0.75);
}

.skill-detail__empty h3 {
  margin-bottom: 0.5rem;
}

.skill-tech-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.skill-tech-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 16, 0.75);
}

.skill-tech-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, 92vw);
  max-height: 84vh;
  overflow: auto;
  background: rgba(8, 13, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.1rem 1.15rem 1.2rem;
  color: #f1f4ff;
}

.skill-tech-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.skill-tech-modal__head h3 {
  margin: 0;
}

.skill-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.skill-tech-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
}

.skill-tech-card h5 {
  margin: 0 0 0.22rem;
  color: #8cd9ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-tech-card p {
  margin: 0;
  word-break: break-word;
  font-size: 0.92rem;
  color: #ecf0ff;
}

.skill-tech-list {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(245, 247, 255, 0.9);
}

.quick-note-page {
  display: grid;
  gap: 1rem;
}

.quick-note-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: rgba(8, 13, 26, 0.88);
}

.quick-note-head h1 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}

.quick-note-head p {
  margin: 0;
  color: rgba(230, 236, 255, 0.76);
}

.quick-note-head-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.quick-note-search input {
  min-width: 260px;
}

.quick-note-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
}

.quick-note-days,
.quick-note-detail {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(8, 13, 26, 0.88);
}

.quick-note-days {
  padding: 0.8rem;
}

.quick-note-days h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.quick-note-days ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  max-height: 70vh;
  overflow: auto;
}

.quick-note-day {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  display: grid;
  gap: 0.18rem;
}

.quick-note-day strong {
  font-size: 0.93rem;
}

.quick-note-day span,
.quick-note-day small,
.quick-note-empty {
  color: rgba(230, 236, 255, 0.72);
  font-size: 0.82rem;
}

.quick-note-day.active {
  border-color: rgba(58, 227, 111, 0.6);
  background: rgba(23, 123, 61, 0.25);
}

.quick-note-detail {
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.85rem;
}

.quick-note-detail-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.quick-note-detail-head p {
  margin: 0.12rem 0 0;
  color: rgba(230, 236, 255, 0.72);
}

.quick-note-stats {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 600;
}

.quick-note-stats span {
  font-size: 1.15rem;
}

.quick-note-timeline {
  display: grid;
  gap: 0.62rem;
}

.quick-note-entry {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.7rem 0.78rem;
}

.quick-note-entry h4 {
  margin: 0 0 0.32rem;
  font-size: 0.92rem;
  color: #53e089;
}

.quick-note-entry p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.52;
}

/* Stage 5: component unification layer */
.card,
.settings-card,
.settings-panel,
.capture-card,
.timeline-card,
.mother-status-card,
.quick-actions-card,
.schedule-card,
.skill-card,
.skill-detail {
  border-radius: var(--radius-lg);
  border-color: var(--surface-border);
}

.card,
.settings-panel,
.settings-card,
.capture-card,
.timeline-card,
.mother-status-card,
.quick-actions-card,
.schedule-card {
  background: var(--surface-bg);
}

.btn,
.button-row a,
.button-row button,
.skill-card .skill-card-actions button,
.skill-detail__cta .secondary {
  border-radius: var(--radius-pill);
}

.btn,
.skill-card .skill-card-actions button,
.skill-detail__cta .secondary {
  min-height: 34px;
}

.btn:focus-visible,
.button-row a:focus-visible,
.button-row button:focus-visible,
.filter-chip:focus-visible,
.search-field input:focus-visible,
.home-demo-input:focus-visible,
.settings-field input:focus-visible,
.settings-field select:focus-visible,
.settings-field textarea:focus-visible,
.auth-form input:focus-visible,
.ops-single-input:focus-visible,
.command-input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.search-field input,
.home-demo-input,
.settings-field input,
.settings-field select,
.settings-field textarea,
.auth-form input,
.ops-single-input,
.command-input {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.settings-field textarea,
.command-input {
  border-radius: var(--radius-md);
}

.status-badge,
.mission-status,
.skill-tag,
.filter-chip {
  border-radius: var(--radius-pill);
}

.settings-modal,
.skill-tech-modal__panel {
  border-radius: var(--radius-lg);
  border-color: var(--surface-border);
}

@media (max-width: 1024px) {
  .home-demo-input {
    font-size: 0.95rem;
  }

  .skill-content {
    grid-template-columns: 1fr;
  }

  .skill-detail {
    position: static;
  }

  .quick-note-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-demo-chips {
    gap: 0.4rem;
  }

  .home-demo-chips .filter-chip {
    font-size: 0.82rem;
    padding: 0.32rem 0.75rem;
  }

  .skill-gallery {
    padding-top: 3rem;
  }

  .skill-filter-buttons {
    flex-direction: column;
  }

  .skill-card-grid {
    grid-template-columns: 1fr;
  }

  .skill-tech-modal__panel {
    width: 94vw;
    max-height: 88vh;
  }

  .quick-note-head {
    flex-direction: column;
  }

  .quick-note-head-actions {
    width: 100%;
  }

  .quick-note-search {
    flex: 1;
  }

  .quick-note-search input {
    min-width: 0;
    width: 100%;
  }
}
