:root {
  color-scheme: dark;
  --ink: #f4f0e7;
  --muted: #b8b1a4;
  --dim: #847d72;
  --line: rgba(244, 240, 231, 0.16);
  --panel: rgba(24, 27, 30, 0.92);
  --panel-strong: rgba(17, 19, 22, 0.96);
  --teal: #53c4b2;
  --teal-dark: #1b766e;
  --gold: #d7a947;
  --red: #d5685f;
  --green: #86bd6c;
  --blue: #6aa9d8;
  --floor: #2d2823;
  --wall: #39322b;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --edge: rgba(244, 240, 231, 0.13);
  --edge-strong: rgba(83, 196, 178, 0.38);
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(76, 96, 91, 0.22), transparent 36%),
    linear-gradient(315deg, rgba(133, 86, 65, 0.2), transparent 40%),
    #121416;
  color: var(--ink);
}

button {
  font: inherit;
}

.prototype-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone-shell {
  position: relative;
  width: min(420px, 100%);
  height: min(900px, calc(100vh - 36px));
  min-height: 720px;
  overflow: hidden;
  background: #0f1113;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 2;
  border: 1px solid rgba(244, 240, 231, 0.08);
  border-radius: 21px;
  pointer-events: none;
}

.phone-shell::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 74px;
  height: 4px;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.2);
  transform: translateX(-50%);
  pointer-events: none;
}

.entry-screen,
.game-app {
  position: absolute;
  inset: 0;
}

.entry-screen {
  display: grid;
  place-items: stretch;
  background:
    linear-gradient(180deg, rgba(12, 17, 19, 0.1), rgba(12, 17, 19, 0.82)),
    radial-gradient(circle at 50% 35%, rgba(83, 196, 178, 0.16), transparent 28%),
    linear-gradient(155deg, #1e2d2d 0%, #201d1a 52%, #101214 100%);
}

.entry-trigger {
  border: 0;
  color: var(--ink);
  background: transparent;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 30px;
  cursor: pointer;
}

.entry-trigger:active .entry-sigil {
  transform: scale(0.96);
}

.entry-sigil {
  width: 128px;
  height: 128px;
  border: 1px solid rgba(83, 196, 178, 0.7);
  border-radius: 50%;
  position: relative;
  background:
    linear-gradient(90deg, transparent 49%, rgba(83, 196, 178, 0.56) 49%, rgba(83, 196, 178, 0.56) 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(215, 169, 71, 0.46) 49%, rgba(215, 169, 71, 0.46) 51%, transparent 51%),
    rgba(12, 18, 20, 0.72);
  box-shadow: 0 0 36px rgba(83, 196, 178, 0.28);
  transition: transform 160ms ease;
}

.entry-sigil::before,
.entry-sigil::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(244, 240, 231, 0.24);
  border-radius: 50%;
}

.entry-sigil::after {
  inset: 43px;
  background: rgba(215, 169, 71, 0.72);
  border-color: rgba(215, 169, 71, 0.9);
}

.entry-title {
  font-size: 30px;
  font-weight: 800;
}

.entry-subtitle {
  color: var(--muted);
  font-size: 15px;
}

.is-hidden {
  display: none !important;
}

.game-app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(180deg, rgba(15, 20, 22, 0.64), rgba(15, 20, 22, 0)),
    radial-gradient(circle at 50% 0, rgba(83, 196, 178, 0.13), transparent 34%),
    #151719;
}

.top-hud {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 17px 12px 9px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(42, 51, 52, 0.42), rgba(17, 19, 21, 0.92)),
    rgba(17, 19, 21, 0.9);
  backdrop-filter: blur(16px);
}

.profile-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(83, 196, 178, 0.28);
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.055);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(244, 240, 231, 0.035);
}

.profile-chip:active,
.dock-button:active,
.dock-home:active,
.feature-menu-button:active,
.base-action:active,
.room-object:active,
.arrange-piece:active,
.arrange-cell:active,
.route-row:active,
.item-cell:active {
  transform: translateY(1px);
}

.avatar-ring {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(83, 196, 178, 0.75);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(83, 196, 178, 0.26), rgba(215, 169, 71, 0.2));
}

.avatar-core {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1c2524;
  color: var(--teal);
  font-weight: 800;
}

.profile-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.profile-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
}

.level-pill {
  color: #101214;
  background: var(--gold);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 800;
}

.hud-bar {
  position: relative;
  min-width: 0;
  height: 16px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
}

.hud-bar-fill {
  display: block;
  height: 100%;
}

.hud-bar-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 5px;
  color: rgba(244, 240, 231, 0.95);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.hud-bar-text b,
.hud-bar-text strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-bar-text strong {
  flex: 0 1 auto;
  text-align: right;
}

.hp-bar .hud-bar-fill {
  background: var(--red);
}

.spirit-bar .hud-bar-fill {
  background: var(--teal);
}

.fatigue-bar .hud-bar-fill {
  background: var(--green);
}

.energy-bar .hud-bar-fill {
  background: linear-gradient(90deg, #8ee6a8, var(--green));
}

.resource-strip {
  display: grid;
  gap: 6px;
  min-width: 112px;
}

.resource-pill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 24px;
  border: 1px solid rgba(244, 240, 231, 0.1);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.resource-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.resource-pill strong {
  min-width: 42px;
  text-align: right;
  font-size: 12px;
}

.resource-icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  flex: 0 0 auto;
}

.resource-icon.coin {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2ad, var(--gold) 58%, #8a6724);
}

.resource-icon.shard {
  clip-path: polygon(50% 0, 92% 38%, 72% 100%, 28% 100%, 8% 38%);
  background: linear-gradient(145deg, #b8fff1, var(--teal-dark));
}

.content-area {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.home-view,
.scene-view {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.scene-view {
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.06), transparent 34%),
    rgba(255, 255, 255, 0.012);
}

.scene-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  min-height: 44px;
}

.scene-outing-button {
  height: 34px;
  min-width: 72px;
  border: 1px solid rgba(83, 196, 178, 0.65);
  border-radius: 8px;
  color: #111315;
  background: linear-gradient(180deg, #69d8c8, var(--teal));
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(83, 196, 178, 0.18);
}

.scene-detail {
  min-height: 0;
  overflow: auto;
  padding-bottom: 12px;
}

.section-kicker {
  display: block;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.08;
}

h2 {
  font-size: 17px;
  line-height: 1.2;
}

.home-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  min-height: 44px;
}

.home-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 2px;
}

.base-action {
  height: 30px;
  border: 1px solid rgba(83, 196, 178, 0.46);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.2), rgba(83, 196, 178, 0.08)),
    rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.base-action.is-active {
  color: #101315;
  background: var(--teal);
  border-color: var(--teal);
}

.floor-map {
  width: 54px;
  height: 54px;
}

