:root {
  --ink: #171717;
  --muted: #5f6368;
  --paper: #f3efe7;
  --panel: #fff;
  --line: #252525;
  --acid: #67e8a5;
  --sol-green: #14f195;
  --hot: #ff4d6d;
  --coin: #f7c948;
  --blue: #00c2ff;
  --violet: #9945ff;
  --gray: #d8d8d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(96px, 18vh, 180px) 24px 40px;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gate-card {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100vw - 48px));
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 8px 0 var(--line);
  padding: 46px clamp(18px, 3vw, 30px) 26px;
  text-align: center;
}

.gate-corner-brand {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
  color: var(--ink);
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.25;
}

#login-card {
  min-height: 230px;
  padding-top: 50px;
  padding-bottom: 34px;
}

.gate-brand {
  position: absolute;
  top: clamp(18px, 3vh, 34px);
  left: 20px;
  right: 20px;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.gate-logo {
  display: block;
  width: clamp(96px, 14vw, 160px);
  height: auto;
  object-fit: contain;
}

.brand-strip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(620px, calc(100vw - 80px));
}

.brand-strip > span {
  display: inline-block;
  max-width: min(620px, 100%);
  padding: 7px 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--line);
  color: var(--ink);
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(8px, 0.82vw, 12px);
  font-weight: 400;
  line-height: 1.45;
  text-transform: uppercase;
}

.question-cloud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.question-cloud span {
  position: absolute;
  width: var(--scribble-width, min(300px, 25vw));
  color: rgba(23, 23, 23, var(--scribble-opacity, 0.15));
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: clamp(17px, var(--scribble-size, 2.2vw), 43px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
  transform: rotate(var(--tilt)) scaleX(var(--scribble-stretch, 1));
  transform-origin: 50% 55%;
}

.question-cloud span::after {
  content: none;
}

.question-cloud .scribble-0 {
  --scribble-size: 2.85vw;
  --scribble-opacity: 0.18;
  --scribble-stretch: 1.1;
}

.question-cloud .scribble-1 {
  --scribble-size: 2.3vw;
  --scribble-opacity: 0.14;
  --scribble-stretch: 0.94;
}

.question-cloud .scribble-2 {
  --scribble-size: 2vw;
  --scribble-opacity: 0.12;
  --scribble-stretch: 1.04;
}

.question-cloud .scribble-3 {
  --scribble-size: 2.6vw;
  --scribble-opacity: 0.16;
}

.question-cloud .scribble-4 {
  --scribble-size: 2.15vw;
  --scribble-opacity: 0.13;
  --scribble-stretch: 1.16;
}

@media (max-width: 700px) {
  .question-cloud span {
    width: min(240px, 46vw);
    font-size: clamp(17px, var(--scribble-size, 7vw), 31px);
  }
}

.gate-card h1 {
  margin: 0 0 24px;
  white-space: nowrap;
  max-width: 100%;
  font-size: clamp(30px, calc((100vw - 96px) / 14), 56px);
  line-height: 1.16;
}

#login-card h1 {
  display: inline-block;
  width: max-content;
  max-width: 118%;
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(18px, calc((100vw - 120px) / 30), 30px);
  line-height: 1.45;
  text-align: center;
  transform: scaleX(0.86);
  transform-origin: center;
}

#login-card .gate-actions {
  margin-bottom: 16px;
}

.gate-card .form-title {
  display: block;
  width: 100%;
  white-space: nowrap;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1;
  text-align: left;
}

.gate-card p {
  color: var(--muted);
  line-height: 1.45;
}

.network-pill {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translate(100%, -50%) rotate(2.5deg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 8px;
  border: 2px solid var(--line);
  background: #e8fff3;
  box-shadow: 3px 3px 0 var(--line);
}

.network-pill strong,
.network-pill span {
  display: block;
}

.network-pill strong {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.network-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.network-pill.warning {
  background: #fff1b8;
}

@media (max-width: 560px) {
  .gate {
    place-items: start center;
    min-height: 100dvh;
    padding: 116px 14px calc(120px + env(safe-area-inset-bottom));
  }

  .gate-corner-brand {
    top: 14px;
    left: 14px;
  }

  .gate-logo {
    width: 74px;
  }

  .gate-card {
    width: 100%;
    padding: 28px 14px 24px;
    box-shadow: 6px 6px 0 var(--line);
  }

  #login-card {
    min-height: 210px;
    padding-top: 34px;
    padding-bottom: 26px;
  }

  .gate-card h1 {
    font-size: clamp(20px, calc((100vw - 52px) / 13.6), 38px);
  }

  #login-card h1 {
    white-space: normal;
    width: auto;
    max-width: 100%;
    font-size: clamp(12px, 3.6vw, 18px);
    line-height: 1.55;
    transform: none;
  }

  #connect-wallet {
    font-size: 10px;
  }

  .gate-card .form-title {
    font-size: clamp(36px, 12vw, 48px);
    line-height: 1.04;
    text-align: center;
  }

  #degen-form {
    margin-top: 58px;
    margin-bottom: 36px;
  }

  .brand-strip {
    max-width: calc(100vw - 38px);
  }

  .brand-strip > span {
    font-size: 7px;
    padding: 5px 8px;
  }

  .network-pill {
    top: auto;
    right: 0;
    bottom: -26px;
    align-items: center;
    flex-direction: row;
    transform: rotate(2.5deg);
  }

  .network-pill span {
    text-align: left;
  }

  .preview {
    grid-template-columns: 88px 1fr;
    gap: 12px;
    margin: 8px 0 14px;
    text-align: left;
  }

  .preview .avatar {
    width: 88px;
    height: 88px;
  }

  .preview .avatar span {
    width: 50px;
    height: 66px;
    border-radius: 28px 28px 0 0;
  }

  .preview .avatar span::before,
  .preview .avatar span::after {
    top: 26px;
    width: 5px;
    height: 5px;
  }

  .preview .avatar span::before {
    left: 16px;
  }

  .preview .avatar span::after {
    right: 16px;
  }

  #form-wallet {
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.25;
  }

  .upload-hint {
    font-size: 12px;
    line-height: 1.25;
  }

  label,
  fieldset {
    margin-top: 12px;
    text-align: left;
  }

  #degen-form label,
  #degen-form legend {
    text-align: center;
  }

  input[type="text"],
  input:not([type]) {
    min-height: 42px;
    padding: 8px 10px;
  }

  .segmented {
    gap: 6px;
  }

  .segmented span {
    min-height: 38px;
    padding: 6px;
    font-size: 13px;
  }

  .form-divider {
    margin: 16px 0 14px;
  }

  #degen-form .gate-actions {
    gap: 8px;
  }
}

.gate-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

#degen-form .gate-actions {
  grid-template-columns: 1fr 1fr;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 2px solid var(--line);
  background: var(--acid);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

#connect-wallet {
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 1.05vw, 14px);
  line-height: 1.3;
  text-transform: uppercase;
}

.primary:disabled {
  cursor: wait;
  opacity: 0.85;
}

.primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

