:root {
  --ink: #151d27;
  --muted: #607086;
  --line: #d7e0e8;
  --paper: #f6f7f1;
  --panel: #ffffff;
  --panel-soft: #eef4ef;
  --green: #197454;
  --teal: #0f7180;
  --red: #b64242;
  --amber: #b6761b;
  --blue: #2868a8;
  --violet: #7553a5;
  --manga-ink: #0e1822;
  --shadow: 0 22px 55px rgba(21, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(25, 116, 84, 0.12), transparent 28%),
    radial-gradient(circle at 94% 12%, rgba(40, 104, 168, 0.11), transparent 31%),
    linear-gradient(180deg, #f7f8f3 0%, #edf2f1 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.boot-mark {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
}

.boot-line {
  width: 180px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--blue));
  animation: pulse 1.4s infinite ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleX(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 560px);
  background: #f7f8f3;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 46px 54px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 25% 20%, rgba(70, 146, 165, 0.24), transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(205, 155, 69, 0.2), transparent 34%),
    linear-gradient(135deg, #101b25 0%, #1c3038 48%, #162027 100%);
  color: #fff;
}

.brand {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-brandline,
.auth-copy,
.auth-worldbar {
  position: relative;
  z-index: 3;
}

.auth-brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-brandline span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.auth-kicker,
.auth-card-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-kicker {
  color: #ecd28a;
  margin-bottom: 14px;
}

.auth-copy {
  max-width: 900px;
}

.auth-copy h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(48px, 6.8vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.auth-copy p {
  max-width: 640px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  font-size: 18px;
  font-weight: 650;
}

.auth-feature-row,
.auth-worldbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-feature-row {
  margin-top: 24px;
}

.auth-feature-row span,
.auth-worldbar span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.auth-worldbar {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.comic-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.comic-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 50% 44%, transparent 0 18%, rgba(0, 0, 0, 0.2) 19%, transparent 20% 100%);
  opacity: 0.7;
  animation: driftGrid 18s linear infinite;
}

.comic-grid {
  position: absolute;
  inset: 38px 42px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 170px 170px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 78%, transparent);
}

.comic-panel {
  position: absolute;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(9, 17, 25, 0.4);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
  transform: skew(-5deg);
}

.comic-panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
}

.panel-a {
  width: 240px;
  height: 270px;
  left: 7%;
  bottom: 11%;
  animation: floatPanel 8s ease-in-out infinite;
}

.panel-b {
  width: 300px;
  height: 380px;
  right: 11%;
  top: 18%;
  animation: floatPanel 9s ease-in-out infinite reverse;
}

.panel-c {
  width: 420px;
  height: 270px;
  left: 34%;
  bottom: 18%;
  animation: floatPanel 10s ease-in-out infinite;
}

.panel-label {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel-rain {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(105deg, transparent 0 17px, rgba(255, 255, 255, 0.38) 18px 20px, transparent 21px 42px);
  opacity: 0.28;
  animation: rainSlide 1.6s linear infinite;
}

.panel-city {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 58%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.44) 0 11%, transparent 11% 15%, rgba(255, 255, 255, 0.28) 15% 27%, transparent 27% 32%, rgba(255, 255, 255, 0.5) 32% 47%, transparent 47% 53%, rgba(255, 255, 255, 0.32) 53% 69%, transparent 69% 75%, rgba(255, 255, 255, 0.46) 75% 100%);
  clip-path: polygon(0 42%, 12% 42%, 12% 12%, 24% 12%, 24% 100%, 36% 100%, 36% 24%, 52% 24%, 52% 100%, 67% 100%, 67% 0, 84% 0, 84% 100%, 100% 100%, 100% 100%, 0 100%);
}

.city-small {
  height: 44%;
}

.city-large {
  height: 62%;
}

.speed-line {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(236, 210, 138, 0.35), rgba(103, 177, 199, 0.26), transparent);
  filter: blur(0.2px);
  transform: rotate(-10deg);
  animation: speedSweep 7s linear infinite;
}

