:root {
  --room-header-height: 76px;
  color-scheme: dark;
  --paper: #f3eedc;
  --muted: #b9b5a4;
  --accent: #cfdb9e;
  --ink: #191b1b;
  font-family: "Courier New", monospace;
  background: var(--ink);
  color: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 8px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover,
button:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button,
a {
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
#world {
  height: 100svh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}
#stage,
#scene {
  position: absolute;
  inset: 0;
}
#scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
/* Token identity lives in the room navigation, without a separate strip. */
.token-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
  font-size: 12px;
  min-width: 0;
}
.contract {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ca-label {
  white-space: nowrap;
}
#contract-address {
  font-size: inherit;
  user-select: all;
  overflow-wrap: anywhere;
  min-width: 0;
}
#copy-contract {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 32px;
  padding: 5px;
}
#copy-contract svg {
  width: 14px;
  height: 14px;
}
.copy-status {
  position: absolute;
  right: 0;
  top: 100%;
  font-size: 10px;
  line-height: 18px;
}
.token-links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 14px;
  font: inherit;
}
.token-links a {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0;
}
.token-links img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.token-links .fomo-wordmark {
  width: 40px;
  height: 13px;
}
.external-arrow {
  font-size: inherit;
}
.token-banner a:hover,
.token-banner button:hover {
  color: #fff;
  opacity: 0.72;
}
.token-banner :focus-visible {
  outline-color: white;
}
#scene {
  background: #101b1c;
}
.room-header {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(#101b1cf0, transparent);
  pointer-events: none;
}
.room-header > * {
  pointer-events: auto;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -1.5px;
}
.identity img {
  width: 32px;
  height: 32px;
}
.room-header > nav {
  flex-shrink: 0;
  gap: 18px;
}
.period {
  color: var(--accent);
}
nav {
  display: flex;
  gap: 28px;
  font-size: 12px;
}
nav a {
  padding: 12px 0;
}
nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.view-label {
  position: absolute;
  top: 96px;
  left: 36px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  pointer-events: none;
}
.view-label a {
  pointer-events: auto;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0;
}
.room-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 34px 16px;
  background: linear-gradient(transparent, #141916ed);
  pointer-events: none;
  font-size: 11px;
}
.room-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.room-controls button,
.room-controls a {
  pointer-events: auto;
}
.room-controls #expand {
  margin-left: auto;
  color: var(--accent);
}
#status {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 1px;
  margin-right: 16px;
}
#status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 7px;
  background: currentColor;
}
#status[data-state="offline"],
#status[data-state="reconnecting"] {
  color: #d6b67e;
}
.stream-caption {
  display: flex;
  align-items: center;
  gap: 6px;
}
#caption {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 65vw;
}
#age {
  color: var(--muted);
  white-space: nowrap;
}
.ambient-note {
  font-size: 9px;
  color: var(--muted);
  opacity: 0.75;
  margin: 8px 0 0;
}
.frame-arrival {
  opacity: 0;
  color: var(--accent);
  font-size: 9px;
  margin-left: 10px;
}
#world:has([data-frame-arrival="new"]) .frame-arrival {
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#fallback {
  position: absolute;
  inset: 18% 6% 20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#stream {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid #536561;
}
#fallback-note {
  font-size: 12px;
}
.static-fly {
  position: absolute;
  width: 100px;
  bottom: -40px;
  left: 10px;
}
body[data-fallback="true"] #accessible-surface:not([data-view="desk"]) {
  clip-path: none;
  width: auto;
  height: auto;
  inset: 145px 24px 155px;
  overflow: auto;
  background: #ede6cf;
  color: #24332e;
  padding: 24px;
  margin: 0;
  border: 8px solid #806848;
}
body[data-fallback="true"]:has(#accessible-surface:not([data-view="desk"]))
  #fallback {
  visibility: hidden;
}
#accessible-surface h2 {
  font-size: 14px;
}
#accessible-surface p {
  font-size: 13px;
  line-height: 1.6;
}
.brain-pixels {
  image-rendering: pixelated;
  object-fit: contain;
  width: 100%;
}
body[data-view="notes"] #accessible-surface {
  clip-path: none;
  width: min(470px, calc(100vw - 40px));
  height: auto;
  inset: calc(var(--room-header-height, 70px) + 48px) 24px 94px auto;
  overflow: auto;
  background: #eee9d6;
  color: #23382e;
  padding: 22px;
  margin: 0;
  border: 6px solid #87785d;
  box-shadow: 0 18px 60px #0008;
  z-index: 3;
  user-select: text;
}
#accessible-surface details {
  border-top: 1px solid #859285;
  padding: 12px 0;
}
#accessible-surface summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
#accessible-surface blockquote {
  margin: 12px 0;
  border-left: 3px solid #69856e;
  padding-left: 10px;
  font-size: 12px;
}
#accessible-surface a {
  color: inherit;
  font-size: 12px;
  text-decoration: underline;
}
.notebook-index {
  padding-left: 18px;
}
.notebook-index li {
  margin: 12px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#accessible-surface p,
#accessible-surface h1,
#accessible-surface h2,
#accessible-surface blockquote {
  overflow-wrap: anywhere;
}
#accessible-surface table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
#accessible-surface th,
#accessible-surface td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #88968a;
}
@media (max-width: 600px) {
  body[data-view="notes"] #accessible-surface {
    inset: calc(var(--room-header-height, 90px) + 76px) 12px 124px;
    width: auto;
    padding: 14px;
  }
  body[data-view="notes"] #surface-title {
    font-size: 20px;
    line-height: 1.4;
  }
}
#note-source {
  display: inline-block;
  font-size: 12px;
  text-decoration: underline;
}
dialog {
  padding: 0;
  border: 1px solid #56655f;
  background: #101b1c;
  color: var(--paper);
  width: min(96vw, 1600px);
  max-width: none;
}
dialog::backdrop {
  background: #050b0be8;
}
#expanded-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85svh;
  object-fit: contain;
}
.expanded-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  font-size: 12px;
}
#expanded-caption {
  flex: 1;
}
dialog[data-fullscreen="window"] {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  max-height: none;
  margin: 0;
}
#expanded-surface:fullscreen {
  background: #101b1c;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.no-js {
  position: fixed;
  top: 130px;
  background: var(--ink);
  padding: 20px;
}
@media (max-width: 650px) {
  .room-header {
    padding: 16px;
  }
  .identity {
    font-size: 23px;
    gap: 5px;
  }
  .identity img {
    width: 32px;
    height: 32px;
  }
  nav {
    gap: 14px;
    font-size: 10px;
  }
  #portfolio {
    display: none;
  }
  .view-label {
    left: 20px;
    top: 80px;
  }
  .room-footer {
    padding: 45px 18px 14px;
  }
  .room-controls {
    gap: 4px;
    flex-wrap: wrap;
    font-size: 10px;
  }
  #scene-note {
    display: none !important;
  }
  .stream-caption {
    flex-wrap: wrap;
    gap: 4px;
  }
  #caption {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    font-size: 11px;
  }
  #age {
    font-size: 10px;
  }
  .ambient-note {
    font-size: 8px;
    line-height: 1.5;
    max-width: 290px;
  }
  .expanded-bar {
    flex-wrap: wrap;
  }
  #expanded-caption {
    flex-basis: 100%;
  }
  #fallback {
    inset: 25% 4% 30%;
  }
  body[data-fallback="true"] #accessible-surface:not([data-view="desk"]) {
    inset: 125px 16px 165px;
    padding: 16px;
    border-width: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Maintain navigation contrast when the camera approaches pale paper. */