.primary:disabled:hover {
  transform: none;
  box-shadow: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(23, 23, 23, 0.22);
  border-top-color: var(--line);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.notice {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 13px;
}

label,
fieldset {
  display: block;
  margin-top: 14px;
}

label,
legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input[type="text"],
input:not([type]) {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #fff;
}

fieldset {
  padding: 0;
  border: 0;
}

.form-divider {
  height: 2px;
  margin: 22px 0 18px;
  background: linear-gradient(90deg, var(--line), transparent);
  opacity: 0.35;
}

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

.segmented label {
  margin: 0;
}

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

.segmented span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 2px solid var(--line);
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.segmented label:nth-child(1) input:checked + span {
  background: var(--blue);
}

.segmented label:nth-child(2) input:checked + span {
  background: var(--violet);
  color: #fff;
}

.segmented label:nth-child(3) input:checked + span {
  background: var(--sol-green);
}

.preview {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 18px;
  margin: 8px 0 18px;
}

.preview .avatar {
  width: 116px;
  height: 116px;
  margin: 0;
}

.avatar-upload {
  padding: 0;
  cursor: pointer;
}

.avatar-upload:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

.preview .avatar span {
  width: 64px;
  height: 84px;
  border-radius: 34px 34px 0 0;
}

.preview .avatar span::before,
.preview .avatar span::after {
  top: 32px;
  width: 6px;
  height: 6px;
}

.preview .avatar span::before {
  left: 20px;
}

.preview .avatar span::after {
  right: 20px;
}

.image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 7vw, 74px);
  line-height: 0.92;
}

h2 {
  margin-bottom: 14px;
  font-size: 19px;
}

.avatar {
  display: grid;
  place-items: end center;
  height: 180px;
  margin-bottom: 16px;
  border: 3px solid var(--line);
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(23, 23, 23, 0.12) 48% 52%, transparent 52%),
    #bdf4dc;
  overflow: hidden;
}

.avatar span {
  width: 100px;
  height: 132px;
  border: 3px solid var(--line);
  border-bottom: 0;
  border-radius: 48px 48px 0 0;
  background: linear-gradient(var(--hot) 0 28%, #f6b36d 28% 52%, #2f2f2f 52%);
  position: relative;
}

.avatar span::before,
.avatar span::after {
  content: "";
  position: absolute;
  top: 45px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.avatar span::before {
  left: 30px;
}

.avatar span::after {
  right: 30px;
}

.handle {
  margin-bottom: 5px;
  color: var(--ink) !important;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.wallet {
  min-height: 20px;
  margin-bottom: 14px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ghost {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.ghost:hover,
.side-action:not(:disabled):hover,
.menu-item:hover,
.menu-help:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

.log-head {
  display: block;
}

ol {
  margin: 0;
  padding-left: 22px;
}

li {
  margin-bottom: 10px;
  line-height: 1.35;
}

li.good {
  color: #006b3f;
}

li.bad {
  color: #9d1535;
}

li.weird {
  color: #4b32a8;
}

#log {
  list-style: none;
  padding-left: 0;
}

#log li {
  font-weight: 800;
}

.sim-window {
  width: min(1180px, calc(100vw - 28px));
  margin: 28px auto;
  background: transparent;
}

.sim-brand {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 8px;
}

.sim-brand strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  line-height: 0.9;
}

.sim-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sim-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 42px;
  padding: 6px;
  margin-bottom: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 5px 5px 0 var(--line);
}

.sim-status + .sim-log {
  margin-bottom: 12px;
}

.sim-status div {
  min-width: 130px;
  padding: 5px 9px;
  border: 2px solid var(--line);
  background: #fff;
}

.sim-status .is-clickable {
  cursor: pointer;
}

.sim-status .is-clickable:hover,
.sim-status .is-clickable:focus-visible {
  background: #e8fff3;
  outline: 0;
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--line);
}

.sim-status .status-clock {
  min-width: 92px;
}

.sim-status span,
.sim-status strong {
  display: block;
}

.sim-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sim-status strong {
  margin-top: 2px;
  font-size: 16px;
}

.sim-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  min-height: 36px;
  padding: 4px;
  margin-bottom: 10px;
  border: 3px solid var(--line);
  background: #fff;
}

.menu-item,
.menu-help {
  min-height: 28px;
  padding: 4px 12px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.menu-item.active {
  border-color: var(--line);
  background: var(--category-color, var(--acid));
  font-weight: 800;
}

.menu-item[data-category="work"],
.sim-actions[data-category="work"] {
  --category-color: #c9f7ff;
}

.menu-item[data-category="trading"],
.sim-actions[data-category="trading"] {
  --category-color: #ffe8a8;
}

.menu-item[data-category="social"],
.sim-actions[data-category="social"] {
  --category-color: #eee6ff;
}

.menu-item[data-category="love"],
.sim-actions[data-category="love"] {
  --category-color: #ffd9e8;
}

.menu-item[data-category="life"],
.sim-actions[data-category="life"] {
  --category-color: #e8fff3;
}

.menu-item[data-category="special"],
.sim-actions[data-category="special"] {
  --category-color: #ffd8bd;
}

.menu-help {
  margin-left: auto;
  text-decoration: underline;
}

.sim-grid {
  display: grid;
  grid-template-columns: 310px minmax(360px, 1fr) minmax(280px, 320px);
  grid-template-areas:
    "portrait center side";
  gap: 12px;
  align-items: start;
}

.sim-main,
.sim-actions,
.sim-bonus,
.sim-wallet,
.sim-log,
.sim-portrait {
  border: 3px solid var(--line);
  background: #fff;
  padding: 8px;
  box-shadow: 5px 5px 0 var(--line);
}

.sim-center {
  grid-area: center;
  display: grid;
  gap: 12px;
  align-content: start;
}

.sim-side {
  grid-area: side;
  display: grid;
  gap: 12px;
  align-content: start;
}

.sim-portrait {
  grid-area: portrait;
  min-height: 520px;
}

.sim-portrait .avatar {
  place-items: center;
  height: 285px;
  background-color: #bdf4dc;
}

.sim-portrait .avatar span {
  width: 150px;
  height: 200px;
  border-radius: 72px 72px 0 0;
}

.sim-portrait .avatar span::before,
.sim-portrait .avatar span::after {
  top: 74px;
  width: 13px;
  height: 13px;
}

.sim-portrait .avatar span::before {
  left: 46px;
}

.sim-portrait .avatar span::after {
  right: 46px;
}

.sim-portrait .ghost {
  margin-top: 10px;
}

.sim-main {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px;
}

.main-status,
.main-pending,
.main-work-actions,
.sim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #fff;
}

.main-status {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  min-height: 112px;
  background: #e8fff3;
}

.main-status span,
.main-pending > span,
.main-work-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.main-status strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

.main-status p {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.main-pending {
  display: block;
  min-height: 104px;
}

.main-work-actions {
  display: block;
  min-height: 92px;
}

.main-work-actions {
  background: #f7fbff;
}

.main-work-actions.is-working {
  background: #e8fff3;
}

.main-work-actions.has-work-event {
  background: #fff7e7;
}

.work-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding: 10px;
  border: 2px solid var(--line);
  background: #fff;
}

.work-status strong,
.work-status span,
.work-status em,
.work-status b {
  display: block;
}

.work-status strong {
  font-size: 18px;
  font-weight: 950;
}

.work-status span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.work-status-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.work-status em,
.work-status b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.work-status em {
  font-style: normal;
}

.work-status b {
  padding: 3px 7px;
  border: 2px solid var(--line);
  background: #e8fff3;
}

.sim-row span {
  color: #222;
}

.sim-row strong {
  font-weight: 400;
}

.stat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.portrait-stats {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
}

.bonus-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(37, 37, 37, 0.08);
  text-transform: capitalize;
}

.bonus-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.bonus-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.panel-mini-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-line {
  min-height: 0;
}