.mini-room {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(244, 240, 231, 0.18);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 3px;
  padding: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.mini-room.is-active {
  border-color: rgba(83, 196, 178, 0.52);
}

.mini-room-label {
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 1px;
}

.mini-grid span {
  border-radius: 1px;
  background: rgba(244, 240, 231, 0.13);
}

.mini-grid span.is-occupied {
  background: rgba(83, 196, 178, 0.82);
}

.mini-grid span.is-wall-cell {
  background: rgba(215, 169, 71, 0.28);
}

.mini-grid span.is-corner-cell {
  background: rgba(0, 0, 0, 0.22);
}

.mini-grid span.is-wall-edge {
  background: rgba(215, 169, 71, 0.76);
}

.screen-title {
  min-height: 44px;
}

.home-scene-wrap {
  position: relative;
  min-height: 0;
}

.room-scene {
  position: absolute;
  inset: 0 34px;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 46%),
    linear-gradient(115deg, rgba(83, 196, 178, 0.08), transparent 36%),
    linear-gradient(180deg, #35302a 0 56%, #2c261f 56% 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.26);
}

.room-scene::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -10%;
  height: 54%;
  background: linear-gradient(180deg, rgba(82, 61, 43, 0.94), rgba(38, 31, 25, 0.98));
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.room-scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 1px;
  background: rgba(244, 240, 231, 0.12);
}

.room-wall-marker {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  color: var(--ink);
  background: rgba(17, 19, 21, 0.72);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.room-wall-marker.wall-front {
  left: 50%;
  top: 9px;
  min-width: 58px;
  transform: translateX(-50%);
}

.room-object {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  min-width: 0;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

.room-object.is-static {
  cursor: default;
}

.room-object.is-required {
  border-color: transparent;
}

.room-object:hover .asset,
.room-object:focus-visible .asset {
  filter: drop-shadow(0 0 10px rgba(83, 196, 178, 0.34)) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.32));
}

.room-object.is-static:hover .asset {
  filter: none;
}

.room-object .required-badge {
  top: -3px;
  right: -3px;
}

.turn-button {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 32px;
  height: 58px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(17, 19, 21, 0.74);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
  cursor: pointer;
}

.turn-left {
  left: 0;
}

.turn-right {
  right: 0;
}

.dock-button svg,
.dock-home svg,
.icon-button svg,
.turn-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.required-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  border-radius: 4px;
  padding: 2px 4px;
  color: #111315;
  background: var(--gold);
  font-size: 9px;
  font-weight: 900;
}

.room-object:focus-visible,
.turn-button:focus-visible,
.arrange-cell:focus-visible,
.arrange-piece:focus-visible,
.dock-button:focus-visible,
.dock-home:focus-visible,
.feature-menu-button:focus-visible,
.base-action:focus-visible,
.profile-chip:focus-visible,
.sheet-actions button:focus-visible,
.icon-button:focus-visible,
.entry-trigger:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.asset {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.32));
}

.room-object .asset {
  position: relative;
  left: auto;
  bottom: auto;
  transform: rotate(var(--asset-rotate, 0deg));
  transform-origin: center;
  max-width: 100%;
  max-height: 100%;
}

.asset-bed {
  width: 108px;
  height: 54px;
  border: 2px solid #33251d;
  border-radius: 7px;
  background: linear-gradient(180deg, #a9695f 0 45%, #5a372f 45%);
}

.asset-bed::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 28px;
  height: 20px;
  border-radius: 5px;
  background: #e8d7bd;
}

.asset-desk {
  width: 118px;
  height: 66px;
  border-bottom: 10px solid #4a3424;
  background: linear-gradient(180deg, #9c7047 0 16px, transparent 16px);
}

.asset-desk::before,
.asset-desk::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 46px;
  background: #5e412b;
}

.asset-desk::before {
  left: 12px;
}

.asset-desk::after {
  right: 12px;
}