.line-one {
  top: 63%;
}

.line-two {
  top: 76%;
  animation-delay: -3s;
}

.train-light {
  position: absolute;
  right: -240px;
  bottom: 23%;
  width: 220px;
  height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.16)),
    rgba(59, 118, 145, 0.42);
  box-shadow: 0 0 32px rgba(112, 188, 214, 0.28);
  animation: trainPass 9s linear infinite;
}

.speech-bubble {
  position: absolute;
  z-index: 2;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 12px 15px;
  background: rgba(247, 248, 244, 0.9);
  color: #15202a;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  animation: bubbleFloat 5s ease-in-out infinite;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: inherit;
  border-right: 3px solid rgba(255, 255, 255, 0.72);
  border-bottom: 3px solid rgba(255, 255, 255, 0.72);
  transform: rotate(45deg);
}

.bubble-a {
  top: 21%;
  left: 13%;
}

.bubble-b {
  top: 35%;
  right: 20%;
  animation-delay: -1.5s;
}

.bubble-c {
  right: 7%;
  bottom: 13%;
  animation-delay: -2.7s;
}

.comic-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.05);
  animation: pulseDot 2.8s ease-in-out infinite;
}

.dot-a {
  left: 25%;
  bottom: 38%;
  background: #d0a348;
}

.dot-b {
  right: 20%;
  bottom: 34%;
  background: #4d92bd;
  animation-delay: -1.2s;
}

@keyframes driftGrid {
  from {
    transform: translate3d(-2%, -2%, 0);
  }
  to {
    transform: translate3d(2%, 2%, 0);
  }
}

@keyframes floatPanel {
  0%,
  100% {
    transform: translateY(0) skew(-5deg);
  }
  50% {
    transform: translateY(-14px) skew(-5deg);
  }
}

@keyframes rainSlide {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 80px;
  }
}

@keyframes speedSweep {
  from {
    transform: translateX(-8%) rotate(-10deg);
  }
  to {
    transform: translateX(8%) rotate(-10deg);
  }
}

@keyframes trainPass {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-140vw);
  }
}

@keyframes bubbleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.auth-card {
  min-height: 100vh;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(25, 116, 84, 0.1), transparent 32%),
    linear-gradient(180deg, #fbfbf7, #f3f6f2);
  backdrop-filter: blur(20px);
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-box {
  position: relative;
  padding: 34px;
  overflow: hidden;
}

.auth-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--blue), var(--violet));
}

.auth-box h2 {
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.subtle {
  color: var(--muted);
  line-height: 1.6;
}

.tabs,
.segmented {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 244, 239, 0.9), rgba(232, 239, 238, 0.9));
}

.tabs button,
.segmented button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tabs button.active,
.segmented button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(23, 32, 42, 0.09);
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
}

.form textarea {
  resize: vertical;
  min-height: 96px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 113, 132, 0.14);
}

.phone-code-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.phone-code-row input {
  min-width: 0;
}

.success-note {
  border: 1px solid rgba(25, 116, 84, 0.24);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(236, 247, 242, 0.92);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.consent-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(25, 116, 84, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 247, 242, 0.96), rgba(247, 250, 248, 0.92));
}

.consent-title {
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
}

