:root {
  color-scheme: dark;
  --void: #030302;
  --carbon: #090907;
  --carbon-2: #0e0e0b;
  --graphite: #171611;
  --line: rgba(216, 174, 79, .22);
  --line-soft: rgba(216, 174, 79, .10);
  --gold: #d8ae4f;
  --gold-bright: #f0ca71;
  --gold-dim: #7d6734;
  --white: #e9e6dc;
  --text: #c8c4b8;
  --muted: #77756e;
  --cold: #92a5a8;
  --danger: #bd6d58;
  --pad: clamp(18px, 2.4vw, 38px);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--void); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background: var(--void);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 35%, rgba(216,174,79,.065), transparent 30rem),
    radial-gradient(circle at 20% 80%, rgba(105,126,127,.028), transparent 24rem),
    linear-gradient(180deg, #050504 0%, #020202 100%);
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(rgba(216,174,79,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216,174,79,.026) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 82%, transparent);
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  top: 22%;
  background: linear-gradient(90deg, transparent 8%, rgba(240,202,113,.23), transparent 84%);
  box-shadow: 0 0 24px rgba(216,174,79,.12);
  animation: scan 11s linear infinite;
}

.portal {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar, .footer {
  min-height: 66px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-color: var(--line-soft);
  background: rgba(3,3,2,.52);
  backdrop-filter: blur(14px);
}

.topbar { border-bottom: 1px solid var(--line-soft); }
.footer { min-height: 40px; border-top: 1px solid var(--line-soft); }

.identity, .topbar-status, .user-chip, .sidebar-head {
  display: flex;
  align-items: center;
}

.identity { gap: 13px; }
.identity strong, .sidebar-head strong {
  display: block;
  color: var(--white);
  font-size: 11px;
  letter-spacing: .14em;
}
.identity small, .sidebar-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .16em;
}

.sigil {
  position: relative;
  width: 31px;
  height: 31px;
  border: 1px solid var(--gold);
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
}
.sigil::before, .sigil::after, .sigil span {
  content: "";
  position: absolute;
  background: var(--gold);
}
.sigil::before { width: 1px; top: 6px; bottom: 6px; left: 50%; }
.sigil::after { height: 1px; left: 6px; right: 6px; top: 50%; }
.sigil span { width: 5px; height: 5px; left: calc(50% - 2px); top: calc(50% - 2px); box-shadow: 0 0 14px var(--gold); }

.topbar-status {
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  white-space: nowrap;
}
.status-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(216,174,79,.75);
}
.divider { color: #44423c; }

.stage {
  min-height: 0;
  padding: clamp(22px, 4vh, 48px) var(--pad);
  display: grid;
}

.auth-view {
  width: min(100%, 920px);
  margin: auto;
  display: grid;
  grid-template-columns: 46px minmax(0, 620px);
  justify-content: center;
  align-items: stretch;
}

.auth-rail {
  padding: 19px 0;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--gold-dim);
  font-size: 7px;
  letter-spacing: .17em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.auth-rail span:first-child { color: var(--gold-bright); font-size: 9px; }

.hud-corners {
  --corner: 15px;
  clip-path: polygon(0 0, calc(100% - var(--corner)) 0, 100% var(--corner), 100% 100%, var(--corner) 100%, 0 calc(100% - var(--corner)));
}

.auth-panel {
  position: relative;
  min-height: min(640px, calc(100svh - 174px));
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(216,174,79,.035), transparent 24%),
    #090907;
  box-shadow: 0 28px 90px rgba(0,0,0,.42);
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(216,174,79,.06);
  clip-path: inherit;
  pointer-events: none;
}

.panel-meta, .card-label, .module-readout, .auth-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #625e51;
  font-size: 7px;
  letter-spacing: .18em;
}
.panel-meta { position: absolute; top: 20px; left: 24px; right: 24px; }
.gold { color: var(--gold); }

.auth-mark {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 34px;
}
.ring {
  position: absolute;
  border: 1px solid rgba(216,174,79,.34);
  border-radius: 50%;
}
.ring-a { inset: 0; border-style: dashed; animation: rotate 20s linear infinite; }
.ring-b { inset: 16px; border-color: rgba(216,174,79,.18); }
.core {
  position: absolute;
  width: 9px;
  height: 9px;
  left: calc(50% - 4.5px);
  top: calc(50% - 4.5px);
  background: var(--gold-bright);
  box-shadow: 0 0 22px rgba(216,174,79,.55);
  transform: rotate(45deg);
}

.kicker {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .2em;
}

h1, h2, h3, p { text-wrap: pretty; }
h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 6vw, 67px);
  line-height: .94;
  letter-spacing: -.055em;
  font-weight: 670;
}
h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(233,230,220,.52);
}
.auth-panel h1 span:first-child {
  color: var(--white);
  -webkit-text-stroke: 0;
}

.intro {
  max-width: 570px;
  margin: 24px 0 28px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: #98958c;
  font-size: 13px;
  line-height: 1.65;
}

.primary-action {
  width: min(100%, 480px);
  min-height: 68px;
  padding: 0;
  display: grid;
  grid-template-columns: 56px 1fr 50px;
  align-items: stretch;
  border: 1px solid rgba(216,174,79,.5);
  background: linear-gradient(90deg, rgba(216,174,79,.13), rgba(216,174,79,.035));
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.primary-action:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(216,174,79,.19), rgba(216,174,79,.055));
  transform: translateY(-1px);
}
.primary-action:focus-visible, .logout:focus-visible, .nav-item:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 3px;
}
.primary-action:disabled { opacity: .58; cursor: wait; transform: none; }
.action-index, .action-arrow {
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  border-right: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: .1em;
}
.action-arrow { border-right: 0; border-left: 1px solid var(--line); font-size: 17px; }
.action-copy { padding: 13px 17px; align-self: center; }
.action-copy strong { display: block; color: var(--white); font-size: 13px; letter-spacing: .02em; }
.action-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .11em; text-transform: uppercase; }

