:root {
  --paper: #d9d7c9;
  --paper-dark: #c7c4b3;
  --ink: #18211c;
  --muted: #5c655f;
  --line: #7a817c;
  --panel: #ece9da;
  --panel-2: #d2d0c1;
  --green: #2f4b3b;
  --warning: #7f4d2b;
  --danger: #6d2e2e;
  --blue: #536f78;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.018) 0, rgba(0,0,0,.018) 1px, transparent 1px, transparent 4px),
    #b8b5a7;
  font-family: "Courier New", Courier, monospace;
  min-height: 100vh;
}

button { font: inherit; }

.shell {
  width: min(1420px, 96vw);
  margin: 24px auto 60px;
}

.masthead {
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  box-shadow: 7px 7px 0 rgba(24,33,28,.22);
}

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .15em; }
h1 { margin: 5px 0 4px; font-size: clamp(24px, 3vw, 42px); letter-spacing: .03em; }
.subline { font-size: 13px; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; margin: 0 4px; }
.clock-panel { text-align: right; min-width: 210px; }
#clock { font-size: 24px; font-weight: 700; }
#dayLabel { margin-top: 5px; font-size: 12px; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(600px, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(24,33,28,.17);
}

.map-card { padding: 16px; }
.right-column { display: grid; gap: 18px; align-content: start; }
.controls, .stats, .inspector { padding: 16px; }
h2 { margin: 0; font-size: 18px; letter-spacing: .06em; }
p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }

