:root {
  --desktop-taskbar-height: 38px;
  --desktop-blue: #2459a9;
  --desktop-blue-deep: #173d82;
  --desktop-blue-light: #5b91d6;
  --desktop-green: #397c35;
  --desktop-window: #ece9d8;
}

body[data-ui-version="v2"] {
  background: #256fae;
}

body[data-ui-version="v2"] .app-shell {
  background: transparent;
  border: 0;
  margin: 0;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

body[data-ui-version="v2"]:not(.registration-mode)[data-scene="desktop"],
body[data-ui-version="v2"]:not(.registration-mode)[data-scene="app"] {
  height: 100dvh;
  overflow: hidden;
}

body[data-ui-version="v2"] .expedition-only {
  display: none;
}

body[data-ui-version="v2"] .desktop-shell {
  background:
    linear-gradient(176deg, transparent 0 70%, rgba(15, 70, 76, 0.2) 70.2% 71%, transparent 71.2%),
    linear-gradient(168deg, transparent 0 72%, rgba(77, 142, 72, 0.42) 72.2% 75%, transparent 75.2%),
    linear-gradient(180deg, #2369ab 0%, #5aa8d8 49%, #c2e9e8 69%, #78a964 69.3%, #315e45 100%);
  color: #101010;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: var(--desktop-taskbar-height);
  position: relative;
}

body[data-ui-version="v2"] .desktop-shell::before {
  background:
    radial-gradient(ellipse at 15% 34%, rgba(255, 255, 255, 0.88) 0 4%, rgba(255, 255, 255, 0.44) 7%, transparent 13%),
    radial-gradient(ellipse at 31% 24%, rgba(255, 255, 255, 0.7) 0 3%, rgba(255, 255, 255, 0.32) 6%, transparent 12%),
    radial-gradient(ellipse at 75% 31%, rgba(255, 255, 255, 0.68) 0 3%, rgba(255, 255, 255, 0.25) 7%, transparent 14%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  content: "";
  inset: 0 0 var(--desktop-taskbar-height);
  pointer-events: none;
  position: absolute;
}

body[data-ui-version="v2"] .desktop-shell::after {
  background:
    repeating-linear-gradient(169deg, transparent 0 18px, rgba(231, 255, 226, 0.11) 19px 20px),
    repeating-linear-gradient(91deg, transparent 0 34px, rgba(10, 54, 48, 0.08) 35px 36px);
  bottom: var(--desktop-taskbar-height);
  content: "";
  height: 31%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

body[data-ui-version="v2"] .desktop-surface {
  min-height: calc(100dvh - var(--desktop-taskbar-height));
  position: relative;
  z-index: 1;
}

body[data-ui-version="v2"] .desktop-masthead {
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.94);
  display: flex;
  justify-content: space-between;
  left: 22px;
  pointer-events: none;
  position: absolute;
  right: 26px;
  text-shadow: 1px 1px 1px rgba(0, 32, 68, 0.9);
  top: 13px;
}

body[data-ui-version="v2"] .desktop-masthead p {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

body[data-ui-version="v2"] .desktop-masthead span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

body[data-ui-version="v2"] .mobile-phone-home,
body[data-ui-version="v2"] .mobile-phone-softkeys {
  display: none;
}

body[data-ui-version="v2"] .desktop-icon-grid {
  display: none;
  gap: 8px 14px;
  grid-template-columns: repeat(2, 118px);
  left: 18px;
  position: absolute;
  top: 58px;
  z-index: 3;
}

body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon-grid {
  display: grid;
}

body[data-ui-version="v2"] .desktop-icon {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: flex-start;
  min-height: 88px;
  padding: 5px 3px;
  text-shadow: 1px 1px 2px #001a3c, -1px -1px 1px rgba(0, 30, 70, 0.55);
  width: 118px;
}

body[data-ui-version="v2"] .desktop-icon:hover,
body[data-ui-version="v2"] .desktop-icon:focus-visible {
  background: rgba(13, 70, 132, 0.45);
  border-color: rgba(255, 255, 255, 0.72);
  outline: 1px dotted #ffffff;
  outline-offset: -4px;
}

body[data-ui-version="v2"] .desktop-icon:active,
body[data-ui-version="v2"] .desktop-icon[aria-pressed="true"] {
  background: rgba(9, 48, 112, 0.62);
  border-color: #dbeeff;
}

body[data-ui-version="v2"] .desktop-icon img {
  filter: drop-shadow(2px 2px 1px rgba(0, 26, 58, 0.72));
  height: 48px;
  image-rendering: auto;
  width: 48px;
}

body[data-ui-version="v2"] .desktop-icon span {
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

body[data-ui-version="v2"] .desktop-app-window {
  background: var(--desktop-window);
  border-color: #ffffff #163a70 #163a70 #ffffff;
  border-style: solid;
  border-width: 2px;
  box-shadow:
    0 0 0 1px #10326b,
    7px 8px 18px rgba(0, 25, 55, 0.4);
  bottom: 14px;
  display: none;
  flex-direction: column;
  left: clamp(214px, 18vw, 282px);
  min-height: 360px;
  overflow: hidden;
  position: absolute;
  right: 24px;
  top: 48px;
  z-index: 10;
}

body[data-ui-version="v2"][data-scene="app"] .desktop-app-window:not(.hidden) {
  display: flex;
}

body[data-ui-version="v2"] .desktop-app-titlebar {
  background: linear-gradient(90deg, #153d89, #3271c4 60%, #75a4df);
  flex: 0 0 auto;
  min-height: 28px;
  padding: 3px 4px 3px 7px;
}

body[data-ui-version="v2"] .desktop-app-close {
  background: var(--panel);
  border-color: #ffffff #313131 #313131 #ffffff;
  border-style: solid;
  border-width: 2px;
  color: #111111;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  min-height: 20px;
  min-width: 48px;
  padding: 1px 5px;
}

body[data-ui-version="v2"] .desktop-app-close:active {
  border-color: #313131 #ffffff #ffffff #313131;
}

body[data-ui-version="v2"] .desktop-app-close:disabled,
body[data-ui-version="v2"] .desktop-home-button:disabled {
  cursor: default;
  filter: grayscale(0.45);
  opacity: 0.72;
}

body[data-ui-version="v2"] .desktop-app-content {
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    var(--panel);
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 7px;
}

body[data-ui-version="v2"] .viewer-launch {
  align-items: center;
  background: #ffffee;
  border-color: var(--shadow-darker) var(--highlight) var(--highlight) var(--shadow-darker);
  border-style: solid;
  border-width: 2px;
  display: none;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: min(10vh, 82px) auto;
  max-width: 720px;
  padding: 18px;
}

body[data-ui-version="v2"] .viewer-launch h1 {
  margin: 4px 0 8px;
}

body[data-ui-version="v2"] .viewer-launch p:last-child {
  color: #3e3e3e;
  max-width: 58ch;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="viewer"] .viewer-launch {
  display: grid;
}

body[data-ui-version="v2"] .hub-overview {
  background: var(--panel);
  border-color: var(--highlight) var(--shadow-darker) var(--shadow-darker) var(--highlight);
  border-style: solid;
  border-width: 2px;
  display: none;
  margin-bottom: 7px;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="portal"] .hub-overview {
  display: block;
}

body[data-ui-version="v2"] .hub-overview-body {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  padding: 7px;
}

body[data-ui-version="v2"] .hub-welcome,
body[data-ui-version="v2"] .hub-summary,
body[data-ui-version="v2"] .hub-actions,
body[data-ui-version="v2"] .hub-bulletin {
  background: #ffffee;
  border-color: var(--shadow-darker) var(--highlight) var(--highlight) var(--shadow-darker);
  border-style: solid;
  border-width: 2px;
  min-width: 0;
  padding: 7px;
}

body[data-ui-version="v2"] .hub-welcome h1 {
  font-size: 20px;
  margin: 3px 0 6px;
}

body[data-ui-version="v2"] .hub-kicker {
  color: #800000;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

body[data-ui-version="v2"] .hub-summary {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

body[data-ui-version="v2"] .hub-summary div {
  background: #ffffff;
  border: 1px solid #808080;
  padding: 4px;
}

body[data-ui-version="v2"] .hub-summary dt {
  color: #800000;
  font-size: 11px;
  font-weight: 700;
}

body[data-ui-version="v2"] .hub-summary dd {
  color: #000080;
  font-family: var(--mono);
  margin: 2px 0 0;
}

body[data-ui-version="v2"] .hub-actions {
  align-content: center;
  display: grid;
  gap: 5px;
}

body[data-ui-version="v2"] .hub-actions p {
  color: #555555;
  font-size: 11px;
}

body[data-ui-version="v2"] .hub-bulletin h2 {
  margin: -4px -4px 4px;
}

body[data-ui-version="v2"] .hub-bulletin ul {
  display: grid;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body[data-ui-version="v2"] .hub-bulletin li {
  border-bottom: 1px dotted #808080;
  padding: 2px;
}

body[data-ui-version="v2"] .hub-bulletin time {
  color: #800000;
  font-family: var(--mono);
  margin-right: 6px;
}

body[data-ui-version="v2"][data-expedition-state="returned"] .hub-overview {
  border-color: #b58a00 #ffffff #ffffff #b58a00;
}

body[data-ui-version="v2"][data-expedition-state="failed"] .hub-overview {
  border-color: #7b0000 #ffffff #ffffff #7b0000;
}

/* デスクトップアプリは既存DOMを複製せず、担当領域だけを一つの窓に投影する。 */
body[data-ui-version="v2"][data-scene="app"] .game-layout,
body[data-ui-version="v2"][data-scene="app"] .status-panel,
body[data-ui-version="v2"][data-scene="app"] .scene-panel,
body[data-ui-version="v2"][data-scene="app"] .record-panel {
  display: none;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="portal"] .game-layout,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .game-layout,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .game-layout,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .game-layout,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="portal"] .status-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .status-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .status-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel {
  display: grid;
  width: 100%;
}

body[data-ui-version="v2"][data-scene="app"] .status-panel,
body[data-ui-version="v2"][data-scene="app"] .record-panel {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

body[data-ui-version="v2"][data-scene="app"] .status-panel > h2,
body[data-ui-version="v2"][data-scene="app"] .record-panel > h2 {
  grid-column: 1 / -1;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="portal"] .status-panel {
  grid-template-columns: minmax(0, 1fr);
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="portal"] .status-panel > :not(h2):not(.expedition-console),
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .status-panel > .expedition-console,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .status-panel > .meter-list,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .status-panel > .settlement-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel > .inventory-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel > .storage-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel > .settlement-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel > .equipment-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .status-panel > .memory-block,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .status-panel > :not(h2):not(.settlement-block) {
  display: none;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .expedition-selectors label:not(:first-child),
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .expedition-actions,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .base-record-status,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="personnel"] .economy-panel > [data-desktop-group="supplies"],
body[data-ui-version="v2"][data-scene="app"][data-hub-service="supplies"] .economy-panel > [data-desktop-group="personnel"] {
  display: none;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .field-trace-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .notes-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .coordinate-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .player-directory-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .log-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="records"] .record-panel > .operations-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .album-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .discovery-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .level-ledger-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .route-knowledge-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .footage-archive-section,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel > .entity-archive-section {
  display: none;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .game-layout {
  grid-template-columns: minmax(210px, 0.55fr) minmax(360px, 1.45fr);
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .status-panel {
  grid-column: 1;
  grid-row: 1;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-panel {
  grid-column: 1;
  grid-row: 2;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-panel {
  align-content: start;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-frame {
  aspect-ratio: auto;
  background: #ffffee;
  min-height: 54px;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-frame img,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-copy,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .combat-strip,
body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .action-grid {
  display: none;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .shop-toggle-button {
  box-shadow: none;
  margin: 4px;
  min-height: 36px;
  position: static;
  width: calc(100% - 8px);
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .shop-inline-slot.active {
  margin: 0 4px 4px;
}

body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] [data-desktop-group="facilities"] {
  display: none;
}

body[data-ui-version="v2"][data-terminal-pending="true"][data-scene="app"] .game-layout,
body[data-ui-version="v2"][data-terminal-pending="true"][data-scene="app"] .expedition-console {
  display: none;
}

body[data-ui-version="v2"] .field-trace {
  background: #050805;
  border-color: var(--shadow-darker) var(--highlight) var(--highlight) var(--shadow-darker);
  border-style: solid;
  border-width: 2px;
  color: #77ff77;
  display: grid;
  font-family: var(--mono);
  gap: 3px;
  min-height: 34px;
  padding: 5px 6px;
}

body[data-ui-version="v2"] .field-trace strong {
  color: #ffff66;
  font-weight: 400;
}

body[data-ui-version="v2"] .field-trace p {
  margin: 0;
}

body[data-ui-version="v2"] .field-trace-actions {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-ui-version="v2"] .field-trace-actions button {
  font-family: var(--mono);
  font-size: 11px;
  min-height: 30px;
  padding: 2px 4px;
}

body[data-ui-version="v2"] .level-ledger-section,
body[data-ui-version="v2"] .player-directory-section,
body[data-ui-version="v2"] .level-ledger-panel,
body[data-ui-version="v2"] .player-directory-panel {
  display: grid;
  gap: 4px;
}

body[data-ui-version="v2"] .level-ledger-record,
body[data-ui-version="v2"] .player-directory-record {
  background: #ffffee;
  border-color: var(--shadow-darker) var(--highlight) var(--highlight) var(--shadow-darker);
  border-style: solid;
  border-width: 2px;
  display: grid;
  font-family: var(--mono);
  font-size: 10.5px;
  gap: 2px;
  padding: 4px;
}

body[data-ui-version="v2"] .level-ledger-record strong,
body[data-ui-version="v2"] .player-directory-record strong,
body[data-ui-version="v2"] .hub-bulletin strong {
  color: #000080;
}

body[data-ui-version="v2"] .level-ledger-record em,
body[data-ui-version="v2"] .player-directory-record em {
  color: #555555;
  font-style: normal;
}

body[data-ui-version="v2"] .desktop-taskbar {
  align-items: center;
  background: linear-gradient(180deg, #4e8bdb 0 8%, var(--desktop-blue) 16% 75%, var(--desktop-blue-deep) 100%);
  border-top: 2px solid #8eb9ed;
  bottom: 0;
  box-shadow: 0 -1px 0 #133a78;
  color: #ffffff;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  height: var(--desktop-taskbar-height);
  left: 0;
  padding: 2px 5px 3px 3px;
  position: fixed;
  right: 0;
  z-index: 100;
}

body[data-ui-version="v2"] .desktop-home-button {
  background: linear-gradient(180deg, #67aa5b, var(--desktop-green) 65%, #245b2c);
  border-color: #9bd38d #173d22 #173d22 #9bd38d;
  border-radius: 0 10px 10px 0;
  border-style: solid;
  border-width: 2px;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 30px;
  min-width: 74px;
  padding: 2px 13px 2px 8px;
  text-shadow: 1px 1px 1px #123c1c;
}

body[data-ui-version="v2"] .desktop-running-apps {
  display: flex;
  gap: 3px;
  min-width: 0;
}

body[data-ui-version="v2"] .desktop-task-button,
body[data-ui-version="v2"] .desktop-return-button {
  background: linear-gradient(180deg, #5d94dc, #2c65b5);
  border-color: #91b9e9 #143d7c #143d7c #91b9e9;
  border-style: solid;
  border-width: 2px;
  color: #ffffff;
  cursor: pointer;
  min-height: 28px;
  overflow: hidden;
  padding: 2px 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"] .desktop-task-button[aria-pressed="true"],
body[data-ui-version="v2"] .desktop-task-button.active {
  background: #1d4d98;
  border-color: #12366e #7ca8de #7ca8de #12366e;
}

body[data-ui-version="v2"] .desktop-task-button[data-running="true"]::before {
  color: #a8ff8d;
  content: "●";
  font-size: 9px;
  margin-right: 5px;
}

body[data-ui-version="v2"] .desktop-task-status {
  align-items: center;
  align-self: stretch;
  background: linear-gradient(180deg, #3f8fc8, #2775b2);
  border-color: #194e83 #78b9e6 #78b9e6 #194e83;
  border-style: solid;
  border-width: 1px;
  display: flex;
  font-family: var(--mono);
  font-size: 10px;
  gap: 7px;
  padding: 2px 7px;
}

body[data-ui-version="v2"] .desktop-task-status time {
  font-size: 12px;
  min-width: 36px;
  text-align: center;
}

body[data-ui-version="v2"] .desktop-return-button {
  background: #f4d96b;
  border-color: #fff5ad #704b00 #704b00 #fff5ad;
  color: #6b1b00;
  font-size: 11px;
  font-weight: 700;
}

/* 遠征中はデスクトップを退避し、既存の実働3列UIだけを復元する。 */
body[data-ui-version="v2"][data-scene="expedition"] {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.14) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.14) 75%) 0 0 / 16px 16px,
    var(--desktop);
  padding-bottom: var(--desktop-taskbar-height);
}

body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
  background: var(--page);
  border-color: var(--highlight) var(--shadow-darker) var(--shadow-darker) var(--highlight);
  border-style: solid;
  border-width: 2px;
  margin: 10px auto;
  max-width: 980px;
  min-height: calc(100dvh - var(--desktop-taskbar-height) - 20px);
  padding: 6px;
}

body[data-ui-version="v2"][data-scene="expedition"] .topbar {
  display: grid;
}

body[data-ui-version="v2"][data-scene="expedition"] .marquee-strip {
  display: block;
}

body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell {
  background: transparent;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell::before,
body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell::after,
body[data-ui-version="v2"][data-scene="expedition"] .desktop-masthead,
body[data-ui-version="v2"][data-scene="expedition"] .desktop-icon-grid,
body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-titlebar,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-launch,
body[data-ui-version="v2"][data-scene="expedition"] .hub-overview {
  display: none;
}

body[data-ui-version="v2"][data-scene="expedition"] .desktop-surface {
  min-height: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-window {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: block;
  min-height: 0;
  overflow: visible;
  position: static;
}

body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content {
  background: transparent;
  overflow: visible;
  padding: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr) 230px;
}

body[data-ui-version="v2"][data-scene="expedition"] .status-panel,
body[data-ui-version="v2"][data-scene="expedition"] .scene-panel,
body[data-ui-version="v2"][data-scene="expedition"] .record-panel {
  display: grid;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
  display: block;
}

/*
 * 指定された補助表示は状態・データ・イベント処理を残したままUIから退避する。
 * 記録台帳ランチャーとネットワークのチャットは引き続き利用できる。
 */
body[data-ui-version="v2"][data-scene="expedition"] .expedition-console,
body[data-ui-version="v2"][data-scene] .topbar,
body[data-ui-version="v2"][data-scene] .marquee-strip,
body[data-ui-version="v2"][data-scene] #recordHeading,
body[data-ui-version="v2"][data-scene] .album-section,
body[data-ui-version="v2"][data-scene] .discovery-section,
body[data-ui-version="v2"][data-scene] .level-ledger-section,
body[data-ui-version="v2"][data-scene] .route-knowledge-section,
body[data-ui-version="v2"][data-scene] .footage-archive-section,
body[data-ui-version="v2"][data-scene] .entity-archive-section,
body[data-ui-version="v2"][data-scene] .field-trace-section,
body[data-ui-version="v2"][data-scene] .notes-section,
body[data-ui-version="v2"][data-scene] .coordinate-section,
body[data-ui-version="v2"][data-scene] .player-directory-section,
body[data-ui-version="v2"][data-scene] .operations-section {
  display: none;
}

@media (max-width: 900px) {
  body[data-ui-version="v2"] .desktop-app-window {
    left: 18px;
    right: 18px;
  }

  body[data-ui-version="v2"][data-scene="app"] .desktop-masthead {
    display: none;
  }

  body[data-ui-version="v2"] .hub-overview-body {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .status-panel,
  body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .scene-panel,
  body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .record-panel {
    grid-column: 1;
    grid-row: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
    margin: 0;
    max-width: none;
    min-height: calc(100dvh - var(--desktop-taskbar-height));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
    order: 1;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .status-panel {
    order: 2;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .record-panel {
    order: 3;
  }
}

@media (max-width: 620px) {
  :root {
    --desktop-taskbar-height: 52px;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell {
    background:
      radial-gradient(130% 44% at 49% 74%, transparent 0 45%, rgba(255, 255, 255, 0.94) 45.5% 48%, transparent 48.5%),
      radial-gradient(120% 48% at 45% 78%, transparent 0 52%, rgba(74, 181, 232, 0.48) 52.5% 55%, transparent 55.5%),
      linear-gradient(158deg, transparent 0 55%, rgba(96, 202, 239, 0.28) 55.2% 66%, transparent 66.2%),
      linear-gradient(180deg, #f9fcff 0%, #eef9ff 35%, #d8f4ff 58%, #8bd3ed 100%);
    color: #061652;
    padding-bottom: 0;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell::before {
    background:
      repeating-linear-gradient(180deg, rgba(15, 78, 143, 0.025) 0 1px, transparent 1px 4px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.46), transparent 24% 76%, rgba(255, 255, 255, 0.46));
    inset: 0;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell::after {
    background:
      repeating-linear-gradient(90deg, transparent 0 21px, rgba(39, 145, 198, 0.08) 22px 23px),
      repeating-linear-gradient(0deg, transparent 0 21px, rgba(255, 255, 255, 0.14) 22px 23px);
    bottom: 58px;
    height: 19%;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-surface {
    min-height: 100dvh;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-masthead,
  body[data-ui-version="v2"][data-scene="desktop"] .desktop-taskbar {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .mobile-phone-home {
    display: block;
    inset: 0 0 58px;
    pointer-events: none;
    position: absolute;
    z-index: 2;
  }

  body[data-ui-version="v2"] .mobile-phone-statusbar {
    align-items: center;
    background:
      repeating-linear-gradient(180deg, rgba(0, 65, 138, 0.04) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #f8fbff, #e5efff);
    border-bottom: 1px solid rgba(22, 76, 143, 0.18);
    box-shadow: inset 0 -1px rgba(255, 255, 255, 0.94);
    color: #031a65;
    display: flex;
    height: 34px;
    justify-content: space-between;
    padding: 3px 13px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal {
    align-items: end;
    display: flex;
    gap: 2px;
    height: 22px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal i {
    background: #04174b;
    border: 1px solid #020b24;
    display: block;
    width: 4px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal i:nth-child(1) {
    height: 6px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal i:nth-child(2) {
    height: 11px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal i:nth-child(3) {
    height: 16px;
  }

  body[data-ui-version="v2"] .mobile-phone-signal i:nth-child(4) {
    height: 21px;
  }

  body[data-ui-version="v2"] .mobile-phone-packet {
    border: 2px solid #17398c;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 18px;
    max-width: 96px;
    min-width: 42px;
    overflow: hidden;
    padding: 0 4px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"] .mobile-phone-battery {
    align-items: stretch;
    border: 2px solid #03143f;
    box-shadow: 0 0 0 1px #ffffff;
    display: flex;
    gap: 1px;
    height: 19px;
    padding: 2px;
    position: relative;
    width: 38px;
  }

  body[data-ui-version="v2"] .mobile-phone-battery::before {
    background: #03143f;
    content: "";
    height: 9px;
    left: -5px;
    position: absolute;
    top: 3px;
    width: 3px;
  }

  body[data-ui-version="v2"] .mobile-phone-battery i {
    background: linear-gradient(180deg, #66e78f, #14a448);
    flex: 1 1 auto;
  }

  body[data-ui-version="v2"] .mobile-phone-summary {
    font-family: "MS Gothic", "ＭＳ ゴシック", var(--mono);
  }

  body[data-ui-version="v2"] .mobile-phone-carrier {
    color: #1636a0;
    font-size: 18px;
    font-style: italic;
    left: 18px;
    letter-spacing: -0.04em;
    position: absolute;
    text-shadow: 1px 1px #ffffff;
    top: 52px;
  }

  body[data-ui-version="v2"] .mobile-phone-date {
    color: #020202;
    font-size: 17px;
    position: absolute;
    right: 16px;
    top: 50px;
  }

  body[data-ui-version="v2"] .mobile-phone-clock {
    color: #183aa6;
    font-size: clamp(52px, 17vw, 68px);
    font-weight: 400;
    letter-spacing: -0.09em;
    line-height: 1;
    position: absolute;
    right: 18px;
    text-shadow: 1px 1px #ffffff;
    top: 82px;
  }

  body[data-ui-version="v2"] .mobile-phone-notice {
    align-items: center;
    color: #080808;
    display: flex;
    font-size: 14px;
    gap: 8px;
    left: 18px;
    margin: 0;
    position: absolute;
    top: 154px;
  }

  body[data-ui-version="v2"] .mobile-phone-envelope {
    background: linear-gradient(145deg, #ffffff, #d5e8ff);
    border: 2px solid #15379c;
    display: inline-block;
    height: 24px;
    position: relative;
    width: 32px;
  }

  body[data-ui-version="v2"] .mobile-phone-envelope::before,
  body[data-ui-version="v2"] .mobile-phone-envelope::after {
    background: #15379c;
    content: "";
    height: 2px;
    position: absolute;
    top: 7px;
    width: 19px;
  }

  body[data-ui-version="v2"] .mobile-phone-envelope::before {
    left: 0;
    rotate: 34deg;
  }

  body[data-ui-version="v2"] .mobile-phone-envelope::after {
    right: 0;
    rotate: -34deg;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon-grid {
    gap: 5px 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 6px;
    right: 6px;
    top: clamp(220px, 31dvh, 268px);
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon {
    color: #071b5f;
    cursor: pointer;
    gap: 5px;
    min-height: 112px;
    padding: 6px 1px;
    text-shadow: 1px 1px #ffffff;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon:hover,
  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon:focus-visible {
    background: linear-gradient(180deg, rgba(104, 202, 255, 0.84), rgba(32, 126, 222, 0.76));
    border-color: #f7fdff #143c9a #143c9a #f7fdff;
    border-radius: 6px;
    outline: 1px dotted #09266e;
    outline-offset: -4px;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon:active,
  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon[aria-pressed="true"] {
    background: linear-gradient(180deg, rgba(47, 153, 235, 0.9), rgba(15, 83, 184, 0.92));
    border-color: #ffffff #08235f #08235f #ffffff;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon img {
    filter:
      drop-shadow(1px 1px 0 #ffffff)
      drop-shadow(2px 2px 0 rgba(8, 34, 96, 0.58));
    height: 58px;
    width: 58px;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon span {
    font-family: "MS Gothic", "ＭＳ ゴシック", var(--mono);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.12;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .mobile-phone-softkeys {
    align-items: stretch;
    background:
      repeating-linear-gradient(90deg, #15519e 0 4px, transparent 4px 8px) top / auto 2px repeat-x,
      linear-gradient(180deg, #eaf9ff, #bceaff);
    bottom: 0;
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr 1.12fr 1fr;
    height: 58px;
    left: 0;
    padding: 5px 4px 4px;
    position: fixed;
    right: 0;
    z-index: 100;
  }

  body[data-ui-version="v2"] .mobile-phone-softkeys > span,
  body[data-ui-version="v2"] .mobile-phone-softkeys > strong {
    align-items: center;
    background: linear-gradient(180deg, #f8fdff, #d5f3ff);
    border: 2px solid;
    border-color: #ffffff #398ac4 #398ac4 #ffffff;
    color: #092661;
    display: flex;
    font-family: "MS Gothic", "ＭＳ ゴシック", var(--mono);
    font-size: clamp(10px, 3.4vw, 14px);
    font-weight: 400;
    justify-content: center;
    line-height: 1.05;
    min-width: 0;
    text-align: center;
  }

  body[data-ui-version="v2"] .mobile-phone-softkeys > strong {
    font-size: clamp(14px, 4.5vw, 19px);
  }

  body[data-ui-version="v2"] .mobile-phone-softkeys i {
    font-size: 10px;
    font-style: normal;
    margin: 0 4px;
  }

  body[data-ui-version="v2"] .desktop-app-window {
    bottom: 0;
    left: 0;
    min-height: 0;
    right: 0;
    top: 0;
  }

  body[data-ui-version="v2"] .desktop-app-content {
    padding: 5px;
  }

  body[data-ui-version="v2"] .desktop-app-close {
    background: linear-gradient(180deg, #ffffff, #d9f1ff);
    border-color: #ffffff #245787 #245787 #ffffff;
    color: #092661;
    min-height: 44px;
    min-width: 64px;
  }

  body[data-ui-version="v2"][data-scene="app"] .desktop-app-titlebar {
    background:
      repeating-linear-gradient(180deg, rgba(9, 47, 116, 0.045) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #f8fcff, #cce9ff);
    border-bottom: 2px solid #2769a8;
    color: #092661;
    min-height: 48px;
  }

  body[data-ui-version="v2"] .viewer-launch {
    grid-template-columns: minmax(0, 1fr);
    margin: 12px auto;
    padding: 12px;
  }

  body[data-ui-version="v2"] .viewer-launch .registration-submit {
    min-height: 44px;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="app"][data-hub-service="network"] .shop-toggle-button {
    min-height: 44px;
  }

  body[data-ui-version="v2"] .hub-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="app"] .status-panel,
  body[data-ui-version="v2"][data-scene="app"] .record-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"] .desktop-taskbar {
    background:
      repeating-linear-gradient(180deg, rgba(9, 47, 116, 0.04) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #effbff, #bfeaff);
    border-top-color: #2d75b2;
    box-shadow: 0 -1px 0 #ffffff;
    color: #092661;
    gap: 2px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 2px;
  }

  body[data-ui-version="v2"] .desktop-home-button {
    background: linear-gradient(180deg, #ffffff, #d6f2ff);
    border-color: #ffffff #2b73aa #2b73aa #ffffff;
    border-radius: 0;
    color: #092661;
    min-height: 44px;
    min-width: 62px;
    padding: 2px 8px 2px 5px;
    text-shadow: none;
  }

  body[data-ui-version="v2"][data-scene="app"]:not([data-terminal-pending="true"]) .desktop-home-button {
    font-size: 0;
  }

  body[data-ui-version="v2"][data-scene="app"]:not([data-terminal-pending="true"]) .desktop-home-button::after {
    content: "待受";
    font-size: 13px;
  }

  body[data-ui-version="v2"] .desktop-task-button {
    background: linear-gradient(180deg, #f8fdff, #caecff);
    border-color: #ffffff #2b73aa #2b73aa #ffffff;
    color: #092661;
    min-height: 44px;
    padding: 2px 5px;
  }

  body[data-ui-version="v2"] .desktop-task-button[aria-pressed="true"],
  body[data-ui-version="v2"] .desktop-task-button.active {
    background: linear-gradient(180deg, #c5edff, #86c9ee);
    border-color: #245f95 #ffffff #ffffff #245f95;
  }

  body[data-ui-version="v2"] .desktop-task-button[data-running="true"]::before {
    color: #147b3f;
  }

  body[data-ui-version="v2"] .desktop-task-status {
    background: linear-gradient(180deg, #eefaff, #bfe8fb);
    border-color: #397da8 #ffffff #ffffff #397da8;
    color: #092661;
    font-size: 9px;
    gap: 2px;
    padding: 2px 3px;
  }

  body[data-ui-version="v2"] .desktop-return-button {
    min-height: 44px;
    max-width: 76px;
    padding: 2px 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .topbar {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
    border-width: 0;
    padding: 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .action-button,
  body[data-ui-version="v2"][data-scene="expedition"] .field-trace-actions button,
  body[data-ui-version="v2"] .hub-actions .registration-submit {
    min-height: 44px;
  }
}

@media (max-width: 390px) {
  body[data-ui-version="v2"] .desktop-task-status time {
    display: block;
    font-size: 9px;
    min-width: 28px;
  }
}

@media (max-width: 620px) and (max-height: 680px) {
  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon-grid {
    top: 202px;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-icon {
    min-height: 98px;
  }

  body[data-ui-version="v2"] .mobile-phone-clock {
    font-size: 50px;
    top: 78px;
  }

  body[data-ui-version="v2"] .mobile-phone-notice {
    top: 142px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-ui-version="v2"] *,
  body[data-ui-version="v2"] *::before,
  body[data-ui-version="v2"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/*
 * Viewer対象デスクトップ
 * ----------------------
 * 安全なランチャーと接続中の現場は同じ既存階層画像を使いつつ、
 * 端末枠と操作状態を明確に分ける。現場用規則は
 * data-scene="expedition" 配下へ閉じ、既存6アプリへ影響させない。
 */
body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell {
  background:
    linear-gradient(180deg, rgba(20, 91, 154, 0.68), rgba(44, 113, 163, 0.46) 56%, rgba(23, 78, 61, 0.7)),
    url("/assets/levels/level0-lobby.png") 50% 52% / cover no-repeat;
}

body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell::before {
  background:
    linear-gradient(90deg, rgba(8, 45, 91, 0.2), transparent 28% 72%, rgba(8, 45, 91, 0.18)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
}

body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell::after {
  background:
    linear-gradient(180deg, transparent, rgba(4, 36, 45, 0.28)),
    repeating-linear-gradient(90deg, transparent 0 33px, rgba(211, 245, 238, 0.06) 34px 35px);
  height: 34%;
}

body[data-ui-version="v2"][data-scene="expedition"] {
  --viewer-alert: #d72b25;
  --viewer-alert-deep: #5f0909;
  --viewer-ink: #101010;
  --viewer-link: #92f0ff;
  --viewer-panel-glass: rgba(236, 233, 216, 0.96);
  background: #06111c;
}

body[data-ui-version="v2"][data-scene="expedition"] .status-panel,
body[data-ui-version="v2"][data-scene="expedition"] .record-panel {
  display: none !important;
}

body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
  background: #05090d;
  min-width: 0;
  position: relative;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-panel > .window-titlebar {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #071b49, #174f91 62%, #356f9a);
  border-bottom: 1px solid #9dbbe0;
  box-shadow: 0 1px 0 #071632;
  min-height: 30px;
  position: relative;
  z-index: 40;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame {
  background:
    radial-gradient(circle at 50% 40%, #263542, #020508 78%);
  border: 0;
  isolation: isolate;
  margin: 0;
  min-width: 0;
  position: relative;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame::before {
  background:
    var(--viewer-wallpaper, url("/assets/levels/level0-lobby.png"))
    center / cover no-repeat;
  content: "";
  filter: blur(18px) saturate(0.78) brightness(0.68);
  inset: -24px;
  opacity: 0.92;
  pointer-events: none;
  position: absolute;
  transform: scale(1.08);
  z-index: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame > #sceneImage {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  transform: scale(1.012);
  width: 100%;
  z-index: 1;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame::after {
  background:
    linear-gradient(180deg, rgba(1, 8, 15, 0.18), transparent 18% 72%, rgba(0, 6, 12, 0.56)),
    repeating-linear-gradient(180deg, rgba(218, 239, 255, 0.07) 0 1px, transparent 1px 4px);
  content: "";
  inset: 0;
  opacity: 1;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-field-layer {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-link-noise {
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(121, 202, 221, 0.035) 48px 49px),
    linear-gradient(90deg, rgba(3, 18, 31, 0.2), transparent 16% 84%, rgba(3, 18, 31, 0.28));
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  left: 9px;
  pointer-events: none;
  position: absolute;
  right: 9px;
  top: 8px;
  z-index: 5;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud > span {
  align-items: center;
  background: rgba(0, 8, 16, 0.86);
  border: 1px solid rgba(142, 205, 224, 0.72);
  box-shadow: inset 0 0 0 1px rgba(5, 50, 74, 0.8);
  color: #d9f8ff;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  min-height: 28px;
  min-width: 64px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud b,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud i {
  align-items: center;
  display: inline-flex;
  font-style: normal;
  min-height: 26px;
  padding: 3px 6px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud b {
  background: #12396a;
  color: #ffffff;
  letter-spacing: 0.05em;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud i {
  color: #baf5ff;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-grid {
  align-content: start;
  display: grid;
  gap: 8px 7px;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  position: absolute;
  scrollbar-color: rgba(216, 233, 240, 0.76) rgba(0, 20, 34, 0.62);
  z-index: 4;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  gap: 2px;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
  padding: 5px 3px 4px;
  position: relative;
  text-shadow: 1px 1px 2px #000000, -1px -1px 1px rgba(0, 0, 0, 0.65);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object:hover,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-object:focus-visible {
  background: rgba(15, 72, 136, 0.58);
  border-color: rgba(231, 248, 255, 0.88);
  outline: 1px dotted #ffffff;
  outline-offset: -4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object[aria-selected="true"] {
  background: rgba(11, 63, 126, 0.78);
  border-color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(95, 173, 237, 0.9),
    2px 3px 0 rgba(0, 8, 24, 0.68);
  outline: 1px dotted #ffffff;
  outline-offset: -4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-label {
  display: -webkit-box;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.12;
  max-width: 100%;
  min-height: 2.24em;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-source {
  background: rgba(0, 22, 38, 0.86);
  border: 1px solid currentColor;
  color: #c5e9f4;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 2px 4px;
  text-shadow: none;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object[data-source-kind="LIVE"] .viewer-object-source {
  background: #064c2f;
  color: #baffd9;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object[data-source-kind="TRACE"] .viewer-object-source {
  background: #624600;
  color: #fff2a0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object[data-source-kind="ARCHIVE"] .viewer-object-source {
  background: #173f83;
  color: #d7eaff;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object[data-source-kind="ECHO"] .viewer-object-source {
  background: #6f0909;
  color: #ffd6d6;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object::after {
  align-items: center;
  background: #303030;
  border: 1px solid #ffffff;
  color: #ffffff;
  display: flex;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 1px 3px;
  position: absolute;
  right: 3px;
  text-shadow: none;
  top: 2px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-unread::after {
  background: #4b4b4b;
  content: "未";
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-analyzed::after {
  background: #174f91;
  content: "解";
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-experienced::after {
  background: #8b5800;
  content: "使";
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-confirmed::after {
  background: #17633e;
  content: "確";
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-unread .viewer-object-icon {
  filter: grayscale(0.62) contrast(0.9);
  opacity: 0.9;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object.stage-confirmed .viewer-object-icon {
  filter: drop-shadow(0 0 3px rgba(167, 255, 218, 0.72));
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-icon {
  display: block;
  flex: 0 0 auto;
  height: 44px;
  margin: 2px 0 1px;
  position: relative;
  width: 50px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-folder .viewer-object-icon {
  background: linear-gradient(180deg, #f8dc75, #bd8d2c);
  border: 2px solid #473514;
  box-shadow: inset 2px 2px #fff0a5, inset -2px -2px #866019;
  height: 34px;
  margin-top: 11px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-folder .viewer-object-icon::before {
  background: #d5aa43;
  border: 2px solid #473514;
  border-bottom: 0;
  content: "";
  height: 8px;
  left: 1px;
  position: absolute;
  top: -9px;
  width: 22px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-shortcut .viewer-object-icon,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-return .viewer-object-icon {
  background:
    linear-gradient(135deg, transparent 0 10px, #ffffff 10px) top right / 13px 13px no-repeat,
    linear-gradient(180deg, #ffffff, #d9e2e9);
  border: 2px solid #252525;
  box-shadow: inset 2px 2px #ffffff, inset -2px -2px #77848e;
  height: 43px;
  width: 35px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-shortcut .viewer-object-icon::before,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-return .viewer-object-icon::before {
  border-bottom: 4px solid #184d9a;
  border-left: 4px solid #184d9a;
  content: "";
  height: 10px;
  left: 6px;
  position: absolute;
  top: 19px;
  transform: skew(-18deg);
  width: 18px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-shortcut .viewer-object-icon::after,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-return .viewer-object-icon::after {
  border-bottom: 6px solid transparent;
  border-left: 8px solid #184d9a;
  border-top: 6px solid transparent;
  content: "";
  left: 20px;
  position: absolute;
  top: 13px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-return .viewer-object-icon {
  transform: scaleX(-1);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-package .viewer-object-icon {
  background:
    linear-gradient(90deg, transparent 0 42%, #dbc283 42% 58%, transparent 58%),
    linear-gradient(145deg, #c79b59, #8a5f2d);
  border: 2px solid #3c2915;
  box-shadow: inset 2px 2px rgba(255, 235, 181, 0.62), inset -2px -2px rgba(64, 37, 13, 0.5);
  height: 38px;
  margin-top: 6px;
  transform: perspective(60px) rotateX(-4deg);
  width: 48px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-package .viewer-object-icon::after {
  border-top: 2px solid rgba(61, 37, 15, 0.72);
  content: "";
  left: 2px;
  position: absolute;
  right: 2px;
  top: 11px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-terminal .viewer-object-icon {
  background: #202522;
  border: 2px solid #d4d0c8;
  box-shadow: 0 0 0 1px #101010, inset 3px 3px #090b0a, inset -3px -3px #555b57;
  height: 35px;
  margin-top: 4px;
  width: 49px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-terminal .viewer-object-icon::before {
  background:
    linear-gradient(90deg, #75dd9a 0 62%, transparent 62%) 6px 8px / 30px 2px no-repeat,
    linear-gradient(90deg, #75dd9a 0 42%, transparent 42%) 6px 15px / 30px 2px no-repeat,
    #092417;
  border: 1px solid #050505;
  content: "";
  inset: 5px 5px 7px;
  position: absolute;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-terminal .viewer-object-icon::after {
  background: #8a8a83;
  border: 1px solid #222222;
  bottom: -8px;
  content: "";
  height: 6px;
  left: 14px;
  position: absolute;
  width: 17px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-base .viewer-object-icon {
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(255, 255, 255, 0.72) 31% 36%, transparent 36% 64%, rgba(255, 255, 255, 0.72) 64% 69%, transparent 69%),
    linear-gradient(180deg, #7eb3d8, #255a8d);
  border: 2px solid #102c4e;
  box-shadow: inset 2px 2px #c9e9ff, inset -2px -2px #163c69;
  height: 40px;
  margin-top: 3px;
  width: 45px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-base .viewer-object-icon::after {
  background: #b9ffcf;
  border: 1px solid #123d25;
  bottom: 5px;
  content: "";
  height: 7px;
  left: 7px;
  position: absolute;
  right: 7px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-trace .viewer-object-icon {
  background:
    repeating-linear-gradient(180deg, transparent 0 7px, #6c7780 7px 9px),
    linear-gradient(180deg, #fffef2, #ced8dc);
  background-clip: padding-box;
  border: 2px solid #27343c;
  box-shadow: inset 2px 2px #ffffff, inset -2px -2px #77838a;
  height: 43px;
  width: 35px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-trace .viewer-object-icon::before {
  background: #a9bdc7;
  border-left: 1px solid #27343c;
  border-bottom: 1px solid #27343c;
  content: "";
  height: 10px;
  position: absolute;
  right: 0;
  top: 0;
  transform: skewY(45deg);
  transform-origin: top right;
  width: 10px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity {
  color: #ffdddd;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity[aria-selected="true"] {
  background: rgba(112, 0, 0, 0.82);
  border-color: #ffb0b0;
  box-shadow: inset 0 0 0 1px #d82b2b, 0 0 14px rgba(255, 31, 31, 0.48);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity .viewer-object-icon {
  animation: viewer-entity-pulse 1.15s steps(2, end) infinite;
  background:
    radial-gradient(circle at 50% 50%, #ffb8b8 0 10%, #8f1111 11% 24%, transparent 25%),
    linear-gradient(135deg, transparent 24%, #d82929 25% 34%, #180000 35% 65%, #d82929 66% 75%, transparent 76%);
  border: 2px solid #ff7777;
  box-shadow: 0 0 10px rgba(255, 31, 31, 0.72);
  height: 36px;
  margin-top: 5px;
  transform: rotate(3deg);
  width: 48px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity .viewer-object-icon::before,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity .viewer-object-icon::after {
  background: #ff7a7a;
  content: "";
  height: 2px;
  left: -6px;
  position: absolute;
  right: -6px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity .viewer-object-icon::before {
  top: 8px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-entity .viewer-object-icon::after {
  bottom: 7px;
}

@keyframes viewer-entity-pulse {
  0%,
  100% {
    translate: 0 0;
  }
  48% {
    translate: -2px 1px;
  }
  52% {
    translate: 2px -1px;
  }
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-recovery .viewer-object-icon {
  background:
    linear-gradient(135deg, transparent 0 10px, #c6e4ef 10px) top right / 13px 13px no-repeat,
    linear-gradient(180deg, #b8dbe9, #4d86a0);
  border: 2px solid #173849;
  box-shadow: inset 2px 2px #eaffff, inset -2px -2px #285a70;
  height: 43px;
  width: 36px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-recovery .viewer-object-icon::before {
  background:
    linear-gradient(153deg, transparent 0 43%, #7e1111 44% 52%, transparent 53%),
    repeating-linear-gradient(180deg, #244e60 0 2px, transparent 2px 6px);
  content: "";
  inset: 10px 5px 5px;
  position: absolute;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector {
  background: var(--viewer-panel-glass);
  border-color: #ffffff #343434 #343434 #ffffff;
  border-style: solid;
  border-width: 2px;
  box-shadow: 0 0 0 1px #10264c, 6px 7px 16px rgba(0, 8, 20, 0.54);
  color: var(--viewer-ink);
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 31px 7px 7px;
  z-index: 22;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector::before {
  align-items: center;
  background: linear-gradient(90deg, #123c85, #3974b7);
  color: #ffffff;
  content: "対象のプロパティ";
  display: flex;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  left: 3px;
  padding: 2px 6px;
  position: absolute;
  right: 3px;
  top: 3px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector.is-empty {
  color: #4c4c4c;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header {
  align-items: start;
  border-bottom: 1px solid #9b9788;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-bottom: 5px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header span {
  color: #184477;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header strong {
  color: #071c42;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header em {
  background: #fff7c6;
  border: 1px solid #806d36;
  color: #523d00;
  flex: 0 0 auto;
  font-size: 9px;
  font-style: normal;
  max-width: 106px;
  padding: 2px 4px;
  text-align: center;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dl {
  background: #ffffff;
  border-color: #565656 #ffffff #ffffff #565656;
  border-style: solid;
  border-width: 2px;
  display: grid;
  font-family: var(--mono);
  font-size: 10px;
  margin: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dt,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dd {
  border-bottom: 1px solid #c1c1c1;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 3px 5px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dt {
  background: #e6e3d3;
  color: #454545;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dd {
  border-left: 1px solid #c1c1c1;
  color: #0b2e57;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector-description {
  background: #ffffee;
  border-color: #595959 #ffffff #ffffff #595959;
  border-style: solid;
  border-width: 2px;
  font-size: 11px;
  margin: 0;
  padding: 6px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-trace-preview {
  background: #050805;
  border: 2px inset #d4d0c8;
  color: #88ff9f;
  display: grid;
  font-family: var(--mono);
  font-size: 10px;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 5px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions {
  background: rgba(216, 210, 189, 0.96);
  border-color: #ffffff #343434 #343434 #ffffff;
  border-style: solid;
  border-width: 2px;
  box-shadow: 0 0 0 1px #20354a, 5px 6px 14px rgba(0, 8, 20, 0.48);
  gap: 6px;
  min-width: 0;
  z-index: 24;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .direction-pad,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .direction-legend,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .base-actions {
  display: none !important;
}

body[data-ui-version="v2"][data-scene="expedition"] .shop-toggle-button {
  display: none !important;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-actions,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock {
  background: #ece9d8;
  border-color: #777777 #ffffff #ffffff #777777;
  border-style: solid;
  border-width: 1px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 5px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-selection-state,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock-heading {
  align-items: baseline;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  min-width: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-selection-state strong,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock-heading strong {
  color: #000080;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-selection-state span,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock-heading span {
  color: #5b4a00;
  font-size: 9px;
  text-align: right;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-buttons,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-buttons {
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button {
  background: #ece9d8;
  border-color: #ffffff #363636 #363636 #ffffff;
  border-style: solid;
  border-width: 2px;
  color: #111111;
  cursor: pointer;
  font-family: var(--font);
  min-height: 44px;
  padding: 4px 6px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button:hover:not(:disabled),
body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button:focus-visible {
  background: #fff7c5;
  color: #000080;
  outline: 1px dotted #000000;
  outline-offset: -4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button:active:not(:disabled) {
  border-color: #363636 #ffffff #ffffff #363636;
  padding: 5px 5px 3px 7px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button.primary {
  color: #0000a8;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button.photo {
  color: #075c3d;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button:disabled {
  color: #777777;
  cursor: default;
  filter: grayscale(0.45);
  opacity: 0.72;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .field-tool {
  --cooldown-fill: 0%;
  background:
    linear-gradient(to top, rgba(16, 72, 131, 0.28) var(--cooldown-fill), transparent var(--cooldown-fill)),
    #ece9d8;
  align-content: center;
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-code {
  color: #0b4777;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-name {
  font-size: 10px;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-status {
  color: #555555;
  font-family: var(--mono);
  font-size: 9px;
}

body[data-ui-version="v2"][data-scene="expedition"] .combat-strip:not(.hidden) {
  background:
    repeating-linear-gradient(135deg, rgba(123, 0, 0, 0.28) 0 8px, transparent 8px 16px),
    rgba(11, 2, 2, 0.96);
  border: 2px solid #ff7777;
  box-shadow: 0 0 0 2px #5b0000, 0 0 18px rgba(255, 25, 25, 0.44);
  color: #ffe4e4;
  z-index: 35;
}

body[data-ui-version="v2"][data-scene="expedition"] .pursuit-title {
  color: #ffb2b2;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame:has(.viewer-object-entity) .viewer-link-noise {
  border: 2px solid rgba(255, 62, 62, 0.72);
  box-shadow: inset 0 0 52px rgba(136, 0, 0, 0.48);
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame:has(.viewer-object-entity) .viewer-link-noise::after {
  background: #8a0000;
  border: 1px solid #ffaaaa;
  color: #ffffff;
  content: "CONTACT / ECHO";
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  position: absolute;
  right: 10px;
  top: 44px;
}

body[data-ui-version="v2"][data-scene="expedition"] .scene-frame:has(> #sceneImage.tone-alert) .viewer-hud > span {
  border-color: rgba(255, 127, 95, 0.9);
}

@media (min-width: 621px) {
  body[data-ui-version="v2"][data-scene="expedition"] {
    height: 100dvh;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
    border: 0;
    height: calc(100dvh - var(--desktop-taskbar-height));
    margin: 0;
    max-width: none;
    min-height: 0;
    padding: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-surface,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-window,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content,
  body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
    height: 100%;
    min-height: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content {
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame {
    aspect-ratio: auto;
    grid-row: 2;
    height: 100%;
    min-height: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-grid {
    bottom: 164px;
    grid-auto-rows: minmax(88px, max-content);
    grid-template-columns: repeat(auto-fill, minmax(92px, 108px));
    left: 12px;
    right: clamp(304px, 28vw, 370px);
    top: 48px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object {
    min-height: 88px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector {
    max-height: calc(100% - 208px);
    overflow: auto;
    position: absolute;
    right: 12px;
    top: 70px;
    width: clamp(286px, 27vw, 350px);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions {
    bottom: 10px;
    display: grid;
    grid-template-columns: minmax(290px, 0.85fr) minmax(410px, 1.15fr);
    left: 10px;
    margin: 0;
    padding: 6px;
    position: absolute;
    right: 10px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy {
    background: rgba(255, 255, 238, 0.94);
    bottom: 160px;
    gap: 2px;
    left: 11px;
    margin: 0;
    max-height: 112px;
    max-width: min(42vw, 500px);
    overflow: auto;
    padding: 5px 7px;
    position: absolute;
    width: max-content;
    z-index: 17;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy h1 {
    font-size: 15px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy #sceneText {
    font-size: 10.5px;
    line-height: 1.25;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-feed {
    height: auto;
    max-height: 45px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .shop-toggle-button {
    bottom: auto;
    right: 14px;
    top: 50px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .shop-inline-slot.active {
    bottom: 162px;
    margin: 0;
    max-height: calc(100% - 240px);
    overflow: auto;
    position: absolute;
    right: 12px;
    top: 70px;
    width: min(390px, calc(100% - 24px));
    z-index: 32;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip:not(.hidden) {
    left: auto;
    margin: 0;
    max-height: min(36dvh, 280px);
    overflow: auto;
    position: absolute;
    right: 12px;
    top: 70px;
    transform: none;
    width: clamp(286px, 27vw, 350px);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-enemy {
    grid-template-columns: minmax(96px, 1fr) repeat(3, auto);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-hp,
  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-timer {
    min-width: 42px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-effects {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip .pursuit-guard {
    grid-column: 1 / -1;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel:has(.combat-strip:not(.hidden)) .viewer-inspector {
    max-height: calc(100% - 242px - min(36dvh, 280px));
    top: calc(78px + min(36dvh, 280px));
  }
}

@media (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell {
    background:
      linear-gradient(180deg, rgba(248, 253, 255, 0.84), rgba(217, 244, 255, 0.72) 58%, rgba(106, 196, 224, 0.68)),
      url("/assets/levels/level0-lobby.png") 51% 54% / cover no-repeat;
  }

  body[data-ui-version="v2"][data-scene="desktop"] .desktop-shell::before {
    background:
      repeating-linear-gradient(180deg, rgba(15, 78, 143, 0.035) 0 1px, transparent 1px 4px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.62), transparent 24% 76%, rgba(255, 255, 255, 0.62));
  }

  body[data-ui-version="v2"][data-scene="expedition"] {
    background:
      repeating-linear-gradient(180deg, rgba(8, 43, 88, 0.045) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #dff6ff, #8dcde8);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
    background: #d9eef6;
    border: 0;
    height: auto;
    margin: 0;
    max-width: 100%;
    min-height: calc(100dvh - var(--desktop-taskbar-height));
    overflow-x: hidden;
    padding: 0 0 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-surface,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-window,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content,
  body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
    height: auto;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content {
    padding: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
    background:
      linear-gradient(180deg, rgba(250, 254, 255, 0.96), rgba(193, 232, 247, 0.95));
    border-color: #ffffff #236591 #236591 #ffffff;
    display: block !important;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel > .window-titlebar {
    background:
      repeating-linear-gradient(180deg, rgba(9, 47, 116, 0.045) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #f8fcff, #cce9ff);
    border-bottom: 2px solid #2769a8;
    color: #092661;
    min-height: 44px;
    padding: 3px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel > .window-titlebar .window-buttons i {
    background: linear-gradient(180deg, #ffffff, #d6f0ff);
    border-color: #ffffff #245787 #245787 #ffffff;
    height: 18px;
    width: 20px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame {
    aspect-ratio: 4 / 3;
    background:
      radial-gradient(ellipse at center, rgba(65, 123, 151, 0.76), rgba(7, 22, 35, 0.96)),
      #071522;
    border-color: #0a3459 #ffffff #ffffff #0a3459;
    border-style: solid;
    border-width: 2px;
    height: auto;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame > #sceneImage {
    object-fit: contain;
    transform: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-link-noise {
    backdrop-filter: saturate(0.84);
    background:
      linear-gradient(90deg, rgba(8, 31, 49, 0.34), transparent 8% 92%, rgba(8, 31, 49, 0.34)),
      repeating-linear-gradient(180deg, rgba(224, 246, 255, 0.055) 0 1px, transparent 1px 4px);
    box-shadow:
      inset 18px 0 22px rgba(6, 22, 37, 0.32),
      inset -18px 0 22px rgba(6, 22, 37, 0.32);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 3px;
    right: 3px;
    top: 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud > span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 24px;
    min-width: 0;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud b,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud i {
    min-height: 22px;
    min-width: 0;
    overflow: hidden;
    padding: 2px 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud b {
    font-size: 7px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud i {
    font-size: 8px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-grid {
    bottom: 4px;
    gap: 2px;
    grid-auto-rows: minmax(65px, auto);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 3px;
    padding-right: 1px;
    right: 3px;
    top: 55px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object {
    gap: 1px;
    min-height: 65px;
    padding: 2px 1px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-icon {
    height: 36px;
    margin: 0;
    scale: 0.78;
    transform-origin: center bottom;
    width: 45px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-folder .viewer-object-icon {
    margin-top: 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-label {
    font-size: clamp(8px, 2.55vw, 10px);
    line-height: 1.08;
    min-height: 2.16em;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-source {
    font-size: 7px;
    padding: 1px 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object::after {
    font-size: 7px;
    height: 16px;
    min-width: 16px;
    right: 2px;
    top: 1px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector {
    box-shadow: 2px 3px 0 rgba(20, 67, 98, 0.34);
    margin: 4px;
    max-height: clamp(128px, 21dvh, 180px);
    overflow: auto;
    padding: 33px 6px 6px;
    position: relative;
    right: auto;
    top: auto;
    width: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector::before {
    background:
      repeating-linear-gradient(180deg, rgba(9, 47, 116, 0.045) 0 1px, transparent 1px 3px),
      linear-gradient(180deg, #f8fcff, #cce9ff);
    border-bottom: 1px solid #2769a8;
    color: #092661;
    height: 26px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector > header em {
    max-width: none;
    min-height: 24px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector dl > div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy {
    gap: 3px;
    margin: 4px;
    max-height: 76px;
    max-width: calc(100% - 8px);
    overflow: auto;
    padding: 5px 6px;
    position: static;
    width: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy h1 {
    font-size: 15px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-copy #sceneText {
    font-size: 10.5px;
    line-height: 1.3;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-feed {
    height: auto;
    max-height: 72px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 4px;
    max-width: calc(100% - 8px);
    padding: 4px;
    position: static;
    width: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-actions,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock {
    padding: 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-selection-state,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock-heading {
    align-items: start;
    display: grid;
    gap: 1px;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-selection-state span,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-dock-heading span {
    text-align: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-buttons {
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button {
    font-size: 11px;
    min-height: 44px;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 3px 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-code,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-name,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons .tool-status {
    font-size: 8.5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .shop-toggle-button {
    bottom: 6px;
    min-height: 44px;
    right: 6px;
    top: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .shop-inline-slot.active {
    margin: 4px;
    max-height: none;
    overflow: visible;
    position: static;
    width: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .combat-strip:not(.hidden) {
    margin: 4px;
    max-height: none;
    overflow: visible;
    position: static;
    transform: none;
    width: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .pursuit-enemy {
    grid-template-columns: minmax(116px, 1fr) repeat(2, auto);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .pursuit-effects,
  body[data-ui-version="v2"][data-scene="expedition"] .pursuit-timer.danger {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .pursuit-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .pursuit-guard {
    grid-column: 1 / -1;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame:has(.viewer-object-entity) .viewer-link-noise::after {
    font-size: 8px;
    right: 4px;
    top: 52px;
  }
}

@media (max-width: 360px) {
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-grid {
    top: 79px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-tool-buttons {
    gap: 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-actions .action-button {
    font-size: 10px;
  }
}

/*
 * OS探索UI
 * --------
 * 接続中のViewerは、PCでは直接操作できるデスクトップ、携帯幅では
 * 画面スタック式の業務用ガラケーとして描画する。旧来の汎用動詞パネルは
 * 読み上げ用情報を除いて表示しない。
 */
body[data-ui-version="v2"][data-scene="expedition"] {
  --viewer-taskbar-height: 32px;
  --viewer-titlebar-blue: #0a2f83;
  --viewer-titlebar-blue-light: #2f6dbd;
  --viewer-window-face: #ece9d8;
  --viewer-window-shadow: #404040;
  --viewer-window-highlight: #ffffff;
  --viewer-phone-ink: #09243a;
  --viewer-phone-lcd: #c7e9ee;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-main-titlebar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-main-caption {
  color: #d4e8ff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-windows-desktop,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-viewport {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-windows-desktop {
  display: block;
  z-index: 3;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-viewport {
  display: none;
  z-index: 4;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-environment-effect {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-environment-effect::before,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-environment-effect::after {
  content: "";
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 220ms steps(3, end);
}

body[data-ui-version="v2"][data-scene="expedition"][data-viewer-visual~="lit"]
  .viewer-environment-effect::before {
  background:
    radial-gradient(ellipse at 54% 42%, rgba(255, 246, 183, 0.42), transparent 44%),
    linear-gradient(180deg, rgba(237, 250, 255, 0.18), transparent 68%);
  inset: 0;
  opacity: 1;
}

body[data-ui-version="v2"][data-scene="expedition"][data-viewer-visual~="signal"]
  .viewer-environment-effect::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(93, 234, 255, 0.2) 53px 54px),
    linear-gradient(90deg, transparent, rgba(49, 206, 255, 0.16), transparent);
  inset: 0;
  opacity: 0.9;
}

body[data-ui-version="v2"][data-scene="expedition"][data-viewer-visual~="entity"]
  .viewer-environment-effect::after {
  animation: viewer-entity-shadow 1.8s steps(2, end) infinite;
  background:
    radial-gradient(ellipse at center 28%, rgba(0, 0, 0, 0.94) 0 8%, transparent 9%),
    radial-gradient(ellipse at center 66%, rgba(0, 0, 0, 0.88) 0 17%, transparent 18%);
  bottom: 5%;
  filter: blur(2px);
  height: 64%;
  opacity: 0.76;
  right: 7%;
  transform-origin: bottom center;
  width: 21%;
}

@keyframes viewer-entity-shadow {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: -3px 1px;
  }
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-layer,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-menu,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-toast-stack,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-scene-taskbar {
  pointer-events: auto;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-layer {
  inset: 34px 0 var(--viewer-taskbar-height);
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 12;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window,
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-window-id] {
  background: var(--viewer-window-face);
  border-color: var(--viewer-window-highlight) var(--viewer-window-shadow)
    var(--viewer-window-shadow) var(--viewer-window-highlight);
  border-style: solid;
  border-width: 2px;
  box-shadow:
    0 0 0 1px #171717,
    7px 8px 18px rgba(0, 0, 0, 0.42);
  color: #111111;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100% - 20px);
  max-width: calc(100% - 20px);
  min-height: 190px;
  min-width: 280px;
  overflow: hidden;
  pointer-events: auto;
  position: absolute;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window[data-active="false"],
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-window-id][data-active="false"] {
  filter: saturate(0.72);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window[data-window-state="minimized"],
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-window-id][data-window-state="minimized"] {
  display: none;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-titlebar,
body[data-ui-version="v2"][data-scene="expedition"] [data-window-titlebar] {
  align-items: center;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, var(--viewer-titlebar-blue), var(--viewer-titlebar-blue-light));
  color: #ffffff;
  cursor: default;
  display: grid;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 27px;
  padding: 2px 3px 2px 6px;
  user-select: none;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-title,
body[data-ui-version="v2"][data-scene="expedition"] [data-window-title] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-controls {
  display: flex;
  gap: 2px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-controls button,
body[data-ui-version="v2"][data-scene="expedition"] [data-window-action] {
  align-items: center;
  background: var(--viewer-window-face);
  border-color: #ffffff #202020 #202020 #ffffff;
  border-style: solid;
  border-width: 2px;
  color: #101010;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 11px;
  height: 21px;
  justify-content: center;
  min-width: 23px;
  padding: 0 4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-content,
body[data-ui-version="v2"][data-scene="expedition"] [data-window-content] {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-toolbar,
body[data-ui-version="v2"][data-scene="expedition"] [data-explorer-toolbar] {
  align-items: center;
  background: var(--viewer-window-face);
  border-bottom: 1px solid #888576;
  display: grid;
  gap: 4px;
  grid-template-columns: auto auto minmax(0, 1fr);
  padding: 4px;
  position: sticky;
  top: 0;
  z-index: 2;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-toolbar button,
body[data-ui-version="v2"][data-scene="expedition"] [data-explorer-action] {
  background: var(--viewer-window-face);
  border-color: #ffffff #353535 #353535 #ffffff;
  border-style: solid;
  border-width: 2px;
  min-height: 28px;
  padding: 2px 7px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-address,
body[data-ui-version="v2"][data-scene="expedition"] [data-explorer-address] {
  background: #ffffff;
  border-color: #404040 #ffffff #ffffff #404040;
  border-style: solid;
  border-width: 2px;
  font-family: var(--mono);
  font-size: 10px;
  min-height: 27px;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-file-list,
body[data-ui-version="v2"][data-scene="expedition"] [data-file-list] {
  align-content: start;
  background: #ffffff;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  min-height: 150px;
  padding: 8px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-file-entry,
body[data-ui-version="v2"][data-scene="expedition"] [data-file-entry-id] {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: #111111;
  display: grid;
  font-family: var(--font);
  font-size: 11px;
  gap: 4px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 44px;
  padding: 4px;
  text-align: left;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-file-entry:hover,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-file-entry:focus-visible,
body[data-ui-version="v2"][data-scene="expedition"] [data-file-entry-id]:hover,
body[data-ui-version="v2"][data-scene="expedition"] [data-file-entry-id]:focus-visible {
  background: #dceaff;
  border-color: #1459aa;
  outline: 1px dotted #000000;
  outline-offset: -3px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-file-icon {
  align-items: center;
  background: #f5f2dc;
  border: 1px solid #384b5c;
  color: #173e64;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 26px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-document,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties,
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-document] {
  background: #fffff4;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  min-height: 100%;
  padding: 12px;
  white-space: pre-wrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties {
  display: grid;
  gap: 6px;
  white-space: normal;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties dl {
  display: grid;
  margin: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties dl > div {
  border-bottom: 1px solid #bbb7a6;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties dt,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties dd {
  margin: 0;
  overflow-wrap: anywhere;
  padding: 4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-properties dt {
  background: #dedac7;
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-viewer,
body[data-ui-version="v2"][data-scene="expedition"] [data-media-viewer] {
  background: #030608;
  color: #d9eff8;
  display: grid;
  gap: 7px;
  grid-template-rows: minmax(120px, 1fr) auto auto;
  min-height: 100%;
  padding: 8px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-frame {
  background: #000000;
  border: 1px solid #6b8490;
  min-height: 130px;
  overflow: hidden;
  position: relative;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-frame::after {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-controls,
body[data-ui-version="v2"][data-scene="expedition"] [data-media-controls] {
  display: flex;
  gap: 4px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-media-controls button,
body[data-ui-version="v2"][data-scene="expedition"] [data-media-action] {
  min-height: 30px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-app-panel,
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-application] {
  background: #d4d0c8;
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 8px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-app-display {
  background: #07140d;
  border-color: #343434 #ffffff #ffffff #343434;
  border-style: solid;
  border-width: 2px;
  color: #73ff9a;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  min-height: 88px;
  padding: 8px;
  white-space: pre-wrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-app-actions,
body[data-ui-version="v2"][data-scene="expedition"] [data-app-actions] {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-app-actions button,
body[data-ui-version="v2"][data-scene="expedition"] [data-app-command] {
  background: var(--viewer-window-face);
  border-color: #ffffff #353535 #353535 #ffffff;
  border-style: solid;
  border-width: 2px;
  min-height: 38px;
  padding: 4px 7px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-menu,
body[data-ui-version="v2"][data-scene="expedition"] [data-context-menu] {
  background: var(--viewer-window-face);
  border-color: #ffffff #292929 #292929 #ffffff;
  border-style: solid;
  border-width: 2px;
  box-shadow: 4px 5px 12px rgba(0, 0, 0, 0.48);
  color: #101010;
  display: grid;
  min-width: 210px;
  padding: 3px;
  position: absolute;
  z-index: 80;
}

body[data-ui-version="v2"][data-scene="expedition"] [data-context-menu][hidden] {
  display: none !important;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-menu button,
body[data-ui-version="v2"][data-scene="expedition"] [data-context-action] {
  align-items: start;
  background: transparent;
  border: 0;
  color: #111111;
  display: grid;
  font-family: var(--font);
  font-size: 11px;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 30px;
  padding: 5px 18px 5px 7px;
  text-align: left;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-menu button:hover,
body[data-ui-version="v2"][data-scene="expedition"] .viewer-context-menu button:focus-visible,
body[data-ui-version="v2"][data-scene="expedition"] [data-context-action]:hover,
body[data-ui-version="v2"][data-scene="expedition"] [data-context-action]:focus-visible {
  background: #0b4da2;
  color: #ffffff;
  outline: 0;
}

body[data-ui-version="v2"][data-scene="expedition"] [data-context-action][aria-disabled="true"] {
  color: #6d6d6d;
}

body[data-ui-version="v2"][data-scene="expedition"] [data-context-action] small {
  font-size: 9px;
  opacity: 0.82;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-toast-stack {
  bottom: calc(var(--viewer-taskbar-height) + 8px);
  display: grid;
  gap: 5px;
  justify-items: end;
  max-width: min(420px, calc(100% - 16px));
  position: absolute;
  right: 8px;
  z-index: 90;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-toast,
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-toast] {
  background: #ffffdc;
  border: 2px solid #263c55;
  box-shadow: 4px 5px 10px rgba(0, 0, 0, 0.42);
  color: #17293b;
  display: grid;
  font-size: 11px;
  gap: 2px;
  min-width: 240px;
  padding: 7px 9px;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-toast[data-tone="danger"],
body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-toast][data-tone="danger"] {
  background: #ffe1df;
  border-color: #8f1717;
  color: #5f0909;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-scene-taskbar {
  align-items: center;
  background: linear-gradient(180deg, #285fa9, #123e80);
  border-top: 1px solid #8db6e6;
  bottom: 0;
  color: #ffffff;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  height: var(--viewer-taskbar-height);
  left: 0;
  padding: 2px 4px;
  position: absolute;
  right: 0;
  z-index: 70;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-scene-start,
body[data-ui-version="v2"][data-scene="expedition"] [data-task-window-id] {
  background: linear-gradient(180deg, #568fd3, #245a9c);
  border-color: #91b9e9 #0f3264 #0f3264 #91b9e9;
  border-style: solid;
  border-width: 2px;
  color: #ffffff;
  font-family: var(--font);
  font-size: 10px;
  min-height: 25px;
  overflow: hidden;
  padding: 2px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-scene-start {
  background: linear-gradient(180deg, #4ba653, #246b30);
  font-weight: 700;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-window-tasks {
  display: flex;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

body[data-ui-version="v2"][data-scene="expedition"] [data-task-window-id][aria-pressed="true"] {
  background: #153c76;
  border-color: #0d2954 #7fa9d8 #7fa9d8 #0d2954;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-process-state {
  background: #0a613e;
  border: 1px solid #a8efcc;
  font-family: var(--mono);
  font-size: 9px;
  padding: 3px 6px;
}

body[data-ui-version="v2"][data-scene="expedition"][data-viewer-visual~="entity"]
  .viewer-process-state {
  animation: viewer-process-alert 900ms steps(2, end) infinite;
  background: #8b0c0c;
  border-color: #ffaaaa;
}

@keyframes viewer-process-alert {
  50% {
    color: #ffef7a;
  }
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-controls {
  display: none;
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-inspector,
body[data-ui-version="v2"][data-scene="expedition"] .scene-copy,
body[data-ui-version="v2"][data-scene="expedition"] .combat-strip,
body[data-ui-version="v2"][data-scene="expedition"] .shop-toggle-button {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

@media (min-width: 621px) {
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object-grid {
    bottom: calc(var(--viewer-taskbar-height) + 8px);
    gap: 6px;
    grid-auto-flow: column;
    grid-auto-columns: 104px;
    grid-template-columns: none;
    grid-template-rows: repeat(5, minmax(86px, max-content));
    left: 9px;
    max-width: calc(100% - 18px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    right: auto;
    top: 44px;
    width: max-content;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-object {
    min-height: 84px;
    width: 102px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window,
  body[data-ui-version="v2"][data-scene="expedition"] [data-viewer-window-id] {
    height: min(390px, calc(100% - 22px));
    left: var(--viewer-window-x, 23%);
    top: var(--viewer-window-y, 7%);
    width: min(560px, calc(100% - 22px));
  }
}

@media (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="expedition"] {
    --desktop-taskbar-height: 34px;
    background:
      radial-gradient(circle at 50% 16%, rgba(95, 157, 190, 0.34), transparent 36%),
      linear-gradient(180deg, #071724, #02070b);
    height: 100dvh;
    overflow: hidden;
    padding-bottom: var(--desktop-taskbar-height);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .app-shell {
    background: transparent;
    height: calc(100dvh - var(--desktop-taskbar-height));
    min-height: 0;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-shell,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-surface,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-window,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-app-content,
  body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
    box-sizing: border-box;
    height: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .game-layout {
    display: block;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 9% 91%, rgba(255, 255, 255, 0.05)),
      linear-gradient(180deg, #26333b, #12191e);
    border: 1px solid #3d515e;
    border-radius: 22px 22px 14px 14px;
    box-shadow:
      inset 0 0 0 3px #080d11,
      inset 0 0 18px rgba(147, 191, 212, 0.18);
    display: grid !important;
    grid-template-rows: 31px minmax(0, 1fr) auto;
    height: 100%;
    margin: 0 auto;
    max-width: 430px;
    padding: 7px 8px 8px;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel > .viewer-main-titlebar {
    background: transparent;
    border: 0;
    color: #adc7d2;
    font-family: var(--mono);
    font-size: 9px;
    justify-content: center;
    min-height: 29px;
    padding: 2px 4px;
    text-align: center;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-main-caption {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame {
    aspect-ratio: auto;
    background: #07141a;
    border-color: #050708 #8fa3aa #8fa3aa #050708;
    border-radius: 5px;
    border-style: solid;
    border-width: 3px;
    grid-row: 2;
    height: 100%;
    min-height: 210px;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-frame > #sceneImage {
    filter: contrast(0.9) saturate(0.72);
    object-fit: cover;
    opacity: 0.62;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-windows-desktop {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-viewport {
    background:
      linear-gradient(180deg, rgba(216, 246, 249, 0.14), transparent 22%),
      rgba(115, 179, 186, 0.24);
    color: var(--viewer-phone-ink);
    display: block;
    pointer-events: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-linkbar {
    align-items: center;
    background: rgba(196, 234, 238, 0.94);
    border-bottom: 1px solid #3d6770;
    display: flex;
    font-family: var(--mono);
    font-size: 8.5px;
    font-weight: 700;
    gap: 4px;
    justify-content: space-between;
    left: 0;
    min-height: 25px;
    overflow: hidden;
    padding: 3px 5px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 5;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-linkbar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-object-grid {
    align-content: start;
    bottom: 21px;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 2px;
    overflow: auto;
    padding: 5px 3px;
    position: absolute;
    right: 2px;
    top: 25px;
    z-index: 3;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-object,
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-object-id] {
    align-items: center;
    appearance: none;
    background: rgba(190, 229, 232, 0.72);
    border: 1px solid transparent;
    color: #09243a;
    display: grid;
    font-family: var(--font);
    font-size: 8.5px;
    gap: 2px;
    justify-items: center;
    min-height: 58px;
    overflow: hidden;
    padding: 3px 2px;
    text-shadow: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-object[aria-selected="true"],
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-object-id][aria-selected="true"] {
    background: #0b4d75;
    border-color: #e6ffff;
    color: #ffffff;
    outline: 1px dotted #ffffff;
    outline-offset: -3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-screen-layer {
    inset: 25px 0 21px;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    z-index: 10;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-screen,
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-screen] {
    background: rgba(202, 235, 237, 0.98);
    color: var(--viewer-phone-ink);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    inset: 0;
    overflow: hidden;
    pointer-events: auto;
    position: absolute;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-screen header,
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-screen] > header {
    align-items: center;
    background: #1a5970;
    color: #ffffff;
    display: flex;
    font-family: var(--mono);
    font-size: 9px;
    gap: 5px;
    justify-content: space-between;
    min-height: 28px;
    padding: 3px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-screen-body,
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-screen-body] {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-list {
    display: grid;
    gap: 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-list button,
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-list-item] {
    background: rgba(240, 255, 255, 0.72);
    border: 1px solid #668b91;
    color: #0b2933;
    font-size: 10px;
    min-height: 44px;
    padding: 5px 7px;
    text-align: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-list button[aria-selected="true"],
  body[data-ui-version="v2"][data-scene="expedition"] [data-phone-list-item][aria-selected="true"] {
    background: #0b4d75;
    color: #ffffff;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-context-menu {
    background: rgba(205, 239, 240, 0.99);
    border: 1px solid #244d58;
    inset: 27px 3px 23px;
    min-width: 0;
    overflow: auto;
    padding: 3px;
    position: absolute;
    z-index: 30;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-context-menu button,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-context-menu [data-context-action] {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #83a7aa;
    color: #092936;
    display: grid;
    font-size: 10px;
    min-height: 44px;
    padding: 6px;
    text-align: left;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-context-menu button:focus-visible,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-context-menu [aria-selected="true"] {
    background: #0b4d75;
    color: #ffffff;
    outline: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-toast {
    background: #fffbd1;
    border: 1px solid #4d5250;
    bottom: 22px;
    color: #182b2d;
    display: none;
    font-size: 9px;
    left: 4px;
    padding: 5px;
    position: absolute;
    right: 4px;
    z-index: 40;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-toast:not(:empty) {
    display: block;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-controls {
    align-content: start;
    background:
      radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.08), transparent 34%),
      #1c272d;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 5px;
    grid-row: 3;
    margin: 0;
    padding: 5px 6px 3px;
    position: static;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-selection {
    color: #b7d0d8;
    font-family: var(--mono);
    font-size: 8px;
    margin: 0;
    min-height: 10px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-softkeys {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-softkeys button,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad button,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-number-keys button {
    background: linear-gradient(180deg, #536570, #26363f);
    border: 1px solid #71848d;
    border-radius: 12px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
    color: #e8f1f4;
    font-family: var(--font);
    min-height: 44px;
    padding: 2px 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-softkeys button {
    border-radius: 16px 16px 9px 9px;
    font-size: 9px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad {
    display: grid;
    gap: 2px;
    grid-template-areas:
      ". up ."
      "left enter right"
      ". down .";
    grid-template-columns: repeat(3, minmax(44px, 58px));
    justify-content: center;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad [data-phone-key="up"] {
    grid-area: up;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad [data-phone-key="left"] {
    grid-area: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad [data-phone-key="enter"] {
    background: linear-gradient(180deg, #7795a4, #3d5662);
    border-radius: 50%;
    grid-area: enter;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad [data-phone-key="right"] {
    grid-area: right;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad [data-phone-key="down"] {
    grid-area: down;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-number-keys {
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-number-keys button {
    border-radius: 14px;
    display: grid;
    font-family: var(--mono);
    font-size: 12px;
    min-height: 40px;
    place-items: center;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-number-keys small {
    font-family: var(--font);
    font-size: 7px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-taskbar {
    background: #111b20;
    border-top-color: #52646d;
    grid-template-columns: minmax(0, 1fr) auto;
    height: var(--desktop-taskbar-height);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-home-button,
  body[data-ui-version="v2"][data-scene="expedition"] .desktop-running-apps,
  body[data-ui-version="v2"][data-scene="expedition"] #desktopNotificationCount,
  body[data-ui-version="v2"][data-scene="expedition"] #desktopClock {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-task-status {
    background: transparent;
    border: 0;
    grid-column: 1 / -1;
    justify-content: space-between;
    padding: 1px 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .desktop-return-button {
    min-height: 29px;
  }
}

@media (max-width: 360px), (max-height: 680px) and (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel {
    grid-template-rows: 25px minmax(200px, 1fr) auto;
    padding: 4px 5px 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .scene-panel > .viewer-main-titlebar {
    min-height: 23px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-controls {
    gap: 3px;
    padding: 3px 4px 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad {
    grid-template-columns: repeat(3, 44px);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-softkeys button,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-dpad button {
    min-height: 38px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-number-keys button {
    min-height: 32px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-selection {
    display: none;
  }
}

/* Feature-phone renderer -------------------------------------------------- */

@media (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-object-grid {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-phone-screen-layer {
    background:
      linear-gradient(rgba(183, 226, 229, 0.42), rgba(169, 218, 223, 0.74)),
      var(--viewer-phone-wallpaper, none) center / cover no-repeat;
    pointer-events: auto;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-phone-screen-layer[data-visual-state~="lit"] {
    filter: brightness(1.08);
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-phone-screen-layer[data-visual-state~="signal"] {
    background:
      repeating-linear-gradient(
        180deg,
        rgba(225, 255, 255, 0.1) 0 2px,
        rgba(15, 73, 83, 0.08) 2px 3px
      ),
      linear-gradient(rgba(183, 226, 229, 0.42), rgba(169, 218, 223, 0.74)),
      var(--viewer-phone-wallpaper, none) center / cover no-repeat;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-phone-screen-layer[data-visual-state~="entity"]::after {
    animation: viewer-phone-entity 1.1s steps(2, end) infinite;
    background: rgba(21, 43, 47, 0.76);
    clip-path: polygon(42% 0, 63% 0, 69% 28%, 85% 100%, 18% 100%, 35% 29%);
    content: "";
    height: 64%;
    opacity: 0.58;
    pointer-events: none;
    position: absolute;
    right: 5%;
    top: 21%;
    width: 28%;
    z-index: 0;
  }

  @keyframes viewer-phone-entity {
    50% {
      opacity: 0.72;
      translate: -2px 1px;
    }
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-stage {
    background: rgba(199, 235, 237, 0.84);
    color: var(--viewer-phone-ink);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    inset: 0;
    overflow: hidden;
    position: absolute;
    text-shadow: none;
    z-index: 2;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-stage > .viewer-feature-phone-softkeys,
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-stage > .viewer-feature-phone-controls {
    display: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-view-header {
    background: linear-gradient(180deg, #246f84, #15495d);
    border-bottom: 1px solid #d5ffff;
    color: #ffffff;
    display: grid;
    gap: 1px;
    min-height: 34px;
    padding: 3px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-breadcrumb {
    font-family: var(--mono);
    font-size: 7.5px;
    opacity: 0.86;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-title {
    font-family: var(--font);
    font-size: 10px;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-view-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-grid {
    align-content: start;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 4px 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-grid[data-phone-columns="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-object {
    align-content: center;
    appearance: none;
    background: rgba(232, 251, 250, 0.74);
    border: 1px solid rgba(50, 99, 105, 0.54);
    color: #092c38;
    display: grid;
    font-family: var(--font);
    gap: 2px;
    justify-items: center;
    min-height: 58px;
    min-width: 0;
    overflow: hidden;
    padding: 3px 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-object[data-selected="true"] {
    background: #0b4d75;
    border-color: #efffff;
    color: #ffffff;
    outline: 1px dotted #ffffff;
    outline-offset: -3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-object-icon {
    align-items: center;
    background: rgba(242, 255, 252, 0.82);
    border: 1px solid currentColor;
    color: #164f62;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 14px;
    height: 22px;
    justify-content: center;
    line-height: 1;
    width: 25px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-object[data-selected="true"]
    .viewer-feature-phone-object-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-object-label {
    display: -webkit-box;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.05;
    max-width: 100%;
    min-height: 2.1em;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-object-stage {
    font-family: var(--mono);
    font-size: 6.5px;
    max-width: 100%;
    opacity: 0.82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-detail {
    background: rgba(218, 243, 242, 0.95);
    border-top: 1px solid #67939a;
    font-size: 9px;
    line-height: 1.45;
    max-height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-grid:not([hidden]) + .viewer-feature-phone-detail {
    max-height: 70px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-selection {
    color: #123a46;
    display: grid;
    font-size: 8px;
    gap: 2px;
    margin: 0;
    min-height: 0;
    overflow: visible;
    text-align: left;
    white-space: normal;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-selection strong,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-selection span,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-selection small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-detail h4,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-detail h5,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-detail p {
    margin: 0 0 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-detail .shop-panel button,
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-detail .shop-panel select,
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-detail .shop-panel input {
    min-height: 44px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-document-body {
    background: rgba(249, 255, 242, 0.72);
    border: 1px solid #79969a;
    font-family: var(--mono);
    font-size: 8px;
    line-height: 1.5;
    margin: 0;
    overflow-wrap: anywhere;
    padding: 5px;
    white-space: pre-wrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-media {
    border: 1px solid #2c5965;
    display: block;
    max-height: 132px;
    object-fit: cover;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-caption,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-frame-list {
    font-family: var(--mono);
    font-size: 8px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-app-status {
    background: #0c2f25;
    border: 1px solid #69958a;
    color: #98ffc5;
    display: block;
    font-family: var(--mono);
    font-size: 8px;
    margin-bottom: 5px;
    padding: 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-app-actions {
    display: grid;
    gap: 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-app-action,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-menu-action {
    background: rgba(238, 255, 252, 0.86);
    border: 1px solid #62878c;
    color: #0a3440;
    display: grid;
    font-size: 9px;
    min-height: 44px;
    padding: 5px 6px;
    text-align: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-menu-action[data-selected="true"] {
    background: #0b4d75;
    color: #ffffff;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-properties {
    display: grid;
    margin: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-properties > div {
    border-bottom: 1px solid #88a5a7;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-properties dt,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-properties dd {
    margin: 0;
    overflow-wrap: anywhere;
    padding: 3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-properties dt {
    background: rgba(75, 124, 130, 0.18);
    font-weight: 700;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-softkey-bar {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-hardware {
    display: grid;
    gap: 5px;
    min-width: 0;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad {
    display: grid;
    gap: 2px;
    grid-template-areas:
      ". up ."
      "left confirm right"
      "back down .";
    grid-template-columns: repeat(3, minmax(44px, 58px));
    justify-content: center;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-control {
    align-items: center;
    appearance: none;
    background: linear-gradient(180deg, #536570, #26363f);
    border: 1px solid #71848d;
    border-radius: 12px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
    color: #e8f1f4;
    display: flex;
    font-family: var(--font);
    justify-content: center;
    min-height: 44px;
    padding: 2px 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-softkey {
    border-radius: 17px 17px 8px 8px;
    font-size: 9px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-up {
    grid-area: up;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-left {
    grid-area: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-confirm {
    background: linear-gradient(180deg, #7896a5, #3d5662);
    border-radius: 50%;
    grid-area: confirm;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-right {
    grid-area: right;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-down {
    grid-area: down;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad .key-back {
    grid-area: back;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-keypad {
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-number-key {
    border-radius: 14px;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.05;
    min-height: 44px;
    white-space: pre-line;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-toast {
    background: #fffbd1;
    border: 1px solid #4d5250;
    color: #182b2d;
    font-size: 9px;
    padding: 5px;
  }
}

@media (max-width: 360px), (max-height: 680px) and (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-control {
    min-height: 44px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-hardware {
    align-items: start;
    gap: 1px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-dpad {
    grid-template-areas:
      "up back"
      "left right"
      "confirm down";
    grid-template-columns: repeat(2, 44px);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-keypad {
    gap: 1px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-number-key {
    font-size: 9px;
    min-height: 44px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-view-header {
    min-height: 29px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-feature-phone-detail {
    padding: 3px 4px;
  }
}

/* Windows renderer ------------------------------------------------------- */

@media (min-width: 621px) {
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window__titlebar {
    align-items: center;
    background:
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px),
      linear-gradient(90deg, var(--viewer-titlebar-blue), var(--viewer-titlebar-blue-light));
    color: #ffffff;
    cursor: default;
    display: grid;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 27px;
    padding: 2px 3px 2px 6px;
    user-select: none;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window__controls {
    display: flex;
    gap: 2px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window__controls button {
    align-items: center;
    background: var(--viewer-window-face);
    border-color: #ffffff #202020 #202020 #ffffff;
    border-style: solid;
    border-width: 2px;
    color: #101010;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 11px;
    height: 21px;
    justify-content: center;
    min-width: 23px;
    padding: 0 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-window__body {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-os-window:not([data-focused="true"]) {
    filter: saturate(0.72);
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer__toolbar {
    align-items: center;
    background: var(--viewer-window-face);
    border-bottom: 1px solid #888576;
    display: grid;
    gap: 4px;
    grid-template-columns: auto auto minmax(0, 1fr);
    padding: 4px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer__toolbar button {
    background: var(--viewer-window-face);
    border-color: #ffffff #353535 #353535 #ffffff;
    border-style: solid;
    border-width: 2px;
    min-height: 28px;
    padding: 2px 7px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer__address {
    background: #ffffff;
    border-color: #404040 #ffffff #ffffff #404040;
    border-style: solid;
    border-width: 2px;
    color: #111111;
    font-family: var(--mono);
    font-size: 10px;
    min-height: 27px;
    min-width: 0;
    padding: 4px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer__items {
    align-content: start;
    background: #ffffff;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    min-height: 150px;
    padding: 8px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    color: #111111;
    display: grid;
    font-family: var(--font);
    font-size: 11px;
    gap: 4px;
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 48px;
    padding: 4px;
    text-align: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item:hover,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item:focus-visible,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item.is-selected {
    background: #dceaff;
    border-color: #1459aa;
    outline: 1px dotted #000000;
    outline-offset: -3px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item__icon {
    align-items: center;
    background: #f5f2dc;
    border: 1px solid #384b5c;
    color: #173e64;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 0;
    height: 30px;
    justify-content: center;
    position: relative;
    width: 26px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item__icon::before {
    content: attr(data-icon);
    font-size: 7px;
    font-weight: 700;
    max-width: 22px;
    overflow: hidden;
    text-transform: uppercase;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item__name {
    overflow-wrap: anywhere;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer-item__type {
    color: #5b5b5b;
    font-family: var(--mono);
    font-size: 8px;
    grid-column: 2;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-explorer__status {
    background: var(--viewer-window-face);
    border-top: 1px solid #8d8a7d;
    font-family: var(--mono);
    font-size: 9px;
    padding: 3px 6px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-task {
    background: linear-gradient(180deg, #568fd3, #245a9c);
    border-color: #91b9e9 #0f3264 #0f3264 #91b9e9;
    border-style: solid;
    border-width: 2px;
    color: #ffffff;
    font-family: var(--font);
    font-size: 10px;
    min-height: 25px;
    min-width: 120px;
    overflow: hidden;
    padding: 2px 7px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-task.is-active {
    background: #153c76;
    border-color: #0d2954 #7fa9d8 #7fa9d8 #0d2954;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-context-menu__item {
    align-items: start;
    background: transparent;
    border: 0;
    color: #111111;
    display: grid;
    font-family: var(--font);
    font-size: 11px;
    min-height: 30px;
    padding: 5px 18px 5px 7px;
    text-align: left;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-os-context-menu__item:hover,
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-os-context-menu__item:focus-visible {
    background: #0b4da2;
    color: #ffffff;
    outline: 0;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-os-context-menu__item[aria-disabled="true"] {
    color: #6d6d6d;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-context-menu__separator {
    border: 0;
    border-top: 1px solid #777777;
    margin: 2px 4px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-toast {
    background: #ffffdc;
    border: 2px solid #263c55;
    box-shadow: 4px 5px 10px rgba(0, 0, 0, 0.42);
    color: #17293b;
    font-size: 11px;
    min-width: 240px;
    padding: 7px 9px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-toast[data-tone="error"],
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-os-toast[data-tone="blocked"] {
    background: #ffe1df;
    border-color: #8f1717;
    color: #5f0909;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-image,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media {
    background: #030608;
    color: #d9eff8;
    display: grid;
    gap: 7px;
    min-height: 100%;
    padding: 8px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-image__content,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media__poster,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media__video {
    display: block;
    max-height: 260px;
    object-fit: contain;
    width: 100%;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media__frame {
    background: #000000;
    border: 1px solid #6b8490;
    min-height: 150px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media__transcript,
  body[data-ui-version="v2"][data-scene="expedition"] .viewer-media__timeline {
    font-family: var(--mono);
    font-size: 9px;
    white-space: pre-wrap;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-app {
    background: #d4d0c8;
    display: grid;
    gap: 8px;
    min-height: 100%;
    padding: 8px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-app__header {
    background: #0b3477;
    color: #ffffff;
    font-weight: 700;
    padding: 5px 7px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-app__status {
    background: #07140d;
    border: 2px inset #7d7d7d;
    color: #73ff9a;
    font-family: var(--mono);
    font-size: 10px;
    padding: 7px;
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-app__actions {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-version="v2"][data-scene="expedition"] .viewer-app__action {
    background: var(--viewer-window-face);
    border-color: #ffffff #353535 #353535 #ffffff;
    border-style: solid;
    border-width: 2px;
    min-height: 38px;
    padding: 4px 7px;
  }
}

body[data-ui-version="v2"][data-scene="expedition"] .viewer-live-application-host {
  align-content: start;
  background: #d4d0c8;
  color: #101010;
  display: grid;
  gap: 8px;
  overflow: auto;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  [data-viewer-live-section] {
  background: #ece9d8;
  border-color: #ffffff #727272 #727272 #ffffff;
  border-style: solid;
  border-width: 1px;
  display: grid !important;
  gap: 5px;
  margin: 0;
  min-width: 0;
  padding: 7px;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  [data-viewer-live-section="field-combat"] {
  clip: auto !important;
  clip-path: none !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 7px !important;
  position: static !important;
  white-space: normal !important;
  width: auto !important;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  [data-viewer-live-section]
  > h3,
body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  [data-viewer-live-section]
  > h4 {
  background: linear-gradient(90deg, #0b3477, #3166a5);
  color: #ffffff;
  font-size: 12px;
  margin: -7px -7px 2px;
  padding: 5px 7px;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  :is(ul, ol) {
  margin: 0;
  padding-left: 18px;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  :is(button, input, select, textarea) {
  max-width: 100%;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  button {
  min-height: 32px;
}

body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  :is(button, input, select, textarea):focus-visible,
body[data-ui-version="v2"][data-scene="expedition"]
  .viewer-live-application-host
  [data-phone-native-selected="true"] {
  outline: 3px solid #ffb400;
  outline-offset: 1px;
}

@media (max-width: 620px) {
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-feature-phone-detail.viewer-live-application-host {
    background: #d5eeee;
    font-size: 9px;
    gap: 5px;
    padding: 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-live-application-host
    [data-viewer-live-section] {
    background: rgba(235, 249, 243, 0.9);
    border: 1px solid #527983;
    gap: 4px;
    padding: 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-live-application-host
    [data-viewer-live-section]
    > h3,
  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-live-application-host
    [data-viewer-live-section]
    > h4 {
    background: #176476;
    font-size: 9px;
    margin: -5px -5px 1px;
    padding: 4px 5px;
  }

  body[data-ui-version="v2"][data-scene="expedition"]
    .viewer-live-application-host
    :is(button, input, select, textarea) {
    font-size: 10px;
    min-height: 44px;
  }
}