.privacy-note {
  max-width: 580px;
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #77746b;
  font-size: 10px;
  line-height: 1.55;
}
.privacy-note p { margin: 0; }
.privacy-note strong { color: #a9a59a; font-weight: 550; }
.privacy-note code { color: var(--gold-dim); font-family: inherit; }
.privacy-icon { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 3px; border: 1px solid var(--gold-dim); transform: rotate(45deg); }

.auth-readout {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  justify-content: flex-start;
  gap: 22px;
}

.app-view {
  width: min(100%, 1420px);
  min-height: min(720px, calc(100svh - 174px));
  margin: auto;
  grid-template-columns: 218px minmax(0, 1fr);
  border: 1px solid var(--line-soft);
  background: #060605;
}
.app-view:not([hidden]) { display: grid; }

.sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--line-soft);
  background: #0a0a08;
}
.sidebar-head { gap: 11px; padding: 24px 18px; border-bottom: 1px solid var(--line-soft); }
.sidebar-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 8px;
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
}
.nav { padding: 14px 0; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 62px;
  padding: 10px 18px 10px 47px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.nav-item > span { position: absolute; left: 18px; top: 14px; color: #565249; font-size: 7px; }
.nav-item strong { display: block; color: #9d998f; font-size: 11px; font-weight: 550; }
.nav-item small { display: block; margin-top: 4px; color: #55534d; font-size: 8px; letter-spacing: .06em; }
.nav-item.active { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(216,174,79,.08), transparent); }
.nav-item.active strong { color: var(--white); }
.nav-item:disabled { opacity: .52; cursor: default; }
.sidebar-foot { padding: 16px 18px; display: grid; gap: 5px; border-top: 1px solid var(--line-soft); color: #4d4a43; font-size: 7px; letter-spacing: .13em; }

.workspace { min-width: 0; padding: clamp(22px, 3vw, 40px); }
.workspace-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.workspace-head h2 { margin: 0; color: var(--white); font-size: clamp(28px, 4vw, 46px); letter-spacing: -.045em; font-weight: 620; }

.user-chip {
  min-width: 260px;
  gap: 11px;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--line-soft);
  background: rgba(11,11,9,.68);
}
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #15140f;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-copy { min-width: 0; margin-right: auto; }
.user-copy strong { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; color: var(--white); font-size: 10px; white-space: nowrap; }
.user-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.logout { padding: 8px 9px; border: 0; border-left: 1px solid var(--line-soft); background: transparent; color: #777268; font-size: 7px; letter-spacing: .12em; cursor: pointer; }
.logout:hover { color: var(--gold-bright); }

.status-grid {
  margin-top: clamp(28px, 5vh, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.status-card {
  --corner: 11px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(216,174,79,.035), transparent 40%), rgba(10,10,8,.72);
}
.status-card-wide { grid-column: 1 / -1; min-height: 174px; }
.card-label { padding-bottom: 15px; border-bottom: 1px solid rgba(216,174,79,.07); }
.card-content { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.status-title { margin: 0 0 7px; color: var(--white); font-size: 17px; font-weight: 570; }
.status-copy { max-width: 660px; margin: 0; color: #79766e; font-size: 11px; line-height: 1.55; }
.state-badge { padding: 8px 10px; border: 1px solid var(--line); color: var(--gold); font-size: 8px; letter-spacing: .14em; }
.progress-track { height: 2px; background: #1a1914; }
.progress-track span { display: block; width: 33%; height: 100%; background: var(--gold); box-shadow: 0 0 12px rgba(216,174,79,.35); }
.metric-value { display: block; margin-top: 22px; color: var(--gold-bright); font-size: clamp(22px, 3vw, 32px); letter-spacing: -.03em; font-weight: 560; }
.metric-value.muted { color: #68645a; }
.metric-caption { display: block; margin-top: 6px; color: #5b5851; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }

.locked-module {
  --corner: 12px;
  position: relative;
  min-height: 230px;
  margin-top: 12px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(216,174,79,.08);
  background: rgba(7,7,6,.68);
}
.locked-module > *:not(.locked-lines) { position: relative; z-index: 1; }
.locked-lines {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(216,174,79,.045) 18px 19px);
}
.lock-symbol { float: right; width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(216,174,79,.12); }
.lock-symbol span { width: 18px; height: 15px; border: 1px solid var(--gold-dim); border-top: 0; position: relative; }
.lock-symbol span::before { content: ""; position: absolute; width: 10px; height: 9px; left: 3px; top: -9px; border: 1px solid var(--gold-dim); border-bottom: 0; border-radius: 7px 7px 0 0; }
.locked-module h3 { max-width: 620px; margin: 0 0 10px; color: #b2aea3; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.035em; font-weight: 560; }
.locked-module p:not(.kicker) { max-width: 650px; margin: 0; color: #66635c; font-size: 11px; line-height: 1.6; }
.module-readout { position: absolute !important; left: 34px; right: 34px; bottom: 24px; justify-content: flex-start; gap: 24px; }

.footer { color: #4c4942; font-size: 7px; letter-spacing: .15em; }

.error-banner {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 640px);
  padding: 11px 14px;
  border: 1px solid rgba(189,109,88,.45);
  background: rgba(40,20,16,.92);
  color: #d6a293;
  font-size: 10px;
  line-height: 1.45;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
}

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes scan { from { transform: translateY(-18vh); } to { transform: translateY(76vh); } }

@media (max-width: 860px) {
  .app-view:not([hidden]) { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .workspace-head { align-items: stretch; flex-direction: column; }
  .user-chip { width: 100%; min-width: 0; }
}

@media (max-width: 620px) {
  .topbar { min-height: 58px; }
  .identity small, .topbar-status #serviceStatus, .topbar-status .divider { display: none; }
  .identity strong { font-size: 9px; }
  .stage { padding-top: 18px; padding-bottom: 18px; }
  .auth-view { grid-template-columns: 1fr; }
  .auth-rail { display: none; }
  .auth-panel { min-height: calc(100svh - 134px); padding: 28px 22px 48px; }
  .panel-meta { left: 20px; right: 20px; }
  .auth-mark { width: 66px; height: 66px; margin-bottom: 24px; }
  .auth-readout { display: none; }
  .primary-action { grid-template-columns: 44px 1fr 42px; }
  .status-grid { grid-template-columns: 1fr; }
  .status-card-wide { grid-column: auto; }
  .card-content { align-items: flex-start; flex-direction: column; gap: 14px; padding-top: 16px; }
  .workspace { padding: 20px; }
  .locked-module { padding: 26px 22px 54px; }
  .module-readout { left: 22px; right: 22px; bottom: 18px; gap: 12px; flex-wrap: wrap; }
  .footer span:first-child { display: none; }
  .footer { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}


.language-control {
  margin-left: auto;
  position: relative;
  z-index: 5;
}
.language-control select {
  appearance: none;
  min-width: 58px;
  padding: 7px 22px 7px 9px;
  border: 1px solid rgba(214,168,58,.28);
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 50%, #d6a83a 50%) calc(100% - 10px) 50%/4px 4px no-repeat,
    linear-gradient(135deg, #d6a83a 50%, transparent 50%) calc(100% - 6px) 50%/4px 4px no-repeat,
    rgba(8,8,8,.72);
  color: #d6a83a;
  font: inherit;
  font-size: 10px;
  letter-spacing: .12em;
  cursor: pointer;
}
.language-control select:focus-visible {
  outline: 1px solid #d6a83a;
  outline-offset: 3px;
}


/* State views must fully disappear even when their component class defines display. */
.auth-view[hidden],
.app-view[hidden] {
  display: none !important;
}


/* v0.4.0 — Lodestone character verification */
.character-state[hidden] { display: none !important; }

.character-card { min-height: 300px; }

.character-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-top: 20px;
}

.character-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 22px;
}

.character-form input {
  min-width: 0;
  height: 46px;
  border: 1px solid rgba(214,168,58,.22);
  border-radius: 0;
  background: rgba(6,6,5,.72);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.character-form input::placeholder { color: rgba(232,233,230,.34); }

.character-form input:focus {
  border-color: rgba(214,168,58,.65);
  box-shadow: inset 3px 0 0 var(--gold);
}

.compact-action,
.secondary-action,
.text-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font: inherit;
  font-size: 10px;
  letter-spacing: .12em;
  text-decoration: none;
  cursor: pointer;
}

.compact-action {
  border: 1px solid rgba(214,168,58,.55);
  background: linear-gradient(180deg, rgba(214,168,58,.12), rgba(214,168,58,.04));
  color: var(--gold);
  padding: 0 18px;
}

.compact-action:hover:not(:disabled) {
  background: rgba(214,168,58,.16);
  border-color: rgba(214,168,58,.85);
}

.compact-action:disabled { opacity: .42; cursor: wait; }

.secondary-action {
  border: 1px solid rgba(232,233,230,.14);
  color: var(--text);
  padding: 0 15px;
  background: rgba(255,255,255,.018);
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
}

.character-summary {
  display: grid;
  grid-template-columns: 58px minmax(150px, .7fr) minmax(220px, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(214,168,58,.14);
  background: rgba(214,168,58,.025);
}

.character-avatar {
  width: 58px;
  height: 58px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214,168,58,.26);
  color: var(--gold);
  font-weight: 700;
}

.character-avatar img { width: 100%; height: 100%; object-fit: cover; }

.character-meta { display: grid; gap: 5px; }
.character-meta strong { font-size: 17px; }
.character-meta span { color: var(--muted); font-size: 11px; }

.verification-token {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding-left: 18px;
  border-left: 1px solid rgba(214,168,58,.14);
}

.verification-token small,
.verified-grid small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .15em;
}

.verification-token code {
  overflow-wrap: anywhere;
  color: var(--gold-bright);
  font-size: clamp(15px, 1.7vw, 21px);
  letter-spacing: .12em;
}

.character-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.verified-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  margin-top: 22px;
  border-top: 1px solid rgba(214,168,58,.13);
  border-bottom: 1px solid rgba(214,168,58,.13);
}

.verified-grid > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 15px 14px 15px 0;
}

.verified-grid > div + div {
  padding-left: 14px;
  border-left: 1px solid rgba(214,168,58,.13);
}

.verified-grid strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.state-badge.ready { color: var(--gold-bright); }
.state-badge.denied { color: #c77761; border-color: rgba(199,119,97,.35); }
.state-badge.config { color: #9c9587; border-color: rgba(156,149,135,.3); }

#characterProgress { width: 18%; transition: width .3s ease; }
#characterProgress.pending { width: 55%; }
#characterProgress.verified { width: 78%; }
#characterProgress.authorised { width: 100%; }

.metric-value.denied { color: #c77761; }
.metric-value.ready { color: var(--gold-bright); }

@media (max-width: 760px) {
  .character-form { grid-template-columns: 1fr; }
  .character-summary { grid-template-columns: 54px 1fr; }
  .verification-token { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(214,168,58,.14); }
  .verified-grid { grid-template-columns: 1fr; }
  .verified-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(214,168,58,.13); }
}




/* v0.4.3 — Compact Lodestone onboarding */
.onboarding-intro {
  max-width: 700px;
  margin-bottom: 0;
}

.link-process {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid rgba(214,168,58,.12);
  border-bottom: 1px solid rgba(214,168,58,.12);
}

.process-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  opacity: .62;
}

.process-step.active {
  opacity: 1;
}

.process-index {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .14em;
  padding-top: 2px;
}

.process-step strong {
  display: block;
  color: var(--text);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 600;
}

.process-step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.process-arrow {
  align-self: center;
  color: rgba(214,168,58,.35);
  font-size: 14px;
}

.compact-link-form {
  display: block;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(214,168,58,.15);
  background:
    linear-gradient(90deg, rgba(214,168,58,.035), transparent 38%),
    rgba(255,255,255,.01);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.field-row input {
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(214,168,58,.22);
  border-radius: 0;
  background: rgba(3,3,3,.7);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 11px;
}

.field-row input:focus {
  outline: none;
  border-color: rgba(214,168,58,.62);
  box-shadow: inset 2px 0 0 var(--gold);
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.field-example {
  color: rgba(232,233,230,.28);
  font-size: 8px;
}

.inline-link {
  color: rgba(214,168,58,.72);
  font-size: 8px;
  letter-spacing: .09em;
  text-decoration: none;
  white-space: nowrap;
}

.inline-link:hover {
  color: var(--gold-bright);
}

@media (max-width: 900px) {
  .link-process {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-arrow {
    display: none;
  }

  .process-step {
    padding: 8px 0;
    border-bottom: 1px solid rgba(214,168,58,.08);
  }

  .process-step:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .field-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-link {
    white-space: normal;
  }
}


/* v0.4.4 — verified-state and wrapping polish */

/* Let introductory copy use the available card width instead of wrapping prematurely. */
.character-heading > div {
  min-width: 0;
  flex: 1 1 auto;
}

.character-heading .status-copy,
.onboarding-intro {
  max-width: none;
  width: 100%;
}

.link-process {
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}

.process-step {
  min-width: 0;
}

.process-step strong,
.process-step p {
  overflow-wrap: anywhere;
}

.locked-module[data-state="ready"] {
  border-color: rgba(214,168,58,.34);
  background:
    linear-gradient(90deg, rgba(214,168,58,.05), transparent 40%),
    rgba(255,255,255,.012);
}

.locked-module[data-state="ready"] .lock-symbol {
  opacity: .55;
}

.locked-module[data-state="ready"] .lock-symbol span::before {
  transform: translateY(-5px) rotate(-10deg);
}

.locked-module[data-state="ready"] h3 {
  color: var(--text);
}

.module-ready-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(214,168,58,.12);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.module-ready-note[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .link-process {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-arrow {
    display: none;
  }

  .process-step {
    padding: 8px 0;
    border-bottom: 1px solid rgba(214,168,58,.08);
  }

  .process-step:last-child {
    border-bottom: 0;
  }
}


/* v0.5.0 — Commendations */
.workspace-view[hidden] {
  display: none !important;
}

.nav-item:not(:disabled) {
  cursor: pointer;
}

.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.view-heading > div:first-child {
  min-width: 0;
}

.view-heading h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 3vw, 46px);
  letter-spacing: -.045em;
}

.view-heading > div:first-child > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 11px;
}

.record-summary {
  flex: 0 0 190px;
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(214,168,58,.18);
  background: rgba(214,168,58,.025);
  display: grid;
  align-content: center;
  gap: 5px;
}

.record-summary small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .15em;
}

.record-summary strong {
  color: var(--gold-bright);
  font-size: 28px;
  letter-spacing: -.03em;
}

.record-summary span {
  color: rgba(232,233,230,.46);
  font-size: 9px;
}

.commendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.commendation-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(214,168,58,.13);
  background:
    linear-gradient(145deg, rgba(214,168,58,.03), transparent 54%),
    rgba(255,255,255,.012);
}

.commendation-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(214,168,58,.08);
  transform: rotate(45deg);
}

.commendation-card.unlocked {
  border-color: rgba(214,168,58,.36);
  background:
    linear-gradient(145deg, rgba(214,168,58,.085), transparent 58%),
    rgba(255,255,255,.014);
}

.commendation-card.locked {
  opacity: .58;
  filter: saturate(.5);
}

.commendation-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.commendation-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214,168,58,.26);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  background: rgba(214,168,58,.035);
}

.commendation-card.unlocked .commendation-icon {
  color: var(--gold-bright);
  box-shadow: inset 0 0 22px rgba(214,168,58,.06);
}

.commendation-status {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.commendation-card.unlocked .commendation-status {
  color: var(--gold);
}

.commendation-card h3 {
  margin: 22px 0 7px;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -.02em;
}

.commendation-card p {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.commendation-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(214,168,58,.1);
}

.commendation-progress {
  flex: 1;
  display: grid;
  gap: 6px;
}

.commendation-progress small,
.commendation-date small {
  color: rgba(232,233,230,.34);
  font-size: 7px;
  letter-spacing: .12em;
}

.commendation-progress-track {
  height: 2px;
  background: rgba(255,255,255,.06);
}

.commendation-progress-track span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.commendation-date {
  display: grid;
  gap: 4px;
  text-align: right;
  color: var(--muted);
  font-size: 8px;
}

.company-milestones {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(214,168,58,.12);
  background: rgba(255,255,255,.008);
}

.company-milestones > p {
  max-width: 720px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.company-track {
  height: 2px;
  background: rgba(255,255,255,.05);
}

.company-track span {
  display: block;
  width: 8%;
  height: 100%;
  background: rgba(214,168,58,.35);
}

@media (max-width: 1050px) {
  .commendation-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .view-heading {
    flex-direction: column;
  }

  .record-summary {
    width: 100%;
    flex-basis: auto;
  }

  .commendation-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.5.1 — persistent application core */
@media (min-width: 761px) {
  body { overflow: hidden; }
  .stage { height: calc(100svh - 76px); min-height: 0; padding-top: 22px; padding-bottom: 22px; }
  .app-view { height: 100%; min-height: 0; max-height: 100%; margin: 0 auto; overflow: hidden; }
  .sidebar { height: 100%; overflow: hidden; }
  .workspace { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr); padding-bottom: 0; }
  .workspace-head-global { justify-content: flex-end; min-height: 58px; padding-bottom: 12px; }
  .workspace-view { min-height: 0; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 0 10px 32px 0; scrollbar-width: thin; scrollbar-color: rgba(216,174,79,.35) rgba(255,255,255,.025); }
  .workspace-view::-webkit-scrollbar { width: 7px; }
  .workspace-view::-webkit-scrollbar-track { background: rgba(255,255,255,.025); }
  .workspace-view::-webkit-scrollbar-thumb { background: rgba(216,174,79,.32); }
}
.overview-heading { margin-bottom: 24px; }
.verified-home { min-height: 100%; }
.dashboard-heading { margin-bottom: 24px; }
.dashboard-heading h2 { margin: 5px 0 8px; color: var(--white); font-size: clamp(30px,3.5vw,46px); letter-spacing:-.045em; }
.dashboard-heading p:last-child { max-width: 680px; margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
.dashboard-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:12px; }
.dashboard-profile { min-height:250px; padding:18px; border:1px solid rgba(216,174,79,.16); background:linear-gradient(145deg,rgba(216,174,79,.035),transparent 58%),rgba(255,255,255,.01); }
.profile-main { display:flex; align-items:center; gap:18px; margin:32px 0; }
.dashboard-avatar { width:82px; height:82px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(216,174,79,.3); background:#15140f; color:var(--gold); font-size:22px; }
.dashboard-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-main small { display:block; color:var(--muted); font-size:8px; letter-spacing:.12em; text-transform:uppercase; }
.profile-main strong { display:block; margin-top:7px; color:var(--white); font-size:24px; }
.profile-main span { display:block; margin-top:6px; color:var(--muted); font-size:10px; }
.dashboard-fc-name { display:block; color:var(--white); font-size:24px; }
.verified-line { display:block; margin-top:8px; color:var(--gold); font-size:9px; letter-spacing:.1em; text-transform:uppercase; }
.access-strip { margin-top:12px; padding:15px 18px; border:1px solid rgba(216,174,79,.13); display:flex; justify-content:space-between; gap:18px; background:rgba(255,255,255,.008); }
.access-label { color:var(--muted); font-size:8px; letter-spacing:.14em; }
.access-strip > div { display:flex; flex-wrap:wrap; gap:18px; color:#918b7e; font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.access-strip > div > span { color:var(--gold); }
.commendation-icon svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:900px) { .dashboard-grid{grid-template-columns:1fr;} .access-strip{flex-direction:column;} }
@media (max-width:760px) { body{overflow:auto;} .app-view{min-height:auto;} .workspace{overflow:visible;} .workspace-view{overflow:visible;} }


/* v0.5.2 — clean verified Overview + Lodestone FC crest */
.overview-onboarding[hidden],
.verified-home[hidden] {
  display: none !important;
}

.fc-profile-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 30px 0 24px;
}

.fc-crest {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216,174,79,.26);
  background:
    radial-gradient(circle at 50% 45%, rgba(216,174,79,.06), transparent 64%),
    rgba(255,255,255,.012);
}

.fc-crest img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.fc-crest-fallback {
  color: rgba(216,174,79,.7);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .13em;
}

.fc-profile-copy {
  min-width: 0;
}

.dashboard-fc-name {
  overflow-wrap: anywhere;
}

.dashboard-profile .secondary-action {
  width: fit-content;
}

@media (max-width: 560px) {
  .fc-profile-main {
    align-items: flex-start;
  }

  .fc-crest {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }
}


/* v0.6.0 — FC-wide fleet & salvage module */
.fleet-heading {
  align-items: flex-end;
}

.fleet-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  min-width: min(100%, 560px);
  border: 1px solid rgba(216,174,79,.14);
  background: rgba(255,255,255,.008);
}

.fleet-summary-strip > div {
  min-width: 0;
  padding: 12px 14px;
}

.fleet-summary-strip > div + div {
  border-left: 1px solid rgba(216,174,79,.12);
}

.fleet-summary-strip small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fleet-summary-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--gold-bright);
  font-size: 13px;
  white-space: nowrap;
}

.fleet-panel {
  padding: 18px;
  border: 1px solid rgba(216,174,79,.13);
  background:
    linear-gradient(135deg, rgba(216,174,79,.018), transparent 52%),
    rgba(255,255,255,.006);
}

.fleet-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.fleet-panel-head p,
.panel-hint {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.submarine-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(216,174,79,.16);
  background: rgba(216,174,79,.025);
}

.submarine-form[hidden] {
  display: none !important;
}

.submarine-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.submarine-form input,
.submarine-select-row select {
  height: 38px;
  border: 1px solid rgba(216,174,79,.22);
  border-radius: 0;
  background: rgba(3,3,3,.78);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

.submarine-form-actions {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.submarine-card {
  min-width: 0;
  min-height: 96px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(216,174,79,.14);
  background: rgba(255,255,255,.008);
}

.submarine-index {
  color: rgba(216,174,79,.65);
  font-size: 8px;
  letter-spacing: .1em;
}

.submarine-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
}

.submarine-card div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.submarine-status {
  grid-column: 2;
  width: fit-content;
  color: var(--gold);
  font-size: 7px;
  letter-spacing: .13em;
}

.fleet-empty,
.inventory-empty {
  margin: 14px 0 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.salvage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
  gap: 12px;
  margin-top: 12px;
}

.fleet-side-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  border: 1px solid rgba(216,174,79,.15);
}

.mode-option {
  min-width: 96px;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.mode-option + .mode-option {
  border-left: 1px solid rgba(216,174,79,.15);
}

.mode-option.active {
  background: rgba(216,174,79,.1);
  color: var(--gold-bright);
}

.submarine-select-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 320px);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.submarine-select-row[hidden] {
  display: none !important;
}

.submarine-select-row label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.salvage-table {
  margin-top: 14px;
  border-top: 1px solid rgba(216,174,79,.12);
  border-bottom: 1px solid rgba(216,174,79,.12);
}

.salvage-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(100px, .7fr) 128px minmax(90px, .65fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
}

.salvage-row + .salvage-row {
  border-top: 1px solid rgba(216,174,79,.07);
}

.salvage-head {
  min-height: 34px;
  color: rgba(232,233,230,.38);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.salvage-row > strong {
  color: var(--text);
  font-size: 10px;
}

.salvage-price,
.salvage-line-total {
  color: var(--muted);
  font-size: 9px;
}

.salvage-line-total {
  text-align: right;
  color: var(--gold-bright);
}

.quantity-control {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  min-height: 32px;
  border: 1px solid rgba(216,174,79,.15);
}

.quantity-control button,
.quantity-control input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.quantity-control button {
  color: var(--gold);
  cursor: pointer;
}

.quantity-control button:hover {
  background: rgba(216,174,79,.08);
}

.quantity-control input {
  width: 100%;
  border-left: 1px solid rgba(216,174,79,.1);
  border-right: 1px solid rgba(216,174,79,.1);
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.salvage-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.salvage-submit-bar small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.salvage-submit-bar strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-bright);
  font-size: 18px;
}

.primary-gold-action {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(216,174,79,.55);
  border-radius: 0;
  background: rgba(216,174,79,.1);
  color: var(--gold-bright);
  font: inherit;
  font-size: 8px;
  letter-spacing: .12em;
  cursor: pointer;
}

.primary-gold-action:hover:not(:disabled) {
  background: rgba(216,174,79,.16);
  border-color: rgba(216,174,79,.85);
}

.primary-gold-action:disabled {
  opacity: .45;
  cursor: wait;
}

.inventory-list {
  display: grid;
  margin-top: 12px;
}

.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(216,174,79,.08);
}

.inventory-item span {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 9px;
}

.inventory-item strong {
  color: var(--gold);
  font-size: 9px;
}

.inventory-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
}

.fleet-activity {
  display: grid;
  margin-top: 12px;
}

.activity-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(216,174,79,.08);
}

.activity-marker {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216,174,79,.16);
  color: var(--gold);
  font-size: 10px;
}