.panel-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.legend { display: flex; gap: 11px; flex-wrap: wrap; justify-content: flex-end; font-size: 10px; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--ink); vertical-align: -1px; }
.swatch.vortex { background: #805b75; }
.swatch.house { background: #655547; }
.swatch.lake { background: var(--blue); }
.swatch.runway { background: #8b897f; }

.map-wrap {
  overflow: auto;
  border: 2px solid var(--ink);
  background: #bfc3ac;
  margin-top: 14px;
  padding: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(20, minmax(25px, 1fr));
  width: 100%;
  min-width: 650px;
  aspect-ratio: 1 / 1;
  border-top: 1px solid rgba(24,33,28,.5);
  border-left: 1px solid rgba(24,33,28,.5);
}

.cell {
  position: relative;
  border-right: 1px solid rgba(24,33,28,.32);
  border-bottom: 1px solid rgba(24,33,28,.32);
  background-color: rgba(227,230,205,.55);
  cursor: crosshair;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.cell:hover { outline: 2px solid var(--ink); z-index: 3; }
.cell.selected { outline: 3px double var(--ink); z-index: 4; }
.cell.pressure-low { background-color: rgba(211,222,192,.62); }
.cell.pressure-mid { background-color: rgba(218,208,170,.68); }
.cell.pressure-high { background-color: rgba(200,168,145,.78); }

.terrain-label {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(7px, .7vw, 10px);
  font-weight: 700;
  text-align: center;
  color: rgba(255,255,255,.9);
  padding: 2px;
  z-index: 1;
}
.cell.house { background: #655547 !important; }
.cell.lake { background: var(--blue) !important; }
.cell.runway { background: #8b897f !important; }
.cell.vortex { background: #805b75 !important; }
.cell.vortex::after {
  content: "◎";
  color: white;
  font-size: 22px;
  font-weight: bold;
  position: relative;
  z-index: 2;
}

.structure {
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 5;
  font-weight: 700;
  font-size: 12px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(24,33,28,.25);
}
.structure.buplin { border-radius: 50% 50% 35% 35%; background: #6f8792; color: #fff; }
.structure.keradisk { background: #c6b783; }

.map-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.tool-grid { display: grid; gap: 8px; margin-top: 12px; }
button {
  border: 2px solid var(--ink);
  background: var(--paper-dark);
  color: var(--ink);
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(24,33,28,.25);
}
button:hover { filter: brightness(.97); transform: translateY(-1px); }
button:active { transform: translateY(1px); box-shadow: none; }
.tool.active { background: var(--green); color: #fff; }
.direction-box { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.direction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.direction-grid button.active { background: var(--warning); color: white; }
.mini-label { font-size: 10px; color: var(--muted); }
.action-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.danger { color: #fff; background: var(--danger); }

.stats .stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dotted var(--line);
  padding: 10px 0 6px;
  gap: 16px;
  font-size: 12px;
}
.stats strong { font-size: 15px; }
.meter { height: 9px; background: #aaa99e; border: 1px solid var(--ink); margin-top: 5px; overflow: hidden; }
.meter div { height: 100%; width: 50%; background: var(--green); transition: width .25s ease; }
#pressureBar { background: var(--warning); }

.inspection-copy { margin-top: 12px; font-size: 12px; line-height: 1.65; min-height: 105px; }
.inspection-copy strong { display: inline-block; min-width: 100px; }

.log-panel { margin-top: 18px; padding: 16px; }
.small-button { padding: 6px 9px; font-size: 10px; }
.event-log { margin-top: 12px; border: 1px solid var(--ink); background: #d8d6c8; max-height: 290px; overflow: auto; }
.log-entry { padding: 9px 10px; border-bottom: 1px dotted var(--line); font-size: 12px; line-height: 1.45; }
.log-entry:last-child { border-bottom: 0; }
.log-time { color: var(--muted); margin-right: 10px; }
.log-entry.warning { border-left: 7px solid var(--warning); }
.log-entry.alert { border-left: 7px solid var(--danger); }
.log-entry.good { border-left: 7px solid var(--green); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,14,11,.72);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  width: min(560px, 94vw);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 rgba(0,0,0,.35);
  padding: 22px;
}
.modal-card h2 { margin-top: 8px; font-size: 25px; }
.modal-card ul { padding-left: 18px; line-height: 1.55; font-size: 13px; }
.modal-card button { width: 100%; margin-top: 10px; }
.hidden { display: none !important; }

@media (max-width: 1050px) {
  .layout { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .shell { width: 94vw; margin-top: 12px; }
  .masthead { align-items: flex-start; flex-direction: column; }
  .clock-panel { text-align: left; }
  .right-column { grid-template-columns: 1fr; }
  .panel-title-row { flex-direction: column; }
  .legend { justify-content: flex-start; }
  .map-footer { flex-direction: column; }
}

/* v0.3 additions */
.version-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.remove-tool.active { background: var(--danger); color: #fff; }
.assistant-panel { padding: 16px; }
.assistant-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.assistant-status {
  border: 1px solid var(--ink);
  background: var(--paper-dark);
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.assistant-copy { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.assistant-row {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dotted var(--line);
  display: grid;
  gap: 4px;
  font-size: 10px;
}
.assistant-row span { color: var(--muted); }
.assistant-row strong { font-size: 11px; line-height: 1.4; }
#buqueStatus.enhanced { color: var(--green); }
.structure.buplin { font-size: 9px; }
.structure.keradisk { font-size: 11px; }

/* v0.4 stewardship / AFK systems */
.assistant-assignment-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.assignment-grid {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.assignment-grid button {
  min-height: 39px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  background: var(--paper-dark);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .045em;
  cursor: pointer;
}
.assignment-grid button:hover { background: #ddd7c7; }
.assignment-grid button:disabled { opacity: .38; cursor: not-allowed; }
.assignment-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}
.assistant-busy-copy {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--paper-dark);
  padding: 9px;
  font-size: 10px;
  line-height: 1.45;
}
.assistant-status.busy { background: var(--ink); color: var(--paper); }
.score-divider { border-top: 1px dotted var(--line); margin: 10px 0 7px; }
.score-stat strong { font-size: 18px; letter-spacing: .06em; }
.rowd-stat strong { font-size: 18px; letter-spacing: .08em; }
.score-note {
  margin: 1px 0 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: .03em;
}

/* v0.5 continuous property presence */
.clock-caption {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
}

.live-panel { padding: 16px; overflow: hidden; }
.live-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.live-indicator {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 4px 6px;
  background: var(--paper-dark);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: receiverBlink 2.4s steps(1, end) infinite;
}
@keyframes receiverBlink {
  0%, 72%, 100% { opacity: 1; }
  73%, 82% { opacity: .18; }
}

.reader-box {
  margin-top: 11px;
  border: 1px solid var(--ink);
  background: rgba(217,215,201,.72);
  padding: 8px;
}
.reader-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .045em;
}
.reader-title-row strong { font-size: 16px; letter-spacing: .08em; }
#fieldCanvas {
  display: block;
  width: 100%;
  height: 68px;
  margin-top: 6px;
  border: 1px solid rgba(24,33,28,.55);
  background: rgba(236,233,218,.8);
}
.reader-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-top: 6px;
  font-size: 7px;
  color: var(--muted);
}
.reader-meta strong { color: var(--ink); }

.live-system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 9px;
}
.live-system-grid > div {
  min-height: 42px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  background: rgba(199,196,179,.35);
}
.live-system-grid span { color: var(--muted); font-size: 7px; letter-spacing: .08em; }
.live-system-grid strong { font-size: 9px; line-height: 1.3; }

.live-feed {
  margin-top: 9px;
  border-top: 1px dotted var(--line);
  padding-top: 5px;
  min-height: 78px;
}
.live-feed-entry {
  display: grid;
  grid-template-columns: 63px 1fr;
  gap: 7px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(92,101,95,.35);
  font-size: 8px;
  line-height: 1.35;
}
.live-feed-entry span { color: var(--muted); }
.live-feed-entry.signal { font-weight: 700; }
.live-feed-entry.assistant { font-style: italic; }
.live-feed-entry.equipment::after { content: ""; }

.assistant-presence-marker {
  position: absolute;
  z-index: 9;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 6px;
  font-weight: 700;
  box-shadow: 1px 1px 0 rgba(24,33,28,.25);
}

.structure.buplin.cycle-active::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(47,75,59,.7);
  border-radius: 50%;
  animation: buplinDiffuse 3.8s ease-out infinite;
  pointer-events: none;
}
.structure.buplin.cycle-rest { opacity: .84; }
@keyframes buplinDiffuse {
  0% { transform: scale(.78); opacity: .7; }
  70% { opacity: .12; }
  100% { transform: scale(1.42); opacity: 0; }
}

.structure.keradisk-live {
  animation: keradiskContact 4.8s ease-in-out infinite;
}
@keyframes keradiskContact {
  0%, 100% { box-shadow: 2px 2px 0 rgba(24,33,28,.25); }
  50% { box-shadow: 2px 2px 0 rgba(24,33,28,.25), 0 0 0 2px rgba(127,77,43,.12); }
}

.cell.live-ping::before,
.cell.live-signal::before {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 3px;
  border: 1px solid rgba(24,33,28,.8);
  pointer-events: none;
  animation: livePing 5s ease-out forwards;
}
.cell.live-signal::before { border-style: double; border-width: 3px; }
@keyframes livePing {
  0% { opacity: 0; transform: scale(.65); }
  12% { opacity: .92; }
  100% { opacity: 0; transform: scale(1.12); }
}

@media (max-width: 1050px) {
  .live-panel { grid-column: span 3; }
}
@media (max-width: 760px) {
  .live-panel { grid-column: auto; }
}

.left-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.operations-panel {
  background: linear-gradient(180deg, #dfe7d6 0%, #d6dfcc 100%);
  border-color: #274132;
}
.operations-panel h2 { margin: 3px 0 0; }
.green-label { color: #274132; }
.ops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.funds-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: .07em;
  color: #274132;
}
.funds-indicator i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f6b3f;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(47,107,63,.12);
}
.funds-strip {
  border: 2px solid rgba(39,65,50,.75);
  background: rgba(255,255,255,.36);
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.funds-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.funds-main span,
.funds-meta span,
.ops-line span,
.proc-row small,
.sale-row small { color: #385443; }
.funds-main strong {
  font-size: 28px;
  color: #1f402d;
}
.funds-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.funds-meta > div,
.ops-card {
  border: 1px solid rgba(39,65,50,.45);
  background: rgba(255,255,255,.34);
  padding: 10px;
}
.funds-meta strong { display: block; margin-top: 4px; }
.ops-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 12px;
}
.ops-card-title {
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 12px;
  margin-bottom: 8px;
  color: #244131;
}
.ops-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(39,65,50,.24);
}
.ops-line:last-of-type { border-bottom: 0; }
.ops-note {
  margin-top: 10px;
  font-size: 12px;
  color: #244131;
  min-height: 2.6em;
}
.proc-row,
.sale-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(39,65,50,.24);
}
.proc-row:last-child,
.sale-row:last-child { border-bottom: 0; }
.proc-row strong,
.sale-row strong { display: block; }
.green-button,
.cost-chip {
  border: 2px solid #274132;
  background: #dfe7d6;
  color: #193323;
  padding: 8px 10px;
  min-width: 80px;
  text-align: center;
  font-weight: 700;
}
.green-button { cursor: pointer; }
.green-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}
.cost-chip { display: inline-block; }
@media (max-width: 1180px) {
  .ops-grid { grid-template-columns: 1fr; }
  .funds-meta { grid-template-columns: 1fr; }
}

.funds-value-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  justify-content: flex-end;
}
#fundsDisplay {
  font-size: 36px;
  letter-spacing: .025em;
  padding: 4px 7px 3px;
  background: rgba(226, 239, 220, .72);
  border-bottom: 2px solid rgba(31, 64, 45, .35);
  min-width: 190px;
  text-align: right;
}
.fund-flow-line {
  width: 88px;
  height: 5px;
  display: inline-block;
  background: #6b746c;
  position: relative;
  overflow: hidden;
}
.fund-flow-line.green { background: #2f6b3f; }
.fund-flow-line.amber { background: #98702c; }
.fund-flow-line.hold { background: #6d2e2e; }
.fund-flow-line.green::after,
.fund-flow-line.amber::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 32%;
  background: rgba(255,255,255,.34);
  animation: fundFlowSweep 1.5s linear infinite;
}
.fund-flow-line.amber::after { animation-duration: 2.6s; }
.fund-flow-line.hold::after { display: none; }
@keyframes fundFlowSweep {
  from { transform: translateX(-130%); }
  to { transform: translateX(360%); }
}
.fund-flow-status {
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 700;
  text-align: right;
  margin-top: -5px;
}
.fund-flow-status.green { color: #245f36; }
.fund-flow-status.amber { color: #805d22; }
.fund-flow-status.hold { color: #6d2e2e; }
@media (max-width: 760px) {
  .funds-main { align-items: flex-start; flex-direction: column; }
  .funds-value-wrap { min-width: 0; width: 100%; justify-content: space-between; }
  #fundsDisplay { font-size: 30px; min-width: 0; }
}

/* v0.7 public-facing economy clarity */
.funds-title-block {
  display: grid;
  gap: 2px;
}
.funds-title-block > small {
  font-size: 10px;
  letter-spacing: .1em;
  color: #5a6f5f;
}
.funds-number-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.fund-flow-wrap {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 110px;
}
.fund-performance {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 30px;
}
#fundNetDisplay {
  font-size: 10px;
  letter-spacing: .055em;
  font-weight: 700;
  color: #365542;
  white-space: nowrap;
}
#fundNetDisplay.negative { color: #6d2e2e; }
#fundNetDisplay.neutral { color: #667068; }
#fundSparkCanvas {
  width: 150px;
  height: 28px;
  border-bottom: 1px solid rgba(39,65,50,.2);
  background: rgba(255,255,255,.2);
}
.availability-note {
  display: block;
  margin-top: 5px;
  font-size: 9px !important;
  letter-spacing: .055em;
  line-height: 1.35;
  font-weight: 700;
  color: #315a3c !important;
}
.availability-note.unavailable { color: #765c35 !important; }
.availability-note.blocked { color: #6d2e2e !important; }
.proc-row.unavailable,
.sale-row.unavailable {
  background: rgba(96, 105, 98, .035);
}
.cost-chip.unavailable {
  opacity: .5;
  border-color: #78827a;
  color: #78827a;
  background: #e1e5dc;
}
.cost-chip.available {
  opacity: 1;
  border-color: #274132;
  color: #193323;
}
.green-button:disabled {
  filter: grayscale(.35);
}
@media (max-width: 760px) {
  .funds-value-wrap { align-items: flex-start; }
  .fund-performance { justify-content: flex-start; flex-wrap: wrap; }
  .funds-number-stack { justify-items: start; }
  .fund-flow-wrap { justify-items: start; }
}

@media (min-width: 1051px) {
  .left-column {
    grid-template-rows: auto 1fr;
    align-content: stretch;
  }
  .operations-panel {
    height: 100%;
  }
}

.fund-history-card {
  margin-top: 14px;
  border: 1px solid rgba(39,65,50,.48);
  background: rgba(255,255,255,.24);
  padding: 12px;
  min-height: 190px;
}
.fund-history-header,
.fund-history-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}
.fund-history-header span {
  display: block;
  font-size: 9px;
  letter-spacing: .11em;
  color: #526959;
}
.fund-history-header strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: .055em;
  color: #244131;
}
#fundHistoryRange,
.fund-history-footer {
  font-size: 9px;
  letter-spacing: .045em;
  color: #526959;
}
#fundHistoryCanvas {
  display: block;
  width: 100%;
  height: 118px;
  margin: 8px 0 7px;
  background: rgba(239,244,235,.36);
  border: 1px solid rgba(39,65,50,.25);
}
#fundHistoryNet {
  font-weight: 700;
  color: #2f6b3f;
}
#fundHistoryNet.negative { color: #6d2e2e; }
.fund-history-footer { align-items: center; }
@media (max-width: 760px) {
  .fund-history-header,
  .fund-history-footer { align-items: flex-start; flex-direction: column; }
}

/* v0.7.5 launch-day systems: notices, personnel rest, daily reports, record locking */
.nava-notice-strip {
  margin-top: 12px;
  border: 2px solid var(--ink);
  background: #d2d0c1;
  min-height: 38px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  box-shadow: 4px 4px 0 rgba(24,33,28,.13);
  font-size: 10px;
  letter-spacing: .035em;
}
.notice-badge {
  border: 1px solid var(--ink);
  padding: 3px 6px;
  font-weight: 700;
  background: var(--paper);
  white-space: nowrap;
}
.notice-status { color: var(--muted); white-space: nowrap; font-size: 9px; }
#noticeText { line-height: 1.35; }

.assistant-fitness-row small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .035em;
}
.assistant-fatigue-meter {
  height: 7px;
  border: 1px solid var(--ink);
  background: #aaa99e;
  overflow: hidden;
  margin-top: 2px;
}
.assistant-fatigue-meter > div {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width .35s ease, background .35s ease;
}
.assistant-fatigue-meter > div.tired { background: #7d7338; }
.assistant-fatigue-meter > div.exhausted { background: var(--warning); }
.assistant-fatigue-meter > div.critical { background: var(--danger); }
.rest-button,
.report-button {
  width: 100%;
  margin-top: 10px;
  background: #d7d4c4;
  font-weight: 700;
}
.rest-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.rest-button.sleeping { background: #cbd6ca; }
.replacement-button { background: #dfd4c5; }

.daily-report-panel,
.record-panel { padding: 16px; }
.daily-report-header,
.record-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.daily-report-copy,
.record-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.report-status,
.record-lock {
  border: 1px solid var(--ink);
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  background: var(--paper-dark);
  white-space: nowrap;
}
.report-status.open,
.record-lock.locked { background: #c8d8c6; color: #214e30; }
.report-status.pending { color: var(--muted); }
.report-button.available {
  background: #c8d8c6;
  box-shadow: 3px 3px 0 rgba(36,82,49,.2);
}
.report-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.record-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.record-status-grid > div {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.22);
  padding: 8px;
  display: grid;
  gap: 3px;
}
.record-status-grid span { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.record-status-grid strong { font-size: 11px; }
.record-status-grid small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.record-actions { display: grid; gap: 7px; margin-top: 11px; }
.record-actions button { padding: 8px; font-size: 9px; font-weight: 700; }
.record-lock.open { color: #695f4d; }

.record-modal-card { width: min(610px, 94vw); }
.archive-procedure {
  margin: 15px 0;
  padding: 13px;
  min-height: 90px;
  border: 1px solid var(--line);
  background: #d9d7c9;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-line;
}
.archive-result {
  margin: 12px 0;
  border: 2px solid #315440;
  background: #dbe5d5;
  padding: 13px;
  display: grid;
  gap: 5px;
  text-align: center;
  font-size: 10px;
}
.archive-lock-large { font-size: 11px; letter-spacing: .18em; font-weight: 700; color: #2f5a3d; }
#archiveCodeDisplay { font-size: 22px; letter-spacing: .09em; }
.archive-result small { color: var(--muted); }
.restore-summary {
  margin: 14px 0;
  border: 1px solid var(--line);
  background: #d9d7c9;
  padding: 12px;
  display: grid;
  gap: 7px;
  font-size: 11px;
  line-height: 1.4;
}
.restore-summary strong { font-size: 16px; }

.assistant-status.sleeping { background: #c8d8c6; color: #214e30; }
.assistant-status.tired { background: #d8d0ab; color: #625323; }
.assistant-status.exhausted { background: #d8bea7; color: #6f4022; }
.assistant-status.dead { background: var(--danger); color: #fff; }

@media (max-width: 760px) {
  .nava-notice-strip { grid-template-columns: 1fr; gap: 6px; }
  .notice-status { display: none; }
  .record-status-grid { grid-template-columns: 1fr; }
}

.record-software-line { margin-top: 8px; border-top: 1px dotted var(--line); padding-top: 7px; color: var(--muted); font-size: 8px; letter-spacing: .07em; }

/* v0.8 fixed field surveys / property reinitialization */
.survey-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: #d7d5c8;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
}

.reset-modal-card { width: min(760px, 95vw); }
.reset-warning,
.reset-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.reset-warning {
  margin: 10px 0 13px;
  border-left: 4px solid var(--danger);
  padding: 8px 10px;
  background: #ded5cc;
}
.survey-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}
.modal-card .survey-choice {
  margin: 0;
  min-height: 104px;
  padding: 11px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 4px;
  background: #d9d7c9;
  border: 1px solid var(--ink);
}
.survey-choice:hover { background: #cfd5c7; }
.survey-choice span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
}
.survey-choice strong { font-size: 13px; letter-spacing: .04em; }
.survey-choice small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.reset-note {
  padding: 8px 10px;
  border: 1px dotted var(--line);
  background: rgba(255,255,255,.18);
}

@media (max-width: 760px) {
  .survey-choice-grid { grid-template-columns: 1fr; }
}


/* v0.8.1 inspection priority / stewardship snapshot sharing */
.inspector-priority {
  border-left: 4px solid #4f6657;
}
.inspection-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.inspection-live-badge {
  border: 1px solid var(--line);
  background: #d8d6c8;
  color: var(--muted);
  padding: 3px 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
.inspector-priority .inspection-copy {
  min-height: 82px;
  margin-top: 9px;
}
.snapshot-share-button {
  width: 100%;
  background: #cfd7ca;
  font-weight: 700;
  letter-spacing: .045em;
  box-shadow: 3px 3px 0 rgba(35,72,49,.18);
}
.snapshot-share-button small {
  display: block;
  margin-top: 3px;
  color: #56645a;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .04em;
}
.share-modal-card { width: min(650px, 95vw); }
.snapshot-id-line {
  margin: 11px 0 8px;
  border: 1px solid var(--line);
  background: #d7d5c8;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 9px;
  align-items: baseline;
  font-size: 9px;
}
.snapshot-id-line span:first-child { color: var(--muted); letter-spacing: .08em; }
.snapshot-id-line strong { font-size: 13px; letter-spacing: .08em; }
.snapshot-id-line span:last-child { color: var(--muted); text-align: right; }
.share-snapshot-text {
  margin: 0;
  max-height: 47vh;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--ink);
  background: #d9d7c9;
  padding: 13px;
  font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  user-select: text;
}
.share-feedback {
  min-height: 15px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .035em;
}
.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}
.share-actions button { margin: 0; font-size: 9px; font-weight: 700; }
.share-actions #closeShareBtn { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .snapshot-id-line { grid-template-columns: 1fr; gap: 3px; }
  .snapshot-id-line span:last-child { text-align: left; }
  .share-actions { grid-template-columns: 1fr; }
  .share-actions #closeShareBtn { grid-column: auto; }
}