.meter-line {
  display: block;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 2px solid rgba(34, 34, 34, 0.22);
  background: transparent;
}

.meter-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.meter-head span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.meter-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.stat-delta {
  display: inline-grid;
  min-width: 34px;
  padding: 2px 5px;
  border: 2px solid var(--line);
  background: #fff;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.stat-delta.positive {
  color: #127a3c;
  background: #d8ffe9;
}

.stat-delta.negative {
  color: #9a2535;
  background: #ffd8bd;
}

.stat-meter {
  height: 8px;
  border: 2px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(23, 23, 23, 0.08) 0 1px, transparent 1px 12px),
    #fff;
  overflow: hidden;
}

.stat-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #60e49a, #14f195);
  transition: width 520ms steps(8, end), background-color 180ms ease;
}

.stat-energy .stat-meter span {
  background: linear-gradient(90deg, #fff1a8, #f7c948);
}

.stat-health .stat-meter span {
  background: linear-gradient(90deg, #ffb3ad, #ff4d4d);
}

.stat-stress .stat-meter span {
  background: linear-gradient(90deg, #eee6ff, #9945ff);
}

.stat-confidence .stat-meter span {
  background: linear-gradient(90deg, #eee6ff, #9945ff);
}

.stat-focus .stat-meter span {
  background: linear-gradient(90deg, #d8ffe9, #14f195);
}

.meter-line.pulse-up {
  animation: statPulseUp 700ms steps(2, end);
}

.meter-line.pulse-down {
  animation: statPulseDown 700ms steps(2, end);
}

@keyframes statPulseUp {
  0%, 100% { background: #fff; }
  45% { background: #d8ffe9; }
}

@keyframes statPulseDown {
  0%, 100% { background: #fff; }
  45% { background: #ffd8bd; }
}

.condition-line {
  border-top: 2px solid var(--line);
  background: #e8fff3;
  text-transform: capitalize;
}

.condition-line strong {
  font-weight: 900;
}

.pending-list {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pending-item {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.pending-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pending-meta span {
  color: var(--ink);
  font-weight: 800;
}

.pending-meta strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pending-progress {
  height: 10px;
  border: 2px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.pending-progress span {
  display: block;
  height: 100%;
  background: var(--acid);
}

.pending-item.ready .pending-meta strong {
  color: #127a3c;
}

.pending-item.checkpoint .pending-meta strong {
  color: #9a4d00;
}

.pending-item.checkpoint .pending-progress span {
  background: #ffd8bd;
}

.claim-button {
  width: fit-content;
  min-width: 148px;
  border: 2px solid var(--line);
  background: var(--acid);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow);
}

.claim-button:hover {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--shadow);
}

.paycheck-claim {
  margin-top: 8px;
  background: #d8ffe9;
}

.sim-actions {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sim-wallet {
  min-height: 220px;
  overflow: hidden;
}

.swap-box {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 2px solid var(--line);
  background: #fff;
}

.swap-meta,
.swap-actions,
.swap-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.swap-meta {
  grid-template-columns: 1fr 1fr;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.swap-meta span:last-child {
  text-align: right;
}

.swap-row {
  grid-template-columns: minmax(84px, 0.7fr) minmax(0, 1fr);
}

.swap-actions {
  grid-template-columns: 1fr 1fr;
}

.swap-box select,
.swap-box input,
.swap-box button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.swap-box input {
  padding: 6px 8px;
  appearance: textfield;
}

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

.swap-box button {
  cursor: pointer;
}

.swap-box button:first-child {
  background: var(--acid);
}

.swap-box button:last-child {
  background: #ffb3ad;
  color: #5f0717;
}

.swap-box button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

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

.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border: 2px solid var(--line);
  background: #e8fff3;
}

.wallet-row:nth-child(2n) {
  background: #eee6ff;
}

.wallet-row.meme-row {
  background: #c9f7ff;
}

.mini-sell {
  margin-top: 3px;
  padding: 2px 8px;
  border: 2px solid var(--line);
  background: #ffb3ad;
  color: #5f0717;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.mini-sell:hover {
  background: #ff7d75;
}

.wallet-row div:last-child {
  text-align: right;
}

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

.wallet-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.tax-status {
  margin-top: 10px;
  padding: 8px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.side-action {
  position: relative;
  min-height: 48px;
  border: 2px solid var(--line);
  background: var(--category-color, #fff);
  cursor: pointer;
}

.side-action:disabled {
  cursor: not-allowed;
}

.side-action.is-locked {
  position: relative;
  color: rgba(23, 23, 23, 0.46);
  background:
    repeating-linear-gradient(135deg, rgba(23, 23, 23, 0.08) 0 5px, transparent 5px 11px),
    #f0ede6;
  box-shadow: none;
}

.side-action.is-locked strong,
.side-action.is-locked span {
  opacity: 0.58;
}

.side-action.is-locked::after {
  content: attr(data-lock-reason);
  position: absolute;
  top: 6px;
  right: 8px;
  color: #8a2f2f;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.side-action.is-busy {
  background:
    repeating-linear-gradient(90deg, rgba(23, 23, 23, 0.08) 0 4px, transparent 4px 10px),
    var(--category-color, #fff);
  opacity: 0.72;
}

.side-action.is-busy::after {
  content: "Busy";
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.action-work {
  --category-color: #c9f7ff;
}

.action-wallet {
  --category-color: #d8ffe9;
}

.action-trading {
  --category-color: #ffe8a8;
}

.action-social {
  --category-color: #eee6ff;
}

.action-love {
  --category-color: #ffd9e8;
}

.action-life {
  --category-color: #e8fff3;
}

.action-special {
  --category-color: #ffd8bd;
}

.side-action strong,
.side-action span {
  display: block;
}

.side-action span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sim-log {
  position: relative;
  min-height: 58px;
  overflow: hidden;
}

.sim-log .log-head {
  margin-bottom: 3px;
}

.sim-log .log-head h2 {
  font-size: 16px;
  line-height: 1;
}

.sim-log.is-collapsed #log {
  display: block;
  height: 24px;
  overflow: hidden;
  border-block: 2px solid rgba(37, 37, 37, 0.18);
}

.sim-log.is-collapsed #log li {
  display: none;
}

.sim-log.is-collapsed #log li:first-child {
  display: block;
  margin: 0;
  padding: 1px 0 2px;
  animation: eventTicker 480ms steps(6, end);
}

.sim-log.is-expanded {
  min-height: 150px;
  max-height: 260px;
  overflow: visible;
}

.sim-log.is-expanded #log {
  max-height: 178px;
  overflow-y: auto;
  padding-right: 6px;
}

.log-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 18px;
  margin: 4px auto 0;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
}

.log-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--line);
}

.sim-log.is-expanded .log-toggle::before {
  border-top: 0;
  border-bottom: 8px solid var(--line);
}

@keyframes eventTicker {
  from {
    transform: translateY(-120%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.encounter {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    rgba(243, 239, 231, 0.92);
  background-size: 24px 24px;
}

.encounter-card {
  width: min(680px, 100%);
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 8px 0 var(--line);
  padding: 22px;
}

.encounter.situation-mode .encounter-card {
  text-align: center;
}

.encounter.job-mode .encounter-card {
  text-align: left;
}

.encounter.residence-mode #encounter-kicker,
.encounter.residence-mode #encounter-art {
  display: none;
}

.encounter.current-job-mode #encounter-kicker,
.encounter.current-job-mode #encounter-art {
  display: none;
}

.encounter-art {
  min-height: 190px;
  margin-bottom: 18px;
  border: 3px solid var(--line);
  background:
    radial-gradient(circle at 18% 22%, rgba(130, 255, 184, 0.85) 0 12%, transparent 13%),
    radial-gradient(circle at 82% 72%, rgba(184, 140, 255, 0.8) 0 14%, transparent 15%),
    linear-gradient(135deg, #c9f7ff 0 45%, #fff7e7 45% 55%, #f0e8ff 55% 100%);
  box-shadow: 5px 5px 0 var(--line);
}

.encounter-art::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 46px auto 0;
  border: 3px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 58px;
  font-weight: 950;
  line-height: 1;
}

.encounter-art.work {
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #c9f7ff 0 46%, #fff7e7 46% 58%, #d8ffe9 58% 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.encounter-art.wallet,
.encounter-art.trading {
  background:
    repeating-linear-gradient(0deg, rgba(23, 23, 23, 0.08) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, #d8ffe9 0 36%, #eee6ff 36% 68%, #c9f7ff 68% 100%);
}

.encounter-art.social,
.encounter-art.love {
  background:
    radial-gradient(circle at 35% 40%, rgba(238, 230, 255, 0.95) 0 20%, transparent 21%),
    radial-gradient(circle at 66% 58%, rgba(255, 216, 189, 0.95) 0 18%, transparent 19%),
    linear-gradient(135deg, #fff7e7, #c9f7ff);
}

.encounter-art.life,
.encounter-art.special {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(23, 23, 23, 0.12) 48% 52%, transparent 52%),
    linear-gradient(135deg, #d8ffe9, #fff7e7 48%, #eee6ff);
}

.encounter-art.job {
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #c9f7ff 0 34%, #d8ffe9 34% 68%, #fff7e7 68% 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.encounter-art.job::before {
  content: "JOB";
  width: 132px;
  font-size: 36px;
}

.encounter-art.residence {
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #fff 0 34%, #d8ffe9 34% 68%, #c9f7ff 68% 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.encounter-art.residence::before {
  content: "HOME";
  width: 150px;
  font-size: 34px;
}

.encounter-card h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.98;
}

.encounter-card p {
  color: var(--muted);
  line-height: 1.45;
}

.encounter.job-mode .encounter-card p {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.job-card-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid var(--line);
  background: #fff;
  padding: 8px 10px;
}

.job-card-line.full {
  grid-column: 1 / -1;
}

.job-image {
  grid-column: 1 / -1;
  min-height: 170px;
  border: 3px solid var(--line);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #c9f7ff 0 34%, #d8ffe9 34% 68%, #fff 68% 100%);
  background-size: 22px 22px, 22px 22px, auto;
  overflow: hidden;
}

.job-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.residence-image {
  grid-column: 1 / -1;
  min-height: 170px;
  border: 3px solid var(--line);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #c9f7ff, #fff 48%, #d8ffe9);
  background-size: 22px 22px, 22px 22px, auto;
  overflow: hidden;
}

.residence-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.job-divider {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.job-divider i {
  display: block;
  height: 10px;
  border-block: 2px solid var(--line);
  background:
    repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
  opacity: 0.82;
}

.job-divider strong {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--line);
}

.job-question {
  grid-column: 1 / -1;
  border: 2px solid var(--line);
  background: #fff;
  padding: 16px 18px;
  font-weight: 850;
  box-shadow: inset 0 0 0 4px rgba(37, 37, 37, 0.05);
}

.encounter.situation-mode .encounter-card p {
  max-width: 560px;
  margin-inline: auto;
  font-size: 18px;
}

.encounter.job-mode .encounter-card p {
  max-width: none;
  margin-inline: 0;
  font-size: 16px;
}

.encounter-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.encounter.situation-mode .encounter-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.encounter-options button {
  min-height: 50px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.encounter-options button:nth-child(1) {
  background: #c9f7ff;
}

.encounter-options button:nth-child(2) {
  background: #eee6ff;
}

.encounter-options button:nth-child(3) {
  background: #d8ffe9;
}

.encounter-options button:nth-child(4) {
  background: #fff7e7;
}

.encounter-options button.danger-action {
  background: #ffb3ad;
  color: #5f0717;
}

.encounter-options button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

.store-modal {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(5px);
}

.store-card {
  width: min(860px, 100%);
  max-height: min(82dvh, 760px);
  overflow: auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(14, 18, 25, 0.98), rgba(9, 12, 18, 0.96));
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 20px;
}

.store-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.store-head .kicker {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.96;
}

.store-close {
  min-width: 96px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 900;
}

.store-copy {
  max-width: 680px;
  margin: 14px 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.45;
}

.store-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.store-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.store-tabs button.active {
  border-color: rgba(97, 230, 149, 0.75);
  background: rgba(97, 230, 149, 0.18);
  color: #8cffb8;
}

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

.store-item {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.065);
}

.store-item-art {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(201, 247, 255, 0.2), rgba(97, 230, 149, 0.12) 48%, rgba(142, 97, 255, 0.2));
  background-size: 18px 18px, 18px 18px, auto;
}

.store-item-art span {
  display: inline-grid;
  place-items: center;
  min-width: 78px;
  min-height: 42px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 5px;
  background: rgba(6, 9, 14, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.store-item-body {
  padding: 12px;
}

.store-item-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.store-item h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.05;
}

.store-item strong {
  color: #8cffb8;
  font-size: 13px;
  white-space: nowrap;
}

.store-item p {
  min-height: 54px;
  margin: 10px 0 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.35;
}

.store-item button {
  width: 100%;
  border: 1px solid rgba(97, 230, 149, 0.75);
  border-radius: 4px;
  background: rgba(97, 230, 149, 0.88);
  color: #08100d;
  font-weight: 950;
}

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

  .work-status em {
    text-align: left;
  }

  .work-status-meta {
    justify-items: start;
  }

  .work-status b {
    text-align: left;
  }

  .encounter.job-mode .encounter-card p {
    grid-template-columns: 1fr;
  }

  .encounter.situation-mode .encounter-options {
    grid-template-columns: 1fr;
  }

  .encounter-art {
    min-height: 150px;
  }

  .encounter-art::before {
    width: 72px;
    height: 72px;
    margin-top: 36px;
    font-size: 46px;
  }

  .store-card {
    max-height: 86dvh;
    padding: 16px;
  }

  .store-head {
    align-items: center;
  }

  .store-items {
    grid-template-columns: 1fr;
  }

  .store-item p {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .sim-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "center"
      "side";
  }

  .sim-actions {
    grid-column: auto;
  }

  .sim-portrait {
    min-height: auto;
  }

  .sim-portrait .avatar {
    height: 220px;
  }

  .sim-portrait .avatar span {
    width: 180px;
    height: 205px;
  }

  .stat-list {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  .gate {
    place-items: center;
    padding: 120px 12px 28px;
  }

  .gate-brand {
    top: 22px;
  }

  .sim-brand {
    display: grid;
    align-items: start;
    gap: 4px;
  }

  .sim-window {
    width: min(100vw - 16px, 980px);
    margin-top: 12px;
  }

  .gate-actions,
  .segmented {
    grid-template-columns: 1fr;
  }

  .sim-menu {
    flex-wrap: wrap;
  }
}

/* Map UI shell */
#game-shell.sim-window {
  --hud-bg: rgba(10, 13, 18, 0.88);
  --hud-card: rgba(28, 34, 44, 0.82);
  --hud-line: rgba(255, 255, 255, 0.12);
  --hud-text: #f8fbff;
  --hud-muted: rgba(248, 251, 255, 0.68);
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #0a0d12;
  color: var(--hud-text);
  z-index: 20;
}

#game-shell .sim-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(390px, 1fr) minmax(150px, 210px) auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--hud-line);
  background: linear-gradient(180deg, rgba(9, 11, 16, 0.96), rgba(9, 11, 16, 0.82));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

#game-shell .sim-brand {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  margin: 0;
}

#game-shell .sim-brand strong {
  color: #fff;
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 400;
  line-height: 1.15;
}

#game-shell .sim-brand span {
  color: rgba(255, 255, 255, 0.74);
  font-family: "Press Start 2P", Arial, Helvetica, sans-serif;
  font-size: clamp(7px, 0.55vw, 9px);
  line-height: 1.5;
  white-space: nowrap;
}

#game-shell .sim-status {
  display: grid;
  grid-template-columns: 0.85fr 0.85fr minmax(170px, 1.5fr) minmax(120px, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#game-shell .sim-status div {
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--hud-line);
  border-radius: 4px;
  background: var(--hud-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#game-shell .sim-status .is-clickable:hover,
#game-shell .sim-status .is-clickable:focus-visible {
  background: rgba(39, 52, 66, 0.92);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 2px rgba(97, 230, 149, 0.28);
}

#game-shell .sim-status span,
#game-shell .sim-status strong {
  color: var(--hud-text);
}

#game-shell .sim-status span {
  color: var(--hud-muted);
  font-size: 11px;
  letter-spacing: 0;
}

#game-shell .sim-status strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .menu-help {
  min-height: 34px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  text-decoration: underline;
}

#game-shell .sim-bonus {
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid rgba(142, 97, 255, 0.65);
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(74, 49, 132, 0.96), rgba(33, 29, 73, 0.9));
  box-shadow: 0 0 24px rgba(142, 97, 255, 0.22);
}

#game-shell .sim-bonus .panel-head {
  margin: 0;
  padding: 0;
  border: 0;
}

