/*
 * Project Outpost — Design Lab runtime base.
 *
 * This stylesheet ports the approved Design Lab shell and navigation language
 * to the real application DOM. It is presentation-only and intentionally
 * contains no route, persistence, Host-command, or authoritative-state logic.
 * Load it after styles.css; the former real-page compatibility coat is retired and archived.
 */

body.outpost-real-page-preview {
  --op-bg: #050506;
  --op-bg-raised: #0a0b0c;
  --op-surface: #0d0e10;
  --op-surface-strong: #121316;
  --op-surface-soft: #090a0b;
  --op-line: rgba(245, 247, 250, 0.22);
  --op-line-strong: rgba(255, 255, 255, 0.72);
  --op-line-faint: rgba(255, 255, 255, 0.08);
  --op-text: #f4f5f6;
  --op-text-muted: #9da1a8;
  --op-text-faint: #686d74;
  --op-accent: #d7f2ff;
  --op-accent-rgb: 215, 242, 255;
  --op-success: #95e6be;
  --op-warning: #f1c477;
  --op-danger: #ff8f8f;
  --op-focus: #ffffff;
  --op-shadow: rgba(0, 0, 0, 0.5);
  --op-grid: rgba(255, 255, 255, 0.035);
  --op-grid-bold: rgba(255, 255, 255, 0.07);
  --op-radius-xs: 2px;
  --op-space-1: 4px;
  --op-space-2: 8px;
  --op-space-3: 12px;
  --op-space-4: 16px;
  --op-space-5: 24px;
  --op-space-6: 32px;
  --op-fast: 140ms;
  --op-medium: 220ms;
  --op-slow: 540ms;
  --op-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --op-font-ui: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --op-font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --op-shell-pad: 24px;
  --op-shell-topbar: 68px;
  --op-shell-rail: 246px;
  --op-shell-gap: 32px;
  --op-shell-main-left: 302px;
  --op-shell-main-top: 124px;
  --op-shell-center-shift: 139px;
  color-scheme: dark;
  min-height: 100vh;
  margin: 0;
  color: var(--op-text);
  background-color: var(--op-bg);
  background-image: none;
  font-family: var(--op-font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.outpost-real-page-preview:is([data-op-theme="light"], [data-outpost-theme="light"]) {
  --op-bg: #eeede9;
  --op-bg-raised: #f7f6f2;
  --op-surface: #faf9f5;
  --op-surface-strong: #ffffff;
  --op-surface-soft: #e8e7e2;
  --op-line: rgba(18, 20, 22, 0.24);
  --op-line-strong: rgba(10, 12, 14, 0.76);
  --op-line-faint: rgba(18, 20, 22, 0.09);
  --op-text: #121416;
  --op-text-muted: #575c62;
  --op-text-faint: #85898e;
  --op-accent: #133a49;
  --op-accent-rgb: 19, 58, 73;
  --op-success: #17633d;
  --op-warning: #8a590b;
  --op-danger: #a43232;
  --op-focus: #0c0e10;
  --op-shadow: rgba(22, 24, 26, 0.16);
  --op-grid: rgba(20, 22, 24, 0.045);
  --op-grid-bold: rgba(20, 22, 24, 0.085);
  color-scheme: light;
}

body.outpost-real-page-preview::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M0 0H32M0 0V32' fill='none' stroke='%23fff' stroke-opacity='.04'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M0 0H160M0 0V160' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E");
  background-position: 0 0, 0 0;
  background-size: 32px 32px, 160px 160px;
}

body.outpost-real-page-preview:is([data-op-theme="light"], [data-outpost-theme="light"])::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M0 0H32M0 0V32' fill='none' stroke='%23000' stroke-opacity='.045'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M0 0H160M0 0V160' fill='none' stroke='%23000' stroke-opacity='.08'/%3E%3C/svg%3E");
}

/* Shell ---------------------------------------------------------------- */

body.outpost-real-page-preview .app,
body.outpost-real-page-preview.profile-mode .app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--op-shell-rail) minmax(0, 1fr);
  grid-template-rows: var(--op-shell-topbar) minmax(0, 1fr);
  column-gap: var(--op-shell-gap);
  width: min(1680px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--op-shell-pad);
}

