:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #d8e0eb;
  --text: #101827;
  --muted: #5a6a82;
  --blue: #2563eb;
  --green: #10b981;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --red: #ef4444;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #eef3fb;
  color: var(--text);
  border: 1px solid var(--line);
}

button.blue {
  background: var(--blue);
}

button.green {
  background: var(--green);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.app {
  min-height: 100vh;
}

.public-app {
  min-height: 100vh;
  background: #f7f7fb;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 34px;
  background: rgba(247, 247, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eceef5;
}

.logo-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #2e2f3a;
  background: transparent;
  border-radius: 0;
  font-size: 18px;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #2d2d37;
  color: white;
  font-weight: 900;
}

.public-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-links button {
  background: transparent;
  color: #656779;
  padding: 10px 12px;
}

.public-links button.active,
.public-links button:hover {
  color: #2d2d37;
  background: white;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.public-hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: 54px;
  padding: 72px 64px 86px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  color: #7c7e91;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  color: #2b2c35;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-weight: 500;
}

.lead {
  margin: 26px 0 0;
  max-width: 680px;
  color: #8b8ea2;
  font-size: 20px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
}

.dark-cta,
.light-cta {
  border-radius: 999px;
  padding: 13px 20px;
  min-height: 44px;
}

.dark-cta {
  background: #2e2f3a;
  color: white;
}

.light-cta {
  background: white;
  color: #2e2f3a;
  border: 1px solid #e1e4ee;
}

.dark-cta.full,
.light-cta.full {
  width: 100%;
  border-radius: 12px;
}

.hero-visual {
  min-height: 580px;
  display: grid;
  place-items: center;
}

.sketch-stage {
  position: relative;
  width: min(640px, 100%);
  aspect-ratio: 1.2;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.75), rgba(236,238,247,0.8)),
    radial-gradient(circle at 50% 35%, #ffffff 0%, #f1f2f8 58%, #e3e5ee 100%);
  border: 1px solid #e3e6f0;
  box-shadow: 0 30px 90px rgba(21, 27, 47, 0.12);
  overflow: hidden;
}

.sketch-stage::before {
  content: "";
  position: absolute;
  inset: 16% 10% 12%;
  transform: perspective(680px) rotateX(58deg) rotateZ(-22deg);
  border: 2px solid rgba(47, 49, 61, 0.18);
  background-image:
    linear-gradient(rgba(47,49,61,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,49,61,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  border-radius: 18px;
}

.orbit-ring {
  position: absolute;
  left: 28%;
  top: 18%;
  width: 190px;
  height: 190px;
  border: 4px solid #a85c33;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-16deg);
}

.mini-world {
  position: absolute;
  left: 38%;
  top: 28%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #f6d8aa, #465061 50%, #1b2029 100%);
  box-shadow: inset -10px -14px 20px rgba(0,0,0,0.28), 0 24px 50px rgba(38,42,58,0.2);
}

.mini-world span {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #b77538;
  box-shadow: 0 10px 18px rgba(0,0,0,0.12);
}

.mini-world span:nth-child(1) { left: -70px; top: 80px; width: 120px; height: 18px; }
.mini-world span:nth-child(2) { right: -78px; top: 72px; width: 132px; height: 18px; }
.mini-world span:nth-child(3) { left: 54px; bottom: -76px; width: 18px; height: 120px; }
.mini-world span:nth-child(4) { left: 56px; top: -58px; width: 18px; height: 84px; }

.world-tile {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 84px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.86);
  color: #2d2f3a;
  border: 1px solid #dce1ee;
  box-shadow: 0 16px 28px rgba(20, 28, 44, 0.1);
  font-weight: 900;
}

.tile-a { left: 10%; top: 24%; }
.tile-b { right: 12%; top: 22%; }
.tile-c { left: 16%; bottom: 22%; }
.tile-d { right: 14%; bottom: 26%; }

.public-section {
  margin: 0 auto 48px;
  width: min(1180px, calc(100vw - 48px));
  padding: 34px;
  background: rgba(255,255,255,0.82);
  border: 1px solid #e6e9f2;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06);
}

.compact-section {
  margin-top: 60px;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head.left {
  text-align: left;
}

.section-head h2 {
  margin: 0;
  font-size: 34px;
  color: #252734;
}

.section-head p {
  margin: 10px auto 0;
  max-width: 780px;
  color: #6f7788;
  font-size: 16px;
  line-height: 1.55;
}

.capability-grid,
.template-gallery,
.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.capability-grid article,
.template-card,
.feed-card,
.public-form-card,
.world-preview-card {
  border: 1px solid #e5e9f3;
  border-radius: 22px;
  background: #fbfcff;
  padding: 20px;
}

.capability-grid article b {
  display: block;
  font-size: 17px;
  margin-bottom: 10px;
}

.capability-grid article p,
.template-card p,
.feed-card p,
.world-preview-card p {
  margin: 0;
  color: #697488;
  line-height: 1.55;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.template-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.template-picker button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 72px;
  background: white;
  color: #272a38;
  border: 1px solid #e4e8f2;
}

.template-picker button.active {
  border-color: #2e63f6;
  background: #edf4ff;
}

.template-picker small {
  color: #7b8498;
}

.world-preview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.world-preview-image,
.template-cover,
.feed-cover {
  display: grid;
  place-items: center;
  min-height: 140px;
  border-radius: 18px;
  color: white;
  font-weight: 900;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.35), transparent 30%),
    linear-gradient(135deg, #1f2937, #5b5bd6 52%, #f59e0b);
}

.template-card,
.feed-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-cover,
.feed-cover {
  min-height: 160px;
}

.tag {
  display: inline-flex;
  margin: 6px 6px 0 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3154c8;
  font-size: 12px;
  font-weight: 800;
}

.public-form-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-form-card label {
  color: #30384a;
  font-size: 13px;
  font-weight: 900;
}

.public-form-card input,
.public-form-card select,
.public-form-card textarea {
  width: 100%;
  border: 1px solid #dce2ef;
  border-radius: 12px;
  background: white;
  padding: 11px 12px;
}

.public-form-card textarea {
  min-height: 160px;
  resize: vertical;
}

.switch-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.switch-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #526074;
}