#game-shell .sim-bonus h2,
#game-shell .sim-bonus #bonus-category {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-transform: uppercase;
}

#game-shell .bonus-card {
  margin-top: 3px;
  border: 0;
  background: transparent;
}

#game-shell .bonus-card strong {
  color: #61e695;
  font-size: 18px;
}

#game-shell .map-stage {
  position: absolute;
  inset: 88px 0 0;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(7, 10, 15, 0.16), rgba(7, 10, 15, 0.4)),
    url("./assets/maps/map_day.png");
  background-position: center;
  background-size: cover;
}

#game-shell.is-night .map-stage {
  background-image:
    linear-gradient(180deg, rgba(7, 10, 15, 0.08), rgba(7, 10, 15, 0.32)),
    url("./assets/maps/map_night.png");
}

#game-shell .map-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 58% 45%, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.3) 62%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

#game-shell .map-node {
  position: absolute;
  z-index: 2;
  max-width: 190px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(97, 230, 149, 0.92);
  border-radius: 5px;
  background: rgba(12, 16, 22, 0.58);
  color: #fff;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

#game-shell .map-node:hover,
#game-shell .map-node:focus-visible {
  outline: 0;
  transform: translateY(-2px);
  background: rgba(14, 19, 27, 0.82);
  box-shadow: 0 0 0 2px rgba(97, 230, 149, 0.35), 0 14px 34px rgba(0, 0, 0, 0.32);
}