.room-header {
  background: linear-gradient(#131819eb, #131819ad 60%, transparent);
}
.view-label {
  background: #171d19b8;
  padding: 8px 10px;
  border-radius: 3px;
  left: 26px;
  top: calc(var(--room-header-height) + 4px);
}
@media (max-width: 1200px) {
  .room-header {
    gap: 4px 18px;
  }
  .room-header > nav {
    margin-left: auto;
  }
  .token-banner {
    gap: 12px;
  }
}
@media (max-width: 650px) {
  .room-header {
    padding: 10px 12px;
    justify-content: center;
    gap: 2px;
  }
  .identity {
    width: 100%;
    justify-content: center;
    font-size: 20px;
  }
  .identity img {
    width: 26px;
    height: 26px;
  }
  .token-banner {
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    font-size: 10px;
  }
  .contract {
    gap: 4px;
    width: 100%;
    justify-content: center;
  }
  .token-links {
    gap: 20px;
  }
  .token-links img {
    width: 14px;
    height: 14px;
  }
  .token-links .fomo-wordmark {
    width: 34px;
    height: 11px;
  }
  .room-header > nav {
    margin: 0;
    gap: 18px;
    font-size: 10px;
  }
  #portfolio {
    display: block;
  }
  .view-label {
    left: 10px;
    top: calc(var(--room-header-height) + 4px);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
    max-width: calc(100% - 20px);
  }
  #room-label {
    flex-basis: 100%;
  }
  body[data-fallback="true"] #accessible-surface:not([data-view="desk"]) {
    top: calc(var(--room-header-height) + 72px);
  }
}