/* One wide-screen composition for every destination -------------------
   Desktop pages share the same centered application plane. The inner
   workspace releases its matching width cap in the foundation layer, so
   expanding this shell never leaves page content pinned to the left. */
@media (min-width: 1800px) {
  body.outpost-real-page-preview .app,
  body.outpost-real-page-preview.profile-mode .app {
    width: min(2200px, calc(100% - 64px));
    margin-inline: auto;
  }
}

body.outpost-real-page-preview .app::before,
body.outpost-real-page-preview.profile-mode .app::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: calc(var(--op-shell-pad) + var(--op-shell-topbar) - 1px);
  right: var(--op-shell-pad);
  left: var(--op-shell-pad);
  height: 1px;
  pointer-events: none;
  background: var(--op-line);
}

body.outpost-real-page-preview .app > header,
body.outpost-real-page-preview.profile-mode .app > header {
  position: static;
  inset: auto;
  z-index: auto;
  display: contents;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

body.outpost-real-page-preview .app > header::after {
  content: none;
}

body.outpost-real-page-preview .brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: var(--op-shell-topbar);
  padding: 0 0 var(--op-space-4);
  border-bottom: 0;
}

body.outpost-real-page-preview .brand::before,
body.outpost-real-page-preview .brand::after {
  content: none;
}

body.outpost-real-page-preview .brand > .op-brand-mark {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-right: 15px;
  color: var(--op-text);
}

body.outpost-real-page-preview .brand > .op-brand-mark i,
body.outpost-real-page-preview .brand > .op-brand-mark::before,
body.outpost-real-page-preview .brand > .op-brand-mark::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  left: 5px;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  transform: rotate(45deg) skew(-8deg, -8deg);
}

body.outpost-real-page-preview .brand > .op-brand-mark::before {
  top: -1px;
}

body.outpost-real-page-preview .brand > .op-brand-mark i {
  top: 5px;
  opacity: 0.64;
}

body.outpost-real-page-preview .brand > .op-brand-mark::after {
  top: 11px;
  opacity: 0.28;
}

body.outpost-real-page-preview .brand h1 {
  margin: 0 !important;
  margin-inline: 0 !important;
  color: var(--op-text);
  font-family: var(--op-font-ui);
  font-size: 15px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0.44em;
  text-align: left;
  text-transform: uppercase;
}

body.outpost-real-page-preview .brand p {
  display: none;
}

body.outpost-real-page-preview .outpost-runtime-topbar-extras {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  min-height: var(--op-shell-topbar);
  padding: 0 0 var(--op-space-4);
  border-bottom: 0;
}

body.outpost-real-page-preview .outpost-runtime-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--op-text-muted);
  font-family: var(--op-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.outpost-real-page-preview .outpost-runtime-status i {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--op-success);
}

body.outpost-real-page-preview .outpost-runtime-status small {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding-left: 12px;
  border-left: 1px solid var(--op-line-faint);
  color: var(--op-text-faint);
  font-size: 9px;
  white-space: nowrap;
}

body.outpost-real-page-preview .outpost-runtime-controls {
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
  border-right: 1px solid var(--op-line);
}

body.outpost-real-page-preview .outpost-runtime-controls :is(button, select) {
  min-width: 0;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--op-line);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.outpost-real-page-preview .outpost-runtime-controls #languageSelect {
  width: 78px;
  padding-right: 30px;
  text-align: left;
}

body.outpost-real-page-preview[data-op-quick-bar="off"] .quick-action-bar {
  display: none !important;
}