.form .consent-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form .consent-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.primary,
.secondary,
.ghost,
.danger {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
  min-height: 42px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary {
  background:
    linear-gradient(135deg, #111b25, #213445);
  color: #fff;
  box-shadow: 0 14px 28px rgba(21, 32, 42, 0.18);
}

.primary:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(135deg, #1c2a37, #2b4354);
}

.secondary {
  background: rgba(238, 244, 239, 0.92);
  border-color: var(--line);
  color: var(--ink);
}

.ghost {
  background: rgba(255, 255, 255, 0.44);
  border-color: var(--line);
  color: var(--muted);
}

.danger {
  background: #fff5f3;
  border-color: rgba(182, 66, 66, 0.25);
  color: var(--red);
}

.error {
  border: 1px solid rgba(182, 66, 66, 0.25);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff5f3;
  color: var(--red);
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(194, 207, 219, 0.78);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 247, 0.84)),
    rgba(247, 248, 244, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(21, 32, 42, 0.08);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 900;
  font-size: 21px;
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(199, 211, 222, 0.85);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.pill.ai {
  color: var(--violet);
  border-color: rgba(112, 89, 166, 0.25);
  background: rgba(112, 89, 166, 0.08);
}

.pill.warn {
  color: #9a5a10;
  border-color: rgba(211, 132, 39, 0.28);
  background: rgba(211, 132, 39, 0.1);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(120deg, rgba(25, 116, 84, 0.08), transparent 30%),
    linear-gradient(250deg, rgba(40, 104, 168, 0.08), transparent 36%);
}

.sidebar,
.rightbar,
.main-panel {
  min-height: calc(100vh - 92px);
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 251, 248, 0.88));
  border: 1px solid rgba(204, 216, 227, 0.92);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(23, 32, 42, 0.08);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(25, 116, 84, 0.82), rgba(182, 118, 27, 0.72), rgba(40, 104, 168, 0.78));
  opacity: 0.78;
}

.panel + .panel {
  margin-top: 14px;
}