/* The same lifecycle evidence stays legible on phones and without WebGL. */
@media (max-width: 700px) {
  body[data-view="lifecycle"] #accessible-surface {
    clip-path: none;
    width: auto;
    height: auto;
    inset: calc(var(--room-header-height, 145px) + 68px) 14px 142px;
    overflow: auto;
    padding: 18px;
    margin: 0;
    color: #c6dad6;
    background: #08151af5;
    border: 1px solid #458b80;
    border-radius: 8px;
    box-shadow: 0 0 24px #61f3dd17;
  }
  body[data-view="lifecycle"] #surface-title {
    font-size: 20px;
    color: #e0f5ef;
  }
  .lifecycle-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 22px 0;
  }
  .lifecycle-steps article {
    position: relative;
    padding: 10px 14px;
    border: 1px solid #579f97;
    border-radius: 8px;
  }
  .lifecycle-steps article[data-active="true"] {
    border-color: #61f3dd;
    box-shadow:
      0 0 14px #61f3dd30,
      inset 0 0 14px #61f3dd12;
  }
  .lifecycle-steps article[data-active="true"][data-tone="amber"] {
    border-color: #ffce77;
    box-shadow: 0 0 14px #ffce7730;
  }
  .lifecycle-steps article[data-step="learn"] {
    border-color: #b875b0;
  }
  .lifecycle-steps article[data-step="review"] {
    border-color: #bf9c62;
  }
  .lifecycle-steps h2 {
    color: #8be7d5;
    margin: 0 0 6px;
  }
  .lifecycle-steps article[data-step="learn"] h2 {
    color: #f28cde;
  }
  .lifecycle-steps article[data-step="review"] h2 {
    color: #ffce77;
  }
  .lifecycle-steps p {
    margin: 0;
  }
}
@media (min-width: 701px) {
  body[data-view="lifecycle"][data-lifecycle-details="true"]
    #accessible-surface {
    clip-path: none;
    width: min(440px, 40vw);
    height: auto;
    inset: calc(var(--room-header-height, 80px) + 65px) 20px 135px auto;
    overflow: auto;
    padding: 24px;
    margin: 0;
    color: #c6dad6;
    background: #08151af7;
    border: 1px solid #458b80;
    border-radius: 8px;
    box-shadow: 0 0 28px #0009;
  }
}
@media (max-width: 700px) {
  #lifecycle-details {
    display: none;
  }
}