body.outpost-real-page-preview .outpost-runtime-controls :is(button, select):hover,
body.outpost-real-page-preview .outpost-runtime-controls :is(button, select):focus-visible {
  color: var(--op-text);
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview .outpost-nav-kicker {
  order: 0;
  display: block;
  margin: 0 0 var(--op-space-3);
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.outpost-real-page-preview .nav-wrap,
body.outpost-real-page-preview.profile-mode .nav-wrap {
  position: sticky !important;
  inset: auto !important;
  top: var(--op-shell-pad) !important;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  width: auto !important;
  height: calc(100dvh - var(--op-shell-pad) - var(--op-shell-topbar));
  min-height: 0;
  margin: 0 !important;
  padding: var(--op-space-6) 0 0;
  transform: none !important;
}

body.outpost-real-page-preview .app > main,
body.outpost-real-page-preview.profile-mode .app > main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: var(--op-space-6);
}

/* Main wave navigation ------------------------------------------------- */

body.outpost-real-page-preview .nav {
  order: 1;
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: var(--op-space-2) 0 var(--op-space-4);
  border: 0;
  background: transparent;
  overflow: visible;
}

body.outpost-real-page-preview .nav .tab {
  --wave-lift: var(--op-nav-lift, 0px);
  position: relative;
  display: grid;
  grid-template-columns: 42px 1px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 14px;
  min-width: 0;
  min-height: 70px;
  padding: 12px 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--op-text-muted);
  background: var(--op-surface-soft);
  box-shadow: none;
  font-family: var(--op-font-ui);
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  transform: translate3d(0, var(--wave-lift), 0);
  transition:
    transform var(--op-medium) var(--op-ease),
    color var(--op-fast) ease,
    background-color var(--op-fast) ease;
  isolation: isolate;
}

body.outpost-real-page-preview .nav .tab::before {
  content: none;
}

body.outpost-real-page-preview .nav .tab:hover,
body.outpost-real-page-preview .nav .tab:focus-visible {
  color: var(--op-text);
  background: var(--op-surface-soft);
  box-shadow: none;
}

body.outpost-real-page-preview .nav .tab:active {
  transform: translate3d(0, 0, 0) scale(1.025);
  transition-duration: 100ms;
}

body.outpost-real-page-preview .nav .tab.active {
  padding-right: 16px;
  color: var(--op-text);
  border: 0;
  background: var(--op-surface-strong);
  box-shadow: none;
}

body.outpost-real-page-preview .nav .tab:focus-visible {
  outline: 2px solid var(--op-focus);
  outline-offset: 2px;
}

body.outpost-real-page-preview .nav .tab[data-encounter-live="true"] > .op-nav-copy small {
  color: var(--op-text-muted);
}

body.outpost-real-page-preview .nav .tab[data-encounter-live="true"] > .nav-icon {
  color: var(--op-text-muted);
}

body.outpost-real-page-preview .nav .tab.active::after {
  content: "";
  position: absolute;
  top: 12px;
  right: -1px;
  bottom: 12px;
  width: 2px;
  height: auto;
  color: inherit;
  background: var(--op-line-strong);
  opacity: 0.72;
}

body.outpost-real-page-preview .nav .tab > .nav-icon {
  position: static;
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  color: currentColor;
  font-size: 22px;
  filter: none;
}

body.outpost-real-page-preview .nav .tab > .nav-icon.image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.82;
  filter: grayscale(1) saturate(0) contrast(0.92) brightness(1.28);
}

body.outpost-real-page-preview .nav .tab > .op-nav-divider {
  display: block;
  width: 1px;
  height: 38px;
  background: var(--op-line);
}

body.outpost-real-page-preview .nav .tab > .op-nav-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

body.outpost-real-page-preview .nav .tab > .op-nav-copy small {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

body.outpost-real-page-preview .nav .tab > .op-nav-copy b {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Design Lab utility rows --------------------------------------------- */

body.outpost-real-page-preview .op-system-utility-nav {
  order: 2;
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--op-line);
}

body.outpost-real-page-preview .op-system-utility-nav .tab {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

body.outpost-real-page-preview .op-system-utility-nav .tab:hover,
body.outpost-real-page-preview .op-system-utility-nav .tab:focus-visible,
body.outpost-real-page-preview .op-system-utility-nav .tab.active {
  color: var(--op-text);
  background: var(--op-surface-soft);
}

body.outpost-real-page-preview .op-system-utility-nav .nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 28px;
  color: currentColor;
  font-size: 14px;
}

body.outpost-real-page-preview .op-system-utility-nav .nav-icon.image img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.78;
  filter: grayscale(1) saturate(0) contrast(0.92) brightness(1.28);
}