.activity-marker.sale {
  color: #c7b06c;
}

.activity-row div {
  min-width: 0;
}

.activity-row div strong,
.activity-row div span {
  display: block;
}

.activity-row div strong {
  color: var(--text);
  font-size: 8px;
}

.activity-row div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.activity-amount {
  color: var(--gold-bright);
  font-size: 8px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .fleet-summary-strip {
    grid-template-columns: 1fr 1fr;
    min-width: 390px;
  }

  .fleet-summary-strip > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(216,174,79,.12);
  }

  .fleet-summary-strip > div:nth-child(4) {
    border-top: 1px solid rgba(216,174,79,.12);
  }

  .fleet-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .fleet-heading {
    align-items: stretch;
  }

  .fleet-summary-strip {
    width: 100%;
    min-width: 0;
  }

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

  .fleet-grid {
    grid-template-columns: 1fr;
  }

  .salvage-row {
    grid-template-columns: minmax(120px, 1fr) 108px 88px;
  }

  .salvage-row > :nth-child(2) {
    display: none;
  }
}

@media (max-width: 520px) {
  .fleet-summary-strip {
    grid-template-columns: 1fr;
  }

  .fleet-summary-strip > div + div {
    border-left: 0;
    border-top: 1px solid rgba(216,174,79,.12);
  }

  .submarine-select-row {
    grid-template-columns: 1fr;
  }

  .salvage-row {
    grid-template-columns: minmax(100px, 1fr) 96px 72px;
    gap: 8px;
  }

  .salvage-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }
}