#game-shell .map-node strong,
#game-shell .map-node span,
#game-shell .map-node em {
  display: block;
}

#game-shell .map-node strong {
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
}

#game-shell .map-node span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

#game-shell .map-node em {
  position: relative;
  margin-top: 3px;
  padding-left: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-style: normal;
}

#game-shell .map-node em::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ee753;
}

#game-shell .node-warehouse { left: 33%; top: 9%; }
#game-shell .node-gym { left: 75%; top: 8%; }
#game-shell .node-store { right: 6%; top: 29%; }
#game-shell .node-exchange { right: 6%; top: 51%; }
#game-shell .node-jobboard { left: 66%; top: 72%; }
#game-shell .node-blackmarket { left: 45%; top: 74%; }
#game-shell .node-park { left: 28%; top: 61%; }
#game-shell .node-cafe { left: 19%; top: 32%; }
#game-shell .node-home { left: 61%; top: 39%; }

#game-shell .sim-log {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 3;
  width: min(300px, calc(100vw - 32px));
  min-height: 0;
  max-height: none;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

#game-shell .sim-log .log-head h2 {
  color: rgba(255, 255, 255, 0.82);
}

#game-shell .sim-log.is-collapsed #log {
  height: 48px;
  border: 0;
}

#game-shell .sim-log #log {
  color: #ff5f66;
}

#game-shell .log-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  height: 20px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#game-shell .log-toggle::before {
  border-left-width: 6px;
  border-right-width: 6px;
  border-top-color: #fff;
}

#game-shell .dphone {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 4;
  width: 270px;
  max-width: calc(100vw - 32px);
}

#game-shell .dphone-frame {
  overflow: hidden;
  padding: 14px;
  border: 3px solid rgba(255, 255, 255, 0.46);
  border-radius: 34px;
  background: linear-gradient(180deg, #10151d, #07090d);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.8), 0 18px 44px rgba(0, 0, 0, 0.45);
}

#game-shell .dphone-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 8px 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

#game-shell .dphone-top strong {
  font-size: 12px;
  font-weight: 700;
}

#game-shell .sim-wallet {
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--hud-line);
  border-radius: 8px;
  background: rgba(20, 26, 34, 0.92);
  box-shadow: none;
}

#game-shell .sim-wallet .panel-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#game-shell .sim-wallet .panel-head h2,
#game-shell .sim-wallet .panel-head span {
  color: rgba(255, 255, 255, 0.82);
}

#game-shell .swap-box,
#game-shell .tax-status,
#game-shell .wallet-row {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
}

#game-shell .swap-box select,
#game-shell .swap-box input,
#game-shell .swap-box button,
#game-shell .mini-sell {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
}

#game-shell .dphone-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

#game-shell .dphone-apps button {
  min-height: 52px;
  border: 1px solid var(--hud-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
}

#game-shell .sim-bottom-panel {
  position: absolute;
  left: 330px;
  right: 250px;
  bottom: 24px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(260px, 0.9fr) minmax(230px, 0.8fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(9, 14, 20, 0.82);
  color: #fff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(4px);
}

#game-shell .sim-portrait,
#game-shell .sim-main,
#game-shell .sim-actions {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#game-shell .sim-portrait {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: start;
}

#game-shell .sim-portrait .avatar {
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

#game-shell .sim-portrait .avatar span {
  width: 62px;
  height: 74px;
}

#game-shell .handle,
#game-shell .wallet {
  color: rgba(255, 255, 255, 0.82);
}

#game-shell .stat-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

#game-shell .meter-line {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

#game-shell .meter-head {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

#game-shell .meter-head strong {
  color: rgba(255, 255, 255, 0.88);
}

#game-shell .stat-meter {
  height: 5px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

#game-shell .main-status,
#game-shell .main-pending,
#game-shell .main-work-actions {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(30, 60, 54, 0.55);
}

#game-shell .main-pending,
#game-shell .main-work-actions {
  margin-top: 8px;
  background: rgba(15, 20, 28, 0.62);
}