.asset-computer {
  width: 120px;
  height: 92px;
  background:
    linear-gradient(180deg, transparent 0 60px, #8a6040 60px 72px, transparent 72px),
    linear-gradient(90deg, transparent 0 12px, #5e412b 12px 26px, transparent 26px 94px, #5e412b 94px 108px, transparent 108px);
}

.asset-computer::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 0;
  width: 66px;
  height: 48px;
  border: 4px solid #1e2c31;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.7), rgba(25, 48, 54, 0.95)),
    #172126;
}

.asset-computer::after {
  content: "";
  position: absolute;
  left: 52px;
  top: 52px;
  width: 20px;
  height: 12px;
  border-radius: 3px 3px 0 0;
  background: #263338;
}

.asset-door {
  width: 92px;
  height: 150px;
  border: 3px solid #172329;
  border-radius: 8px 8px 3px 3px;
  background:
    radial-gradient(circle at 78% 50%, var(--gold) 0 4px, transparent 5px),
    linear-gradient(180deg, #315564, #1f333d);
}

.asset-door::before {
  content: "";
  position: absolute;
  inset: 12px 14px 48px;
  border: 1px solid rgba(244, 240, 231, 0.18);
  border-radius: 5px;
}

.asset-board {
  width: 112px;
  height: 92px;
  border: 5px solid #5a3c25;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(0, 0, 0, 0.08) 12% 14%, transparent 14% 100%),
    linear-gradient(180deg, #d1b17b, #8f7048);
}

.asset-board::before,
.asset-board::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 2px;
  background: rgba(45, 29, 18, 0.55);
}

.asset-board::before {
  top: 32px;
}

.asset-board::after {
  top: 52px;
}

.asset-wardrobe {
  width: 120px;
  height: 164px;
  border: 3px solid #3b2b21;
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(31, 22, 17, 0.48) 49% 51%, transparent 51%),
    linear-gradient(180deg, #8a6040, #4f3527);
}

.asset-wardrobe::before,
.asset-wardrobe::after {
  content: "";
  position: absolute;
  top: 74px;
  width: 7px;
  height: 18px;
  border-radius: 4px;
  background: var(--gold);
}

.asset-wardrobe::before {
  left: 47px;
}

.asset-wardrobe::after {
  right: 47px;
}

.asset-mirror {
  width: 78px;
  height: 138px;
  border: 5px solid #6b5234;
  border-radius: 40px 40px 6px 6px;
  background: linear-gradient(135deg, rgba(180, 239, 236, 0.76), rgba(69, 103, 105, 0.42));
}

.asset-mirror::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -22px;
  height: 22px;
  background: #4a3426;
}

.asset-storage {
  width: 144px;
  height: 132px;
  border: 3px solid #4a3325;
  border-radius: 6px;
  background:
    linear-gradient(180deg, transparent 31%, rgba(22, 16, 12, 0.5) 31% 34%, transparent 34% 64%, rgba(22, 16, 12, 0.5) 64% 67%, transparent 67%),
    linear-gradient(90deg, #75523a, #5b3f2d);
}

.asset-storage::before,
.asset-storage::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 22px;
  border-radius: 5px;
  background: #b59658;
}

.asset-storage::before {
  left: 18px;
  top: 26px;
}

.asset-storage::after {
  right: 22px;
  top: 74px;
}

.asset-chest {
  width: 108px;
  height: 78px;
  border: 3px solid #3d2b20;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(45, 31, 22, 0.64) 47% 53%, transparent 53%),
    linear-gradient(180deg, #986c3f 0 45%, #68442b 45%);
}

.asset-chest::before {
  content: "";
  position: absolute;
  left: 42px;
  top: 31px;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: var(--gold);
}

.asset-bench {
  width: 126px;
  height: 106px;
  background:
    radial-gradient(circle at 50% 24%, rgba(83, 196, 178, 0.72) 0 12px, transparent 13px),
    linear-gradient(180deg, transparent 0 30px, #8b6845 30px 42px, transparent 42px),
    linear-gradient(90deg, transparent 0 16px, #5d432f 16px 30px, transparent 30px 96px, #5d432f 96px 110px, transparent 110px);
}

.asset-bench::before {
  content: "";
  position: absolute;
  left: 45px;
  top: 35px;
  width: 36px;
  height: 50px;
  border: 3px solid rgba(83, 196, 178, 0.9);
  border-radius: 0 0 18px 18px;
  border-top: 0;
}

.asset-window {
  width: 154px;
  height: 102px;
  border: 5px solid #23313a;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(35, 49, 58, 0.9) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 58%, rgba(35, 49, 58, 0.9) 58% 62%, transparent 62%),
    radial-gradient(circle at 74% 24%, #f2c66d 0 9px, transparent 10px),
    linear-gradient(165deg, transparent 0 54%, rgba(59, 92, 89, 0.9) 54% 68%, transparent 68%),
    linear-gradient(195deg, transparent 0 48%, rgba(47, 74, 82, 0.86) 48% 67%, transparent 67%),
    linear-gradient(180deg, #5d8ca7 0 48%, #d5a85b 48% 72%, #476c57 72%);
}

.asset-window::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -14px;
  height: 12px;
  border-radius: 3px;
  background: #3b2d23;
}

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

.city-status div,
.city-note,
.place-card,
.place-scene,
.stage-card,
.area-brief,
.empty-state {
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)),
    rgba(0, 0, 0, 0.12);
}

.city-status div {
  min-width: 0;
  padding: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.city-status span,
.place-category,
.place-card small,
.scene-copy p,
.place-action small,
.stage-head span,
.drop-list span,
.stage-actions small,
.empty-state span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.city-status span {
  display: block;
  margin-bottom: 4px;
}

.city-status strong {
  font-size: 13px;
}

.city-note {
  margin-top: 10px;
  padding: 10px;
  display: grid;
  gap: 5px;
  background: rgba(83, 196, 178, 0.08);
  border-color: rgba(83, 196, 178, 0.22);
}

.city-note strong {
  font-size: 13px;
}

.city-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.city-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.city-filter span,
.place-state,
.activity-nav button,
.activity-nav span {
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 800;
}

.map-overview {
  height: 116px;
  border: 1px solid rgba(83, 196, 178, 0.2);
  border-radius: 10px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 32%, rgba(83, 196, 178, 0.34) 0 5px, transparent 6px),
    radial-gradient(circle at 66% 38%, rgba(215, 169, 71, 0.46) 0 5px, transparent 6px),
    radial-gradient(circle at 48% 72%, rgba(106, 169, 216, 0.34) 0 5px, transparent 6px),
    linear-gradient(135deg, rgba(83, 196, 178, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 28px rgba(83, 196, 178, 0.08);
}

.map-overview::before,
.map-overview::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(244, 240, 231, 0.09);
  border-radius: 18px;
}

.map-overview::after {
  inset: 36px 64px 28px 28px;
  border-color: rgba(83, 196, 178, 0.16);
}

.map-overview span {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.12);
  transform-origin: left center;
}

.map-overview span:nth-child(1) {
  left: 32px;
  top: 38px;
  width: 180px;
  transform: rotate(8deg);
}

.map-overview span:nth-child(2) {
  left: 78px;
  top: 28px;
  width: 130px;
  transform: rotate(62deg);
}

.map-overview span:nth-child(3) {
  left: 50px;
  top: 82px;
  width: 220px;
  transform: rotate(-13deg);
}

.map-overview span:nth-child(4) {
  left: 170px;
  top: 32px;
  width: 132px;
  transform: rotate(44deg);
}

.map-overview span:nth-child(5) {
  left: 250px;
  top: 26px;
  width: 72px;
  transform: rotate(86deg);
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.place-card {
  min-height: 126px;
  padding: 10px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.026);
}

.place-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 34%, rgba(255, 255, 255, 0.14) 34% 36%, transparent 36%),
    linear-gradient(180deg, rgba(83, 196, 178, 0.24), transparent);
}

.place-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent),
    rgba(0, 0, 0, 0.18);
}

.place-card > * {
  position: relative;
}

.place-card strong {
  font-size: 16px;
  line-height: 1.15;
}

.place-state {
  width: fit-content;
  color: #111315;
  background: linear-gradient(180deg, #74dece, var(--teal));
}

.scene-medical::before,
.scene-pharmacy::before {
  background:
    linear-gradient(90deg, transparent 42%, rgba(244, 240, 231, 0.3) 42% 58%, transparent 58%),
    linear-gradient(180deg, rgba(106, 169, 216, 0.38), transparent);
}

.scene-diner::before,
.scene-store::before {
  background:
    radial-gradient(circle at 72% 22%, rgba(215, 169, 71, 0.7) 0 9px, transparent 10px),
    linear-gradient(180deg, rgba(215, 169, 71, 0.3), transparent);
}

.scene-training::before,
.scene-equipment::before {
  background:
    linear-gradient(135deg, transparent 38%, rgba(213, 104, 95, 0.35) 38% 42%, transparent 42%),
    linear-gradient(180deg, rgba(213, 104, 95, 0.22), transparent);
}

.scene-library::before,
.scene-lab::before {
  background:
    repeating-linear-gradient(90deg, rgba(244, 240, 231, 0.16) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, rgba(134, 189, 108, 0.22), transparent);
}

.scene-exchange::before,
.scene-bank::before {
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(215, 169, 71, 0.28) 20% 22%, transparent 22% 42%, rgba(215, 169, 71, 0.22) 42% 44%, transparent 44%),
    linear-gradient(180deg, rgba(106, 169, 216, 0.18), transparent);
}

.activity-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.activity-nav button {
  color: var(--ink);
  cursor: pointer;
}

.place-scene {
  min-height: 220px;
  padding: 11px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.16);
}

.scene-visual {
  min-height: 86px;
  border: 1px solid rgba(244, 240, 231, 0.08);
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(244, 240, 231, 0.09) 18% 20%, transparent 20% 42%, rgba(244, 240, 231, 0.09) 42% 44%, transparent 44%),
    linear-gradient(180deg, #293638, #171b1d);
}

.scene-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.scene-visual span {
  position: absolute;
  border-radius: 6px;
  background: rgba(244, 240, 231, 0.12);
}

.scene-visual span:nth-child(1) {
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: 18px;
}

.scene-visual span:nth-child(2) {
  left: 28px;
  top: 18px;
  width: 82px;
  height: 42px;
}

.scene-visual span:nth-child(3) {
  right: 28px;
  top: 24px;
  width: 58px;
  height: 52px;
}

.scene-copy h3,
.area-brief h3,
.stage-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.scene-copy p,
.area-brief p {
  margin: 6px 0 0;
}