body.outpost-real-page-preview:is([data-op-theme="light"], [data-outpost-theme="light"]) :is(
  .nav .tab > .nav-icon.image img,
  .op-system-utility-nav .nav-icon.image img
) {
  opacity: 0.76;
  filter: grayscale(1) saturate(0) contrast(1.05) brightness(0.72);
}

body.outpost-real-page-preview .op-system-identity {
  order: 3;
  display: grid;
  gap: 3px;
  margin-top: 24px;
  padding: 14px 12px;
  border-left: 1px solid var(--op-line);
}

body.outpost-real-page-preview .op-system-identity > :is(small, span) {
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.outpost-real-page-preview .op-system-identity > b,
body.outpost-real-page-preview .op-system-identity #navCharacterName {
  overflow: hidden;
  color: var(--op-text);
  font-family: var(--op-font-ui);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body.outpost-real-page-preview .op-system-identity #profileNavManageButton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--op-line-faint);
  border-radius: 0;
  color: var(--op-text-muted);
  background: transparent;
  box-shadow: none;
  font-family: var(--op-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-align: left;
}

body.outpost-real-page-preview .op-system-identity #profileNavManageButton:hover,
body.outpost-real-page-preview .op-system-identity #profileNavManageButton:focus-visible {
  color: var(--op-text);
}

body.outpost-real-page-preview .op-system-identity #profileNavManageButton > b {
  color: currentColor;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
}

/* Account, language, DM and room utilities ----------------------------- */

body.outpost-real-page-preview .nav-character {
  position: static !important;
  inset: auto !important;
  order: 2;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100% !important;
  margin: auto 0 0;
  padding: var(--op-space-4) 0 0;
  border-top: 1px solid var(--op-line);
  color: var(--op-text-muted);
  transform: none !important;
  gap: 6px;
}

body.outpost-real-page-preview .nav-character #navCharacterName {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0 4px 4px;
  overflow: hidden;
  color: var(--op-text-muted);
  font-family: var(--op-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body.outpost-real-page-preview .nav-character :is(button, select) {
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--op-line);
  border-radius: var(--op-radius-xs);
  color: var(--op-text-muted);
  background: var(--op-surface-soft);
  box-shadow: none;
  font-family: var(--op-font-ui);
  font-size: 10px;
  transition: border-color var(--op-fast) ease, color var(--op-fast) ease, background-color var(--op-fast) ease;
}

body.outpost-real-page-preview .nav-character :is(button, select):hover,
body.outpost-real-page-preview .nav-character :is(button, select):focus-visible,
body.outpost-real-page-preview .nav-character button.active {
  color: var(--op-text);
  border-color: var(--op-line-strong);
  background: var(--op-surface-strong);
}

body.outpost-real-page-preview .nav-character :is(.nav-options-lower, #changeNameButton) {
  grid-column: 1 / -1;
}

body.outpost-real-page-preview .outpost-theme-preview-toggle {
  color: var(--op-accent) !important;
  font-family: var(--op-font-mono) !important;
  letter-spacing: 0.08em;
}

body.outpost-real-page-preview .profile-nav-footer,
body.outpost-real-page-preview.profile-mode .profile-nav-footer {
  position: static !important;
  inset: auto !important;
  order: 3;
  display: grid !important;
  width: auto !important;
  margin: 8px 0 0 !important;
  transform: none !important;
  gap: 6px;
}

body.outpost-real-page-preview .profile-nav-room,
body.outpost-real-page-preview #profileNavManageButton {
  border: 1px solid var(--op-line);
  border-radius: var(--op-radius-xs);
  color: var(--op-text-muted);
  background: var(--op-surface-soft);
  box-shadow: none;
}

body.outpost-real-page-preview .profile-nav-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  min-height: 50px;
  padding: 8px 10px;
  font-family: var(--op-font-mono);
}