#game-shell .main-status span,
#game-shell .main-pending > span,
#game-shell .main-work-actions > span {
  color: rgba(255, 255, 255, 0.68);
}

#game-shell .main-status strong,
#game-shell .main-status p,
#game-shell .pending-list {
  color: #fff;
}

#game-shell .sim-actions .panel-head {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#game-shell .sim-actions .panel-head h2,
#game-shell #action-category {
  color: rgba(255, 255, 255, 0.82);
}

#game-shell .sim-menu {
  display: none;
}

#game-shell .action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 206px;
  overflow-y: auto;
  padding-right: 3px;
}

#game-shell .side-action {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

#game-shell .side-action span {
  color: rgba(255, 255, 255, 0.62);
}

#game-shell .side-action:hover:not(:disabled) {
  background: rgba(97, 230, 149, 0.22);
}

#game-shell .sim-bottom-panel {
  left: 50%;
  right: auto;
  bottom: 18px;
  width: min(930px, calc(100vw - 660px));
  min-width: 760px;
  max-height: 188px;
  transform: translateX(-50%);
  grid-template-columns: 370px minmax(250px, 1fr) 220px;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 13, 19, 0.78);
}

#game-shell .sim-bottom-panel > * {
  min-width: 0;
}

#game-shell .sim-portrait {
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#game-shell .sim-portrait .avatar {
  align-self: center;
  width: 78px;
  height: 78px;
}

#game-shell .sim-portrait .avatar span {
  width: 58px;
  height: 69px;
}

#game-shell .handle {
  margin: 0 0 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .wallet {
  margin: 0 0 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .stat-list {
  gap: 4px;
  margin-top: 0;
}

#game-shell .meter-line {
  min-height: 0;
}

#game-shell .meter-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 1px;
  font-size: 11px;
  line-height: 1;
}

#game-shell .meter-head strong {
  font-size: 11px;
}

#game-shell .stat-meter {
  height: 4px;
  border-width: 0;
}

#game-shell .sim-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
  overflow: hidden;
}

#game-shell .main-status,
#game-shell .main-pending,
#game-shell .main-work-actions {
  min-height: 0;
  padding: 10px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(14, 22, 29, 0.62);
}

#game-shell .main-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-content: start;
  background: rgba(22, 78, 66, 0.56);
}

#game-shell .main-status span,
#game-shell .main-pending > span,
#game-shell .main-work-actions > span {
  font-size: 11px;
  line-height: 1;
}

#game-shell .main-status strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1;
}

#game-shell .main-status p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.25;
}

#game-shell .main-pending {
  overflow: hidden;
}

#game-shell .main-pending .pending-list,
#game-shell .main-work-actions .pending-list {
  max-height: 56px;
  overflow-y: auto;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

#game-shell .main-work-actions {
  display: block;
  max-height: 58px;
  overflow: hidden;
  margin-top: 0;
}

#game-shell .main-work-actions.hidden {
  display: none;
}

#game-shell .work-status {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 5px;
  padding: 6px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

#game-shell .work-status strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .work-status span,
#game-shell .work-status em,
#game-shell .work-status b {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

#game-shell .work-status b {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(216, 255, 233, 0.1);
}

#game-shell .pending-item {
  gap: 4px;
  margin-top: 4px;
}

#game-shell .pending-meta span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .pending-meta strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

#game-shell .pending-progress {
  height: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
}

#game-shell .claim-button {
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  box-shadow: none;
  font-size: 12px;
}

#game-shell .sim-actions {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#game-shell .sim-actions .panel-head {
  margin-bottom: 7px;
}

#game-shell .sim-actions .panel-head h2 {
  font-size: 16px;
}

#game-shell .action-buttons {
  max-height: 132px;
  gap: 7px;
  overflow-y: auto;
}

#game-shell .side-action {
  min-height: 42px;
  padding: 6px 8px;
}

#game-shell .side-action strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .side-action span {
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-shell .sim-topbar {
  grid-template-columns: auto minmax(120px, 1fr) 260px auto;
  grid-template-areas:
    "brand spacer bonus exit"
    "status status bonus exit";
  gap: 8px 16px;
  align-items: center;
  min-height: 136px;
  padding: 14px 18px 14px;
}

#game-shell .sim-brand {
  grid-area: brand;
  align-self: end;
}

#game-shell .sim-status {
  grid-area: status;
  grid-template-columns: 170px 180px minmax(260px, 310px) 150px 140px;
  gap: 8px;
  align-self: start;
  max-width: 980px;
}

#game-shell .sim-status div {
  min-height: 62px;
  padding: 9px 14px;
}

#game-shell .sim-status span {
  font-size: 12px;
}

#game-shell .sim-status strong {
  font-size: 18px;
}

#game-shell .sim-bonus {
  grid-area: bonus;
  align-self: end;
  width: 260px;
  min-height: 62px;
  padding: 9px 14px;
}

#game-shell .sim-bonus h2,
#game-shell .sim-bonus #bonus-category {
  font-size: 12px;
}

#game-shell .bonus-card strong {
  font-size: 18px;
}

#game-shell .menu-help {
  grid-area: exit;
  align-self: center;
  font-size: 20px;
}

#game-shell .map-stage {
  inset: 136px 0 0;
  background-size: cover;
}

#game-shell .map-node.active {
  background: rgba(16, 28, 22, 0.88);
  box-shadow: 0 0 0 2px rgba(97, 230, 149, 0.48), 0 14px 34px rgba(0, 0, 0, 0.32);
}

@media (max-width: 1260px) {
  #game-shell .sim-topbar {
    grid-template-columns: 1fr auto;
  }

  #game-shell .sim-status {
    grid-column: 1 / -1;
    order: 3;
  }

  #game-shell .map-stage {
    inset: 136px 0 0;
  }

  #game-shell .sim-bottom-panel {
    left: 310px;
    right: 18px;
    grid-template-columns: minmax(280px, 1fr) minmax(250px, 1fr);
  }

  #game-shell .sim-actions {
    grid-column: 1 / -1;
  }

  #game-shell .action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 130px;
  }
}

