:root {
  --bg-base: #fafafb;
  --text-main: #121214;
  --text-dim: #8e8e93;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.2);
  --font-chassis: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

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

html {
  scrollbar-gutter: stable;
  height: 100%;
  scroll-behavior: smooth;
}

/* Operator Gate Terminal */
.gate-container {
  position: fixed;
  inset: 0;
  background-color: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.gate-container.is-unlocked {
  display: none;
}

.gate-terminal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.gate-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.gate-input-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.gate-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--text-main);
  width: 140px;
  text-transform: uppercase;
  padding: 0;
  caret-color: var(--text-main);
}

.layout.is-locked {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
}

.layout {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: pageDissolve 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity;
}

@keyframes pageDissolve {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layout {
    animation: none;
  }
}

/* Masthead */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.nav-link:hover {
  opacity: 0.5;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 19.15px;
  width: auto;
  display: block;
}

.location-tag {
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: none;
}

.viewport-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
}

.stage-frame {
  position: relative;
  width: 100%;
  height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}


/* Photo Viewfinder Layer */
.stage-photo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow: hidden;
}

.stage-photo-layer.is-active {
  opacity: 1;
  pointer-events: auto;
}

.stage-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stage-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  border-radius: 7px;
}

.stage-canvas.is-active {
  opacity: 1;
  pointer-events: auto;
}

.stage-canvas:active {
  cursor: grabbing;
}

.stage-tool-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage-hint {
  font-family: var(--font-chassis);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* Channel Nav */
.channel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.channel-buttons {
  display: flex;
  gap: 14px;
}

.channel-btn {
  background: transparent;
  border: none;
  font-family: var(--font-chassis);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.channel-btn:hover {
  color: var(--text-main);
}

.channel-btn.active {
  color: var(--text-main);
  font-weight: 600;
}

.channel-btn:focus,
.channel-btn:focus-visible {
  outline: none;
}

.channel-title {
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Modulet Tactile Chassis Bar */
.chassis-deck {
  margin-top: 14px;
  padding: 10px 14px;
  background: #f1f1f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.deck-cartridge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-chip {
  background: var(--text-main);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 6px;
  border-radius: 3px;
}

.deck-id {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-main);
}

.deck-telemetry {
  display: flex;
  align-items: center;
}

.deck-spec {
  font-family: var(--font-chassis);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.deck-controls {
  display: flex;
  gap: 6px;
}

.deck-key {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.deck-key:active {
  transform: translateY(1px);
  background: #f7f7f8;
}

/* Footer */
.footer {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-mark {
  font-family: var(--font-chassis);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.copy-mark {
  font-weight: 300;
  font-size: 0.52rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 0;
  transform: translateY(-0.5px);
}

.footer-role {
  color: var(--text-dim);
}

.footer-link {
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.18s ease;
}

.footer-link:hover {
  opacity: 0.6;
}

/* Dedicated About Page */
.about-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  width: 100%;
}

.about-media {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}

.about-image {
  width: 100%;
  height: auto;
  display: block;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-label {
  font-family: var(--font-chassis);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 8px;
}

.about-heading {
  font-family: var(--font-chassis);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 5px;
}

.about-meta {
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 22px;
}

.about-body {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 20px;
  max-width: 100%;
  text-wrap: pretty;
}

.about-contact {
  font-family: var(--font-chassis);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  gap: 8px;
  align-items: center;
}

.about-contact-label {
  color: var(--text-dim);
}

.about-contact-link {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dedicated Log Page */
.log-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  padding: 56px 0 60px;
  width: 100%;
}

.dispatch-feed {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.dispatch-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 40px;
}

.dispatch-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-chassis);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dispatch-index {
  font-weight: 600;
  color: var(--text-main);
}

.dispatch-title {
  font-weight: 600;
  color: var(--text-main);
}

.dispatch-date {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.68rem;
}

.dispatch-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background-color: #f2f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

.dispatch-media-tag {
  font-family: var(--font-chassis);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dispatch-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dispatch-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-main);
  text-wrap: pretty;
}

.dispatch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-chassis);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 4px;
}

.dispatch-cost {
  color: var(--text-dim);
}

.dispatch-link {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.dispatch-link:hover {
  opacity: 0.5;
}
.log-index {
  color: var(--text-main);
  font-weight: 600;
}

/* Floating Contact Card */
.contact-card {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(250, 250, 251, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 24px;
}

.contact-card.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-frame {
  position: relative;
  background: var(--bg-base);
  border: 1px solid var(--line);
  padding: 36px 32px 32px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 28px;
  max-width: 680px;
  width: 100%;
  box-shadow: none;
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  font-family: var(--font-chassis);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease;
}

.contact-close:hover {
  color: var(--text-main);
}

.contact-portrait-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
}

.contact-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.16);
  transform-origin: 50% 20%;
  display: block;
  border: none;
}

.contact-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: var(--font-chassis);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.contact-loc {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.contact-statement {
  font-size: 0.8rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  margin: 10px 0 2px;
  max-width: 100%;
  text-align: left;
}

.contact-channel {
  margin-top: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact-channel-label {
  color: var(--text-dim);
}

.contact-email {
  font-weight: 500;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
  margin-left: 2px;
}

.contact-email:hover {
  opacity: 0.6;
}

@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (max-width: 600px) {
  .stage-frame {
    height: 300px;
  }
  .contact-frame {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 24px 24px;
    max-width: 420px;
  }
  .contact-portrait-frame {
    aspect-ratio: 16 / 11;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}