body.outpost-real-page-preview .profile-nav-room::before {
  content: "CURRENT OUTPOST";
  grid-column: 1 / -1;
  color: var(--op-text-faint);
  font-family: var(--op-font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

body.outpost-real-page-preview #profileNavRoom,
body.outpost-real-page-preview #profileNavClock {
  min-width: 0;
  overflow: hidden;
  color: var(--op-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.outpost-real-page-preview #profileNavManageButton {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  font-size: 10px;
  text-align: left;
  transition: border-color var(--op-fast) ease, color var(--op-fast) ease, background-color var(--op-fast) ease;
}

body.outpost-real-page-preview #profileNavManageButton:hover,
body.outpost-real-page-preview #profileNavManageButton:focus-visible {
  color: var(--op-text);
  border-color: var(--op-line-strong);
  background: var(--op-surface-strong);
}

body.outpost-real-page-preview #profileNavManageButton > :is(span, b) {
  color: var(--op-accent);
}

/* Fixed runtime surfaces follow the Lab content column. */
body.outpost-real-page-preview .drawer-view {
  left: var(--op-shell-main-left);
  right: var(--op-shell-pad);
  top: var(--op-shell-main-top);
  bottom: var(--op-shell-pad);
  width: auto;
  height: auto;
  max-height: none;
  --drawer-inner-height: calc(100dvh - var(--op-shell-main-top) - var(--op-shell-pad) - 24px);
}

body.outpost-real-page-preview .drawer-close-button {
  top: calc(var(--op-shell-main-top) + 10px);
  right: calc(var(--op-shell-pad) + 10px);
}

body.outpost-real-page-preview .quick-action-bar,
body.outpost-real-page-preview.profile-mode .quick-action-bar {
  left: calc(50% + var(--op-shell-center-shift));
}

@keyframes opRuntimeAmbientBreath {
  0%, 100% { opacity: 0.16; }
  50% { opacity: 0.34; }
}

/* Compact desktop ------------------------------------------------------ */

@media (max-width: 1120px) {
  body.outpost-real-page-preview {
    --op-shell-rail: 190px;
    --op-shell-gap: 20px;
    --op-shell-main-left: 234px;
    --op-shell-center-shift: 105px;
  }

  body.outpost-real-page-preview .nav .tab {
    grid-template-columns: 34px 1px minmax(0, 1fr);
    gap: 9px;
    padding-inline: 10px;
  }

  body.outpost-real-page-preview .nav .tab > .nav-icon {
    width: 34px;
  }

  body.outpost-real-page-preview .nav .tab > .op-nav-copy b {
    font-size: 11px;
  }
}

/* Horizontal mobile/tablet shell -------------------------------------- */