@media (max-width: 920px) {
  #game-shell.sim-window {
    overflow-y: auto;
  }

  #game-shell .sim-topbar,
  #game-shell .map-stage,
  #game-shell .sim-log,
  #game-shell .dphone,
  #game-shell .sim-bottom-panel,
  #game-shell .map-node {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  #game-shell .sim-topbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  #game-shell .sim-brand {
    display: grid;
    gap: 4px;
  }

  #game-shell .sim-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #game-shell .map-stage {
    display: grid;
    gap: 12px;
    min-height: 100dvh;
    padding: 14px;
    background-position: center top;
  }

  #game-shell .map-node {
    width: 100%;
    max-width: none;
  }

  #game-shell .dphone {
    width: 100%;
  }

  #game-shell .dphone-frame {
    border-radius: 18px;
  }

  #game-shell .sim-bottom-panel {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 921px) {
  #game-shell .sim-topbar {
    grid-template-columns: minmax(340px, auto) minmax(540px, 1fr) 230px auto;
    grid-template-areas: "brand status bonus exit";
    min-height: 94px;
    padding: 10px 18px;
    gap: 12px;
  }

  #game-shell .sim-brand {
    align-self: center;
    gap: 12px;
  }

  #game-shell .sim-brand strong {
    font-size: 26px;
  }

  #game-shell .sim-brand span {
    font-size: 12px;
    max-width: 360px;
    white-space: normal;
  }

  #game-shell .sim-status {
    grid-template-columns: 120px 120px minmax(210px, 1.35fr) 135px 120px;
    max-width: none;
    align-self: center;
    gap: 7px;
  }

  #game-shell .sim-status div {
    min-height: 50px;
    padding: 7px 10px;
  }

  #game-shell .sim-status span {
    font-size: 10px;
  }

  #game-shell .sim-status strong {
    font-size: 16px;
  }

  #game-shell .sim-bonus {
    width: 230px;
    min-height: 50px;
    align-self: center;
    padding: 8px 12px;
  }

  #game-shell .sim-bonus h2,
  #game-shell .sim-bonus #bonus-category {
    font-size: 10px;
  }

  #game-shell .bonus-card strong {
    font-size: 16px;
  }

  #game-shell .menu-help {
    align-self: center;
    font-size: 17px;
  }

  #game-shell .map-stage {
    inset: 94px 0 0;
  }

  #game-shell .sim-log {
    width: 250px;
    padding: 9px 10px;
  }

  #game-shell .sim-log.is-collapsed #log {
    height: 40px;
  }

  #game-shell .sim-log .log-head h2 {
    font-size: 14px;
  }

  #game-shell .sim-log #log {
    font-size: 14px;
    line-height: 1.25;
  }

  #game-shell .map-node {
    max-width: 160px;
    padding: 8px 10px 8px 12px;
  }

  #game-shell .map-node strong {
    font-size: 14px;
  }

  #game-shell .map-node span {
    font-size: 12px;
  }

  #game-shell .map-node em {
    font-size: 11px;
  }

  #game-shell .dphone {
    left: 18px;
    bottom: 16px;
    width: 220px;
  }

  #game-shell .dphone-frame {
    padding: 11px;
    border-radius: 28px;
  }

  #game-shell .dphone-top {
    padding-bottom: 7px;
    font-size: 10px;
  }

  #game-shell .sim-wallet {
    padding: 9px;
  }

  #game-shell .sim-wallet .panel-head h2 {
    font-size: 16px;
  }

  #game-shell .swap-box {
    gap: 6px;
    padding: 7px;
  }

  #game-shell .swap-box select,
  #game-shell .swap-box input,
  #game-shell .swap-box button {
    min-height: 32px;
    font-size: 14px;
  }

  #game-shell .dphone-apps {
    gap: 6px;
  }

  #game-shell .dphone-apps button {
    min-height: 43px;
    font-size: 9px;
  }

  #game-shell .sim-bottom-panel {
    bottom: 14px;
    width: min(820px, calc(100vw - 520px));
    min-width: 680px;
    max-height: 156px;
    grid-template-columns: 300px minmax(230px, 1fr) 190px;
    padding: 8px 10px;
    gap: 8px;
  }

  #game-shell .sim-portrait {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 9px;
  }

  #game-shell .sim-portrait .avatar {
    width: 60px;
    height: 60px;
  }

  #game-shell .sim-portrait .avatar span {
    width: 46px;
    height: 54px;
  }

  #game-shell .handle {
    font-size: 10px;
  }

  #game-shell .wallet {
    margin-bottom: 5px;
    font-size: 9px;
  }

  #game-shell .meter-head,
  #game-shell .meter-head strong {
    font-size: 9px;
  }

  #game-shell .stat-meter {
    height: 3px;
  }

  #game-shell .main-status,
  #game-shell .main-pending,
  #game-shell .main-work-actions {
    padding: 8px;
  }

  #game-shell .main-status strong {
    font-size: 15px;
  }

  #game-shell .main-status p,
  #game-shell .pending-list {
    font-size: 11px;
  }

  #game-shell .main-pending .pending-list,
  #game-shell .main-work-actions .pending-list {
    max-height: 42px;
  }

  #game-shell .sim-actions .panel-head h2 {
    font-size: 14px;
  }

  #game-shell .action-buttons {
    max-height: 104px;
    gap: 6px;
  }

  #game-shell .side-action {
    min-height: 36px;
    padding: 5px 7px;
  }

  #game-shell .side-action strong {
    font-size: 11px;
  }

  #game-shell .side-action span {
    font-size: 10px;
  }
}

@media (min-width: 921px) {
  #game-shell .sim-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 86px;
    min-height: 86px;
    padding: 10px 16px;
  }

  #game-shell .sim-brand {
    flex: 0 1 360px;
    min-width: 220px;
  }

  #game-shell .sim-brand strong {
    font-size: clamp(15px, 1.25vw, 20px);
  }

  #game-shell .sim-brand span {
    max-width: 360px;
    font-size: clamp(6px, 0.48vw, 8px);
    line-height: 1.5;
  }

  #game-shell .sim-status {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 0.85fr 0.85fr minmax(170px, 1.55fr) minmax(120px, 1fr);
    gap: 7px;
  }

  #game-shell .sim-status div {
    min-width: 0;
    min-height: 50px;
    padding: 7px 9px;
  }

  #game-shell .sim-status span {
    font-size: 10px;
  }

  #game-shell .sim-status strong {
    font-size: 15px;
    line-height: 1.05;
  }

  #game-shell .sim-bonus {
    flex: 0 0 216px;
    width: 216px;
    min-height: 50px;
    padding: 8px 11px;
  }

  #game-shell .bonus-card strong {
    font-size: 15px;
  }

  #game-shell .menu-help {
    flex: 0 0 auto;
    padding-inline: 4px;
    font-size: 16px;
  }

  #game-shell .map-stage {
    inset: 86px 0 0;
  }

  #game-shell .dphone {
    left: 18px;
    bottom: 18px;
    width: 198px;
  }

  #game-shell .dphone-frame {
    padding: 9px;
    border-width: 2px;
    border-radius: 25px;
  }

  #game-shell .sim-wallet {
    padding: 8px;
  }

  #game-shell .sim-wallet .panel-head {
    margin-bottom: 7px;
    padding-bottom: 6px;
  }

  #game-shell .sim-wallet .panel-head h2 {
    font-size: 15px;
  }

  #game-shell .swap-meta {
    font-size: 9px;
  }

  #game-shell .swap-row,
  #game-shell .swap-actions {
    gap: 6px;
  }

  #game-shell .wallet-list {
    gap: 5px;
  }

  #game-shell .tax-status {
    margin-top: 7px;
    padding: 6px;
    font-size: 10px;
  }

  #game-shell .dphone-apps button {
    min-height: 38px;
  }

  #game-shell .sim-bottom-panel {
    bottom: 22px;
    width: min(760px, calc(100vw - 470px));
    min-width: 640px;
    height: 132px;
    max-height: 132px;
    grid-template-columns: 270px minmax(210px, 1fr) 180px;
    padding: 8px;
    overflow: hidden;
  }

  #game-shell .sim-portrait {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }

  #game-shell .sim-portrait .avatar {
    width: 54px;
    height: 54px;
  }

  #game-shell .sim-portrait .avatar span {
    width: 41px;
    height: 49px;
  }

  #game-shell .stat-list {
    gap: 3px;
  }

  #game-shell .sim-main {
    grid-template-rows: 56px minmax(0, 1fr);
    gap: 6px;
  }

  #game-shell .main-status,
  #game-shell .main-pending,
  #game-shell .main-work-actions {
    padding: 7px;
  }

  #game-shell .main-status p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 10px;
  }

  #game-shell .main-work-actions:not(.has-work-event):not(.has-paycheck) {
    display: none !important;
  }

  #game-shell .main-work-actions {
    max-height: 42px;
  }

  #game-shell .work-status {
    margin-top: 4px;
    padding: 5px;
  }

  #game-shell .work-status span {
    display: none;
  }

  #game-shell .claim-button {
    padding: 4px 8px;
    font-size: 10px;
  }

  #game-shell .action-buttons {
    max-height: 90px;
  }

  #game-shell .side-action {
    min-height: 34px;
  }

  #game-shell .map-node {
    max-width: 145px;
    padding: 7px 9px 7px 10px;
  }

  #game-shell .map-node strong {
    font-size: 13px;
  }

  #game-shell .map-node span,
  #game-shell .map-node em {
    font-size: 10px;
  }
}