/* v0.7.0 — Shared salvage ledger + FC permissions */
.management-nav[hidden] {
  display: none !important;
}

.salvage-heading,
.management-heading {
  align-items: flex-end;
}

.last-update-card {
  flex: 0 0 min(360px, 38%);
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(216,174,79,.15);
  background:
    linear-gradient(100deg, rgba(216,174,79,.045), transparent 70%),
    rgba(255,255,255,.008);
}

.last-update-card small,
.last-update-card span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .09em;
}

.last-update-card strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
}

.salvage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.salvage-stat {
  padding: 14px 16px;
  border: 1px solid rgba(216,174,79,.12);
  background: rgba(255,255,255,.007);
}

.salvage-stat small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.salvage-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-bright);
  font-size: 18px;
}

.permission-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(216,174,79,.15);
  background: rgba(216,174,79,.035);
}

.permission-banner[hidden] {
  display: none !important;
}

.permission-banner strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .13em;
}

.permission-banner span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.salvage-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .7fr);
  gap: 10px;
}

.salvage-ledger-panel,
.sales-history-panel,
.management-info,
.management-member {
  border: 1px solid rgba(216,174,79,.13);
  background:
    linear-gradient(145deg, rgba(216,174,79,.018), transparent 52%),
    rgba(255,255,255,.006);
}

