:root {
  color-scheme: dark;
  --ink: #151522;
  --ink-deep: #0d0e17;
  --ink-soft: #222332;
  --surface: rgba(31, 32, 46, 0.92);
  --surface-solid: #20212f;
  --paper: #f6f2e9;
  --paper-ink: #20202a;
  --text: #f8f5ed;
  --muted: #b9b8c7;
  --faint: #858598;
  --line: rgba(248, 245, 237, 0.13);
  --line-strong: rgba(248, 245, 237, 0.25);
  --coral: #ff5a52;
  --coral-dark: #cc332f;
  --mint: #5de0c1;
  --yellow: #ffd65a;
  --pink: #ff75b5;
  --cyan: #62cbe8;
  --lime: #b6df52;
  --danger: #ff7b72;
  --success: #70d99a;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(5, 6, 13, 0.36);
  --shadow-soft: 0 14px 36px rgba(5, 6, 13, 0.22);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fluid: cubic-bezier(0.65, 0, 0.18, 1);
  --sans: "Avenir Next", Avenir, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --display: "Arial Rounded MT Bold", "Avenir Next", "PingFang SC", ui-sans-serif, system-ui, sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", Consolas, monospace;
  --z-base: 0;
  --z-art: 1;
  --z-content: 2;
  --z-nav: 10;
  --z-entry: 30;
  --z-ripple: 40;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink-deep);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--ink-deep);
  font-family: var(--sans);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.52;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 90, 82, 0.18), transparent 28%),
    radial-gradient(circle at 88% 30%, rgba(93, 224, 193, 0.12), transparent 24%),
    linear-gradient(180deg, #11121d 0%, #171824 58%, #0d0e17 100%);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  touch-action: manipulation;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(10, 11, 20, 0.56);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 112px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7f7e90;
}

input:focus,
textarea:focus {
  border-color: var(--mint);
  background: rgba(10, 11, 20, 0.82);
  box-shadow: 0 0 0 4px rgba(93, 224, 193, 0.12);
  outline: 0;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper-ink);
  background: var(--yellow);
  border-radius: var(--radius);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.kicker {
  margin: 0 0 12px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.button {
  position: relative;
  isolation: isolate;
  min-height: 48px;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 220ms var(--ease-spring),
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 220ms ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  pointer-events: none;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active,
.button.is-pressed {
  transform: scale(0.98);
}

.button.primary {
  color: #20130f;
  background: var(--coral);
  box-shadow: 0 12px 30px rgba(255, 90, 82, 0.25);
}

.button.primary:hover {
  background: #ff6b63;
}

.button.secondary {
  color: #14201d;
  background: var(--mint);
}

.button.ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(23, 24, 37, 0.58);
  backdrop-filter: blur(16px) saturate(120%);
}

.button.ink {
  color: var(--paper);
  background: var(--paper-ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.button-ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0);
  animation: button-ripple 620ms var(--ease-spring) forwards;
}

@keyframes button-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

/* Opening stage */
.entry-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-entry);
  min-height: 100dvh;
  overflow: hidden;
  background: #0b0c15;
}

body:not(.pre-entry) .entry-screen {
  display: none;
}

.entry-fluid-canvas,
.entry-image,
.entry-vignette {
  position: absolute;
  inset: 0;
}

.entry-fluid-canvas {
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
}

.entry-image {
  z-index: 1;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(13, 14, 23, 0.94) 0%, rgba(13, 14, 23, 0.54) 42%, rgba(13, 14, 23, 0.08) 72%),
    linear-gradient(160deg, rgba(255, 90, 82, 0.18), rgba(98, 203, 232, 0.05) 44%, rgba(182, 223, 82, 0.12));
  opacity: 0.86;
}

.entry-image .art-slot-note {
  position: absolute;
  z-index: 3;
  right: 6vw;
  bottom: 11vh;
  width: min(360px, 36vw);
  color: rgba(248, 245, 237, 0.72);
  border-color: rgba(248, 245, 237, 0.34);
  background: rgba(13, 14, 23, 0.54);
  backdrop-filter: blur(16px);
}

.entry-vignette {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 10, 18, 0.18), transparent 56%, rgba(9, 10, 18, 0.78)),
    linear-gradient(90deg, rgba(9, 10, 18, 0.84), transparent 62%);
}

.entry-orbit {
  position: absolute;
  z-index: 2;
  width: 190px;
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgba(248, 245, 237, 0.3);
  border-radius: 50%;
}

.entry-orbit::before,
.entry-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.entry-orbit::before {
  inset: 22%;
  border: 1px solid rgba(248, 245, 237, 0.16);
}

.entry-orbit::after {
  width: 18px;
  height: 18px;
  top: -9px;
  left: calc(50% - 9px);
  background: var(--yellow);
}

.entry-orbit-one {
  top: -54px;
  right: 11vw;
}

.entry-orbit-two {
  right: 30vw;
  bottom: -94px;
  width: 260px;
}

.entry-content {
  position: relative;
  z-index: 4;
  display: grid;
  align-content: center;
  min-height: 100dvh;
  width: min(780px, calc(100% - 64px));
  margin-left: max(32px, 7vw);
  padding: 44px 0 116px;
}

.entry-content h1 {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--paper);
  font-size: 50px;
  line-height: 1.14;
  letter-spacing: 0;
  text-wrap: balance;
}

.entry-brand {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.08;
}

.entry-track {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 30px;
  margin: 12px 0 0;
  padding: 4px 11px 4px 5px;
  border: 1px solid rgba(16, 33, 58, 0.2);
  border-radius: 999px;
  color: #263b50;
  background: rgba(238, 242, 226, 0.58);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.entry-track span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff8df;
  background: #10213a;
  font-size: 10px;
}

.entry-title-cn {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--yellow);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.35;
}

.entry-copy {
  max-width: 690px;
  margin: 10px 0 0;
  color: #d4d1db;
  font-size: 15px;
  line-height: 1.7;
}

.entry-tech-note {
  display: grid;
  gap: 3px;
  max-width: 690px;
  margin-top: 14px;
  padding: 11px 14px;
  border-left: 3px solid var(--coral);
  color: #10213a;
  background: rgba(238, 242, 226, 0.72);
  box-shadow: 0 14px 36px rgba(16, 33, 58, 0.08);
  backdrop-filter: blur(12px);
}

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

.entry-tech-note span {
  color: #415769;
  font-size: 12px;
  line-height: 1.55;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.entry-actions .button {
  min-height: 50px;
}

.entry-actions .button.ghost {
  color: #10213a;
  border-color: rgba(16, 33, 58, 0.24);
  background: rgba(238, 242, 226, 0.7);
}

.entry-actions .button small {
  margin-left: 5px;
  font-size: 10px;
  opacity: 0.72;
}

.button-symbol {
  display: inline-block;
  margin-right: 5px;
}

.entry-demo-anchor {
  max-width: 690px;
  margin: 12px 0 0;
  color: #425669;
  font-size: 11px;
  line-height: 1.55;
}

.entry-demo-anchor strong {
  margin-right: 7px;
  color: #8f342f;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.entry-chapter {
  position: absolute;
  left: max(32px, 7vw);
  right: max(32px, 7vw);
  bottom: 30px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  color: rgba(248, 245, 237, 0.62);
  font-family: var(--mono);
  font-size: 12px;
}

.entry-chapter span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(248, 245, 237, 0.28);
}

.entry-chapter b {
  color: #8f342f;
  font-size: 10px;
}

.entry-iris {
  position: absolute;
  inset: -30%;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: var(--coral);
  clip-path: circle(0 at 50% 50%);
}

.entry-screen.is-departing .entry-iris {
  animation: iris-close 720ms var(--ease-fluid) forwards;
}

.entry-screen.is-departing .entry-content,
.entry-screen.is-departing .entry-chapter,
.entry-screen.is-departing .entry-image .art-slot-note {
  animation: entry-fade-out 420ms ease forwards;
}

@keyframes iris-close {
  0% { opacity: 1; clip-path: circle(0 at 69% 42%); }
  100% { opacity: 1; clip-path: circle(92% at 69% 42%); }
}

@keyframes entry-fade-out {
  to { opacity: 0; transform: translateY(-16px); }
}

@media (prefers-reduced-motion: no-preference) {
  .entry-content > * {
    opacity: 0;
    animation: entry-rise 800ms var(--ease-spring) forwards;
  }

  .entry-content > :nth-child(2) { animation-delay: 80ms; }
  .entry-content > :nth-child(3) { animation-delay: 160ms; }
  .entry-content > :nth-child(4) { animation-delay: 220ms; }
  .entry-content > :nth-child(5) { animation-delay: 300ms; }
  .entry-content > :nth-child(6) { animation-delay: 360ms; }
  .entry-content > :nth-child(7) { animation-delay: 420ms; }
  .entry-content > :nth-child(8) { animation-delay: 480ms; }
  .entry-orbit-one { animation: orbit-float 7s ease-in-out infinite; }
  .entry-orbit-two { animation: orbit-float 9s ease-in-out -2s infinite reverse; }
}

@keyframes entry-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orbit-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(18px, -14px, 0) rotate(8deg); }
}

/* Global navigation */
.pre-entry .topbar,
.pre-entry .nation-workspace {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px max(24px, 4vw);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 23, 0.86);
  backdrop-filter: blur(22px) saturate(130%);
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0;
  color: var(--text);
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #26120f;
  border-radius: 50% 50% 48% 52% / 55% 45% 55% 45%;
  background: var(--coral);
  font-family: var(--display);
  font-weight: 900;
  transition: transform 240ms var(--ease-spring);
}

.brand-button:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}

.brand-wording {
  display: grid;
  gap: 2px;
}

.brand-wording strong {
  font-family: var(--display);
  font-size: 15px;
}

.brand-wording small {
  color: var(--muted);
  font-size: 11px;
}

.nation-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nation-nav button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  transition: color 180ms ease, transform 180ms var(--ease-spring);
}

.nation-nav button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nation-nav button.active {
  color: #24130f;
}

.nation-nav button span {
  display: none;
}

.nav-liquid {
  position: absolute;
  left: 5px;
  top: 5px;
  width: calc((100% - 22px) / 4);
  height: 42px;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateX(calc(var(--nav-index, 0) * (100% + 4px)));
  transition: transform 420ms var(--ease-spring);
}

/* App canvas */
.nation-workspace {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 96px;
}

.nation-status-ribbon {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(420px, 1.2fr) minmax(230px, 0.72fr);
  gap: 0;
  min-height: 118px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(31, 32, 46, 0.84);
  box-shadow: var(--shadow-soft);
}

.nation-status-ribbon > * {
  padding: 18px 20px;
}

.nation-status-ribbon > * + * {
  border-left: 1px solid var(--line);
}

.nation-identity span,
.status-passport span,
.nation-metrics dt,
.current-proposal > div > span,
.decision-heading > span,
.triggered-block > span,
.department-current > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.nation-identity strong {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 20px;
}

.nation-identity p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.nation-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

.nation-metrics div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 16px;
}

.nation-metrics div + div {
  border-left: 1px solid var(--line);
}