@media (max-width: 820px) {
  body.outpost-real-page-preview {
    --op-shell-pad: 16px;
    --op-shell-topbar: 58px;
    --op-shell-rail: 0px;
    --op-shell-gap: 0px;
    --op-shell-main-left: 16px;
    --op-shell-main-top: 16px;
    --op-shell-center-shift: 0px;
  }

  body.outpost-real-page-preview,
  body.outpost-real-page-preview.profile-mode {
    overflow: auto;
  }

  body.outpost-real-page-preview .app,
  body.outpost-real-page-preview.profile-mode .app {
    display: block;
    width: 100%;
    min-height: 100vh;
    padding: var(--op-shell-pad);
  }

  body.outpost-real-page-preview .app > header,
  body.outpost-real-page-preview.profile-mode .app > header {
    display: block;
  }

  body.outpost-real-page-preview .brand {
    min-height: var(--op-shell-topbar);
    padding-bottom: var(--op-space-4);
  }

  body.outpost-real-page-preview .outpost-runtime-topbar-extras {
    min-height: 48px;
    padding: 0;
  }

  body.outpost-real-page-preview .outpost-runtime-status {
    display: none;
  }

  body.outpost-real-page-preview .outpost-runtime-controls {
    width: 100%;
  }

  body.outpost-real-page-preview .outpost-runtime-controls :is(button, select) {
    flex: 1;
  }

  body.outpost-real-page-preview .outpost-nav-kicker {
    display: none;
  }

  body.outpost-real-page-preview .nav-wrap,
  body.outpost-real-page-preview.profile-mode .nav-wrap {
    position: static !important;
    display: flex;
    width: 100% !important;
    height: auto;
    min-height: 0;
    margin: 0 0 18px !important;
    padding: 18px 0 0;
  }

  body.outpost-real-page-preview .nav {
    display: flex;
    gap: 7px;
    width: 100%;
    padding: 6px 2px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  body.outpost-real-page-preview .nav .tab {
    flex: 0 0 124px;
    grid-template-columns: 28px 1px minmax(0, 1fr);
    gap: 9px;
    min-width: 124px;
    min-height: 58px;
    padding: 8px;
    transform: none;
  }

  body.outpost-real-page-preview .nav .tab > .nav-icon {
    width: 28px;
    height: 32px;
    font-size: 16px;
  }

  body.outpost-real-page-preview .nav .tab > .op-nav-divider {
    height: 30px;
  }

  body.outpost-real-page-preview .nav .tab > .op-nav-copy small {
    display: none;
  }

  body.outpost-real-page-preview .nav .tab > .op-nav-copy b {
    font-size: 10px;
  }

  body.outpost-real-page-preview .nav-character {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
    padding-top: 8px;
  }

  body.outpost-real-page-preview .op-system-utility-nav {
    display: flex;
    order: 2;
    margin: 0 0 12px;
  }

  body.outpost-real-page-preview .op-system-utility-nav .tab {
    flex: 1;
    border-right: 1px solid var(--op-line);
  }

  body.outpost-real-page-preview .op-system-identity {
    display: none;
  }

  body.outpost-real-page-preview .nav-character #navCharacterName,
  body.outpost-real-page-preview .nav-character :is(.nav-options-lower, #changeNameButton) {
    grid-column: auto;
  }

  body.outpost-real-page-preview .nav-character #navCharacterName {
    display: none;
  }

  body.outpost-real-page-preview .profile-nav-footer,
  body.outpost-real-page-preview.profile-mode .profile-nav-footer {
    display: none !important;
  }

  body.outpost-real-page-preview .app > main,
  body.outpost-real-page-preview.profile-mode .app > main {
    width: 100%;
    height: auto;
    min-height: 0;
    padding-top: 0;
    overflow: visible;
  }

  body.outpost-real-page-preview .drawer-view {
    z-index: 92;
    left: var(--op-shell-pad);
    right: var(--op-shell-pad);
    top: var(--op-shell-pad);
    bottom: var(--op-shell-pad);
    --drawer-inner-height: calc(100dvh - var(--op-shell-pad) - var(--op-shell-pad) - 24px);
  }

  body.outpost-real-page-preview .drawer-close-button {
    z-index: 93;
    top: calc(var(--op-shell-pad) + 10px);
    right: calc(var(--op-shell-pad) + 10px);
  }

  body.outpost-real-page-preview .quick-action-bar,
  body.outpost-real-page-preview.profile-mode .quick-action-bar {
    left: 50%;
  }
}

@media (max-width: 560px) {
  body.outpost-real-page-preview .brand h1 {
    font-size: 12px;
    letter-spacing: 0.28em;
  }

  body.outpost-real-page-preview .nav-character {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  body.outpost-real-page-preview {
    --op-shell-pad: 10px;
    --op-shell-main-left: 10px;
    --op-shell-main-top: 10px;
  }

  body.outpost-real-page-preview .nav-character {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.outpost-real-page-preview *,
  body.outpost-real-page-preview *::before,
  body.outpost-real-page-preview *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

body.outpost-real-page-preview[data-op-motion="reduced"] *,
body.outpost-real-page-preview[data-op-motion="reduced"] *::before,
body.outpost-real-page-preview[data-op-motion="reduced"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
}

body.outpost-real-page-preview:is([data-op-motion="reduced"], .reduce-motion, .no-hover-motion, .low-performance) .nav .tab {
  transform: none !important;
}

@media (hover: none) {
  body.outpost-real-page-preview .nav .tab:hover {
    transform: none;
  }
}