.panel-header {
  position: relative;
  padding: 18px 18px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.panel-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.panel-body {
  position: relative;
  padding: 0 18px 18px;
}

.character-name {
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0;
}

.status-list {
  display: grid;
  gap: 12px;
}

.stat {
  display: grid;
  gap: 6px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e4ebef;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar.warn > span {
  background: var(--amber);
}

.bar.danger > span {
  background: var(--red);
}

.money {
  font-size: 28px;
  font-weight: 900;
  color: var(--green);
}

.nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(204, 216, 227, 0.86);
  background: rgba(255, 255, 255, 0.44);
}

.nav button {
  position: relative;
  min-height: 44px;
  border: 1px solid rgba(204, 216, 227, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-weight: 850;
}

.nav button.active {
  background:
    linear-gradient(135deg, rgba(21, 29, 39, 0.98), rgba(31, 51, 61, 0.98));
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 10px 24px rgba(21, 32, 42, 0.16);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.scene {
  position: relative;
  padding: 22px;
}

.scene-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.narrative {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(204, 216, 227, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 244, 0.88)),
    #fff;
  color: #243342;
  line-height: 1.9;
  white-space: pre-wrap;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76), 0 14px 32px rgba(23, 32, 42, 0.06);
}

.narrative::before {
  content: "CURRENT SCENE";
  display: block;
  width: max-content;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(25, 116, 84, 0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.shared-world {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid rgba(36, 113, 128, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(239, 248, 245, 0.92), rgba(255, 255, 255, 0.88));
}

.shared-world-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.shared-world-head strong {
  display: block;
  margin-bottom: 2px;
}

.shared-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.shared-live-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid rgba(25, 116, 84, 0.24);
  border-radius: 8px;
  background: rgba(236, 247, 242, 0.95);
  color: var(--green);
}

.shared-live-notice strong,
.shared-live-notice span {
  min-width: 0;
}

.shared-live-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.shared-live-notice button {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-height: 34px;
  border: 1px solid rgba(25, 116, 84, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green);
  font-weight: 900;
  padding: 6px 10px;
}

.shared-summary,
.shared-waiting,
.shared-action-queue,
.shared-marks {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(204, 216, 227, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.shared-summary strong,
.shared-waiting strong,
.shared-action-queue strong,
.shared-marks strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.shared-summary ul {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.shared-marks {
  border-color: rgba(121, 164, 150, 0.32);
  background: rgba(247, 252, 250, 0.88);
}

.shared-mark {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid rgba(204, 216, 227, 0.58);
}

.shared-mark:first-of-type {
  border-top: 0;
}

.shared-mark span {
  color: var(--green);
  font-weight: 900;
}

.shared-mark p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.settlement-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(121, 164, 150, 0.32);
  border-radius: 8px;
  background: rgba(247, 252, 250, 0.9);
}

.settlement-panel > strong {
  color: var(--green);
}

.shared-waiting {
  border-color: rgba(182, 118, 27, 0.24);
  background: rgba(255, 250, 239, 0.86);
}

.shared-waiting-item {
  display: grid;
  gap: 3px;
  padding: 7px 0;
  border-top: 1px solid rgba(204, 216, 227, 0.58);
}

.shared-waiting-item:first-of-type {
  border-top: 0;
}

.shared-waiting-item span {
  color: var(--ink);
  font-weight: 850;
}

.shared-waiting-item small {
  color: var(--muted);
  line-height: 1.45;
}

.shared-action-queue {
  border-color: rgba(91, 139, 183, 0.28);
  background: rgba(247, 251, 255, 0.9);
}

.shared-action-record {
  display: grid;
  gap: 3px;
  padding: 7px 0;
  border-top: 1px solid rgba(204, 216, 227, 0.58);
}

.shared-action-record:first-of-type {
  border-top: 0;
}

.shared-action-record span {
  color: var(--ink);
  font-weight: 850;
}

.shared-action-record small {
  color: var(--muted);
  line-height: 1.45;
}

.shared-action-record.collective span {
  color: var(--green);
}

.shared-player {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(204, 216, 227, 0.82);
  font-weight: 800;
}

.shared-events {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.shared-event {
  padding: 8px 10px;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.shared-event strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.shared-event small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.shared-event ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.decision-trace {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(239, 246, 242, 0.95);
  color: var(--muted);
  font-size: 12px;
}

.decision-trace strong {
  display: inline;
  margin: 0 6px 0 0;
  color: var(--teal);
}

.shared-event li + li {
  margin-top: 2px;
}

.shared-event.pending {
  border-left-color: var(--gold);
}

.shared-prompts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.shared-prompts-title {
  font-size: 12px;
  font-weight: 950;
  color: var(--green);
  letter-spacing: 0.04em;
}

.shared-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(113, 76, 168, 0.24);
  border-radius: 8px;
  background: rgba(250, 247, 255, 0.88);
}

.shared-prompt p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.shared-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.shared-prompt-actions button {
  min-height: 34px;
  border: 1px solid rgba(204, 216, 227, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 6px 10px;
  font-weight: 850;
}

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

.choice {
  min-height: 64px;
  border: 1px solid rgba(204, 216, 227, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 248, 0.92));
  color: var(--ink);
  padding: 12px;
  text-align: left;
  font-weight: 820;
  line-height: 1.45;
}

.choice:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(18, 113, 132, 0.13);
}

.composer {
  display: grid;
  gap: 10px;
}

.composer textarea {
  border: 1px solid rgba(204, 216, 227, 0.95);
  border-radius: 8px;
  min-height: 96px;
  resize: vertical;
  padding: 15px;
  background: rgba(255, 255, 255, 0.94);
  outline: none;
}

.draft-sync-notice {
  display: none;
  padding: 10px 12px;
  border: 1px solid rgba(25, 116, 84, 0.24);
  border-radius: 8px;
  background: rgba(236, 247, 242, 0.95);
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.draft-sync-notice.show {
  display: block;
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.participant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(204, 216, 227, 0.78);
}

.participant:last-child {
  border-bottom: 0;
}

.participant-name {
  font-weight: 900;
}

.participant-role {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.type-tag {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  background: var(--panel-soft);
  color: var(--muted);
}

.type-tag.human {
  background: rgba(31, 122, 90, 0.1);
  color: var(--green);
}

.type-tag.ai_agent {
  background: rgba(112, 89, 166, 0.12);
  color: var(--violet);
}

.type-tag.npc {
  background: rgba(182, 118, 27, 0.13);
  color: var(--amber);
}

.relation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 13px;
  border: 1px solid rgba(204, 216, 227, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.04);
}

.list-item.needs-attention {
  border-color: rgba(197, 64, 64, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 245, 0.95));
}

.list-item strong {
  display: block;
  margin-bottom: 5px;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(204, 216, 227, 0.9);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-decoration: none;
}

.unread-message {
  border-color: rgba(197, 64, 64, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 247, 0.94));
}

.social-inbox-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(204, 216, 227, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.social-inbox-summary.has-new {
  border-color: rgba(197, 64, 64, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 248, 0.94));
}

.social-inbox-summary strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.social-alert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.social-alert-grid span {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(204, 216, 227, 0.9);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
}

.social-alert-grid span.active {
  color: #a43737;
  border-color: rgba(197, 64, 64, 0.34);
  background: rgba(197, 64, 64, 0.1);
}

.inbox-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(91, 139, 183, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.inbox-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.inbox-panel-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.inbox-list {
  display: grid;
  gap: 10px;
}

.inbox-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(204, 216, 227, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.inbox-item.urgent {
  border-color: rgba(197, 64, 64, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 248, 0.95));
}

.inbox-item-main {
  min-width: 0;
}

.inbox-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inbox-item-title strong {
  color: var(--ink);
  font-size: 15px;
}

.inbox-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.inbox-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #16745e;
  background: rgba(33, 128, 96, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.inbox-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.goal-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(121, 164, 150, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 252, 250, 0.96), rgba(255, 255, 255, 0.92));
}

.goal-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.goal-panel-head strong {
  color: var(--ink);
  font-size: 18px;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.goal-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(204, 216, 227, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.goal-card.finance {
  border-color: rgba(197, 64, 64, 0.28);
}

.goal-card.tutorial {
  border-color: rgba(16, 113, 128, 0.32);
  background: linear-gradient(180deg, rgba(238, 249, 248, 0.94), rgba(255, 255, 255, 0.92));
}

.goal-card.appointment,
.goal-card.work {
  border-color: rgba(94, 126, 190, 0.28);
}

.goal-card.health {
  border-color: rgba(33, 128, 96, 0.32);
}

.goal-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.goal-card p {
  margin: 0;
  color: var(--muted);
}

.goal-next {
  padding: 8px 9px;
  border-left: 3px solid rgba(33, 128, 96, 0.45);
  border-radius: 7px;
  background: rgba(242, 252, 247, 0.86);
  font-weight: 800;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.goal-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(232, 239, 244, 0.68);
}

.npc-dialogue {
  display: grid;
  gap: 8px;
}

.npc-dialogue-start {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 252, 248, 0.94));
}

.npc-dialogue-messages {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.npc-dialogue-message {
  padding: 9px 10px;
  border-left: 3px solid rgba(89, 121, 150, 0.24);
  border-radius: 7px;
  background: rgba(248, 251, 253, 0.9);
}

.npc-dialogue-message.fresh {
  border-left-color: rgba(197, 64, 64, 0.55);
  background: rgba(255, 248, 247, 0.92);
}

.npc-dialogue-message b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.dialogue-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-notice.success {
  border-color: rgba(33, 128, 96, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 252, 247, 0.94));
}

.finance-notice.warning {
  border-color: rgba(191, 127, 32, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 235, 0.94));
}

.finance-notice.danger {
  border-color: rgba(197, 64, 64, 0.38);
}

.bill-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.bill-list.compact {
  margin: 10px 0 0;
}

.bill-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(204, 216, 227, 0.88);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.9));
}

