/* ============================================================
   DISCOVERY + FIELD LOG
   ============================================================ */

.mission-screen--support { max-width: 1160px; }

.field-log-screen { max-width: 1100px; }

.discovery-layout {
  display: grid;
  grid-template-columns:
    var(--operator-panel-width)
    minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 34px;
}

.discovery-operator-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 24px;
  text-align: center;
  background:
    linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.018)
    );
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
}

.discovery-mascot {
  width: var(--operator-portrait-width);
  height: var(--operator-portrait-height);
  object-fit: contain;
  filter:
    drop-shadow(
      0 18px 28px
      rgba(0, 0, 0, 0.35)
    );
  animation: discoveryMascotArrive 650ms cubic-bezier(0.18, 0.8, 0.25, 1) both;
}

@keyframes discoveryMascotArrive {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.discovery-console {
  padding: 32px 34px;
  background:
    radial-gradient(
      circle at 70% 25%,
      rgba(233, 183, 189, 0.07),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.065),
      rgba(255, 255, 255, 0.03)
    );
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.discovery-console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.discovery-console-header .eyebrow {
  margin-bottom: 8px;
}

.discovery-console-header h2 {
  margin: 0;
  font-size: 1.7rem;
}

.discovery-sector {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  letter-spacing: 0.12em;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
}

.discovery-reward {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  text-align: center;
  background:
    radial-gradient(
      circle,
      rgba(233, 183, 189, 0.11),
      transparent 58%
    ),
    rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(233, 183, 189, 0.22);
  border-radius: 18px;
}

.discovery-reward > span {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.17em;
}

.discovery-reward strong {
  margin: 15px 0 12px;
  color: var(--text);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size:
    clamp(
      1.8rem,
      3vw,
      2.7rem
    );
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(233, 183, 189, 0.16);
}

.discovery-reward small {
  color: #74b98a;
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.discovery-copy {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.discovery-copy p { margin: 0 0 8px; }

.discovery-copy p:last-child { margin-bottom: 0; }

.field-log-archive-label { white-space: nowrap; }

.field-log-archive-label span {
  margin: 0 6px;
  color: var(--accent);
}

.field-log-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.field-log-panel {
  min-width: 0;
  padding: 26px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.025)
    );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.22);
}

.field-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.field-panel-header .panel-label {
  margin-bottom: 7px;
}

.field-panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.field-log-count,
.field-log-live {
  flex: 0 0 auto;
  padding: 6px 9px;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  letter-spacing: 0.1em;
  border-radius: 8px;
}

.field-log-count {
  color: var(--muted);
  border: 1px solid var(--panel-border);
}

.field-log-live {
  color: #74b98a;
  border: 1px solid rgba(116, 185, 138, 0.22);
  background: rgba(116, 185, 138, 0.04);
}

.field-log-entries {
  display: grid;
  gap: 10px;
}

.field-log-entry {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
}

.field-log-sector {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.13em;
}

.field-log-entry strong {
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.field-log-empty {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.field-log-empty span {
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.field-log-empty p {
  margin: 10px 0 0;
}

.field-notes-panel {
  display: flex;
  flex-direction: column;
}

.field-notes-input {
  flex: 1;
  min-height: 360px;
  resize: none;
  padding: 18px;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 950px) {
  .discovery-layout,
  .field-log-layout {
    grid-template-columns: 1fr;
  }

}

/* ============================================================
   SECTORS 07–11
   ============================================================ */

.integrity-console { width: 100%; }

.integrity-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.integrity-option {
  position: relative;
  display: grid;
  grid-template-columns:
    38px
    1fr;
  grid-template-rows:
    auto
    auto;
  gap:
    3px
    10px;
  align-items: center;
  min-height: 78px;
  padding: 10px 14px;
  color: var(--text);
  text-align: left;
  background: rgba(0, 0, 0, 0.19);
  border: 1px solid var(--panel-border);
  border-radius: 15px;
  cursor: pointer;
  transition:
    transform 130ms ease,
    border-color 130ms ease,
    background 130ms ease;
}

.integrity-option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.integrity-option-id {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--accent);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.72rem;
  border: 1px solid rgba(233, 183, 189, 0.22);
  border-radius: 10px;
  background: rgba(233, 183, 189, 0.05);
}

.integrity-option strong {
  font-size: 0.94rem;
  line-height: 1.45;
}

.integrity-option small {
  color: var(--muted);
  font-size: var(--font-label);
  letter-spacing: 0.1em;
}

.integrity-option.correct {
  border-color: rgba(116, 185, 138, 0.55);
  background: rgba(116, 185, 138, 0.08);
}

.integrity-option.wrong {
  border-color: rgba(210, 104, 104, 0.55);
  background: rgba(210, 104, 104, 0.07);
}

@media (hover: hover) and (pointer: fine) {
  .integrity-option:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(233, 183, 189, 0.25);
  }
}

.validation-question {
  padding: 24px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
}

.validation-question .panel-label {
  margin-bottom: 12px;
}

.validation-question strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.5;
}

.validation-options {
  display: grid;
  gap: 10px;
}

.validation-option {
  display: grid;
  grid-template-columns:
    40px
    1fr;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  cursor: pointer;
}