.switch-row input {
  width: auto;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pipeline-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pipeline-strip span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: white;
  border: 1px solid #dfe5f1;
  font-weight: 900;
}

.pipeline-strip span:not(:last-child)::after {
  content: "→";
  margin-left: 14px;
  color: #97a3b8;
}

.admin-link {
  display: block;
  text-align: center;
  color: #3154c8;
  font-weight: 900;
  text-decoration: none;
  padding: 8px;
}

.status-note {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #cfe7db;
  background: #eefbf4;
  color: #087448;
  font-weight: 800;
}

.result-dock {
  margin-top: 20px;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.public-json {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 380px;
  background: #101827;
  color: #e5edf8;
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.5;
}

.public-error {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 560px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.admin-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.12), transparent 34%),
    #f7f7fb;
}

.admin-gate-card {
  width: min(820px, 100%);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: center;
  padding: 32px;
  border-radius: 28px;
  border: 1px solid #e4e8f2;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.12);
}

.admin-gate-card h1 {
  margin: 0;
  font-size: 42px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.run-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 360px;
}

.run-strip input {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: white;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.sidebar,
.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 12px;
  height: calc(100vh - 98px);
  position: sticky;
  top: 80px;
  overflow: auto;
}

.step {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  background: #f9fbff;
}

.step.active {
  border-color: #9bbcff;
  background: #eef5ff;
}

.step h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
}

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

.step.external {
  background: #fffaf0;
}

.step.external.active {
  border-color: #fbbf24;
  background: #fffbeb;
}

.step-group-title {
  margin: 12px 4px 8px;
  color: #3d4d66;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.recent-panel {
  box-shadow: none;
  margin-top: 14px;
  padding: 12px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 22px;
}

.panel-title p {
  margin: 6px 0 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #edf2ff;
  color: var(--blue);
}

.pill.ok {
  background: #e7fbf3;
  color: #047857;
}

.pill.failed,
.pill.error {
  background: #fee2e2;
  color: #b91c1c;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #27364d;
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--text);
  padding: 9px 10px;
  min-height: 38px;
}