.bill-card.urgent {
  border-color: rgba(197, 64, 64, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 245, 0.96));
}

.bill-card .online-player-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.bill-amount {
  color: #a43737;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.cash-ledger {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cash-ledger.compact {
  margin-top: 8px;
}

.cash-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(204, 216, 227, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.cash-ledger-row span {
  font-weight: 850;
  color: var(--ink);
}

.cash-ledger-row strong {
  font-size: 15px;
}

.cash-ledger-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 750;
}

.cash-ledger-row.income strong {
  color: var(--green);
}

.cash-ledger-row.expense strong {
  color: #a43737;
}

.online-player-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.online-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding-top: 9px;
  border-top: 1px solid rgba(204, 216, 227, 0.7);
}

.online-player strong {
  margin-bottom: 3px;
}

.online-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.status-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 7px;
}

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

.meeting-plan.pending {
  border-color: rgba(36, 113, 128, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 245, 0.92));
}

.meeting-plan.fulfilled {
  border-color: rgba(25, 126, 91, 0.24);
}

.meeting-plan.cancelled,
.meeting-plan.declined,
.meeting-plan.expired,
.meeting-plan.missed {
  opacity: 0.72;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  border-left: 3px solid var(--teal);
  padding: 4px 0 16px 16px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(15, 113, 128, 0.12);
}