.validation-option > span {
  color: var(--muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
}

.validation-option strong {
  font-size: 0.9rem;
  line-height: 1.45;
}

.validation-option.correct {
  border-color: rgba(116, 185, 138, 0.55);
  background: rgba(116, 185, 138, 0.08);
}

.validation-option.wrong {
  border-color: rgba(210, 104, 104, 0.55);
  background: rgba(210, 104, 104, 0.07);
}

.logic-console {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
}

.logic-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.logic-console-header .panel-label { margin: 0; }

.logic-lock-status {
  color: #d68e8e;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.logic-equations {
  display: grid;
  gap: 8px;
}

.logic-equation {
  display: grid;
  grid-template-columns:
    30px
    1fr;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
}

.logic-equation > span {
  color: var(--muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
}

.logic-equation strong {
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.logic-equation--code {
  margin-top: 3px;
  border-color: rgba(233, 183, 189, 0.28);
  background: rgba(233, 183, 189, 0.055);
}

.logic-equation--code strong {
  color: var(--accent);
}

.fragment-console {
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
}

.fragment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.fragment-header .panel-label { margin: 0; }

.fragment-status {
  color: #d68e8e;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.fragment-value {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(
      circle,
      rgba(233, 183, 189, 0.08),
      transparent 58%
    );
  border-radius: 14px;
}

.fragment-value > span {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.15em;
}

.fragment-value strong {
  display: block;
  max-width: 100%;
  margin: 20px 0 15px;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.3;
  letter-spacing: 0.12em;
}

/* Sectors 8 and 9: compact their puzzle controls within the shared workspace. */
.mission-screen--terminal[data-sector="8"] .logic-console { padding: 16px; }
.mission-screen--terminal[data-sector="8"] .logic-console-header {
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.mission-screen--terminal[data-sector="8"] .logic-equations { gap: 6px; }
.mission-screen--terminal[data-sector="8"] .logic-equation { min-height: 46px; }
.mission-screen--terminal[data-sector="8"] .answer-area { margin-top: 16px; }

.mission-screen--terminal[data-sector="9"] .fragment-console { padding: 18px; }
.mission-screen--terminal[data-sector="9"] .fragment-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.mission-screen--terminal[data-sector="9"] .fragment-value { min-height: 180px; }
.mission-screen--terminal[data-sector="9"] .fragment-value strong { margin: 14px 0 10px; }
.mission-screen--terminal[data-sector="9"] .answer-area { margin-top: 16px; }

.fragment-value small {
  max-width: 50ch;
  color: var(--accent);
  font-size: 0.7rem;
  line-height: 1.5;
}

.core-console {
  padding: 24px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(233, 183, 189, 0.07),
      transparent 52%
    ),
    rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(233, 183, 189, 0.17);
  border-radius: 20px;
}

.core-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.core-status-bar .panel-label { margin: 0; }

.core-status {
  color: var(--accent);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.11em;
}

.core-fragments {
  display: grid;
  grid-template-columns:
    1fr
    48px
    1fr;
  gap: 16px;
  align-items: center;
}

.core-fragment-slot {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
}

.core-fragment-slot span {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.core-fragment-slot strong {
  margin: 12px 0 8px;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 1.5rem;
  letter-spacing: 0.09em;
}

.core-fragment-slot small {
  color: var(--accent);
  font-size: var(--font-label);
  letter-spacing: 0.1em;
}

.core-combine-symbol {
  color: var(--muted);
  text-align: center;
  font-size: 1.6rem;
}

.pattern-console {
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
}

.pattern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pattern-header .panel-label { margin: 0; }

.pattern-status {
  color: var(--accent);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.11em;
}

.pattern-display {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  background:
    radial-gradient(
      circle,
      rgba(233, 183, 189, 0.07),
      transparent 60%
    );
}

.pattern-display strong {
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.35;
  letter-spacing: 0.1em;
}

@media (max-width: 950px) {
  .integrity-options {
    grid-template-columns: 1fr;
  }

  .integrity-option:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .core-fragments {
    grid-template-columns: 1fr;
  }

  .core-combine-symbol {
    transform: rotate(90deg);
  }
}

/* ============================================================
   SECTOR 13
   ============================================================ */

.deduction-console { width: 100%; }

.puzzle-screen-brief .mission-message .deduction-intro-rule {
  margin-top: 10px;
}

.deduction-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.deduction-divider::before,
.deduction-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.deduction-divider span {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.13em;
}

.deduction-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.deduction-option {
  display: grid;
  grid-template-columns:
    45px
    1fr;
  grid-template-rows:
    auto
    auto;
  gap:
    4px
    13px;
  align-items: center;
  min-height: 94px;
  padding: 14px 16px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  cursor: pointer;
}

.deduction-option-id {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.7rem;
  background: rgba(233, 183, 189, 0.05);
  border: 1px solid rgba(233, 183, 189, 0.18);
  border-radius: 9px;
}

.deduction-option strong { font-size: 0.88rem; }

.deduction-option small {
  color: var(--muted);
  font-size: var(--font-label);
  letter-spacing: 0.09em;
}

.deduction-option.correct {
  background: rgba(116, 185, 138, 0.08);
  border-color: rgba(116, 185, 138, 0.5);
}

.deduction-option.wrong {
  background: rgba(210, 104, 104, 0.07);
  border-color: rgba(210, 104, 104, 0.5);
}