.salvage-ledger-panel {
  padding: 18px;
}

.ledger-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ledger-panel-head p {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.plugin-ready-chip {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(216,174,79,.18);
  color: rgba(216,174,79,.72);
  font-size: 7px;
  letter-spacing: .12em;
}

.salvage-ledger-table {
  margin-top: 16px;
  border-top: 1px solid rgba(216,174,79,.12);
  border-bottom: 1px solid rgba(216,174,79,.12);
}

.salvage-ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(105px, .7fr) 132px minmax(100px, .65fr);
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 6px 0;
}

.salvage-ledger-row + .salvage-ledger-row {
  border-top: 1px solid rgba(216,174,79,.07);
}

.salvage-ledger-head {
  min-height: 34px;
  color: rgba(232,233,230,.38);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.salvage-ledger-row > strong {
  color: var(--text);
  font-size: 10px;
}

.ledger-price {
  color: var(--muted);
  font-size: 9px;
}

.ledger-line-value {
  color: var(--gold-bright);
  font-size: 9px;
  text-align: right;
}

.ledger-quantity {
  display: grid;
  grid-template-columns: 30px minmax(48px, 1fr) 30px;
  min-height: 32px;
  border: 1px solid rgba(216,174,79,.15);
}

.ledger-quantity button,
.ledger-quantity input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.ledger-quantity button {
  color: var(--gold);
  cursor: pointer;
}

.ledger-quantity button:hover:not(:disabled) {
  background: rgba(216,174,79,.08);
}

.ledger-quantity button:disabled,
.ledger-quantity input:disabled {
  cursor: default;
  opacity: .52;
}

.ledger-quantity input {
  width: 100%;
  border-left: 1px solid rgba(216,174,79,.1);
  border-right: 1px solid rgba(216,174,79,.1);
  -moz-appearance: textfield;
}

.ledger-quantity input::-webkit-inner-spin-button,
.ledger-quantity input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.salvage-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.salvage-actions-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.salvage-actions-copy small {
  display: block;
  max-width: 520px;
  color: rgba(232,233,230,.34);
  font-size: 8px;
  line-height: 1.5;
}

.primary-gold-action {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(216,174,79,.55);
  border-radius: 0;
  background: rgba(216,174,79,.1);
  color: var(--gold-bright);
  font: inherit;
  font-size: 8px;
  letter-spacing: .12em;
  cursor: pointer;
}

.primary-gold-action:hover:not(:disabled) {
  background: rgba(216,174,79,.16);
  border-color: rgba(216,174,79,.85);
}

.primary-gold-action:disabled {
  opacity: .4;
  cursor: default;
}

.sales-history-panel {
  min-width: 0;
  padding: 18px;
}

.sales-history {
  display: grid;
  margin-top: 12px;
}

.sales-empty,
.management-empty {
  margin: 14px 0 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.sale-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(216,174,79,.08);
}

.sale-history-date,
.sale-history-amount {
  display: grid;
  gap: 3px;
}

.sale-history-date small,
.sale-history-amount small {
  color: rgba(232,233,230,.32);
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sale-history-date strong {
  color: var(--text);
  font-size: 8px;
}

.sale-history-amount {
  text-align: right;
}

.sale-history-amount strong {
  color: var(--gold-bright);
  font-size: 9px;
  white-space: nowrap;
}

.sale-history-compare,
.sale-history-actor {
  color: rgba(216,174,79,.7);
  font-size: 7px;
}

.sale-history-compare.negative {
  color: #c68772;
}

.sale-history-actor {
  text-align: right;
  color: var(--muted);
}

.sale-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

.sale-confirm-backdrop[hidden] {
  display: none !important;
}

.sale-confirm-modal {
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgba(216,174,79,.28);
  background: #0a0a09;
  box-shadow: 0 28px 90px rgba(0,0,0,.5);
}

.sale-confirm-modal h3 {
  margin: 7px 0 9px;
  font-size: 25px;
  letter-spacing: -.035em;
}

.sale-confirm-modal > p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.sale-confirm-value {
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(216,174,79,.12);
  border-bottom: 1px solid rgba(216,174,79,.12);
}

.sale-confirm-value small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .11em;
}

.sale-confirm-value strong {
  display: block;
  margin-top: 5px;
  color: var(--gold-bright);
  font-size: 22px;
}

.sale-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.management-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 10px;
}