.timeline-item strong {
  display: block;
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.map-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.city-visual {
  min-height: 230px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(23, 32, 42, 0.42)),
    url("/assets/city-map.svg") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 32px rgba(23, 32, 42, 0.08);
}

.place-grid,
.city-grid {
  display: grid;
  gap: 10px;
}

.place-card,
.city-card {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(204, 216, 227, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 13px;
}

.place-card.active,
.city-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(18, 113, 132, 0.1), 0 12px 24px rgba(18, 113, 132, 0.1);
}

.json-box,
pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15202a;
  color: #e7f0f2;
  padding: 14px;
  line-height: 1.55;
}

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

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.empty.compact {
  padding: 10px;
  font-size: 13px;
}

.loading {
  opacity: 0.58;
  pointer-events: none;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sponsor-dashboard {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(121, 164, 150, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 252, 250, 0.96), rgba(255, 255, 255, 0.94));
}

.sponsor-wallet,
.sponsor-player-grid {
  display: grid;
  gap: 12px;
}

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

.sponsor-wallet > div,
.sponsor-player-card,
.sponsor-report {
  border: 1px solid rgba(204, 216, 227, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.sponsor-wallet > div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.sponsor-wallet strong {
  color: var(--green);
  font-size: 22px;
}

.sponsor-player-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.sponsor-player-head,
.sponsor-report-head,
.sponsor-meter {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sponsor-meter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.sponsor-report {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.sponsor-report p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.agent-handoff {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(121, 164, 150, 0.35);
  border-radius: 8px;
  background: rgba(247, 252, 250, 0.94);
}

.agent-handoff textarea {
  min-height: 154px;
  resize: vertical;
  border: 1px solid rgba(204, 216, 227, 0.95);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.report-block {
  display: grid;
  gap: 4px;
}

.report-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.warn-text {
  color: #9c6b12;
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .rightbar {
    grid-column: 1 / -1;
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rightbar .panel + .panel {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 58vh;
    padding: 26px;
  }

  .auth-brandline {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .auth-copy h1 {
    font-size: clamp(38px, 12vw, 64px);
  }

  .auth-copy p {
    font-size: 15px;
  }

  .panel-b,
  .panel-c {
    opacity: 0.55;
  }

  .bubble-b,
  .bubble-c {
    display: none;
  }

  .auth-card {
    min-height: auto;
    padding: 18px;
  }

  .game-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar,
  .rightbar,
  .main-panel {
    min-height: auto;
  }

  .rightbar {
    grid-template-columns: 1fr;
  }

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

  .choices,
  .map-grid,
  .two-col,
  .sponsor-wallet,
  .phone-code-row,
  .social-inbox-summary,
  .inbox-item {
    grid-template-columns: 1fr;
  }

  .inbox-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-alert-grid {
    justify-content: flex-start;
  }

  .shared-prompt {
    grid-template-columns: 1fr;
  }

  .shared-prompt-actions {
    justify-content: flex-start;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