/* The physical account CRT opens a quiet, readable ledger. */
body[data-view="portfolio"] #accessible-surface {
  clip-path: none;
  width: min(1050px, calc(100vw - 56px));
  height: auto;
  inset: calc(var(--room-header-height, 80px) + 52px) 0 104px;
  overflow: auto;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid #54716c;
  border-radius: 14px;
  background: #0c1c21fa;
  color: #e5e9df;
  box-shadow: 0 25px 100px #000b;
  z-index: 4;
  user-select: text;
  scrollbar-color: #4b6a65 #0c1c21;
}
body[data-view="portfolio"] #surface-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a7b8b5;
  margin: 0 0 25px;
}
.account-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.account-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9cbbb3;
}
#accessible-surface .account-intro h2 {
  font:
    500 clamp(19px, 2.1vw, 28px)/1.3 system-ui,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 9px 0 0;
  color: #f1e6cd;
}
#accessible-surface .account-profile {
  font-size: 12px;
  white-space: nowrap;
  color: #a4e4ce;
  text-decoration: none;
}
#accessible-surface .account-observation {
  color: #a5b5b4;
  font-size: 11px;
  margin: 14px 0 26px;
}
.account-metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
}
.account-metric {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-left: 22px;
  border-left: 1px solid #324a4b;
}
.account-metric:first-child {
  padding-left: 0;
  border: 0;
}
.account-metric strong {
  font:
    500 clamp(25px, 3vw, 39px)/1.1 system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: #f0e6cd;
}
.account-metric small {
  font-size: 10px;
  color: #a5b5b4;
}
.account-allocation {
  display: flex;
  gap: 2px;
  height: 7px;
  margin: 26px 0 30px;
  border-radius: 5px;
  overflow: hidden;
  background: #273a3d;
}
.account-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
.account-columns section {
  min-width: 0;
}
.account-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.account-section-head h3 {
  font:
    500 17px system-ui,
    sans-serif;
  margin: 0 0 12px;
}
.account-section-head > span {
  color: #a6bdb7;
  font-size: 11px;
}
#accessible-surface .account-positions {
  width: 100%;
  font-size: 12px;
  table-layout: fixed;
  margin-top: 5px;
}
#accessible-surface .account-positions th {
  color: #97b1ac;
  font-size: 10px;
  font-weight: normal;
}
#accessible-surface .account-positions th,
#accessible-surface .account-positions td {
  padding: 13px 0;
  border-bottom: 1px solid #2b4142;
  overflow-wrap: anywhere;
}
.account-positions th:first-child {
  width: 48%;
}
.account-positions td:not(:first-child),
.account-positions th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#accessible-surface .account-asset {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e1e9df;
}
.account-asset > span:last-child {
  min-width: 0;
}
.account-asset strong {
  font-size: 12px;
  font-weight: 500;
}
.account-asset small {
  display: block;
  color: #a0b2b0;
  font-size: 10px;
  margin-top: 4px;
}
.account-dot {
  width: 7px;
  height: 25px;
  border-radius: 3px;
  flex: 0 0 auto;
}
#accessible-surface .account-footnote {
  color: #a5b5b4;
  font-size: 10px;
  line-height: 1.6;
  margin: 10px 0;
}
.account-search {
  box-sizing: border-box;
  width: 100%;
  background: #14292e;
  border: 1px solid #3c5657;
  border-radius: 7px;
  color: #e5e9df;
  padding: 11px 13px;
  margin: 5px 0 13px;
  font: inherit;
  font-size: 12px;
}
.account-search::placeholder {
  color: #a1b5b2;
}
.account-search:focus-visible,
.account-panel a:focus-visible {
  outline: 2px solid #94dec8;
  outline-offset: 3px;
}
.account-following {
  max-height: 330px;
  overflow: auto;
  scrollbar-color: #4b6a65 #0c1c21;
  padding-right: 5px;
}
#accessible-surface .account-followed {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e5e9df;
  padding: 10px 5px;
  border-radius: 7px;
  text-decoration: none;
}
.account-followed:hover {
  background: #1a3034;
}
.account-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #294449;
  color: #a4e4ce;
  font-size: 12px;
}
.account-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-person {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.account-person strong {
  font:
    500 12px system-ui,
    sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-person small {
  font-size: 10px;
  color: #a5b5b4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-arrow {
  color: #8aaba3;
  font-size: 12px;
}
.account-empty {
  color: #b3c5bf;
}
@media (max-width: 700px) {
  body[data-view="portfolio"] #accessible-surface {
    width: calc(100vw - 24px);
    inset: calc(var(--room-header-height, 145px) + 49px) 0 145px;
    padding: 19px;
    border-radius: 10px;
  }
  .account-intro {
    display: block;
  }
  #accessible-surface .account-profile {
    display: inline-block;
    margin-top: 14px;
  }
  .account-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 20px 12px;
  }
  .account-metric {
    padding-left: 12px;
  }
  .account-metric:last-child {
    grid-column: 1/-1;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid #324a4b;
  }
  .account-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .account-following {
    max-height: 320px;
  }
}

@media (min-width: 701px) {
  body[data-view="portfolio"]:not([data-account-details="true"]):not(
      [data-fallback="true"]
    )
    #accessible-surface {
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    border: 0;
  }
}
@media (max-width: 700px) {
  #portfolio-details {
    display: none;
  }
}