.scene-points,
.stage-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.scene-points button,
.stage-actions button {
  min-height: 44px;
  border: 1px solid rgba(83, 196, 178, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-weight: 850;
}

.place-action-list,
.stage-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.place-action {
  min-height: 72px;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-left-color: rgba(83, 196, 178, 0.55);
  border-radius: 10px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(83, 196, 178, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.045);
  text-align: left;
  cursor: pointer;
}

.place-action > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.place-action b,
.place-action em {
  width: max-content;
  justify-self: end;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  font-style: normal;
}

.place-action b {
  color: #111315;
  background: linear-gradient(180deg, #f1cf78, var(--gold));
}

.place-action em {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.area-brief {
  padding: 10px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
}

.stage-card {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.stage-card.is-locked {
  opacity: 0.58;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stage-head > span {
  max-width: 42%;
  text-align: right;
  font-weight: 800;
}

.drop-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.drop-list span {
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.07);
}

.stage-actions button {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 6px;
}

.stage-actions button:disabled {
  opacity: 0.48;
  cursor: default;
}

.stage-actions strong {
  font-size: 12px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.wardrobe-summary,
.storage-summary {
  border: 1px solid rgba(83, 196, 178, 0.22);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: rgba(83, 196, 178, 0.08);
}

.wardrobe-summary div,
.storage-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.wardrobe-summary span,
.storage-summary span,
.slot-copy span,
.wardrobe-item small,
.storage-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wardrobe-summary strong,
.storage-summary strong {
  color: var(--gold);
  font-size: 18px;
}

.wardrobe-summary p,
.storage-summary p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.equipment-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.equipment-slot,
.wardrobe-tabs button,
.wardrobe-item,
.storage-tabs button,
.storage-item {
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 10px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.026)),
    rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.equipment-slot {
  min-height: 62px;
  padding: 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
}

.slot-icon,
.item-icon {
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  display: block;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 18px rgba(83, 196, 178, 0.055);
}

.slot-icon {
  width: 34px;
  height: 34px;
}

.slot-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.equipment-slot strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-slot.is-empty strong {
  color: var(--dim);
}

.wardrobe-tabs,
.storage-tabs {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.wardrobe-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storage-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wardrobe-tabs button,
.storage-tabs button {
  height: 34px;
  font-size: 12px;
  font-weight: 900;
}

.wardrobe-tabs button.is-active,
.storage-tabs button.is-active {
  color: #101315;
  border-color: var(--teal);
  background: var(--teal);
}

.wardrobe-list,
.storage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.wardrobe-item,
.storage-item {
  min-height: 116px;
  padding: 8px 7px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  position: relative;
  text-align: center;
}

.item-icon {
  width: 46px;
  height: 46px;
}

.item-copy {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 3px;
}

.wardrobe-item strong,
.storage-item strong {
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wardrobe-item small,
.storage-item small {
  min-height: 26px;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wardrobe-item em,
.storage-item em {
  border-radius: 5px;
  padding: 4px 6px;
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.075);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.route-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.route-row {
  min-height: 72px;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.route-row.is-locked {
  opacity: 0.58;
}

.route-row strong,
.item-cell strong {
  display: block;
  font-size: 14px;
}

.route-row small,
.item-cell small {
  color: var(--muted);
  font-size: 11px;
}

.route-state {
  color: #111315;
  background: var(--teal);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
}

.route-state.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.route-map {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  display: block;
}

.route-map.city {
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(255, 255, 255, 0.16) 12px 14px, transparent 14px),
    linear-gradient(0deg, #25363d 0 45%, #6f8c90 45% 48%, #314b4f 48%);
}

.route-map.field {
  background:
    linear-gradient(135deg, rgba(244, 240, 231, 0.16) 0 10%, transparent 10% 22%, rgba(244, 240, 231, 0.12) 22% 30%, transparent 30%),
    linear-gradient(180deg, #32413b 0 48%, #65784e 48% 52%, #25322e 52%);
}

.route-map.work {
  background:
    linear-gradient(90deg, #7d5b3c 0 34%, transparent 34% 38%, #7d5b3c 38% 72%, transparent 72%),
    linear-gradient(180deg, #2b3536, #1f2425);
}

.route-map.hazard {
  background:
    linear-gradient(135deg, transparent 45%, rgba(213, 104, 95, 0.78) 45% 55%, transparent 55%),
    linear-gradient(180deg, #2d2224, #151719);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.item-cell {
  min-height: 112px;
  padding: 8px 7px;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 10px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.12);
  cursor: pointer;
  text-align: center;
}

.item-cell strong {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-cell small {
  border-radius: 5px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.075);
  font-weight: 800;
}

.growth-panel {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.growth-orbit {
  height: 230px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 8px;
  position: relative;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(83, 196, 178, 0.28) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(215, 169, 71, 0.24) 49.5% 50.5%, transparent 50.5%),
    rgba(255, 255, 255, 0.04);
}

.growth-orbit span {
  position: absolute;
  border: 1px solid rgba(83, 196, 178, 0.28);
  border-radius: 50%;
}

.growth-orbit span:nth-child(1) {
  inset: 26px 64px;
}

.growth-orbit span:nth-child(2) {
  inset: 64px 104px;
  border-color: rgba(215, 169, 71, 0.34);
}

.growth-orbit span:nth-child(3) {
  width: 44px;
  height: 44px;
  left: 50%;
  top: 50%;
  margin: -22px 0 0 -22px;
  background: rgba(83, 196, 178, 0.32);
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.stat-list div {
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.045);
}

.character-section {
  margin-top: 12px;
}

.aura-summary {
  margin-top: 12px;
  border: 1px solid rgba(83, 196, 178, 0.32);
  border-radius: 12px;
  padding: 11px;
  display: grid;
  gap: 7px;
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.18), transparent 48%),
    rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 22px rgba(83, 196, 178, 0.07);
}

.aura-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.aura-summary span,
.aura-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.aura-summary b {
  color: var(--gold);
}

.aura-summary strong {
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
}

.aura-summary p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.character-note {
  border: 1px solid rgba(83, 196, 178, 0.26);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 5px;
  background: rgba(83, 196, 178, 0.09);
}

.character-note strong {
  font-size: 13px;
}

.character-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-tab-pane {
  margin-top: 10px;
}

.breakthrough-pane {
  height: 100%;
  min-height: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.breakthrough-shell {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.breakthrough-shell.is-scroll-region {
  flex: 1 1 auto;
}

.profile-home {
  display: grid;
  gap: 10px;
}

.profile-meter-shell {
  margin-top: 0;
}

.profile-meter-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.profile-meter-shell:not([open]) .profile-meter-list {
  display: none;
}

.profile-meter-group {
  display: grid;
  gap: 8px;
}

.profile-meter-group.is-vitals,
.profile-meter-group.is-body,
.profile-meter-group.is-aura {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-meter-row {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  padding: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-meter-row.has-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.profile-meter-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "label detail value"
    "track track track";
  align-items: center;
  gap: 5px 8px;
}

.profile-meter-row.is-side-action .profile-meter-main {
  padding-right: 2px;
}

.profile-meter-main span {
  grid-area: label;
  min-width: 0;
  min-height: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.profile-meter-main strong {
  grid-area: value;
  align-self: center;
  justify-self: end;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1;
}

.profile-meter-detail {
  grid-area: detail;
  align-self: center;
  justify-self: center;
  color: var(--teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.profile-meter-help {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(244, 240, 231, 0.22);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--gold);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  background: rgba(0, 0, 0, 0.22);
  cursor: help;
}

.profile-meter-help::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  width: 196px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--ink);
  background: rgba(16, 18, 20, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.profile-meter-help:hover::after,
.profile-meter-help:focus::after,
.profile-meter-help:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.profile-meter-row.is-side-action .profile-meter-help::after {
  right: 0;
  left: auto;
}

.profile-meter-action {
  min-height: 30px;
  border: 1px solid rgba(83, 196, 178, 0.34);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--teal);
  background: rgba(83, 196, 178, 0.1);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.profile-meter-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.profile-meter-track {
  grid-area: track;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.1);
}

.profile-meter-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.profile-meter-track.hp i {
  background: linear-gradient(90deg, var(--red), #ef9a84);
}

.profile-meter-track.mp i {
  background: linear-gradient(90deg, var(--blue), #95c8ec);
}

.profile-meter-track.fatigue i {
  background: linear-gradient(90deg, var(--green), #b4d77a);
}

.profile-meter-track.energy i {
  background: linear-gradient(90deg, #8ee6a8, var(--green));
}

.profile-meter-track.aura i {
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.profile-meter-track.stone i {
  background: linear-gradient(90deg, #9a8af0, var(--teal));
}

.profile-action-list {
  display: grid;
  gap: 8px;
}

.profile-action-row {
  min-width: 0;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  min-height: 62px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(90deg, rgba(83, 196, 178, 0.12), transparent 62%),
    rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.profile-action-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-action-row b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.profile-action-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.profile-action-row > strong {
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.profile-overview-section {
  min-width: 0;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 0;
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.profile-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-collapsible > .profile-overview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  min-height: 24px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.profile-collapsible > .profile-overview-head::-webkit-details-marker {
  display: none;
}

.profile-collapse-icon {
  grid-column: 3;
  grid-row: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 160ms ease;
}

.profile-collapse-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: rgba(244, 240, 231, 0.72);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-collapsible[open] > .profile-overview-head .profile-collapse-icon {
  transform: rotate(180deg);
}

.profile-overview-head h3 {
  grid-column: 1;
  margin: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1;
}

.profile-overview-head > .profile-meter-help {
  grid-column: 2;
  align-self: center;
}

.profile-ability-grid,
.profile-combat-grid {
  display: grid;
  gap: 7px;
}

.profile-collapsible[open] > .profile-meter-list,
.profile-collapsible[open] > .profile-ability-grid,
.profile-collapsible[open] > .profile-combat-grid {
  margin-top: 8px;
}

.profile-ability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-combat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-stat-pill {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(244, 240, 231, 0.11);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 5px;
  background: rgba(0, 0, 0, 0.15);
}

.profile-stat-pill span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.profile-stat-pill strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.combat-pill {
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.combat-pill strong {
  justify-self: end;
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
}

.profile-stat-pill:nth-child(2n) .profile-meter-help::after,
.profile-stat-pill:nth-child(3n) .profile-meter-help::after,
.profile-overview-head .profile-meter-help::after {
  right: 0;
  left: auto;
}

.profile-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.breakthrough-shell .profile-page-head {
  flex: 0 0 auto;
}

.profile-page-head h3 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  font-size: 18px;
}

.body-node-section {
  margin-top: 12px;
  border: 1px solid rgba(215, 169, 71, 0.18);
  border-radius: 10px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(215, 169, 71, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.035);
}

.breakthrough-shell .body-node-section {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.body-node-card span,
.node-system-note,
.body-node-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.node-total-progress,
.region-progress {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.1);
}

.node-total-progress {
  height: 8px;
  margin-top: 9px;
}

.node-total-progress span,
.region-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.node-system-note {
  margin: 8px 0 0;
  display: none;
}

.body-region-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.body-node-card {
  width: 100%;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.body-node-card.is-active {
  border-color: rgba(83, 196, 178, 0.58);
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(83, 196, 178, 0.16);
}

.node-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.node-card-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.node-card-head strong {
  font-size: 14px;
}

.node-card-head b {
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
}

.region-card-stats {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}

.region-card-stats small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.region-progress {
  height: 5px;
}

.active-node-panel {
  margin-top: 10px;
  border: 1px solid rgba(83, 196, 178, 0.18);
  border-radius: 9px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.14);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.breakthrough-pane .body-node-section {
  flex: 0 0 auto;
}

.body-node-section.active-node-panel {
  margin-top: 12px;
  border-color: rgba(83, 196, 178, 0.34);
  background:
    linear-gradient(135deg, rgba(83, 196, 178, 0.14), transparent 58%),
    rgba(0, 0, 0, 0.16);
}

.breakthrough-shell .body-node-section.active-node-panel {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.breakthrough-pane .active-node-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.breakthrough-shell.is-compact-region .active-node-panel {
  flex: 0 0 auto;
}

.node-close-button {
  min-width: 52px;
  height: 30px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.active-node-summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.active-node-summary span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.body-node-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 72px;
  align-content: start;
  gap: 7px;
  margin-top: 9px;
  max-height: 282px;
  overflow: auto;
  padding-right: 2px;
}

.breakthrough-pane .body-node-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.breakthrough-shell.is-compact-region .body-node-grid {
  flex: 0 0 auto;
  overflow: visible;
}

.breakthrough-pane .body-node-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.body-node-item {
  min-width: 0;
  height: 72px;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.1), rgba(83, 196, 178, 0.025)),
    rgba(255, 255, 255, 0.035);
}

.body-node-item.is-ready {
  border-color: rgba(215, 169, 71, 0.72);
  background:
    linear-gradient(180deg, rgba(215, 169, 71, 0.2), rgba(215, 169, 71, 0.065)),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 0 0 1px rgba(215, 169, 71, 0.18),
    0 10px 22px rgba(215, 169, 71, 0.13);
}

.node-main-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.node-main-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.body-node-item strong {
  font-size: 12px;
  line-height: 1.25;
}

.body-node-item span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.node-main-meta em {
  color: var(--teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.node-action-block {
  width: 78px;
  display: grid;
  justify-items: stretch;
  gap: 4px;
}

.node-breakthrough-button {
  min-height: 42px;
  border: 1px solid rgba(215, 169, 71, 0.48);
  border-radius: 8px;
  padding: 5px 6px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #111315;
  background: linear-gradient(180deg, #f0cb6d, var(--gold));
  line-height: 1;
  cursor: pointer;
}

.node-breakthrough-button b {
  font-size: 12px;
  font-weight: 900;
}

.body-node-item .node-breakthrough-button small {
  color: rgba(17, 19, 21, 0.72);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.node-breakthrough-button:disabled {
  color: var(--muted);
  border-color: rgba(244, 240, 231, 0.12);
  background: rgba(255, 255, 255, 0.06);
  cursor: not-allowed;
}

.body-node-item .node-breakthrough-button:disabled small {
  color: var(--muted);
}

.body-node-item small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.node-cost-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.1);
}

.node-cost-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(83, 196, 178, 0.72), var(--teal));
}

.body-node-item.is-ready .node-cost-progress i {
  background: linear-gradient(90deg, var(--gold), var(--teal));
  box-shadow: 0 0 10px rgba(215, 169, 71, 0.36);
}

.body-node-item.is-locked,
.body-node-item.is-waiting {
  opacity: 0.46;
}

.ability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.ability-card {
  min-width: 0;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.ability-card div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ability-card span,
.derived-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ability-card strong {
  color: var(--gold);
  font-size: 18px;
}

.ability-card small,
.derived-row small {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.ability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.aura-level-button {
  min-height: 38px;
  border: 1px solid rgba(215, 169, 71, 0.42);
  border-radius: 9px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #121315;
  background: linear-gradient(180deg, #f0cb6d, var(--gold));
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(215, 169, 71, 0.16);
}

.aura-level-button span,
.aura-level-button strong {
  font-size: 12px;
  font-weight: 900;
}

.aura-level-button:disabled {
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.18);
  box-shadow: none;
  cursor: not-allowed;
}

.aura-stone-button {
  min-height: 38px;
  border: 1px solid rgba(83, 196, 178, 0.34);
  border-radius: 9px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.18), rgba(83, 196, 178, 0.07)),
    rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.aura-stone-button span,
.aura-stone-button strong {
  font-size: 12px;
  font-weight: 900;
}

.aura-stone-button strong {
  color: var(--teal);
}

.aura-stone-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.character-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.character-section-title h3 {
  margin: 0;
  font-size: 15px;
}

.derived-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.derived-row {
  min-width: 0;
  min-height: 72px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.035);
}

.derived-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.derived-row strong {
  font-size: 13px;
}

.derived-value {
  color: var(--gold);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.derived-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.action-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 55;
  width: calc(100% - 28px);
  max-height: calc(100% - 180px);
  overflow: auto;
  border: 1px solid rgba(244, 240, 231, 0.15);
  border-radius: 8px;
  padding: 11px;
  background: rgba(17, 19, 21, 0.94);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 160ms ease, transform 160ms ease;
  visibility: hidden;
  pointer-events: none;
}

.action-sheet.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  pointer-events: auto;
}

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

.sheet-copy {
  min-width: 0;
}

.sheet-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sheet-actions button {
  min-width: 84px;
  height: 34px;
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.075);
  font-weight: 800;
  cursor: pointer;
}

.sheet-actions button.primary {
  color: #101214;
  background: var(--teal);
  border-color: var(--teal);
}

.idle-scene {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
  overflow: hidden;
  background: #111719;
}

.idle-scene.is-open {
  display: block;
}

.idle-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(180deg, #5d8ca7 0%, #d8b276 54%, #273f3b 100%);
}

.idle-sun {
  position: absolute;
  right: 54px;
  top: 72px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f2c66d;
  box-shadow: 0 0 58px rgba(242, 198, 109, 0.42);
}

.idle-cloud {
  position: absolute;
  height: 18px;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.52);
  box-shadow:
    22px -8px 0 rgba(244, 240, 231, 0.44),
    46px 0 0 rgba(244, 240, 231, 0.36);
}

.cloud-one {
  left: 36px;
  top: 106px;
  width: 62px;
}

.cloud-two {
  left: 160px;
  top: 154px;
  width: 48px;
  opacity: 0.6;
}

.idle-ridge,
.idle-city,
.idle-field {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.idle-ridge {
  height: 45%;
  clip-path: polygon(0 58%, 13% 35%, 25% 50%, 39% 22%, 55% 46%, 72% 18%, 88% 44%, 100% 31%, 100% 100%, 0 100%);
}

.ridge-back {
  bottom: 142px;
  background: rgba(45, 68, 75, 0.78);
}

.ridge-front {
  bottom: 78px;
  background: rgba(33, 62, 55, 0.88);
  clip-path: polygon(0 50%, 16% 34%, 28% 45%, 46% 20%, 65% 48%, 78% 29%, 100% 42%, 100% 100%, 0 100%);
}

.idle-city {
  height: 138px;
  bottom: 82px;
  background:
    linear-gradient(90deg, transparent 0 18px, rgba(22, 30, 33, 0.78) 18px 54px, transparent 54px 68px, rgba(22, 30, 33, 0.84) 68px 112px, transparent 112px 130px, rgba(22, 30, 33, 0.76) 130px 176px, transparent 176px 190px, rgba(22, 30, 33, 0.82) 190px 232px, transparent 232px 248px, rgba(22, 30, 33, 0.72) 248px 306px, transparent 306px);
  opacity: 0.86;
}

.idle-field {
  height: 132px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 38px),
    linear-gradient(180deg, #2f5b47, #182a25);
}

.idle-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  padding: 11px;
  background: rgba(17, 19, 21, 0.72);
  backdrop-filter: blur(16px);
}

.idle-hud p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.feature-window,
.activity-window,
.map-window {
  position: absolute;
  inset: 74px 10px 82px;
  z-index: 45;
  display: none;
}

.feature-window.is-open,
.activity-window.is-open,
.map-window.is-open {
  display: block;
}

.feature-panel,
.activity-panel,
.map-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(83, 196, 178, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.08), transparent 24%),
    rgba(17, 19, 21, 0.97);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.feature-head,
.activity-head,
.map-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 12px 12px;
  border-bottom: 1px solid rgba(83, 196, 178, 0.18);
  background:
    linear-gradient(90deg, rgba(83, 196, 178, 0.12), transparent 62%),
    rgba(255, 255, 255, 0.02);
}

.feature-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.feature-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(83, 196, 178, 0.12);
  background: rgba(0, 0, 0, 0.08);
}

.feature-menu-button {
  min-width: 0;
  height: 54px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.026)),
    rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.feature-menu-button span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.feature-menu-button.is-active {
  color: var(--ink);
  border-color: rgba(83, 196, 178, 0.45);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.24), rgba(83, 196, 178, 0.08)),
    rgba(0, 0, 0, 0.08);
}

.feature-glyph {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #101315;
  background: linear-gradient(180deg, #73dccd, var(--teal));
  font-size: 11px;
  font-weight: 900;
}

.feature-detail {
  min-height: 0;
  overflow: auto;
  padding: 0 10px 14px;
}

.activity-detail,
.map-detail {
  min-height: 0;
  overflow: auto;
  padding: 12px 10px 14px;
}

.housing-window {
  position: absolute;
  inset: 78px 10px 82px;
  z-index: 46;
  display: none;
}

.housing-window.is-open {
  display: block;
}

.housing-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.96);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.housing-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(244, 240, 231, 0.12);
}

.housing-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px 10px 14px;
}

.arrange-window {
  position: absolute;
  inset: 78px 10px 82px;
  z-index: 47;
  display: none;
}

.arrange-window.is-open {
  display: block;
}

.arrange-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.96);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.arrange-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(244, 240, 231, 0.12);
}

.arrange-body {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 12px 10px 14px;
}

.arrange-grid {
  width: min(100%, 560px);
  max-height: 100%;
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 0;
  padding: 6px;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #24211e;
}

.arrange-grid::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: calc(6px + ((100% - 12px) / 12));
  border: 2px solid rgba(244, 240, 231, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.arrange-wall-label {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(215, 169, 71, 0.42);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #101315;
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.arrange-wall-top {
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
}

.arrange-wall-right {
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.arrange-wall-bottom {
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
}

.arrange-wall-left {
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.arrange-cell {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(244, 240, 231, 0.105);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  opacity: 1;
  cursor: default;
}

.arrange-grid.is-editing .arrange-cell {
  cursor: crosshair;
}

.arrange-cell.is-wall-cell {
  border-color: rgba(215, 169, 71, 0.18);
  background:
    linear-gradient(135deg, rgba(215, 169, 71, 0.12) 0 25%, transparent 25% 50%, rgba(215, 169, 71, 0.08) 50% 75%, transparent 75%),
    rgba(215, 169, 71, 0.05);
  background-size: 10px 10px;
}

.arrange-cell.is-floor-cell {
  background: rgba(255, 255, 255, 0.035);
}

.arrange-cell.is-corner-cell {
  background: rgba(0, 0, 0, 0.24);
  cursor: not-allowed;
}

.arrange-cell:disabled,
.arrange-piece:disabled {
  opacity: 1;
}

.arrange-piece {
  min-width: 0;
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 3px;
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(14, 16, 18, 0.78);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
  cursor: default;
  user-select: none;
}

.arrange-grid.is-editing .arrange-piece {
  cursor: pointer;
  touch-action: none;
}

.arrange-grid.is-dragging .arrange-piece {
  cursor: grabbing;
}

.arrange-piece.is-drag-source {
  opacity: 0.38;
  transform: scale(0.98);
}

.arrange-piece.is-required {
  border-color: rgba(215, 169, 71, 0.55);
}

.arrange-piece.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(83, 196, 178, 0.28), 0 12px 22px rgba(0, 0, 0, 0.22);
}

.arrange-piece.is-boundary {
  min-height: 28px;
  background: rgba(83, 196, 178, 0.2);
}

.arrange-preview {
  min-width: 0;
  position: relative;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 3px;
  border: 2px dashed rgba(83, 196, 178, 0.88);
  border-radius: 7px;
  background: rgba(83, 196, 178, 0.18);
  pointer-events: none;
}

.arrange-preview.is-invalid {
  border-color: rgba(207, 91, 74, 0.9);
  background: rgba(207, 91, 74, 0.18);
}

.arrange-preview.is-boundary {
  min-height: 28px;
}

.arrange-preview .plan-asset {
  opacity: 0.78;
}

.plan-asset {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 5px;
  display: block;
  position: relative;
  background: var(--teal);
  overflow: hidden;
  transform: none;
}

.plan-asset-bed {
  width: 86%;
  height: 74%;
  border: 2px solid #33251d;
  background: linear-gradient(180deg, #e8d7bd 0 34%, #a9695f 34% 100%);
}

.plan-asset-computer {
  width: 78%;
  height: 70%;
  background:
    linear-gradient(180deg, #1e2c31 0 54%, #8a6040 54% 68%, transparent 68%),
    linear-gradient(90deg, transparent 0 22%, #5e412b 22% 34%, transparent 34% 66%, #5e412b 66% 78%, transparent 78%);
}

.plan-asset-door {
  width: 90%;
  height: 76%;
  background:
    radial-gradient(circle at 78% 50%, var(--gold) 0 2px, transparent 3px),
    linear-gradient(180deg, #315564, #1f333d);
}

.plan-asset-window {
  width: 92%;
  height: 68%;
  border: 2px solid #23313a;
  background:
    linear-gradient(90deg, transparent 48%, rgba(35, 49, 58, 0.9) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 58%, rgba(35, 49, 58, 0.9) 58% 62%, transparent 62%),
    linear-gradient(180deg, #5d8ca7 0 48%, #d5a85b 48% 72%, #476c57 72%);
}

.plan-asset-wardrobe {
  width: 86%;
  height: 82%;
  border: 2px solid #3b2b21;
  background:
    linear-gradient(90deg, transparent 49%, rgba(31, 22, 17, 0.48) 49% 51%, transparent 51%),
    linear-gradient(180deg, #8a6040, #4f3527);
}

.plan-asset-mirror {
  width: 72%;
  height: 86%;
  border: 2px solid #6b5234;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(135deg, rgba(180, 239, 236, 0.82), rgba(69, 103, 105, 0.42));
}

.plan-asset-storage {
  width: 90%;
  height: 76%;
  border: 2px solid #4a3325;
  background:
    linear-gradient(180deg, transparent 31%, rgba(22, 16, 12, 0.5) 31% 34%, transparent 34% 64%, rgba(22, 16, 12, 0.5) 64% 67%, transparent 67%),
    linear-gradient(90deg, #75523a, #5b3f2d);
}

.arrange-piece .plan-asset,
.arrange-preview .plan-asset {
  width: 100%;
  height: 100%;
}

.plan-asset-bed {
  border: 2px solid #33251d;
  border-radius: 6px;
  background: #a9695f;
}

.plan-asset-bed::before {
  content: "";
  position: absolute;
  border-radius: 4px;
  background: #e8d7bd;
}

[data-facing="top"] .plan-asset-bed::before {
  top: 8%;
  left: 14%;
  right: 14%;
  height: 24%;
}

[data-facing="bottom"] .plan-asset-bed::before {
  bottom: 8%;
  left: 14%;
  right: 14%;
  height: 24%;
}

[data-facing="left"] .plan-asset-bed::before {
  top: 14%;
  bottom: 14%;
  left: 8%;
  width: 24%;
}

[data-facing="right"] .plan-asset-bed::before {
  top: 14%;
  right: 8%;
  bottom: 14%;
  width: 24%;
}

.plan-asset-computer {
  border: 2px solid #5e412b;
  border-radius: 5px;
  background: #8a6040;
}

.plan-asset-computer::before {
  content: "";
  position: absolute;
  border: 2px solid #1e2c31;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(83, 196, 178, 0.72), rgba(25, 48, 54, 0.95));
}

[data-facing="top"] .plan-asset-computer::before {
  top: 8%;
  left: 18%;
  right: 18%;
  height: 36%;
}

[data-facing="bottom"] .plan-asset-computer::before {
  left: 18%;
  right: 18%;
  bottom: 8%;
  height: 36%;
}

[data-facing="left"] .plan-asset-computer::before {
  top: 18%;
  bottom: 18%;
  left: 8%;
  width: 36%;
}

[data-facing="right"] .plan-asset-computer::before {
  top: 18%;
  right: 8%;
  bottom: 18%;
  width: 36%;
}

.plan-asset-wardrobe {
  border: 2px solid #3b2b21;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(31, 22, 17, 0.5) 48% 52%, transparent 52%),
    linear-gradient(180deg, #8a6040, #4f3527);
}

[data-facing="top"] .plan-asset-wardrobe,
[data-facing="bottom"] .plan-asset-wardrobe {
  background:
    linear-gradient(180deg, transparent 48%, rgba(31, 22, 17, 0.5) 48% 52%, transparent 52%),
    linear-gradient(90deg, #8a6040, #4f3527);
}

.plan-asset-storage {
  border: 2px solid #4a3325;
  border-radius: 5px;
  background:
    linear-gradient(180deg, transparent 31%, rgba(22, 16, 12, 0.5) 31% 34%, transparent 34% 64%, rgba(22, 16, 12, 0.5) 64% 67%, transparent 67%),
    linear-gradient(90deg, #75523a, #5b3f2d);
}

[data-facing="left"] .plan-asset-storage,
[data-facing="right"] .plan-asset-storage {
  background:
    linear-gradient(90deg, transparent 31%, rgba(22, 16, 12, 0.5) 31% 34%, transparent 34% 64%, rgba(22, 16, 12, 0.5) 64% 67%, transparent 67%),
    linear-gradient(180deg, #75523a, #5b3f2d);
}

.plan-asset-window {
  border: 2px solid #23313a;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(35, 49, 58, 0.9) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 58%, rgba(35, 49, 58, 0.9) 58% 62%, transparent 62%),
    linear-gradient(180deg, #5d8ca7 0 48%, #d5a85b 48% 72%, #476c57 72%);
}

[data-facing="left"] .plan-asset-window,
[data-facing="right"] .plan-asset-window {
  background:
    linear-gradient(0deg, transparent 48%, rgba(35, 49, 58, 0.9) 48% 52%, transparent 52%),
    linear-gradient(90deg, transparent 58%, rgba(35, 49, 58, 0.9) 58% 62%, transparent 62%),
    linear-gradient(90deg, #5d8ca7 0 48%, #d5a85b 48% 72%, #476c57 72%);
}

.plan-asset-door {
  border: 2px solid #172329;
  border-radius: 5px;
  background:
    radial-gradient(circle at 78% 50%, var(--gold) 0 2px, transparent 3px),
    linear-gradient(180deg, #315564, #1f333d);
}

[data-facing="left"] .plan-asset-door,
[data-facing="right"] .plan-asset-door {
  background:
    radial-gradient(circle at 50% 78%, var(--gold) 0 2px, transparent 3px),
    linear-gradient(90deg, #315564, #1f333d);
}

.plan-asset-mirror {
  border: 2px solid #6b5234;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(135deg, rgba(180, 239, 236, 0.82), rgba(69, 103, 105, 0.42));
}

[data-facing="left"] .plan-asset-mirror,
[data-facing="right"] .plan-asset-mirror {
  border-radius: 999px 5px 5px 999px;
}

.arrange-piece strong {
  display: none;
}

.arrange-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.arrange-controls .base-action {
  min-width: 84px;
}

.arrange-controls .base-action:disabled {
  opacity: 0.42;
  cursor: default;
}

.arrange-status {
  min-height: 34px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.message-list,
.partner-list,
.record-grid {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.message-row,
.partner-row,
.record-card {
  min-height: 62px;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 10px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026)),
    rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.message-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 10px;
  padding: 9px 10px;
  text-align: left;
}

.message-row strong,
.partner-row strong,
.record-card strong {
  font-size: 14px;
}

.message-row small,
.partner-row small,
.record-card small {
  color: var(--muted);
  font-size: 11px;
}

.message-row span {
  grid-row: 1 / span 2;
  grid-column: 2;
  border-radius: 5px;
  padding: 4px 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.075);
  font-size: 11px;
  font-weight: 800;
}

.message-row.unread span {
  color: #101315;
  background: linear-gradient(180deg, #73dccd, var(--teal));
}

.record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-card {
  height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
}

.partner-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  text-align: left;
}

.partner-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #101315;
  font-weight: 900;
}

.partner-avatar.human {
  background: var(--gold);
}

.partner-avatar.beast {
  background: var(--green);
}

.partner-avatar.spirit {
  background: var(--teal);
}

.growth-panel.compact .growth-orbit {
  height: 156px;
}

.stat-list.wide,
.profile-stats.in-window {
  margin-top: 12px;
}

.setting-list.in-window {
  margin-top: 12px;
}

.profile-sheet {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: end;
  background: rgba(0, 0, 0, 0.45);
}

.profile-sheet.is-open {
  display: flex;
}

.profile-panel {
  width: 100%;
  height: calc(100% - 64px);
  max-height: calc(100% - 64px);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(244, 240, 231, 0.18);
  background: rgba(17, 19, 21, 0.98);
  padding: 14px 12px 20px;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.45);
}

.profile-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.profile-panel-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.profile-panel-head::before {
  content: "";
}

.profile-panel-head > div {
  min-width: 0;
  text-align: center;
}

.profile-panel-head .icon-button {
  grid-column: 3;
}

.profile-panel-head h2 {
  line-height: 1;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(244, 240, 231, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.profile-stats div,
.setting-list button {
  border: 1px solid rgba(244, 240, 231, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-stats div {
  padding: 9px;
}

.profile-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.profile-detail {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-detail::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.profile-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-top: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-content::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.profile-content > .breakthrough-pane {
  height: 100%;
  min-height: 0;
}

.profile-derived .derived-row {
  min-height: 82px;
}

.setting-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.setting-list button {
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  cursor: pointer;
}

.setting-list strong {
  color: var(--teal);
}

.bottom-dock {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.07), rgba(17, 19, 21, 0.96)),
    rgba(17, 19, 21, 0.96);
  backdrop-filter: blur(16px);
}

.dock-exp {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(83, 196, 178, 0.42);
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 7px;
  align-items: center;
  gap: 7px 8px;
  padding: 7px 9px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.14), rgba(83, 196, 178, 0.06)),
    rgba(11, 14, 16, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.dock-exp-label {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.dock-exp-rate {
  justify-self: start;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.dock-exp-track {
  grid-column: 1 / -1;
  min-width: 0;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 240, 231, 0.12);
}

.dock-exp-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  box-shadow: 0 0 12px rgba(83, 196, 178, 0.34);
}

.dock-exp-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.dock-exp-value strong {
  color: var(--gold);
  font-size: 11px;
}

.dock-exp-value span {
  color: var(--muted);
}

.dock-button,
.dock-home {
  min-width: 0;
  height: 56px;
  border: 1px solid rgba(244, 240, 231, 0.14);
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.dock-home {
  height: 64px;
  color: #101315;
  border-color: var(--teal);
  background: linear-gradient(180deg, #74dece, var(--teal));
  box-shadow: 0 10px 26px rgba(83, 196, 178, 0.24);
}

.dock-button span,
.dock-home span {
  font-size: 11px;
  font-weight: 800;
}

.dock-menu {
  color: var(--ink);
  border-color: rgba(83, 196, 178, 0.38);
  background:
    linear-gradient(180deg, rgba(83, 196, 178, 0.18), rgba(83, 196, 178, 0.075)),
    rgba(0, 0, 0, 0.18);
}

@media (max-width: 480px) {
  .prototype-stage {
    padding: 0;
  }

  .phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .top-hud {
    padding-top: max(10px, env(safe-area-inset-top));
  }
}

@media (max-height: 760px) {
  .phone-shell {
    min-height: 0;
  }

  .home-view {
    grid-template-rows: auto 1fr;
  }
}