.management-info > div {
  padding: 14px 16px;
}

.management-info > div + div {
  border-left: 1px solid rgba(216,174,79,.1);
}

.management-info small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.management-info strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
}

.management-members {
  display: grid;
  gap: 8px;
}

.management-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, auto);
  gap: 20px;
  align-items: center;
  padding: 15px 16px;
}

.management-member.leader {
  border-color: rgba(216,174,79,.33);
  background:
    linear-gradient(90deg, rgba(216,174,79,.06), transparent 50%),
    rgba(255,255,255,.008);
}

.management-member-identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.management-role {
  color: var(--gold);
  font-size: 7px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.management-member-identity strong {
  color: var(--text);
  font-size: 12px;
}

.management-member-identity small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
}

.management-permissions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.permission-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.permission-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 34px;
  height: 17px;
  border: 1px solid rgba(216,174,79,.25);
  background: rgba(255,255,255,.035);
  transition: background .18s ease, border-color .18s ease;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  background: rgba(232,233,230,.4);
  transition: transform .18s ease, background .18s ease;
}

.permission-toggle input:checked + .toggle-track {
  border-color: rgba(216,174,79,.68);
  background: rgba(216,174,79,.12);
}

.permission-toggle input:checked + .toggle-track .toggle-knob {
  transform: translateX(17px);
  background: var(--gold-bright);
}