.field textarea {
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

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

.mini {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 0 -16px 12px;
  padding: 0 16px;
}

.tab {
  background: transparent;
  color: var(--muted);
  padding: 10px 8px;
  border-radius: 0;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.metric b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.metric span {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.file-item {
  text-align: left;
  color: var(--text);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 54px;
}

.file-item strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.file-item small {
  color: var(--muted);
}

.file-item.compact {
  width: 100%;
  margin-top: 8px;
}

pre.viewer {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 560px;
  min-height: 260px;
  padding: 14px;
  background: #0b1220;
  color: #e5edf8;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.preview-frame {
  width: 100%;
  height: 560px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.image-preview {
  max-width: 100%;
  max-height: 560px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
}

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

.editor-grid textarea {
  min-height: 420px;
  width: 100%;
}

.external-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.external-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-chip {
  background: #f8fbff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.result-chip.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.external-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

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

.external-head b,
.external-head small {
  display: block;
  overflow-wrap: anywhere;
}

.external-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.external-viewer {
  max-height: 680px;
}

.pc-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 720px;
}

.pc-toolbar,
.pc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fbff;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-group.right {
  margin-left: auto;
}

.toolbar-group select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 10px;
}

.tool-btn {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.tool-btn.active {
  background: #111827;
  color: white;
  border-color: #111827;
}

.pc-main {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 260px;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f4f7fb;
}

.pc-hierarchy,
.pc-inspector {
  background: #ffffff;
  padding: 12px;
  overflow: auto;
}

.pc-hierarchy {
  border-right: 1px solid var(--line);
}

.pc-inspector {
  border-left: 1px solid var(--line);
}

.pc-hierarchy h3,
.pc-inspector h3,
.asset-tray h3,
.runtime-contract h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.entity-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  background: #fbfdff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 9px;
  margin-bottom: 8px;
}

.entity-row.active {
  background: #eef5ff;
  border-color: #8bb4ff;
}

.entity-row b,
.entity-row small {
  overflow-wrap: anywhere;
}

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

.entity-kind {
  width: fit-content;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--blue);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
}

.pc-viewport {
  position: relative;
  background:
    linear-gradient(rgba(255,255,255,0.05), rgba(255,255,255,0.05)),
    radial-gradient(circle at 50% 30%, #1d355b 0%, #0b1220 58%, #050914 100%);
  min-height: 520px;
  overflow: hidden;
}

.pc-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #111827;
}

.viewport-grid {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d8e5ff;
}

.grid-floor {
  position: absolute;
  inset: 52% 8% 10%;
  transform: perspective(480px) rotateX(58deg);
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.28) 1px, transparent 1px);
  background-size: 28px 28px;
}

.viewport-hud {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.viewport-hud span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.gizmo {
  position: absolute;
  left: 48%;
  top: 48%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gizmo .axis {
  position: absolute;
  left: 44px;
  top: 44px;
  width: 58px;
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
}

.gizmo .axis.x {
  background: #ef4444;
}

.gizmo .axis.y {
  background: #22c55e;
  transform: rotate(-90deg);
}

.gizmo .axis.z {
  background: #3b82f6;
  transform: rotate(-35deg);
}

.gizmo span {
  position: absolute;
  left: 4px;
  top: 68px;
  max-width: 140px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

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

.mini-code {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 260px;
  background: #0b1220;
  color: #e5edf8;
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
}

.pc-bottom {
  align-items: stretch;
}

.asset-tray {
  flex: 1.4;
}

.runtime-contract {
  flex: 1;
}

.asset-tray,
.runtime-contract {
  min-width: 0;
}

.asset-card {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 170px;
  min-height: 62px;
  margin: 0 8px 8px 0;
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.asset-card small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  color: #7c4a03;
  line-height: 1.45;
}

.error-box {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .public-hero,
  .two-col,
  .capability-grid,
  .template-gallery,
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .public-hero {
    min-height: auto;
    padding: 44px 24px;
  }

  .public-nav,
  .public-links,
  .hero-actions,
  .admin-gate-card {
    flex-wrap: wrap;
  }

  .admin-gate-card {
    grid-template-columns: 1fr;
  }

  .public-section {
    width: min(100vw - 24px, 1180px);
    padding: 22px;
  }

  .world-preview-card,
  .template-picker {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

  .grid-2,
  .editor-grid,
  .pc-main {
    grid-template-columns: 1fr;
  }

  .pc-hierarchy,
  .pc-inspector {
    border: 0;
  }

  .pc-toolbar,
  .pc-bottom {
    flex-direction: column;
    align-items: stretch;
  }
}