@media (min-width: 921px) {
  #game-shell .dphone {
    bottom: 0;
    transform: translateY(calc(100% - 42px));
    transition: transform 260ms ease;
    cursor: pointer;
  }

  #game-shell .dphone.is-open {
    transform: translateY(0);
    cursor: default;
  }

  #game-shell .dphone::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    z-index: 2;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    transform: translateX(-50%);
    pointer-events: none;
  }

  #game-shell .sim-bottom-panel {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: min(760px, calc(100vw - 620px));
    min-width: 600px;
    height: 116px;
    max-height: 116px;
    grid-template-columns: 255px minmax(0, 1fr);
    transform: translateX(-50%);
  }

  #game-shell .sim-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 7px;
  }

  #game-shell .main-status,
  #game-shell .main-pending {
    height: 100%;
    min-height: 0;
  }

  #game-shell .main-work-actions {
    grid-column: 1 / -1;
    max-height: 36px;
  }

  #game-shell .main-work-actions.has-work-event,
  #game-shell .main-work-actions.has-paycheck {
    display: block !important;
  }

  #game-shell .sim-actions {
    position: fixed;
    right: 18px;
    top: 112px;
    bottom: 20px;
    z-index: 4;
    width: 270px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(9, 14, 20, 0.76);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(4px);
  }

  #game-shell .sim-actions .panel-head {
    margin-bottom: 10px;
  }

  #game-shell .sim-actions .panel-head h2 {
    font-size: 16px;
  }

  #game-shell .action-buttons {
    max-height: calc(100% - 34px);
    padding-right: 4px;
  }

  #game-shell .side-action {
    min-height: 44px;
  }

  #game-shell .side-action strong {
    font-size: 13px;
  }

  #game-shell .side-action span {
    font-size: 11px;
  }
}

@media (min-width: 921px) {
  #game-shell .node-gym {
    left: 70%;
    right: auto;
    top: 10%;
  }

  #game-shell .node-store {
    left: 76%;
    right: auto;
    top: 31%;
  }

  #game-shell .node-exchange {
    left: 73%;
    right: auto;
    top: 55%;
  }

  #game-shell .node-home {
    left: 58%;
    right: auto;
    top: 41%;
  }

  #game-shell .node-jobboard {
    left: 62%;
    right: auto;
    top: 72%;
  }

  #game-shell .sim-bottom-panel {
    left: 50%;
    right: auto;
    bottom: 18px;
    z-index: 5;
    width: min(880px, calc(100vw - 660px));
    min-width: 680px;
    height: 154px;
    max-height: 154px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas: "portrait main";
    gap: 12px;
    padding: 12px;
    overflow: hidden;
    transform: translateX(-50%);
  }

  #game-shell .sim-bottom-panel > .sim-portrait {
    grid-area: portrait;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding-right: 12px;
  }

  #game-shell .sim-bottom-panel > .sim-main {
    grid-area: main;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  #game-shell .sim-bottom-panel .main-status,
  #game-shell .sim-bottom-panel .main-pending {
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: hidden;
  }

  #game-shell .sim-bottom-panel .main-work-actions {
    grid-column: 1 / -1;
    min-height: 0;
    max-height: 44px;
    margin: 0;
    overflow: hidden;
  }

  #game-shell .sim-bottom-panel .main-work-actions:not(.has-work-event):not(.has-paycheck) {
    display: none !important;
  }

  #game-shell .sim-bottom-panel .main-work-actions.has-work-event,
  #game-shell .sim-bottom-panel .main-work-actions.has-paycheck {
    display: block !important;
  }

  #game-shell .sim-bottom-panel .main-status p {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #game-shell .sim-bottom-panel .main-pending .pending-list,
  #game-shell .sim-bottom-panel .main-work-actions .pending-list {
    max-height: 68px;
    overflow-y: auto;
  }

  #game-shell .sim-bottom-panel > .sim-actions {
    position: fixed;
    left: auto;
    right: 18px;
    top: 130px;
    bottom: 22px;
    z-index: 5;
    width: 272px;
    max-height: none;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(9, 14, 20, 0.76);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(4px);
  }

  #game-shell .sim-bottom-panel > .sim-actions .action-buttons {
    max-height: calc(100% - 36px);
    overflow-y: auto;
  }
}

@media (min-width: 921px) {
  #game-shell .dphone {
    left: 24px;
    bottom: 0;
    width: 351px;
    transform: translateY(calc(100% - 48px));
  }

  #game-shell .dphone-frame {
    padding: 14px;
    border-width: 3px;
    border-radius: 40px;
  }

  #game-shell .dphone-top {
    padding: 7px 14px 13px;
    font-size: 14px;
  }

  #game-shell .dphone-top strong {
    font-size: 14px;
  }

  #game-shell .sim-wallet {
    padding: 14px;
  }

  #game-shell .sim-wallet .panel-head h2 {
    font-size: 21px;
  }

  #game-shell .swap-row select,
  #game-shell .swap-row input,
  #game-shell .swap-actions button {
    min-height: 47px;
    font-size: 18px;
  }

  #game-shell .dphone-apps {
    gap: 9px;
    margin-top: 14px;
  }

  #game-shell .dphone-apps button {
    min-height: 62px;
    font-size: 12px;
  }

  #game-shell .sim-bottom-panel {
    left: 410px;
    right: 312px;
    bottom: 18px;
    width: auto;
    min-width: 0;
    height: 156px;
    max-height: 156px;
    transform: none;
    grid-template-columns: 310px minmax(0, 1fr);
    overflow: visible;
    backdrop-filter: none;
  }

  #game-shell .sim-bottom-panel > .sim-actions {
    position: fixed;
    left: auto;
    right: 18px;
    top: 128px;
    bottom: 22px;
    z-index: 7;
    width: 270px;
    max-height: none;
    margin: 0;
    overflow: hidden;
  }

  #game-shell .sim-bottom-panel > .sim-actions .panel-head {
    margin-bottom: 12px;
  }

  #game-shell .sim-bottom-panel > .sim-actions .panel-head h2 {
    font-size: 18px;
  }

  #game-shell .sim-bottom-panel > .sim-actions .action-buttons {
    max-height: calc(100% - 44px);
    gap: 9px;
  }

  #game-shell .sim-bottom-panel > .sim-actions .side-action {
    min-height: 54px;
  }

  #game-shell .sim-bottom-panel > .sim-actions .side-action strong {
    font-size: 17px;
  }

  #game-shell .sim-bottom-panel > .sim-actions .side-action span {
    font-size: 15px;
  }

  #game-shell .node-gym {
    left: calc(70% - 40px);
  }

  #game-shell .node-store {
    left: calc(76% - 70px);
  }

  #game-shell .node-exchange {
    left: calc(73% - 40px);
  }

  #game-shell .node-home {
    left: calc(58% - 40px);
  }
}