.permission-toggle input:disabled + .toggle-track {
  opacity: .55;
}

.toggle-copy {
  color: var(--muted);
  font-size: 8px;
}

.leader-immutable {
  width: 100%;
  text-align: right;
  color: rgba(216,174,79,.55);
  font-size: 7px;
}

@media (max-width: 1100px) {
  .salvage-workspace {
    grid-template-columns: 1fr;
  }

  .management-member {
    grid-template-columns: 1fr;
  }

  .management-permissions {
    justify-content: flex-start;
  }

  .leader-immutable {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .salvage-heading,
  .management-heading {
    align-items: stretch;
  }

  .last-update-card {
    width: 100%;
    flex-basis: auto;
  }

  .salvage-summary {
    grid-template-columns: 1fr;
  }

  .salvage-ledger-row {
    grid-template-columns: minmax(120px, 1fr) 120px 90px;
  }

  .salvage-ledger-row > :nth-child(2) {
    display: none;
  }

  .salvage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .salvage-actions-copy {
    order: 3;
  }

  .management-info {
    grid-template-columns: 1fr;
  }

  .management-info > div + div {
    border-left: 0;
    border-top: 1px solid rgba(216,174,79,.1);
  }
}

@media (max-width: 520px) {
  .salvage-ledger-row {
    grid-template-columns: minmax(100px, 1fr) 104px 72px;
    gap: 8px;
  }

  .permission-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v0.7.2 — FC Leader sale-history management */
.sales-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sales-leader-badge {
  padding: 5px 7px;
  border: 1px solid rgba(216,174,79,.18);
  color: rgba(216,174,79,.72);
  font-size: 7px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sales-leader-badge[hidden],
.sales-selection-bar[hidden],
.sales-audit-note[hidden] {
  display: none !important;
}

.sales-selection-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  align-items: center;
  margin-top: 12px;
  padding: 8px 9px;
  border: 1px solid rgba(184,83,64,.28);
  background: rgba(184,83,64,.055);
}

.sales-selection-bar > span {
  color: var(--muted);
  font-size: 8px;
}

.danger-action {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(184,83,64,.5);
  border-radius: 0;
  background: rgba(184,83,64,.09);
  color: #d89484;
  font: inherit;
  font-size: 7px;
  letter-spacing: .11em;
  cursor: pointer;
}

.danger-action:hover:not(:disabled) {
  border-color: rgba(206,105,84,.82);
  background: rgba(184,83,64,.15);
  color: #efab9c;
}

.danger-action:disabled {
  opacity: .45;
  cursor: default;
}

.sale-history-row {
  position: relative;
}

.sale-history-row.selected {
  margin-inline: -8px;
  padding-inline: 8px;
  border-left: 2px solid rgba(206,105,84,.72);
  background: linear-gradient(90deg, rgba(184,83,64,.07), transparent 58%);
}

.sale-select-toggle {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(216,174,79,.14);
  border-radius: 0;
  background: transparent;
  color: rgba(232,233,230,.42);
  font: inherit;
  font-size: 7px;
  letter-spacing: .1em;
  cursor: pointer;
}

.sale-select-toggle:hover,
.sale-select-toggle.active {
  border-color: rgba(184,83,64,.5);
  background: rgba(184,83,64,.07);
  color: #d89484;
}

.sales-audit-note {
  display: block;
  margin-top: 12px;
  color: rgba(232,233,230,.28);
  font-size: 7px;
  line-height: 1.45;
}

.sale-void-warning {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-left: 2px solid rgba(184,83,64,.6);
  background: rgba(184,83,64,.05);
  color: #c79a8e !important;
}

@media (max-width: 520px) {
  .sales-selection-bar {
    grid-template-columns: 1fr;
  }

  .sales-selection-bar .text-action,
  .sales-selection-bar .danger-action {
    width: 100%;
  }
}


/* v0.7.4 — compact sale history */
.sales-history-toggle {
  width: 100%;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(216,174,79,.24);
  background: rgba(216,174,79,.025);
  color: var(--gold-bright);
  font: inherit;
  font-size: 8px;
  letter-spacing: .12em;
  cursor: pointer;
}

.sales-history-toggle:hover {
  background: rgba(216,174,79,.08);
  border-color: rgba(216,174,79,.5);
}


/* v0.8.0 — Lodestone-backed salvage metadata */
.ledger-item-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ledger-item-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  object-fit: contain;
}
.ledger-item-identity > span {
  min-width: 0;
}
.management-refresh-date {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}


/* v0.8.1 — Lodestone refresh feedback and cache health */
.status-toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 2000;
  max-width: min(420px, calc(100vw - 32px)); padding: 12px 15px;
  border: 1px solid rgba(216,174,79,.28); background: rgba(10,10,8,.96);
  color: var(--text); box-shadow: 0 12px 36px rgba(0,0,0,.35);
  font-size: 9px; letter-spacing: .03em;
}
.status-toast.progress { border-color: rgba(216,174,79,.5); color: var(--gold-bright); }
.status-toast.success { border-color: rgba(119,170,126,.5); }
.status-toast.warning { border-color: rgba(216,174,79,.55); }
.management-cache-log { margin: 12px 0; padding: 14px; border: 1px solid rgba(216,174,79,.12); }
.management-cache-log-head small { display:block; color:var(--gold); font-size:7px; letter-spacing:.12em; }
.management-cache-log-head strong { display:block; margin-top:4px; font-size:10px; }
.management-cache-log-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin-top:12px; background:rgba(216,174,79,.08); }
.management-cache-log-grid > div { min-width:0; padding:10px; background:#0a0a08; }
.management-cache-log-grid small { display:block; color:var(--muted); font-size:7px; }
.management-cache-log-grid strong { display:block; margin-top:4px; overflow-wrap:anywhere; font-size:9px; font-weight:500; }
@media (max-width:800px) { .management-cache-log-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .management-cache-log-grid { grid-template-columns:1fr; } }

.member-cache-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  letter-spacing: .04em;
}

.member-cache-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(143, 194, 150, .78);
  box-shadow: 0 0 8px rgba(143, 194, 150, .2);
}

.member-cache-status.stale::before {
  background: rgba(216, 174, 79, .8);
  box-shadow: 0 0 8px rgba(216, 174, 79, .18);
}

.member-cache-status.warning::before {
  background: rgba(211, 111, 102, .85);
  box-shadow: 0 0 8px rgba(211, 111, 102, .2);
}

/* v0.9.2 — Fleet-first voyage operations */
.voyage-heading {
  align-items: flex-end;
}