.nation-metrics dd {
  margin: 8px 0 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.nation-metrics .kite-status dd {
  color: var(--mint);
  font-size: 12px;
}

.status-passport {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.status-passport code,
.status-passport small {
  overflow-wrap: anywhere;
  font-family: var(--mono);
}

.status-passport code {
  color: var(--yellow);
  font-size: 11px;
}

.status-passport small {
  color: var(--muted);
  font-size: 11px;
}

.view-panel[hidden] {
  display: none;
}

.view-panel {
  min-width: 0;
}

.view-panel.is-entering {
  animation: view-arrive 420ms var(--ease-spring) both;
}

.is-pulsing {
  animation: state-pulse 500ms var(--ease-spring) both;
}

@keyframes view-arrive {
  from { opacity: 0; transform: translateY(22px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes state-pulse {
  0%, 100% { box-shadow: none; }
  45% { box-shadow: 0 0 0 7px rgba(255, 214, 90, 0.22); }
}

.view-intro {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(0, 1fr);
  align-items: end;
  gap: 42px;
  min-height: 270px;
  padding: 50px max(16px, 2vw) 42px;
}

.view-intro h2 {
  max-width: 820px;
  margin: 0;
  font-size: 50px;
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.view-intro p:last-child {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.nation-tags,
.request-tags,
.triggered-laws {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nation-tags {
  justify-content: flex-end;
  padding-bottom: 8px;
}

.nation-tags span,
.request-tags span,
.law-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.nation-tags span:nth-child(4n + 1) { color: var(--yellow); }
.nation-tags span:nth-child(4n + 2) { color: var(--mint); }
.nation-tags span:nth-child(4n + 3) { color: var(--pink); }
.nation-tags span:nth-child(4n) { color: var(--cyan); }

/* Art slots */
.art-slot {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed rgba(248, 245, 237, 0.34);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 28% 30%, rgba(255, 117, 181, 0.23), transparent 28%),
    radial-gradient(circle at 72% 42%, rgba(93, 224, 193, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(255, 90, 82, 0.16), rgba(98, 203, 232, 0.08) 55%, rgba(182, 223, 82, 0.14));
}

.art-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.art-slot::after {
  content: "";
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  right: -12%;
  top: -18%;
  z-index: -1;
  border: 1px solid rgba(248, 245, 237, 0.28);
  border-radius: 45% 55% 62% 38% / 41% 35% 65% 59%;
  transform: rotate(16deg);
}

.art-slot-note {
  display: grid;
  gap: 8px;
  width: min(430px, calc(100% - 40px));
  padding: 18px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(18, 19, 31, 0.72);
}

.art-slot-note code {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 11px;
}

.art-slot-note strong {
  font-family: var(--display);
  font-size: 18px;
}

.art-slot-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Setup */
.territory-stage {
  min-height: 0;
}

.territory-art {
  min-height: 420px;
  border-color: rgba(16, 33, 58, 0.18);
  box-shadow: 0 24px 70px rgba(29, 70, 78, 0.16);
}

.governance-config {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  align-items: start;
  gap: 36px;
  padding: 52px max(4px, 2vw) 8px;
}

.territory-picker {
  min-width: 0;
}

.territory-picker h3 {
  color: #171821;
}

.territory-picker > p {
  color: #3f4852;
  font-weight: 500;
}

.territory-picker h3,
.section-copy h3,
.citizen-heading h3,
.proposal-form h3,
.decision-heading h3,
.department-current h3,
.constitution-sheet h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.territory-picker > p,
.section-copy > p,
.citizen-heading > div > p:last-child,
.proposal-examples .section-copy p,
.department-current p,
.constitution-sheet > div > p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.template-chip {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  width: 100%;
  min-height: 330px;
  padding: 20px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(25, 26, 39, 0.9);
  text-align: left;
  transition: transform 220ms var(--ease-spring), border-color 180ms ease, background 180ms ease, box-shadow 220ms ease;
}

.template-chip::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
}

.template-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(93, 224, 193, 0.48);
  box-shadow: 0 18px 42px rgba(10, 15, 24, 0.18);
}

.template-chip.active {
  border-color: var(--coral);
  background: #252534;
  box-shadow: 0 18px 48px rgba(255, 90, 82, 0.18);
}

.template-chip.active::after {
  background: var(--coral);
}

.template-policy-label {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-featured {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 7px;
  color: #281612;
  border-radius: 999px;
  background: var(--coral);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.template-title {
  display: grid;
  gap: 2px;
}

.template-title strong {
  padding-right: 72px;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.25;
}

.template-title small,
.template-subtitle,
.template-route,
.template-demo {
  display: block;
}

.template-title small {
  color: #8e8da0;
  font-family: var(--mono);
  font-size: 9px;
}

.template-subtitle {
  color: #d6d4de;
  font-size: 12px;
  font-weight: 800;
}

.template-wallet-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(248, 245, 237, 0.12);
  border-radius: 6px;
}

.template-wallet-metrics > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

.template-wallet-metrics > span + span {
  border-left: 1px solid rgba(248, 245, 237, 0.12);
}

.template-wallet-metrics small {
  color: #8e8da0;
  font-size: 9px;
}

.template-wallet-metrics strong {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.template-rule {
  display: block;
  color: #bbb9c7;
  font-size: 11px;
  line-height: 1.5;
}

.template-route {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
}

.template-demo {
  align-self: end;
  padding-top: 10px;
  color: #f0b2a5;
  border-top: 1px solid rgba(248, 245, 237, 0.1);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.policy-preview {
  position: sticky;
  top: 86px;
  overflow: hidden;
  border: 1px solid rgba(93, 224, 193, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: #171923;
  box-shadow: var(--shadow-soft);
}

.policy-preview-heading {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(93, 224, 193, 0.06);
}

.policy-preview-heading > span,
.policy-preview-rule span {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-preview-heading h3 {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.35;
}

.policy-preview-heading p {
  margin: 8px 0 0;
  color: #9695a6;
  font-size: 11px;
  line-height: 1.55;
}

.policy-preview-content {
  padding: 8px 22px 22px;
}

.policy-preview-list {
  margin: 0;
}

.policy-preview-list div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(248, 245, 237, 0.09);
}

.policy-preview-list dt {
  color: #858598;
  font-size: 10px;
}

.policy-preview-list dd {
  margin: 0;
  color: #f6f2e9;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.policy-preview-rule {
  margin-top: 18px;
}

.policy-preview-rule p {
  margin: 7px 0 0;
  color: #c4c2cc;
  font-size: 11px;
  line-height: 1.6;
}

.policy-preview-truth {
  margin: 16px 0 0;
  padding: 10px;
  color: #9faab4;
  border: 1px solid rgba(255, 214, 90, 0.2);
  background: rgba(255, 214, 90, 0.05);
  font-size: 9px;
  line-height: 1.55;
}

.founding-form-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.6fr) minmax(0, 1.4fr);
  gap: 72px;
  padding: 110px max(16px, 4vw);
}

.founding-form {
  display: grid;
  gap: 22px;
}

.mission-field textarea {
  font-size: 17px;
}

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

.budget-inputs label > span,
.currency-field {
  position: relative;
  display: block;
}

.budget-inputs em,
.currency-field em {
  position: absolute;
  right: 13px;
  top: 50%;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  transform: translateY(-50%);
}

.budget-inputs input,
.currency-field input {
  padding-right: 62px;
  font-family: var(--mono);
  font-weight: 800;
}

.founding-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.setup-status {
  margin: 0;
  color: #173d34;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.citizen-section {
  padding: 30px 0 110px;
}

[data-view-panel="setup"] > .citizen-section {
  padding: 34px 0 64px;
}

[data-view-panel="setup"] > .citizen-section + .setup-intro {
  padding-top: 38px;
}

.citizen-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 48px;
  padding: 0 max(16px, 4vw) 42px;
}

.citizen-group-art {
  min-height: 340px;
  aspect-ratio: 16 / 9;
}

.citizen-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding: 0 max(4px, 2vw);
}

.citizen-card {
  --citizen-accent: #ff5a52;
  --citizen-accent-rgb: 255, 90, 82;
  --citizen-panel: rgba(91, 24, 40, 0.66);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 430px;
  padding: 22px;
  overflow: hidden;
  color: #ffffff;
  border: 1px solid rgba(149, 147, 139, 0.46);
  border-radius: 30px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.025), transparent 38%),
    #020203;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.25);
  transition: transform 320ms var(--ease-spring), border-color 180ms ease, box-shadow 260ms ease;
  transform-style: preserve-3d;
}

.citizen-card:hover {
  border-color: rgba(var(--citizen-accent-rgb), 0.72);
  box-shadow:
    0 26px 58px rgba(0, 0, 0, 0.36),
    0 0 40px rgba(var(--citizen-accent-rgb), 0.1);
  transform: translateY(-5px);
}

.citizen-card::before {
  content: "";
  position: absolute;
  inset: 42% -24% -34% 15%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.5;
  background: radial-gradient(ellipse at center, rgba(var(--citizen-accent-rgb), 0.48), transparent 66%);
  filter: blur(28px);
}

.citizen-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 5px;
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000);
}

.citizen-theme-prime,
.citizen-theme-opposition,
.citizen-theme-oppose {
  --citizen-accent: #ff4f69;
  --citizen-accent-rgb: 255, 79, 105;
  --citizen-panel: rgba(92, 21, 43, 0.7);
}

.citizen-theme-treasurer,
.citizen-theme-caretaker,
.citizen-theme-approve {
  --citizen-accent: #4ce3b0;
  --citizen-accent-rgb: 76, 227, 176;
  --citizen-panel: rgba(12, 74, 68, 0.68);
}

.citizen-theme-auditor,
.citizen-theme-reduce {
  --citizen-accent: #ffbf48;
  --citizen-accent-rgb: 255, 191, 72;
  --citizen-panel: rgba(95, 53, 8, 0.68);
}

.citizen-theme-builder {
  --citizen-accent: #ff4d9a;
  --citizen-accent-rgb: 255, 77, 154;
  --citizen-panel: rgba(94, 16, 67, 0.68);
}

.citizen-theme-archivist,
.citizen-theme-delay {
  --citizen-accent: #7a98ff;
  --citizen-accent-rgb: 122, 152, 255;
  --citizen-panel: rgba(25, 39, 96, 0.72);
}

.citizen-theme-custom {
  --citizen-accent: #d7ff63;
  --citizen-accent-rgb: 215, 255, 99;
  --citizen-panel: rgba(65, 77, 23, 0.62);
}

.citizen-card-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
}

.citizen-portrait-wrap {
  position: relative;
  z-index: 2;
  align-self: start;
}

.citizen-avatar {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  color: #101014;
  border: 1px solid rgba(var(--citizen-accent-rgb), 0.72);
  border-radius: 50%;
  background: var(--citizen-accent);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
  font-family: var(--display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.citizen-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.citizen-avatar.has-image {
  background: transparent;
}

.citizen-id-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.citizen-id-text h4 {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  font-family: "Inter", var(--sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.18;
}

.citizen-id-text h4 span,
.citizen-id-text h4 strong {
  display: block;
  font: inherit;
  overflow-wrap: anywhere;
}

.citizen-id-text small {
  color: #95938b;
  font-family: "Inter", var(--sans);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
}

.citizen-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  gap: 2px;
  margin-top: 8px;
  color: #70d99a;
  font-family: "Inter", var(--sans);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: default;
}

.citizen-score small {
  color: #95938b;
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
}

.citizen-score--live {
  color: #8dffad;
}

.citizen-role-panel {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 106px;
  margin: -18px 0 0 78px;
  padding: 24px 17px 18px 39px;
  border: 1px solid rgba(var(--citizen-accent-rgb), 0.24);
  border-radius: 47.5px 16px 16px 100px;
  background: linear-gradient(118deg, var(--citizen-panel), rgba(var(--citizen-accent-rgb), 0.13));
  backdrop-filter: blur(12px);
}

.citizen-role-panel small {
  color: rgba(255, 255, 255, 0.72);
  font-family: "Alibaba PuHuiTi 3.0", "PingFang SC", var(--sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
}

.citizen-role-panel small strong {
  color: #ffffff;
  font: inherit;
}

.citizen-role-panel p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-family: "Alibaba PuHuiTi 3.0", "PingFang SC", var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.citizen-credential-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.citizen-credential-list > div {
  min-width: 0;
}

.citizen-credential-list dt {
  color: #95938b;
  font-family: "Inter", var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.citizen-credential-list dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: #ffffff;
  font-family: "Inter", var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.citizen-credential-list > div:first-child dd {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.citizen-card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.citizen-edit {
  min-height: 30px;
  padding: 0 10px;
  color: #95938b;
  border: 1px solid rgba(149, 147, 139, 0.34);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 10px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.citizen-edit:hover {
  color: #ffffff;
  border-color: rgba(var(--citizen-accent-rgb), 0.68);
  background: rgba(var(--citizen-accent-rgb), 0.1);
}

.citizen-edit:active {
  transform: scale(0.96);
}

.citizen-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #ff5a52;
  font-family: Georgia, "Times New Roman", serif;
  white-space: nowrap;
}

.citizen-brand img {
  width: 22px;
  height: 18px;
  flex: 0 0 auto;
}

.citizen-brand strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.citizen-create {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 20px;
  min-height: 430px;
  padding: 30px;
  color: #95938b;
  text-align: left;
  border-style: dashed;
  background:
    linear-gradient(145deg, rgba(var(--citizen-accent-rgb), 0.08), transparent 52%),
    #020203;
  cursor: pointer;
}

.citizen-create:hover {
  color: #ffffff;
}

.citizen-create-orbit {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #0b0c08;
  border: 1px solid rgba(var(--citizen-accent-rgb), 0.78);
  border-radius: 50%;
  background: var(--citizen-accent);
  box-shadow: 0 0 36px rgba(var(--citizen-accent-rgb), 0.22);
  transition: transform 300ms var(--ease-spring), box-shadow 300ms ease;
}

.citizen-create-orbit i {
  font-family: "Inter", var(--sans);
  font-size: 36px;
  font-style: normal;
  line-height: 1;
}

.citizen-create:hover .citizen-create-orbit {
  box-shadow: 0 0 54px rgba(var(--citizen-accent-rgb), 0.38);
  transform: rotate(90deg) scale(1.04);
}

.citizen-create-copy {
  display: grid;
  gap: 7px;
}

.citizen-create-copy small {
  color: var(--citizen-accent);
  font-family: var(--mono);
  font-size: 9px;
}

.citizen-create-copy strong {
  color: #ffffff;
  font-family: "Inter", var(--sans);
  font-size: 20px;
  font-weight: 400;
}

.citizen-create-copy > span {
  color: #95938b;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .citizen-list {
    grid-template-columns: 1fr;
  }

  .citizen-card,
  .citizen-create {
    min-height: 410px;
    padding: 18px;
    border-radius: 24px;
  }

  .citizen-card-top {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 96px;
  }

  .citizen-avatar {
    width: 96px;
    height: 96px;
  }

  .citizen-role-panel {
    min-height: 102px;
    margin-left: 66px;
    padding-left: 39px;
  }
}

/* Citizen editor dialog */
.citizen-editor {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.citizen-editor::backdrop {
  background: rgba(5, 6, 13, 0.6);
  backdrop-filter: blur(4px);
}

.citizen-editor-form {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.citizen-editor-form h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}

.citizen-editor-form > label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.citizen-editor-form > label small {
  color: var(--faint);
  font-size: 10px;
}

.citizen-editor-form input[type="text"],
.citizen-editor-form textarea,
.citizen-editor-form select {
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.citizen-editor-form textarea {
  resize: vertical;
}

.citizen-editor-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-preview {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 72px;
  overflow: hidden;
  color: #21130f;
  border-radius: 48% 52% 42% 58% / 58% 40% 60% 42%;
  background: var(--coral);
  font-family: var(--display);
  font-size: 30px;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.citizen-editor-portrait-controls {
  display: grid;
  gap: 8px;
}

.upload-btn {
  min-height: 34px;
  padding: 0 14px;
  cursor: pointer;
}

.emoji-field {
  display: grid;
  gap: 4px;
  color: var(--faint);
  font-size: 11px;
}

.emoji-field input {
  width: 76px;
  text-align: center;
}

.citizen-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.citizen-editor-spacer {
  flex: 1;
}

.citizen-editor-actions .button {
  min-height: 38px;
  padding: 0 14px;
}

.citizen-delete {
  color: var(--danger);
}

/* Constitution */
.constitution-stage {
  position: relative;
  min-height: 880px;
  margin-bottom: 90px;
}

.constitution-art {
  min-height: 620px;
  aspect-ratio: 7 / 5;
  width: 70%;
}

.constitution-sheet {
  position: relative;
  z-index: 2;
  width: min(820px, 66%);
  margin: -340px 0 0 auto;
  padding: 46px;
  color: var(--paper-ink);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 36px 90px rgba(5, 6, 13, 0.44);
}

.constitution-sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(32, 32, 42, 0.18);
  border-radius: 4px;
}

.constitution-seal {
  position: absolute;
  right: 40px;
  top: 38px;
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  color: var(--paper);
  border-radius: 47% 53% 50% 50% / 57% 44% 56% 43%;
  background: var(--coral-dark);
  font-family: var(--display);
  font-weight: 900;
  transform: rotate(7deg);
}

.constitution-sheet > div > span {
  color: #7b3440;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.policy-grid {
  display: grid;
  gap: 0;
  margin-top: 34px;
}

.policy-chapter {
  margin: 26px 0 0;
  color: var(--paper-ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.policy-chapter:first-child {
  margin-top: 6px;
}

.policy-card {
  display: grid;
  grid-template-columns: 52px minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid rgba(32, 32, 42, 0.16);
}

.policy-card > span {
  display: grid;
  place-items: center;
  min-height: 38px;
  color: var(--paper);
  border-radius: 50%;
  background: var(--paper-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.policy-card > strong {
  padding-top: 8px;
  font-family: var(--display);
  font-size: 17px;
}

.editable-policy textarea {
  min-height: 104px;
  color: var(--paper-ink);
  border-color: rgba(32, 32, 42, 0.22);
  background: rgba(255, 255, 255, 0.48);
  font-size: 14px;
}

.policy-editor {
  display: grid;
  gap: 8px;
}

.policy-effect {
  color: rgba(32, 32, 42, 0.64);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.editable-policy textarea:focus {
  border-color: var(--coral-dark);
  background: #fffdf8;
  box-shadow: 0 0 0 4px rgba(204, 51, 47, 0.1);
}

/* Proposal and treasury */
.proposal-stage {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  margin-bottom: 18px;
}

.proposal-form,
.proposal-examples {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.proposal-form {
  display: grid;
  align-content: start;
  gap: 17px;
}

.milestone-field {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.milestone-field input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--mint);
}

.milestone-field span {
  display: grid;
  gap: 3px;
}

.milestone-field strong {
  color: var(--text);
  font-size: 12px;
}

.milestone-field small {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
}

.proposal-examples {
  display: grid;
  align-content: start;
  gap: 18px;
}

.section-copy.small h3 {
  font-size: 22px;
}

.request-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.request-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 230px;
  padding: 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 220ms var(--ease-spring), border-color 180ms ease, background 180ms ease;
}

.request-card:hover,
.request-card.active {
  transform: translateY(-4px) rotate(-0.5deg);
  border-color: var(--coral);
  background: rgba(255, 90, 82, 0.11);
}

.request-card span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.request-card strong {
  display: block;
  margin-top: 12px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.35;
}

.request-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.request-card-footer {
  display: grid;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.request-card-footer code {
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
}

.request-card-footer em {
  color: var(--mint);
  font-size: 11px;
  font-style: normal;
}

.current-proposal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 190px;
  margin: 18px 0;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.current-proposal h3 {
  margin: 8px 0 0;
  font-size: 30px;
}

.current-proposal p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.request-tags {
  margin-top: 15px;
}

.request-tags span,
.law-chip {
  color: var(--yellow);
  background: rgba(255, 214, 90, 0.06);
}

.proposal-amount {
  min-width: 180px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.proposal-amount code,
.proposal-amount em {
  display: block;
}

.proposal-amount code {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 900;
}

.proposal-amount em {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.treasury-theatre {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
  min-height: 670px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.treasury-art {
  min-height: 670px;
  border: 0;
  border-radius: 0;
}

.decision-card {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 36px;
  border-left: 1px solid var(--line);
}

#reviewResult {
  scroll-margin-top: 96px;
}

.decision-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.decision-metrics div {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.decision-metrics dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.decision-metrics dd {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 900;
}

.triggered-block {
  display: grid;
  gap: 11px;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.review-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.progress-step {
  min-height: 70px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.progress-step span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
}

.progress-step strong {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.progress-step.active {
  border-color: var(--yellow);
  background: rgba(255, 214, 90, 0.08);
}

.progress-step.active span,
.progress-step.done span {
  color: #211a0c;
  border-color: var(--yellow);
  background: var(--yellow);
}

.progress-step.done strong {
  color: var(--success);
}

.progress-step.muted {
  opacity: 0.55;
}

.council-section {
  padding: 100px max(16px, 3vw) 40px;
}

.debate-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 9px;
  margin-top: 28px;
}

.debate-item {
  position: relative;
  min-height: 240px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  animation: council-arrive 480ms var(--ease-spring) both;
}

.debate-item:nth-child(2) { animation-delay: 40ms; }
.debate-item:nth-child(3) { animation-delay: 80ms; }
.debate-item:nth-child(4) { animation-delay: 120ms; }
.debate-item:nth-child(5) { animation-delay: 160ms; }
.debate-item:nth-child(6) { animation-delay: 200ms; }
.debate-item:nth-child(7) { animation-delay: 240ms; }

@keyframes council-arrive {
  from { opacity: 0; transform: translateY(20px) rotate(1deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.debate-item strong,
.debate-item small {
  display: block;
}

.debate-item strong {
  font-family: var(--display);
  font-size: 17px;
}

.debate-item small {
  margin-top: 5px;
  color: var(--faint);
  font-size: 10px;
}

.debate-item p {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.62;
}

.vote {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 16px;
  padding: 0 9px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.vote-oppose { color: var(--danger); }
.vote-reduce,
.vote-delay { color: var(--yellow); }
.vote-approve { color: var(--success); }
.vote-override { color: var(--pink); }

.ai-voiced {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 16px;
  margin-left: 6px;
  padding: 0 9px;
  color: var(--ink-deep);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--mint), var(--cyan));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.debate-loading {
  border-style: dashed;
}

.ai-thinking {
  animation: ai-thinking-pulse 1.1s ease-in-out infinite;
}

@keyframes ai-thinking-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-thinking {
    animation: none;
  }
}

/* Map */
.nation-map-stage {
  position: relative;
  min-height: 760px;
  margin-bottom: 18px;
}

.nation-map-art {
  min-height: 760px;
  aspect-ratio: 16 / 10;
}

.map-note {
  width: min(520px, calc(100% - 80px));
}

.map-hotspot {
  position: absolute;
  display: grid;
  gap: 3px;
  min-width: 136px;
  min-height: 58px;
  padding: 10px 14px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 14, 23, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms var(--ease-spring), background 180ms ease, color 180ms ease;
}

.map-hotspot:hover,
.map-hotspot.active {
  color: #20130f;
  background: var(--coral);
  transform: translateY(-5px) rotate(-1deg);
}

.map-hotspot span {
  font-weight: 900;
}

.map-hotspot small {
  font-size: 10px;
  opacity: 0.76;
}

.hotspot-treasury { left: 42%; top: 46%; }
.hotspot-garden { left: 11%; top: 28%; }
.hotspot-studio { right: 10%; top: 22%; }
.hotspot-academy { left: 18%; bottom: 17%; }
.hotspot-embassy { right: 22%; bottom: 18%; }
.hotspot-shop { right: 7%; top: 52%; }

/* Roadmap 部门：视觉上退居次要，让稼働中的 Kite 国库与创作工坊成为主角 */
.hotspot-garden,
.hotspot-academy,
.hotspot-embassy,
.hotspot-shop {
  color: var(--faint);
  border-style: dashed;
  border-color: var(--line);
  background: rgba(13, 14, 23, 0.5);
  box-shadow: none;
}

.hotspot-garden small,
.hotspot-academy small,
.hotspot-embassy small,
.hotspot-shop small {
  color: var(--faint);
}

.hotspot-garden:hover,
.hotspot-academy:hover,
.hotspot-embassy:hover,
.hotspot-shop:hover {
  color: var(--muted);
  background: rgba(13, 14, 23, 0.74);
  transform: translateY(-3px) rotate(-1deg);
}

.department-story {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  padding-bottom: 90px;
}

.department-current {
  display: grid;
  align-content: center;
  min-height: 420px;
  padding: 34px;
  color: #21130f;
  border-radius: var(--radius);
  background: var(--coral);
  transition: background 300ms var(--ease-spring), color 220ms ease;
}

.department-current[data-department="garden"] { background: var(--mint); }
.department-current[data-department="studio"] { background: var(--yellow); }
.department-current[data-department="academy"] { background: var(--cyan); }
.department-current[data-department="embassy"] { background: var(--pink); }
.department-current[data-department="shop"] { background: var(--lime); }

.department-current > span {
  color: rgba(33, 19, 15, 0.62);
}

.department-current p {
  color: rgba(33, 19, 15, 0.78);
}

.department-current .button {
  justify-self: start;
  margin-top: 22px;
  color: var(--paper);
  background: var(--paper-ink);
}

.future-departments {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.future-departments article {
  min-height: 140px;
  padding: 22px;
}

.future-departments article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.future-departments article:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.future-departments strong {
  display: block;
  margin-top: 7px;
  font-family: var(--display);
  font-size: 18px;
}

.future-departments article > span {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
}

.future-departments p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Gazette */
.gazette-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(380px, 0.86fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 50px;
}

.gazette-paper {
  min-height: 780px;
  padding: 40px;
  color: var(--paper-ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.gazette-masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 3px double rgba(32, 32, 42, 0.68);
}

.gazette-masthead span,
.gazette-masthead small {
  font-family: var(--mono);
  font-size: 10px;
}

.gazette-masthead strong {
  font-family: var(--display);
  font-size: 28px;
  text-align: center;
}

.gazette-masthead small {
  text-align: right;
}

.gazette-card {
  min-height: 570px;
  padding: 32px 0;
}

.gazette-card h3 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
}

.gazette-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 0;
  border: 1px solid rgba(32, 32, 42, 0.18);
  background: rgba(32, 32, 42, 0.18);
}

.gazette-list div {
  padding: 16px;
  background: var(--paper);
}

.gazette-list dt {
  color: #7d7a72;
  font-family: var(--mono);
  font-size: 10px;
}

.gazette-list dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.gazette-terminal {
  margin-top: 24px;
  overflow: hidden;
  color: #e6e9e3;
  border: 1px solid rgba(32, 32, 42, 0.8);
  border-radius: var(--radius);
  background: #151720;
}

.gazette-terminal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(248, 245, 237, 0.12);
}

.gazette-terminal-heading span,
.gazette-terminal-heading strong,
.gazette-terminal dt,
.gazette-terminal dd {
  font-family: var(--mono);
}

.gazette-terminal-heading span {
  color: var(--mint);
  font-size: 9px;
  font-weight: 900;
}

.gazette-terminal-heading strong {
  color: var(--yellow);
  font-size: 9px;
}

.gazette-terminal dl {
  margin: 0;
  padding: 5px 14px;
}

.gazette-terminal dl div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(248, 245, 237, 0.08);
}

.gazette-terminal dl div:last-child {
  border-bottom: 0;
}

.gazette-terminal dt {
  color: #858598;
  font-size: 9px;
}

.gazette-terminal dd {
  margin: 0;
  color: #d7e8e2;
  font-size: 9px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gazette-terminal > p {
  margin: 0;
  padding: 10px 14px;
  color: #9ca0aa;
  border-top: 1px solid rgba(248, 245, 237, 0.08);
  font-size: 9px;
  line-height: 1.55;
}

.gazette-terminal[data-execution-mode="sandbox"] {
  border-color: rgba(255, 214, 90, 0.36);
}

.gazette-terminal-empty {
  border-top: 0 !important;
}

.gazette-side {
  display: grid;
  gap: 18px;
}

.gazette-art {
  min-height: 360px;
  aspect-ratio: 1;
}

.trace-box {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0b13;
}

.trace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.trace-header span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.trace-header strong {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
  text-align: right;
}

.trace-box pre {
  max-height: 410px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #c7e8df;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.history-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1.5fr);
  gap: 48px;
  padding: 70px max(16px, 3vw) 100px;
}

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

.history-item,
.empty-state {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.history-item span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.history-item strong {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 17px;
}

.history-item p,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.history-item p {
  margin: 8px 0 0;
}

.history-item code {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 10px;
}

/* Legacy output hooks kept non-visual */
.proof-grid,
.proof-actions,
.inspector-grid {
  display: none;
}

/* Responsive */
@media (max-width: 1180px) {
  .nation-status-ribbon {
    grid-template-columns: 1fr 1.15fr;
  }

  .status-passport {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0 !important;
  }

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

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

  .request-card {
    min-height: 160px;
  }

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

  .governance-config {
    grid-template-columns: 1fr;
  }

  .policy-preview {
    position: relative;
    top: auto;
  }
}

@media (max-width: 900px) {
  body:not(.pre-entry) {
    padding-bottom: 88px;
  }

  .entry-content h1 {
    font-size: 44px;
  }

  .entry-title-cn {
    font-size: 22px;
  }

  .topbar {
    position: relative;
    min-height: 68px;
    padding: 10px 18px;
    backdrop-filter: none;
  }

  .nation-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: var(--z-nav);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 66px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(22, 23, 35, 0.94);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(22px);
  }

  .nation-nav button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 0 3px;
    border-radius: 14px;
  }

  .nation-nav button span {
    display: block;
    font-family: var(--display);
    font-size: 16px;
  }

  .nation-nav button strong {
    font-size: 10px;
    white-space: nowrap;
  }

  .nav-liquid {
    top: 5px;
    height: 54px;
    border-radius: 14px;
  }

  .nation-workspace {
    width: min(100% - 28px, 720px);
    padding-top: 14px;
  }

  .nation-status-ribbon,
  .territory-stage,
  .founding-form-section,
  .citizen-heading,
  .proposal-stage,
  .treasury-theatre,
  .department-story,
  .gazette-stage,
  .history-section {
    grid-template-columns: 1fr;
  }

  .nation-status-ribbon > * + * {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .nation-metrics div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .nation-metrics div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .status-passport {
    grid-column: auto;
  }

  .view-intro {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 56px 4px 32px;
  }

  .view-intro h2 {
    font-size: 38px;
  }

  .nation-tags {
    justify-content: flex-start;
  }

  .territory-stage {
    min-height: 0;
  }

  .territory-art {
    min-height: 440px;
  }

  .territory-picker {
    padding: 0;
    border: 0;
  }

  .founding-form-section {
    gap: 30px;
    padding: 80px 4px;
  }

  .citizen-heading {
    gap: 30px;
    padding: 0 4px 32px;
  }

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

  .constitution-stage {
    min-height: 0;
  }

  .constitution-art {
    width: 100%;
    min-height: 460px;
  }

  .constitution-sheet {
    width: calc(100% - 24px);
    margin: -100px auto 0;
    padding: 34px;
  }

  .policy-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .policy-card textarea {
    grid-column: 1 / -1;
  }

  .proposal-stage {
    gap: 12px;
  }

  .proposal-form,
  .proposal-examples {
    padding: 22px;
  }

  .current-proposal {
    grid-template-columns: 1fr;
  }

  .proposal-amount {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .treasury-theatre {
    min-height: 0;
  }

  .treasury-art {
    min-height: 480px;
  }

  .decision-card {
    padding: 28px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .council-section {
    padding: 72px 4px 20px;
  }

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

  .nation-map-stage,
  .nation-map-art {
    min-height: 620px;
  }

  .map-hotspot {
    min-width: 120px;
  }

  .future-departments {
    grid-template-columns: 1fr 1fr;
  }

  .gazette-paper {
    min-height: 0;
    padding: 28px;
  }

  .history-section {
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .entry-image .art-slot-note {
    display: none;
  }

  .entry-content {
    align-content: start;
    width: calc(100% - 40px);
    margin-left: 20px;
    padding: 28px 0 38px;
  }

  .entry-content h1 {
    margin-top: 10px;
    font-size: 30px;
    line-height: 1.16;
  }

  .entry-brand {
    font-size: 22px;
  }

  .entry-track {
    max-width: 100%;
    font-size: 9px;
  }

  .entry-title-cn {
    margin-top: 12px;
    font-size: 17px;
  }

  .entry-copy {
    font-size: 12px;
    line-height: 1.6;
  }

  .entry-tech-note {
    margin-top: 10px;
    padding: 9px 11px;
  }

  .entry-tech-note span {
    font-size: 10px;
  }

  .entry-actions {
    display: grid;
  }

  .entry-actions .button {
    width: 100%;
    min-height: 44px;
    font-size: 12px;
  }

  .entry-demo-anchor {
    margin-top: 9px;
    font-size: 9px;
  }

  .entry-chapter {
    display: none;
  }

  .entry-orbit-one {
    right: -80px;
  }

  .entry-orbit-two {
    left: -160px;
  }

  .brand-wording small {
    display: none;
  }

  .nation-nav button strong {
    font-size: 9px;
  }

  .nation-workspace {
    width: calc(100% - 20px);
  }

  .nation-status-ribbon {
    margin-bottom: 14px;
  }

  .nation-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .view-intro h2 {
    font-size: 32px;
  }

  .view-intro p:last-child {
    font-size: 15px;
  }

  .art-slot-note {
    width: calc(100% - 24px);
    padding: 14px;
  }

  .art-slot-note strong {
    font-size: 16px;
  }

  .territory-art {
    min-height: 360px;
  }

  .territory-picker {
    padding: 0;
  }

  .governance-config {
    gap: 24px;
    padding: 32px 0 4px;
  }

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

  .template-chip {
    min-height: 0;
  }

  .policy-preview-list div {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .budget-inputs,
  .citizen-list,
  .decision-metrics,
  .debate-timeline,
  .future-departments,
  .gazette-list,
  .history-list {
    grid-template-columns: 1fr;
  }

  .founding-actions {
    display: grid;
    align-items: stretch;
  }

  .citizen-group-art {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  [data-view-panel="setup"] > .citizen-section {
    padding: 24px 0 46px;
  }

  .citizen-card {
    min-height: 280px;
  }

  .constitution-art {
    min-height: 360px;
  }

  .constitution-sheet {
    width: calc(100% - 12px);
    margin-top: -48px;
    padding: 24px 18px;
  }

  .constitution-seal {
    position: static;
    width: 56px;
    margin-bottom: 18px;
  }

  .current-proposal {
    padding: 22px;
  }

  .current-proposal h3 {
    font-size: 24px;
  }

  .treasury-art {
    min-height: 390px;
  }

  .decision-card {
    padding: 22px;
  }

  .review-progress {
    grid-template-columns: 1fr 1fr;
  }

  .nation-map-stage,
  .nation-map-art {
    min-height: 0;
  }

  .nation-map-art {
    aspect-ratio: 4 / 5;
    padding-bottom: 340px;
  }

  .map-note {
    width: calc(100% - 24px);
  }

  .map-hotspot {
    position: static;
    display: inline-grid;
    width: calc(50% - 8px);
    min-width: 0;
    margin: 8px 4px 0;
    vertical-align: top;
  }

  .future-departments article,
  .future-departments article:nth-child(odd),
  .future-departments article:nth-child(n + 3) {
    border: 0;
    border-top: 1px solid var(--line);
  }

  .future-departments article:first-child {
    border-top: 0;
  }

  .gazette-paper {
    padding: 20px;
  }

  .gazette-masthead {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .gazette-masthead small {
    text-align: center;
  }

  .gazette-card h3 {
    font-size: 28px;
  }
}

@media (max-height: 780px) and (min-width: 621px) {
  .entry-content {
    width: min(720px, calc(100% - 64px));
    padding-top: 28px;
    padding-bottom: 78px;
  }

  .entry-content h1 {
    font-size: 40px;
    line-height: 1.14;
  }

  .entry-title-cn {
    margin-top: 10px;
    font-size: 19px;
  }

  .entry-copy {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.65;
  }

  .entry-actions {
    margin-top: 12px;
  }

  .entry-tech-note {
    margin-top: 10px;
    padding-block: 8px;
  }

  .entry-demo-anchor {
    margin-top: 8px;
  }

  .entry-chapter {
    bottom: 18px;
  }
}

@media (max-width: 620px) and (max-height: 680px) {
  .entry-screen {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .entry-content {
    align-content: start;
    min-height: 100%;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .entry-content h1 {
    font-size: 32px;
    line-height: 1.05;
  }

  .entry-title-cn {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.35;
  }

  .entry-copy {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.5;
  }

  .entry-actions {
    gap: 8px;
    margin-top: 14px;
  }

  .entry-actions .button {
    min-height: 38px;
  }

  .entry-tech-note {
    margin-top: 7px;
    padding: 7px 9px;
  }

  .entry-tech-note strong {
    font-size: 10px;
  }

  .entry-tech-note span,
  .entry-demo-anchor {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .entry-fluid-canvas {
    display: none;
  }

  .entry-screen.is-departing .entry-iris {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .map-hotspot,
  .button.ghost,
  .entry-image .art-slot-note {
    backdrop-filter: none;
    background: var(--surface-solid);
  }
}

/* Cloud kingdom narrative layer */
body {
  background: #fff;
}

body::before {
  opacity: 1;
  background: #fff;
}

.entry-screen {
  background: #fff;
}

.entry-image {
  background:
    linear-gradient(90deg, rgba(235, 236, 238, 0.9) 0%, rgba(219, 221, 224, 0.5) 48%, rgba(155, 159, 166, 0.08) 76%),
    linear-gradient(160deg, rgba(239, 103, 81, 0.1), rgba(142, 145, 153, 0.08) 52%, rgba(104, 108, 115, 0.12));
  opacity: 0.6;
}

.entry-vignette {
  background:
    linear-gradient(180deg, rgba(13, 27, 48, 0.04), transparent 58%, rgba(13, 27, 48, 0.18)),
    linear-gradient(90deg, rgba(235, 236, 238, 0.78), transparent 68%);
}

.entry-orbit {
  display: none;
}

.entry-content h1,
.entry-brand,
.entry-title-cn {
  color: #10213a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.entry-content .kicker {
  color: #8f342f;
}

.entry-copy {
  color: #34495b;
}

.entry-chapter {
  color: rgba(16, 33, 58, 0.62);
}

.entry-chapter span {
  border-top-color: rgba(16, 33, 58, 0.26);
}

.entry-image .art-slot-note {
  color: #10213a;
  border-color: rgba(16, 33, 58, 0.24);
  background: rgba(238, 242, 226, 0.68);
}

.entry-image .art-slot-note span {
  color: #4b5c66;
}

.entry-image .art-slot-note code {
  color: #9a3b34;
}

.entry-iris {
  background: #ed6751;
}

.view-intro,
.founding-form-section > .section-copy,
.citizen-heading > div:first-child,
.council-section > .section-copy,
.history-section > .section-copy {
  color: #10213a;
}

.view-intro p:last-child,
.founding-form-section > .section-copy > p,
.citizen-heading > div:first-child > p:last-child,
.council-section > .section-copy > p,
.history-section > .section-copy > p {
  color: #405868;
}

.view-intro .kicker,
.founding-form-section .kicker,
.citizen-heading .kicker {
  color: #8f342f;
}

.founding-form label {
  color: #263f50;
}

.nation-tags span {
  border-color: rgba(16, 33, 58, 0.22);
  background: rgba(16, 33, 58, 0.07);
}

.nation-tags span:nth-child(4n + 1) { color: #8b3d2f; }
.nation-tags span:nth-child(4n + 2) { color: #286754; }
.nation-tags span:nth-child(4n + 3) { color: #8b315e; }
.nation-tags span:nth-child(4n) { color: #256477; }

.art-slot {
  background:
    linear-gradient(145deg, rgba(238, 242, 225, 0.72), rgba(87, 167, 176, 0.2) 52%, rgba(237, 103, 81, 0.18));
  border-color: rgba(16, 33, 58, 0.28);
}

.art-slot::before {
  background-image:
    linear-gradient(rgba(16, 33, 58, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 33, 58, 0.09) 1px, transparent 1px);
}

.art-slot::after {
  border-radius: 42% 58% 72% 28% / 58% 38% 62% 42%;
  border-color: rgba(16, 33, 58, 0.18);
}

.passport-mode-button {
  justify-self: start;
  min-height: 30px;
  padding: 0;
  color: var(--mint);
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.passport-mode-button[hidden] {
  display: none;
}

/* Submission visual pass: replace production art notes with live nation surfaces. */
.nation-system-preview {
  display: block;
  min-height: 420px;
  border-style: solid;
  border-color: rgba(116, 88, 255, 0.42);
  background: #06070d;
}

.nation-system-preview > img,
.nation-map-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nation-system-preview > img {
  position: absolute;
  inset: 0;
  filter: saturate(1.12) contrast(1.08);
}

.nation-system-preview::before {
  z-index: 1;
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(4, 5, 12, 0.9), rgba(4, 5, 12, 0.08) 64%),
    linear-gradient(0deg, rgba(4, 5, 12, 0.9), transparent 58%);
  mask-image: none;
}

.nation-system-preview::after {
  display: none;
}

.nation-system-caption {
  position: absolute;
  left: clamp(22px, 4vw, 64px);
  bottom: clamp(22px, 4vw, 58px);
  z-index: 2;
  width: min(470px, calc(100% - 44px));
  color: #fff;
}

.nation-system-caption span,
.citizen-council-signal span,
.constitution-monument span,
.constitution-rule small,
.seal-core span,
.seal-core small {
  color: #8c7dff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nation-system-caption strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.12;
}

.nation-system-caption p {
  max-width: 52ch;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

.citizen-council-signal {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: 22px 96px 22px 24px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(121, 94, 255, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(7, 8, 17, 0.96), rgba(25, 11, 41, 0.92)),
    #070811;
  box-shadow: 0 18px 50px rgba(40, 22, 92, 0.2);
}

.citizen-council-signal strong {
  margin-top: 7px;
  font-size: 20px;
}

.citizen-council-signal i {
  position: absolute;
  right: 28px;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid #ff454d;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 69, 77, 0.48);
}

.citizen-council-signal i::before,
.citizen-council-signal i::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(141, 116, 255, 0.75);
  border-radius: 50%;
}

.citizen-council-signal i::after {
  inset: 17px;
  border: 0;
  background: #ff454d;
  box-shadow: 0 0 16px #ff454d;
}

.constitution-visual {
  position: relative;
  isolation: isolate;
  width: 70%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(120, 91, 255, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(rgba(122, 91, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 91, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(119, 78, 255, 0.3), transparent 28%),
    linear-gradient(145deg, #05060b, #0d0718 68%, #17090e);
  background-size: 38px 38px, 38px 38px, auto, auto;
  box-shadow: 0 32px 90px rgba(20, 8, 55, 0.34);
}

.constitution-visual::after {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 46%;
  background: repeating-radial-gradient(ellipse at center bottom, rgba(127, 92, 255, 0.42) 0 1px, transparent 2px 22px);
  transform: perspective(380px) rotateX(66deg);
  transform-origin: center bottom;
}

.constitution-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(66%, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(139, 108, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(122, 82, 255, 0.28), inset 0 0 44px rgba(255, 65, 77, 0.12);
  transform: translate(-50%, -50%);
  animation: constitution-pulse 4s ease-in-out infinite;
}

.constitution-monument {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 220px;
  min-height: 260px;
  padding: 28px;
  color: #fff;
  border: 1px solid rgba(255, 80, 86, 0.7);
  clip-path: polygon(18% 0, 82% 0, 100% 13%, 100% 87%, 82% 100%, 18% 100%, 0 87%, 0 13%);
  background: linear-gradient(180deg, rgba(49, 13, 29, 0.96), rgba(9, 8, 19, 0.98));
  box-shadow: 0 0 50px rgba(255, 65, 77, 0.22);
  transform: translate(-50%, -50%);
}

.constitution-monument strong {
  color: #ff4952;
  font-size: 80px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(255, 73, 82, 0.6);
}

.constitution-monument p {
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.constitution-rule {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 5px;
  min-width: 150px;
  padding: 15px 18px;
  color: #fff;
  border: 1px solid rgba(125, 95, 255, 0.42);
  border-radius: 6px;
  background: rgba(7, 7, 15, 0.84);
  backdrop-filter: blur(12px);
}

.constitution-rule strong { font-size: 14px; }
.rule-one { left: 6%; top: 18%; }
.rule-two { right: 6%; top: 26%; }
.rule-three { left: 9%; bottom: 13%; }

.nation-map-art {
  display: block;
  border-style: solid;
  border-color: rgba(122, 91, 255, 0.42);
  background: #04050a;
  box-shadow: 0 30px 90px rgba(21, 8, 54, 0.36);
}

.nation-map-art > img {
  position: absolute;
  inset: 0;
  filter: saturate(1.05) contrast(1.04);
}

.nation-map-art::before {
  z-index: 1;
  opacity: 1;
  background: linear-gradient(180deg, rgba(2, 3, 8, 0.12), transparent 42%, rgba(2, 3, 8, 0.38));
  mask-image: none;
}

.nation-map-art::after { display: none; }

.map-core-card {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(520px, 42%);
  min-height: 150px;
  padding: 22px;
  color: #fff;
  border: 1px solid rgba(137, 103, 255, 0.86);
  border-radius: 8px;
  background: rgba(6, 6, 14, 0.98);
  box-shadow: 0 0 46px rgba(119, 72, 255, 0.44);
  transform: translate(-50%, -50%);
}

.map-core-card span,
.map-core-card small {
  color: #9b86ff;
  font-family: var(--mono);
  font-size: 10px;
}

.map-core-card strong {
  font-size: clamp(20px, 2.2vw, 34px);
}

.map-hotspot { z-index: 3; }

.gazette-seal-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  aspect-ratio: 1;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(117, 88, 255, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(rgba(128, 93, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 93, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(115, 78, 255, 0.24), transparent 48%),
    #06070d;
  background-size: 30px 30px, 30px 30px, auto, auto;
}

.seal-rings {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border: 1px solid rgba(134, 103, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(115, 79, 255, 0.34), inset 0 0 34px rgba(255, 67, 78, 0.18);
  animation: seal-rotate 12s linear infinite;
}

.seal-rings::before,
.seal-rings::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(255, 75, 84, 0.68);
  border-radius: 50%;
}

.seal-rings::after {
  inset: 28%;
  border-style: solid;
  border-color: rgba(137, 108, 255, 0.72);
}

.seal-core {
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
}

.seal-core strong {
  color: #ff444d;
  font-size: clamp(68px, 8vw, 112px);
  line-height: 1;
  text-shadow: 0 0 34px rgba(255, 68, 77, 0.65);
}

.seal-status {
  position: absolute;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.62);
  font-family: var(--mono);
  font-size: 10px;
}

.seal-status i {
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ff444d;
  box-shadow: 0 0 12px #ff444d;
}

@keyframes constitution-pulse {
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: .72; }
}

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

@media (max-width: 900px) {
  .constitution-visual { width: 100%; min-height: 460px; }
  .map-core-card { width: 54%; min-height: 120px; }
}

@media (max-width: 620px) {
  .nation-system-preview { min-height: 330px; }
  .nation-system-preview > img { object-fit: cover; }
  .nation-system-caption p { font-size: 12px; }
  .citizen-council-signal { width: 100%; }
  .constitution-visual { min-height: 380px; }
  .constitution-monument { width: 156px; min-height: 190px; padding: 18px; }
  .constitution-monument strong { font-size: 58px; }
  .constitution-rule { min-width: 112px; padding: 10px 12px; }
  .rule-one { left: 3%; top: 9%; }
  .rule-two { right: 3%; top: 15%; }
  .rule-three { left: 4%; bottom: 8%; }
  .nation-map-art { aspect-ratio: 4 / 3; padding-bottom: 0; }
  .map-core-card { width: 58%; min-height: 92px; padding: 12px; }
  .map-core-card small { display: none; }
  .gazette-seal-visual { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .constitution-orbit,
  .seal-rings { animation: none; }
}

.kite-gate {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 32px;
  margin: 0 0 18px;
  padding: 32px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #12263c;
  box-shadow: 0 22px 60px rgba(26, 58, 69, 0.22);
}

.kite-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background:
    repeating-linear-gradient(132deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 47px 48px),
    linear-gradient(90deg, rgba(72, 151, 141, 0.16), transparent 44%, rgba(237, 103, 81, 0.12));
  transform: translateX(-12%);
  transition: transform 900ms var(--ease-fluid), opacity 300ms ease;
}

.kite-gate[data-kite-state="pending"]::before,
.kite-gate[data-kite-state="settled"]::before {
  opacity: 0.82;
  transform: translateX(0);
}

.kite-gate[data-kite-state="error"],
.kite-gate[data-kite-state="offline"] {
  background: #3a2027;
}

.kite-gate-story h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.kite-gate-story > p:last-child {
  margin: 12px 0 0;
  color: #bbcad0;
  font-size: 13px;
  line-height: 1.7;
}

.protocol-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.protocol-steps li {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 260ms var(--ease-spring), border-color 220ms ease, background 220ms ease;
}

.protocol-steps li:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.protocol-steps li > span {
  color: #7f9aa5;
  font-family: var(--mono);
  font-size: 10px;
}

.protocol-steps strong,
.protocol-steps small,
.protocol-steps em {
  display: block;
  overflow-wrap: anywhere;
}

.protocol-steps strong {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 15px;
}

.protocol-steps small {
  margin-top: 4px;
  color: #8da5af;
  font-family: var(--mono);
  font-size: 9px;
}

.protocol-steps em {
  align-self: end;
  margin-top: 14px;
  color: var(--yellow);
  font-size: 10px;
  font-style: normal;
}

.kite-gate[data-kite-state="ready"] [data-protocol-step="passport"],
.kite-gate[data-kite-state="ready"] [data-protocol-step="session"],
.kite-gate[data-kite-state="pending"] [data-protocol-step="passport"],
.kite-gate[data-kite-state="settled"] .protocol-steps li {
  border-color: rgba(93, 224, 193, 0.52);
  background: rgba(93, 224, 193, 0.09);
}

.kite-gate[data-kite-state="pending"] [data-protocol-step="session"] {
  border-color: rgba(255, 214, 90, 0.72);
  background: rgba(255, 214, 90, 0.1);
}

.kite-gate[data-kite-state="settled"] [data-protocol-step="receipt"] {
  color: #10213a;
  border-color: var(--mint);
  background: var(--mint);
}

.kite-gate[data-kite-state="settled"] [data-protocol-step="receipt"] small,
.kite-gate[data-kite-state="settled"] [data-protocol-step="receipt"] em,
.kite-gate[data-kite-state="settled"] [data-protocol-step="receipt"] span {
  color: rgba(16, 33, 58, 0.7);
}

.kite-gate-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.kite-gate-foot p {
  margin: 0;
  color: #8da5af;
  font-size: 11px;
}

.provider-mode-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--mint);
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
}

.proposal-form label > small {
  color: var(--faint);
  font-weight: 500;
}

@media (max-width: 1080px) {
  .kite-gate {
    grid-template-columns: 1fr;
  }

  .kite-gate-foot {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .kite-gate {
    padding: 22px;
  }

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

  .protocol-steps li {
    min-height: 136px;
  }

  .kite-gate-foot {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .entry-brand {
    font-size: 19px;
  }

  .protocol-steps {
    grid-template-columns: 1fr;
  }

  .protocol-steps li {
    min-height: 116px;
  }
}

/* Treasury proposal console · reference-led redesign */
body:has([data-view-panel="review"]:not([hidden])) {
  background: #05060c;
}

body:has([data-view-panel="review"]:not([hidden]))::before {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(70, 47, 180, 0.18), transparent 46%),
    linear-gradient(180deg, #070810 0%, #04050b 68%, #080611 100%);
}

body:has([data-view-panel="review"]:not([hidden])) .nation-workspace {
  color: #ffffff;
}

.review-intro {
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 250px;
  padding: 64px 20px 38px;
  text-align: center;
}

.review-intro > div {
  width: min(860px, 100%);
}

.review-intro,
body:has([data-view-panel="review"]:not([hidden])) .review-intro {
  color: #ffffff;
}

.review-intro .kicker,
body:has([data-view-panel="review"]:not([hidden])) .review-intro .kicker {
  color: #ff646a;
  opacity: 1;
  text-shadow: 0 0 20px rgba(255, 70, 82, 0.42);
}

.review-intro h2 {
  color: #ffffff;
  opacity: 1;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.72),
    0 0 34px rgba(122, 112, 255, 0.42);
}

.review-intro > div > p:last-child {
  max-width: 760px;
  margin: 14px auto 0;
  color: #d9dced;
  opacity: 1;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.78);
}

.treasury-console {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(480px, 1.44fr) minmax(280px, 0.78fr);
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

.treasury-console > .proposal-form,
.treasury-console > .proposal-examples,
.treasury-console > .kite-gate {
  min-width: 0;
  min-height: 720px;
  margin: 0;
  border: 1px solid rgba(117, 102, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(50, 40, 115, 0.12), transparent 42%),
    rgba(4, 5, 14, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 46px rgba(70, 54, 170, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.22);
}

.treasury-console > .proposal-form,
.treasury-console > .proposal-examples {
  padding: 25px;
}

.console-panel-heading {
  display: grid;
  gap: 7px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(117, 102, 255, 0.2);
}

.console-panel-heading > span {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.console-panel-heading h3 {
  margin: 0;
  font-size: 22px;
}

.console-panel-heading p {
  margin: 0;
  color: #8f91a5;
  font-size: 11px;
  line-height: 1.55;
}

.treasury-console .proposal-form {
  gap: 14px;
}

.treasury-console .proposal-form label {
  gap: 6px;
  color: #a5a5b5;
  font-size: 12px;
}

.treasury-console .proposal-form input,
.treasury-console .proposal-form textarea {
  min-height: 43px;
  border-color: rgba(117, 102, 255, 0.35);
  border-radius: 6px;
  background: rgba(9, 8, 25, 0.82);
}

.treasury-console .proposal-form textarea {
  min-height: 94px;
}

.treasury-console .milestone-field {
  padding: 10px;
  border-color: rgba(117, 102, 255, 0.26);
  background: rgba(117, 102, 255, 0.045);
}

.treasury-console .proposal-form > .button {
  min-height: 48px;
  margin-top: auto;
  color: #ffffff;
  background: linear-gradient(180deg, #ff4f49, #d82027);
  box-shadow: 0 10px 28px rgba(255, 49, 56, 0.26), inset 0 1px 0 rgba(255,255,255,0.25);
}

.treasury-console .proposal-examples {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.treasury-console .request-list {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 10px 3px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(122, 112, 255, 0.65) rgba(255, 255, 255, 0.035);
}

.treasury-console .request-card {
  flex: 0 0 calc(100% - 10px);
  min-height: 480px;
  padding: 22px;
  scroll-snap-align: center;
  border-color: rgba(117, 102, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(93, 67, 214, 0.2), transparent 45%),
    rgba(14, 10, 35, 0.88);
  box-shadow: inset 0 0 35px rgba(88, 64, 220, 0.08);
}

.treasury-console .request-card:hover,
.treasury-console .request-card.active {
  border-color: #ff4b55;
  background:
    linear-gradient(160deg, rgba(200, 35, 57, 0.28), transparent 52%),
    rgba(33, 8, 22, 0.94);
  box-shadow: inset 0 0 42px rgba(255, 54, 75, 0.12), 0 0 26px rgba(255, 54, 75, 0.12);
  transform: translateY(-3px);
}

.treasury-console .request-card strong {
  font-size: 22px;
}

.treasury-console .request-card p {
  font-size: 13px;
  line-height: 1.7;
}

.treasury-console .request-card-footer code {
  color: #ff5159;
  font-size: 24px;
}

.treasury-console > .kite-gate {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 18px;
  padding: 26px 22px 20px;
  overflow: hidden;
}

.treasury-console > .kite-gate::before {
  opacity: 0.74;
  background:
    linear-gradient(rgba(114, 92, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 92, 255, 0.07) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 58%, rgba(90, 54, 255, 0.22), transparent 58%);
  background-size: 34px 34px, 34px 34px, auto;
  transform: none;
}

.treasury-console .kite-gate-story {
  text-align: center;
}

.treasury-console .kite-gate-story h3 {
  font-size: 25px;
}

.treasury-console .kite-gate-story > p:last-child {
  max-width: 560px;
  margin: 10px auto 0;
  color: #8d8fa6;
  font-size: 11px;
}

.treasury-console .protocol-steps {
  position: relative;
  align-items: end;
  gap: 10px;
}

.treasury-console .protocol-steps::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 38px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b8dff 14%, #865bff 50%, #ff3f56 86%, transparent);
  box-shadow: 0 0 14px #654cff;
}

.treasury-console .protocol-steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 300px;
  padding: 0;
  text-align: center;
  border: 0;
  background: transparent;
}

.treasury-console .protocol-steps li:hover {
  transform: translateY(-4px);
}

.treasury-console .protocol-steps li > span {
  color: #b7b6c8;
  font-size: 10px;
}

.treasury-console .protocol-steps strong {
  margin-top: 7px;
  font-size: 14px;
}

.treasury-console .protocol-steps small {
  color: #8583a4;
  font-size: 8px;
}

.protocol-arch {
  position: relative;
  display: grid;
  place-items: center;
  width: min(116px, 100%);
  height: 158px;
  margin-top: 13px;
  color: #65b9ff;
  border: 2px solid currentColor;
  border-bottom-width: 6px;
  border-radius: 58px 58px 8px 8px;
  background:
    repeating-radial-gradient(ellipse at 50% 74%, transparent 0 14px, rgba(106, 90, 255, 0.22) 15px 16px),
    linear-gradient(180deg, rgba(49, 45, 126, 0.3), rgba(11, 15, 48, 0.86));
  box-shadow: inset 0 0 26px rgba(58, 119, 255, 0.3), 0 0 20px rgba(70, 74, 255, 0.4);
}

.protocol-arch::before {
  content: "";
  position: absolute;
  inset: 13px 12px 8px;
  border: 1px solid currentColor;
  border-radius: 48px 48px 4px 4px;
  opacity: 0.58;
}

.protocol-arch::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -12px;
  height: 12px;
  border: 1px solid currentColor;
  background: rgba(31, 24, 91, 0.86);
  box-shadow: 0 0 18px currentColor;
}

.protocol-arch i {
  position: relative;
  z-index: 1;
  color: #b8d9ff;
  font-family: var(--mono);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 0 12px currentColor;
}

.treasury-console .protocol-steps em {
  min-height: 26px;
  margin-top: 22px;
  color: #9c99bb;
  font-size: 9px;
}

.kite-gate[data-kite-state="ready"] .protocol-arch,
.kite-gate[data-kite-state="sandbox"] .protocol-arch,
.kite-gate[data-kite-state="settled"] .protocol-arch {
  animation: treasury-gate-pulse 2.8s ease-in-out infinite;
}

.kite-gate[data-kite-state="settled"] [data-protocol-step="receipt"] .protocol-arch {
  color: #ff4e58;
  box-shadow: inset 0 0 30px rgba(255, 48, 68, 0.32), 0 0 28px rgba(255, 48, 68, 0.56);
}

.treasury-core-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 128px;
}

.treasury-core-shell::before {
  content: "";
  position: absolute;
  inset: 50% 4% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #6655ff, #ff3f4f, #6655ff, transparent);
  box-shadow: 0 0 14px #6b50ff;
}

.treasury-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 6px;
  width: min(220px, 72%);
  min-height: 112px;
  padding: 16px;
  border: 1px solid #ff4350;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(84, 21, 49, 0.94), rgba(16, 10, 36, 0.98));
  box-shadow: inset 0 0 28px rgba(255, 54, 78, 0.13), 0 0 28px rgba(255, 42, 62, 0.24);
}

.treasury-core small,
.treasury-core span {
  color: #8f8ba8;
  font-family: var(--mono);
  font-size: 8px;
}

.treasury-core strong {
  color: #ffffff;
  font-size: 18px;
  text-align: center;
}

.treasury-console .kite-gate-foot {
  grid-column: auto;
  padding-top: 12px;
}

.treasury-console .kite-gate-foot p {
  font-size: 9px;
}

.treasury-console .provider-mode-badge {
  color: #70d99a;
  border-radius: 4px;
}

.current-proposal {
  border-color: rgba(255, 73, 82, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 51, 63, 0.08), transparent 36%),
    rgba(5, 6, 15, 0.94);
  box-shadow: inset 0 0 34px rgba(255, 49, 63, 0.04);
}

.treasury-theatre {
  min-height: 520px;
  border-color: rgba(117, 102, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 5, 14, 0.96);
}

.treasury-ledger-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 34px;
  min-height: 520px;
  padding: 46px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(93, 56, 255, 0.24), transparent 50%),
    #050610;
}

.ledger-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.44;
  background-image:
    linear-gradient(rgba(100, 80, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 80, 255, 0.12) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 82%, transparent);
  transform: perspective(500px) rotateX(54deg) scale(1.35) translateY(18%);
}

.ledger-route {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
  align-items: center;
  width: min(660px, 100%);
}

.ledger-route span {
  display: grid;
  place-items: center;
  min-width: 68px;
  min-height: 34px;
  padding: 0 9px;
  color: #b7b5cb;
  border: 1px solid rgba(117, 102, 255, 0.44);
  background: rgba(30, 22, 73, 0.76);
  font-family: var(--mono);
  font-size: 9px;
}

.ledger-route i {
  height: 1px;
  background: linear-gradient(90deg, #6258ff, #ff4152);
  box-shadow: 0 0 12px #755cff;
}

.ledger-core {
  display: grid;
  place-items: center;
  gap: 10px;
  width: min(390px, 100%);
  min-height: 190px;
  padding: 30px;
  border: 1px solid rgba(255, 64, 80, 0.68);
  background: linear-gradient(180deg, rgba(57, 20, 66, 0.94), rgba(9, 8, 28, 0.98));
  box-shadow: inset 0 0 46px rgba(115, 73, 255, 0.15), 0 0 46px rgba(255, 48, 75, 0.13);
  clip-path: polygon(8% 0, 92% 0, 100% 15%, 100% 85%, 92% 100%, 8% 100%, 0 85%, 0 15%);
}

.ledger-core small {
  color: #ff5963;
  font-family: var(--mono);
  font-size: 9px;
}

.ledger-core strong {
  font-family: var(--display);
  font-size: 27px;
}

.ledger-core code {
  color: #9692b2;
  font-family: var(--mono);
  font-size: 10px;
}

.treasury-ledger-visual > p {
  max-width: 610px;
  margin: 0;
  color: #85859a;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.treasury-theatre .decision-card {
  border-left-color: rgba(117, 102, 255, 0.24);
  background: linear-gradient(180deg, rgba(45, 28, 104, 0.08), transparent);
}

.treasury-theatre .decision-metrics div {
  border-color: rgba(117, 102, 255, 0.28);
  background: rgba(117, 102, 255, 0.045);
}

@keyframes treasury-gate-pulse {
  0%, 100% { filter: brightness(0.9); transform: translateY(0); }
  50% { filter: brightness(1.2); transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .kite-gate .protocol-arch {
    animation: none !important;
  }
}

@media (max-width: 1180px) {
  .treasury-console {
    grid-template-columns: minmax(280px, 0.72fr) minmax(480px, 1.28fr);
  }

  .treasury-console > .proposal-examples {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .treasury-console .request-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .treasury-console .request-card {
    min-height: 250px;
  }
}

@media (max-width: 980px) {
  .treasury-console {
    grid-template-columns: 1fr;
  }

  .treasury-console > .proposal-form,
  .treasury-console > .proposal-examples,
  .treasury-console > .kite-gate {
    min-height: 0;
  }

  .treasury-console > .proposal-examples {
    grid-column: auto;
  }

  .treasury-console .request-list {
    display: flex;
    overflow-x: auto;
  }

  .treasury-console .request-card {
    flex-basis: min(310px, 86vw);
    min-height: 330px;
  }

  .treasury-theatre {
    grid-template-columns: 1fr;
  }

  .treasury-theatre .decision-card {
    border-top: 1px solid rgba(117, 102, 255, 0.24);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .review-intro {
    padding: 42px 4px 28px;
  }

  .review-intro h2 {
    font-size: 34px;
  }

  .treasury-console > .proposal-form,
  .treasury-console > .proposal-examples,
  .treasury-console > .kite-gate {
    padding: 20px 16px;
  }

  .treasury-console .protocol-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .treasury-console .protocol-steps::before {
    display: none;
  }

  .treasury-console .protocol-steps li {
    min-height: 278px;
  }

  .protocol-arch {
    width: 112px;
    height: 148px;
  }

  .ledger-route {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ledger-route i {
    display: none;
  }

  .treasury-ledger-visual {
    min-height: 440px;
    padding: 28px 18px;
  }

  .ledger-core {
    min-height: 170px;
    padding: 22px 16px;
  }
}

/* Figma Homepage · node 12:410 */
.entry-screen {
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  background: #090a11;
}

.entry-figma-backdrop,
.entry-figma-backdrop img,
.entry-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.entry-figma-backdrop {
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.entry-figma-backdrop img {
  object-fit: cover;
}

.entry-fluid-canvas {
  z-index: 1;
  opacity: 0.16;
  mix-blend-mode: screen;
}

.entry-vignette {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 10, 17, 0.2) 0%, rgba(9, 10, 17, 0) 46%, rgba(9, 10, 17, 0.92) 100%),
    radial-gradient(circle at 50% 40%, rgba(9, 10, 17, 0) 20%, rgba(9, 10, 17, 0.22) 64%, rgba(9, 10, 17, 0.72) 100%);
}

.entry-topnav {
  position: absolute;
  top: 16px;
  left: 64px;
  right: 84px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 44px;
}

.entry-nav-brand,
.entry-nav-menu button,
.entry-nav-actions button {
  border: 0;
}

.entry-nav-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  padding: 0;
  color: var(--coral);
  background: transparent;
}

.entry-nav-brand img {
  width: 22px;
  height: 18px;
}

.entry-nav-brand strong {
  font-family: Georgia, "Source Serif 4", serif;
  font-size: 24px;
  line-height: 32px;
}

.entry-nav-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  min-width: 0;
  height: 44px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.entry-nav-menu a,
.entry-nav-menu button {
  display: grid;
  height: 38px;
  place-items: center;
  padding: 0 14px;
  border-radius: 21px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.entry-nav-menu a:hover,
.entry-nav-menu button:hover,
.entry-nav-menu .active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.entry-nav-menu a:active,
.entry-nav-menu button:active,
.entry-nav-actions button:active {
  transform: scale(0.97);
}

.entry-nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.entry-nav-actions > span {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--mono);
  font-size: 11px;
}

.entry-nav-actions button {
  min-width: 116px;
  height: 42px;
  padding: 0 22px;
  border-radius: 36px;
  color: #090a11;
  background: #fff;
  font-size: 14px;
  transition: transform 180ms ease, background 180ms ease;
}

.entry-nav-actions button:hover {
  background: #f1f1f4;
  transform: translateY(-1px);
}

.entry-island-visual {
  position: absolute;
  top: 34px;
  left: 50%;
  z-index: 3;
  width: min(112vw, 1720px);
  aspect-ratio: 1152 / 643.5;
  overflow: hidden;
  transform: translateX(-50%);
  opacity: 0.62;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

.entry-island-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.72);
}

.entry-island-visual i {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(15, 15, 26, 0.16) 62%, #090a11 100%);
}

.entry-content {
  position: absolute;
  top: 290px;
  left: 50%;
  z-index: 5;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 0;
  width: min(760px, calc(100% - 48px));
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  text-align: center;
}

.entry-content h1.entry-brand,
.entry-brand {
  display: grid;
  max-width: 760px;
  margin: 0;
  color: transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.44), #fff 20%, #fff 80%, rgba(255, 255, 255, 0.44));
  background-clip: text;
  -webkit-background-clip: text;
  font-family: var(--sans);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0;
  text-shadow: none;
  text-wrap: balance;
}

.entry-brand span {
  display: block;
}

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.entry-actions .entry-primary-cta,
.entry-proposal-badge {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  white-space: nowrap;
}

.entry-actions .entry-primary-cta {
  padding: 0 22px;
  color: #fff;
  background: var(--coral);
  box-shadow:
    0 10px 21px rgba(0, 0, 0, 0.14),
    0 38px 38px rgba(0, 0, 0, 0.12),
    0 0 0 4px rgba(255, 255, 255, 0.1);
  font-size: 16px;
}

.entry-actions .entry-primary-cta:hover {
  color: #fff;
  background: #ff6d65;
  transform: translateY(-2px);
}

.entry-proposal-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 14px 6px 8px;
  color: #fff;
  background: rgba(57, 117, 254, 0.24);
  box-shadow: inset 0 0 0 1px rgba(114, 157, 255, 0.12);
  font-size: 14px;
  transition: transform 180ms ease, background 180ms ease;
}

.entry-proposal-badge img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.entry-proposal-badge:hover {
  background: rgba(57, 117, 254, 0.4);
  transform: translateY(-2px);
}

.entry-scroll-cue {
  position: absolute;
  left: 58px;
  bottom: 36px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 50px;
  place-items: center;
  border-radius: 20px;
  transition: transform 180ms ease;
}

.entry-scroll-cue img {
  width: 30px;
  height: 50px;
  transform: scaleY(-1);
}

.entry-scroll-cue:hover {
  transform: translateY(3px);
}

.entry-manifesto,
.entry-kite-note {
  position: absolute;
  z-index: 5;
  margin: 0;
}

.entry-manifesto {
  bottom: 38px;
  left: 50%;
  width: min(420px, 36vw);
  transform: translateX(-50%);
  color: #fff;
  font-size: 20px;
  line-height: 1.65;
  text-align: center;
}

.entry-kite-note {
  right: 44px;
  bottom: 42px;
  width: 294px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.58;
  text-align: right;
}

.entry-iris {
  z-index: 20;
  background: #090a11;
}

.entry-screen.is-departing .entry-topnav,
.entry-screen.is-departing .entry-content,
.entry-screen.is-departing .entry-manifesto,
.entry-screen.is-departing .entry-kite-note,
.entry-screen.is-departing .entry-scroll-cue {
  animation: entry-fade-out 420ms ease forwards;
}

@media (max-width: 1100px) {
  .entry-topnav {
    left: 34px;
    right: 34px;
    grid-template-columns: minmax(205px, 1fr) auto;
    gap: 14px;
  }

  .entry-nav-menu a,
  .entry-nav-menu button {
    padding-inline: 8px;
    font-size: 12px;
  }

  .entry-nav-actions > span {
    display: none;
  }

  .entry-island-visual {
    width: 92vw;
  }

  .entry-kite-note {
    right: 28px;
    width: 250px;
    font-size: 12px;
  }
}

@media (max-width: 820px) {
  .entry-topnav {
    left: 24px;
    right: 24px;
    grid-template-columns: 1fr auto;
  }

  .entry-nav-menu {
    display: none;
  }

  .entry-nav-brand strong {
    font-size: 21px;
  }

  .entry-island-visual {
    top: 92px;
    width: 145vw;
  }

  .entry-content {
    top: 31%;
  }

  .entry-content h1.entry-brand,
  .entry-brand {
    font-size: 50px;
  }

  .entry-manifesto {
    bottom: 102px;
    width: min(520px, calc(100% - 80px));
    font-size: 17px;
  }

  .entry-kite-note {
    right: 24px;
    bottom: 30px;
    left: 80px;
    width: auto;
    font-size: 11px;
  }

  .entry-scroll-cue {
    left: 24px;
    bottom: 26px;
  }
}

@media (max-width: 620px) {
  .entry-topnav {
    top: 14px;
    left: 18px;
    right: 18px;
  }

  .entry-nav-brand img {
    width: 18px;
    height: 15px;
  }

  .entry-nav-brand strong {
    font-size: 18px;
    line-height: 24px;
  }

  .entry-nav-actions button {
    min-width: 88px;
    height: 38px;
    padding-inline: 16px;
    font-size: 12px;
  }

  .entry-island-visual {
    top: 92px;
    width: 152vw;
    opacity: 0.5;
  }

  .entry-content {
    top: 27%;
    width: calc(100% - 32px);
  }

  .entry-content h1.entry-brand,
  .entry-brand {
    font-size: 40px;
    line-height: 1.14;
  }

  .entry-actions {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 24px;
  }

  .entry-actions .entry-primary-cta {
    min-height: 44px;
    font-size: 14px;
  }

  .entry-proposal-badge {
    min-height: 34px;
    font-size: 12px;
  }

  .entry-manifesto {
    bottom: 112px;
    width: calc(100% - 46px);
    font-size: 15px;
    line-height: 1.55;
  }

  .entry-kite-note {
    right: 20px;
    bottom: 24px;
    left: 66px;
    font-size: 9px;
    line-height: 1.5;
    text-align: right;
  }

  .entry-scroll-cue {
    left: 18px;
    bottom: 20px;
    width: 25px;
    height: 42px;
  }

  .entry-scroll-cue img {
    width: 25px;
    height: 42px;
  }
}

@media (max-width: 390px) {
  .entry-content h1.entry-brand,
  .entry-brand {
    font-size: 36px;
  }
}

@media (max-height: 700px) {
  .entry-island-visual {
    top: 64px;
    width: min(72vw, 940px);
  }

  .entry-content {
    top: 27%;
  }

  .entry-content h1.entry-brand,
  .entry-brand {
    font-size: 46px;
  }

  .entry-actions {
    margin-top: 18px;
  }

  .entry-manifesto {
    bottom: 28px;
    font-size: 15px;
  }

  .entry-kite-note {
    bottom: 28px;
    font-size: 10px;
  }
}

@media (max-width: 620px) and (max-height: 700px) {
  .entry-island-visual {
    top: 76px;
    width: 132vw;
  }

  .entry-content {
    top: 25%;
  }

  .entry-content h1.entry-brand,
  .entry-brand {
    font-size: 32px;
  }

  .entry-manifesto {
    bottom: 86px;
    font-size: 13px;
  }

  .entry-kite-note {
    bottom: 18px;
    font-size: 8px;
  }
}

/* ═══════════════════════════════════════════════════
   护照导出触发按钮
═══════════════════════════════════════════════════ */
.export-passport-trigger {
  padding: 5px 14px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 20px;
  background: transparent;
  color: #c9a84c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}

.export-passport-trigger:hover {
  background: rgba(201, 168, 76, 0.12);
}

/* ═══════════════════════════════════════════════════
   国家护照 · 导出弹窗
═══════════════════════════════════════════════════ */
.passport-export-dialog {
  max-width: min(880px, 96vw);
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  overflow: visible;
  box-shadow: none;
  margin-top: 40px;
  margin-bottom: 60px;
}

.passport-export-dialog::backdrop {
  background: rgba(0, 0, 12, 0.78);
  backdrop-filter: blur(8px);
}

.passport-book {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(201, 168, 76, 0.18),
    8px 0 24px -8px rgba(0, 0, 0, 0.5) inset;
}

/* ── 封面页 ── */
.passport-cover-page {
  width: 256px;
  flex: 0 0 256px;
  background: #0b1e3d;
  color: #f0e6c0;
  padding: 28px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  border-right: 1px solid rgba(201, 168, 76, 0.25);
}

.pp-cover-border {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  pointer-events: none;
  border-radius: 2px;
}

.pp-issuer-text {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: rgba(240, 230, 192, 0.5);
  text-transform: uppercase;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.pp-seal {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
}

.pp-seal svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.3));
}

.pp-passport-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #c9a84c;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pp-nation-name {
  font-size: 17px;
  font-weight: 700;
  color: #f0e6c0;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-all;
}

.pp-template-name {
  font-size: 11px;
  color: #c9a84c;
  letter-spacing: 0.04em;
  margin-bottom: auto;
}

.pp-issued {
  font-size: 10px;
  color: rgba(240, 230, 192, 0.4);
  margin-top: 14px;
  margin-bottom: 10px;
}

.pp-mrz {
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(240, 230, 192, 0.3);
  letter-spacing: 0.04em;
  line-height: 1.65;
  width: 100%;
  border-top: 1px solid rgba(201, 168, 76, 0.18);
  padding-top: 8px;
  word-break: break-all;
  text-align: left;
}

/* ── 数据页 ── */
.passport-data-page {
  flex: 1;
  background: #faf8f0;
  color: #1a1a2e;
  padding: 22px 26px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 72vh;
}

.pp-section-title {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #0b1e3d;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(201, 168, 76, 0.45);
  padding-bottom: 4px;
  margin-bottom: 7px;
  font-weight: 700;
}

.pp-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.pp-dl > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pp-dl dt {
  font-size: 7.5px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pp-dl dd {
  font-size: 10.5px;
  color: #1a1a2e;
  font-weight: 600;
}

.pp-articles {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-articles li {
  font-size: 10px;
  line-height: 1.45;
  padding: 4px 7px;
  background: rgba(11, 30, 61, 0.04);
  border-radius: 3px;
  border-left: 2px solid #c9a84c;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 6px;
}

.pp-articles strong {
  color: #0b1e3d;
  font-weight: 700;
  font-size: 9px;
  line-height: 1.6;
  grid-row: 1 / 3;
  padding-top: 1px;
}

.pp-articles em {
  font-style: normal;
  font-weight: 600;
  color: #2c2c4a;
  font-size: 10px;
}

.pp-articles span {
  color: #777;
  font-size: 8.5px;
  margin-top: 1px;
}

.pp-gazette-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-gazette-list li {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 3px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.pp-gazette-list strong {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pp-gazette-list em {
  font-style: normal;
  font-weight: 600;
}

.pp-gazette-list small {
  margin-left: auto;
  color: #aaa;
  font-size: 8.5px;
}

.pp-g-approve { background: rgba(0, 180, 100, 0.07); }
.pp-g-approve strong { color: #007a42; background: rgba(0, 180, 100, 0.13); }

.pp-g-deny { background: rgba(210, 50, 50, 0.06); }
.pp-g-deny strong { color: #b22222; background: rgba(210, 50, 50, 0.1); }

.pp-g-reduce { background: rgba(220, 160, 0, 0.07); }
.pp-g-reduce strong { color: #996600; background: rgba(220, 160, 0, 0.13); }

.pp-g-empty { color: #bbb; font-style: italic; font-size: 10px; padding: 4px 0; }

.pp-mrz-data {
  color: rgba(11, 30, 61, 0.2);
  border-top-color: rgba(201, 168, 76, 0.25);
  margin-top: auto;
  padding-top: 8px;
}

/* ── 操作栏 ── */
.passport-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 2px 0;
}

.pp-btn {
  padding: 8px 18px;
  background: #c9a84c;
  color: #0b1e3d;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 150ms;
  letter-spacing: 0.02em;
}

.pp-btn:hover { opacity: 0.82; }

.pp-btn-ghost {
  background: transparent;
  color: rgba(240, 230, 192, 0.55);
  border: 1px solid rgba(240, 230, 192, 0.18);
  font-weight: 500;
}

.pp-btn-ghost:hover {
  opacity: 1;
  color: rgba(240, 230, 192, 0.85);
  background: rgba(240, 230, 192, 0.05);
}

.pp-btn-print {
  background: #162d58;
  color: #f0e6c0;
}

/* ── 打印 ── */
@media print {
  body > *:not(dialog) { display: none !important; }
  dialog { position: static !important; }
  .passport-export-actions { display: none !important; }
  .passport-export-dialog { max-width: none !important; }
  .passport-book { box-shadow: none !important; }
  .passport-data-page { max-height: none !important; overflow: visible !important; }
}

/* ── 响应式：手机上改为纵向叠放 ── */
@media (max-width: 600px) {
  .passport-book { flex-direction: column; }
  .passport-cover-page { width: 100%; flex: none; padding: 24px 20px 16px; }
  .passport-data-page { max-height: 55vh; }
}

/* Detail-view brand lockup and centered constitution. */
.brand-mark {
  flex: 0 0 34px;
  width: 34px !important;
  height: 28px !important;
  min-height: 0;
  overflow: hidden;
  color: transparent;
  border-radius: 0;
  background: transparent;
}

.brand-mark img {
  display: block;
  width: 34px !important;
  height: 28px !important;
  min-height: 0 !important;
  max-height: 28px !important;
  object-fit: fill;
}

.brand-wording {
  display: block;
}

.brand-wording strong {
  color: #ff5559;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
}

.constitution-stage.constitution-centered {
  display: flex;
  justify-content: center;
  min-height: 0;
  margin-bottom: 90px;
}

.constitution-centered .constitution-sheet {
  width: min(980px, 100%);
  margin: 0 auto;
}

@media (max-width: 620px) {
  .brand-button { gap: 8px; }
  .brand-mark {
    flex-basis: 28px;
    width: 28px !important;
    height: 23px !important;
  }
  .brand-mark img {
    width: 28px !important;
    height: 23px !important;
    max-height: 23px !important;
  }
  .brand-wording strong { font-size: 18px; }
  .constitution-stage.constitution-centered { margin-bottom: 54px; }
  .constitution-centered .constitution-sheet {
    width: 100%;
    margin: 0;
  }
}

/* The map artwork already contains labels; keep DOM buttons as invisible hit areas. */
.nation-map-stage .map-core-card,
.nation-map-stage .map-hotspot,
.nation-map-stage .map-hotspot:hover,
.nation-map-stage .map-hotspot.active {
  display: none;
}

.nation-map-stage .map-core-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: min(760px, 48%);
  min-height: 178px;
  padding: 28px 36px;
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  background: #080811;
  box-shadow: none;
}

.map-core-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.map-core-copy span {
  color: #a991ff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.map-core-copy strong {
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.16;
}

.map-core-copy small {
  color: #a6a5b2;
  font-size: 12px;
  line-height: 1.5;
}

.map-core-badge {
  display: grid;
  place-items: center;
  min-width: 184px;
  min-height: 94px;
  padding: 16px 22px;
  color: #140d10;
  border-radius: 999px;
  background: #ff5559;
  text-align: center;
}

.map-core-badge strong {
  font-size: 22px;
}

.map-core-badge small {
  margin-top: 4px;
  color: rgba(20, 13, 16, 0.72);
  font-size: 11px;
}

@media (max-width: 760px) {
  .nation-map-stage .map-core-card {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 58%;
    min-height: 120px;
    padding: 14px 16px;
  }

  .map-core-copy {
    text-align: center;
  }

  .map-core-copy small {
    display: none;
  }

  .map-core-badge {
    min-width: 0;
    min-height: 42px;
    padding: 8px 14px;
  }

  .map-core-badge strong {
    font-size: 15px;
  }

  .map-core-badge small {
    display: none;
  }
}