.voyage-access-note {
  flex: 0 0 min(330px, 36%);
  display: grid;
  gap: 4px;
  padding: 0 0 4px 18px;
  border-left: 1px solid rgba(216,174,79,.14);
}

.voyage-access-note small {
  color: rgba(216,174,79,.74);
  font-size: 7px;
  letter-spacing: .13em;
}

.voyage-access-note span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.voyage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.voyage-summary .salvage-stat { min-width: 0; }

.voyage-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(216,174,79,.13);
  background: linear-gradient(145deg, rgba(216,174,79,.014), transparent 52%), rgba(255,255,255,.004);
}

.voyage-panel .ledger-panel-head p { max-width: 640px; }

.voyage-fleet-panel { margin-bottom: 10px; }

.voyage-fleet-head {
  align-items: start;
  gap: 18px;
}

.voyage-add-toggle {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 8px;
}

.voyage-fleet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.voyage-fleet-empty { grid-column: 1 / -1; }

.voyage-fleet-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(216,174,79,.10);
  background: rgba(0,0,0,.16);
}

.voyage-fleet-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(216,174,79,.07);
}

.voyage-fleet-card-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voyage-fleet-card-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voyage-fleet-card-head span {
  color: rgba(216,174,79,.72);
  font-size: 8px;
  letter-spacing: .05em;
}

.voyage-fleet-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  font-size: 7px;
  letter-spacing: .08em;
  cursor: pointer;
}

.text-action:hover { color: var(--gold-bright); }
.danger-text-action:hover,
.danger-text-action[data-confirm-remove="1"] { color: #d36f66; }

.voyage-fleet-metrics {
  display: grid;
  grid-template-columns: .62fr 1fr 1fr;
  gap: 10px;
  padding-top: 10px;
}

.voyage-fleet-metrics > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voyage-fleet-metrics small {
  color: var(--muted);
  font-size: 6px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.voyage-fleet-metrics span {
  overflow: hidden;
  color: rgba(232,233,230,.74);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submarine-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(216,174,79,.12);
  background: rgba(216,174,79,.015);
}

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

.submarine-form input,
.voyage-form input,
.voyage-form select,
.voyage-form textarea,
.voyage-salvage-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(216,174,79,.12);
  background: rgba(0,0,0,.22);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-size: 10px;
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}

.submarine-form input:focus,
.voyage-form input:focus,
.voyage-form select:focus,
.voyage-form textarea:focus,
.voyage-salvage-row input:focus {
  border-color: rgba(216,174,79,.42);
  background: rgba(216,174,79,.018);
}

.voyage-operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 10px;
  align-items: start;
}

.voyage-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.voyage-core-fields,
.voyage-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.voyage-form > label,
.voyage-core-fields label,
.voyage-date-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .04em;
}

.voyage-form textarea {
  min-height: 58px;
  resize: vertical;
}

.voyage-manifest {
  border-top: 1px solid rgba(216,174,79,.11);
  border-bottom: 1px solid rgba(216,174,79,.08);
}

.voyage-manifest summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  list-style: none;
  cursor: pointer;
}

.voyage-manifest summary::-webkit-details-marker { display: none; }

.voyage-manifest summary > span:first-child {
  display: grid;
  gap: 3px;
}

.voyage-manifest summary strong {
  color: var(--text);
  font-size: 9px;
  letter-spacing: .06em;
}

.voyage-manifest summary small {
  color: var(--muted);
  font-size: 7px;
}

.manifest-marker {
  color: rgba(216,174,79,.72);
  font-size: 15px;
  line-height: 1;
  transition: transform .15s ease;
}

.voyage-manifest[open] .manifest-marker { transform: rotate(45deg); }

.voyage-manifest-body { padding: 0 0 10px; }

.voyage-salvage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216,174,79,.07);
}

.voyage-salvage-head strong { color: var(--text); font-size: 9px; }
.voyage-salvage-head span { color: var(--muted); font-size: 7px; }

.voyage-salvage-rows { display: grid; }

.voyage-salvage-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 92px 66px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(216,174,79,.055);
}

.voyage-salvage-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voyage-salvage-row small { color: var(--muted); font-size: 7px; text-align: right; }
.voyage-salvage-row input { padding: 6px 7px; text-align: right; }

.voyage-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
}

.voyage-submit-row small {
  max-width: 360px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

#logVoyageButton { flex: 0 0 auto; min-width: 178px; }

.voyage-history-panel { min-height: 100%; }

.voyage-history {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid rgba(216,174,79,.11);
}

.voyage-history-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(216,174,79,.075);
}

.voyage-history-top,
.voyage-history-details {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.voyage-history-top > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voyage-history-top strong { color: var(--text); font-size: 10px; }
.voyage-history-top span { color: rgba(216,174,79,.68); font-size: 8px; }

.voyage-history-return {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  text-align: right;
}

.voyage-history-return strong { color: rgba(232,233,230,.76); font-size: 8px; }
.voyage-history-return small { color: var(--muted); font-size: 7px; }

.voyage-history-details span {
  color: var(--muted);
  font-size: 7px;
}

.voyage-history-details span:first-child { color: var(--gold-bright); }

.voyage-history-manifest,
.voyage-history-notes {
  margin: 0;
  color: rgba(232,233,230,.52);
  font-size: 7px;
  line-height: 1.5;
}

.voyage-history-notes {
  padding-left: 9px;
  border-left: 1px solid rgba(216,174,79,.12);
  color: var(--muted);
}

@media (max-width: 1180px) {
  .voyage-fleet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voyage-operations-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .voyage-heading { align-items: stretch; }
  .voyage-access-note { width: 100%; flex-basis: auto; padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(216,174,79,.12); }
  .voyage-summary { grid-template-columns: 1fr 1fr; }
  .voyage-fleet { grid-template-columns: 1fr; }
  .submarine-form { grid-template-columns: 1fr 70px; }
  .submarine-form button { width: 100%; }
  .voyage-core-fields,
  .voyage-date-row { grid-template-columns: 1fr; }
  .voyage-salvage-row { grid-template-columns: minmax(0, 1fr) 66px; }
  .voyage-salvage-row small { display: none; }
  .voyage-submit-row { align-items: stretch; flex-direction: column; }
  #logVoyageButton { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .voyage-summary { grid-template-columns: 1fr; }
  .voyage-fleet-metrics { grid-template-columns: 1fr 1fr; }
  .voyage-fleet-metrics > div:last-child { grid-column: 1 / -1; }
  .voyage-history-top,
  .voyage-history-details { flex-direction: column; gap: 5px; }
  .voyage-history-return { text-align: left; }
}
