:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #edf3f0;
  --surface-strong: #e2ebe7;
  --ink: #16211d;
  --muted: #66736e;
  --line: #d8e2de;
  --line-strong: #becdc7;
  --brand: #0f7a66;
  --brand-strong: #085f50;
  --brand-soft: #dcefe9;
  --accent: #e85d4a;
  --accent-soft: #fbe6e2;
  --warning: #b97908;
  --warning-soft: #fff0ce;
  --danger: #bf4038;
  --danger-soft: #fbe7e5;
  --info: #2f70b7;
  --info-soft: #e4eef9;
  --shadow: 0 12px 36px rgba(24, 48, 40, 0.1);
  --sidebar-width: 232px;
  --mobile-header-height: 58px;
  --mobile-nav-height: 66px;
  --mobile-header-total: calc(var(--mobile-header-height) + env(safe-area-inset-top));
  --mobile-nav-total: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 122, 102, 0.25);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
strong {
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.native-client-only {
  display: none !important;
}

html.desktop-client .native-client-only {
  display: flex !important;
}

html.desktop-client #settings-client-section {
  display: none;
}

html.desktop-client body {
  overscroll-behavior: none;
}

html.desktop-client .app-shell {
  min-height: 100vh;
}

html.desktop-client body:not(.signed-in) .public-header [data-client-open] {
  display: none;
}

.muted {
  color: var(--muted);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: var(--bg);
  font-size: 20px;
  font-weight: 700;
}

.boot-screen img {
  width: 64px;
  height: 64px;
}

.boot-screen small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.button,
.icon-button,
.send-button,
.main-nav button,
.mobile-nav button,
.filter-row button,
.segmented button {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 650;
  background: var(--surface-strong);
}

.button:hover {
  filter: brightness(0.98);
}

.button:disabled,
.icon-button:disabled,
.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary {
  color: #fff;
  background: var(--brand);
}

.button.primary:hover {
  background: var(--brand-strong);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

.button.light {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.7);
}

.button.ghost-on-image {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(255, 255, 255, 0.84);
}

.button.large {
  min-height: 50px;
  padding-inline: 22px;
}

.button.small {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 13px;
}

.button.full {
  width: 100%;
}

.button svg,
.icon-button svg,
.send-button svg,
.main-nav svg,
.mobile-nav svg,
.search-field svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.icon-button.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.public-site {
  min-height: 100vh;
  background: var(--surface);
}

.public-hero {
  position: relative;
  min-height: calc(100svh - 72px);
  padding: 0 clamp(22px, 6vw, 92px) 62px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background-image: url("/assets/minitogo-hero-v1.webp");
  background-size: cover;
  background-position: center;
}

.public-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(243, 249, 247, 0.38);
}

.public-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 78px;
  padding: 16px clamp(22px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.public-brand,
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.public-brand img,
.app-brand img {
  width: 40px;
  height: 40px;
}

.public-actions,
.hero-actions,
.page-actions,
.workspace-actions,
.preview-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vpn-public-button i,
.client-public-button i {
  width: 18px;
  height: 18px;
}

.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.48;
}

.vpn-release-meta {
  margin: 4px 0 2px;
  border-top: 1px solid var(--line);
}

.vpn-release-meta > div {
  min-height: 42px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.vpn-release-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.vpn-release-meta dd {
  margin: 0;
  min-width: 0;
  font-weight: 650;
}

.vpn-checksum dd {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.vpn-release-notes {
  margin: 4px 0 6px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.client-modal {
  width: min(680px, calc(100vw - 28px));
}

.client-modal .modal-shell {
  max-height: min(90dvh, 820px);
  overflow-y: auto;
}

.client-release-meta {
  margin: 4px 0 2px;
  border-top: 1px solid var(--line);
}

.client-release-meta > div {
  min-height: 42px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.client-release-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.client-release-meta dd {
  min-width: 0;
  margin: 0;
  font-weight: 650;
}

.client-checksum dd {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.client-release-notes {
  margin: 4px 0 8px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.client-test-notice {
  margin: 10px 0 14px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #e6c56e;
  border-radius: 7px;
  color: #705214;
  background: var(--warning-soft);
  font-size: 13px;
}

.client-test-notice svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.client-pairing-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.client-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.client-section-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.client-section-heading span,
.client-empty-state span,
.client-device-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.client-pair-code {
  min-height: 74px;
  margin-top: 14px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}

.client-pair-code span,
.client-pair-code small {
  color: var(--muted);
  font-size: 12px;
}

.client-pair-code strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px;
  letter-spacing: 0;
  text-align: center;
}

.client-pair-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.client-device-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.client-device-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.client-device-row > div,
.client-empty-state {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.client-device-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.client-device-dot.online {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.client-empty-state {
  padding: 15px 0;
}

.hero-copy {
  width: min(620px, 58vw);
  padding-top: 50px;
  color: #10201a;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.55);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin-bottom: 14px;
  font-size: 68px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 520px;
  margin-bottom: 30px;
  font-size: 25px;
  line-height: 1.55;
  font-weight: 650;
}

.hero-next {
  position: absolute;
  left: clamp(22px, 6vw, 92px);
  bottom: 22px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  font-weight: 650;
}

.public-proof {
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.public-proof > div {
  min-height: 96px;
  padding: 18px clamp(20px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
}

.public-proof > div:last-child {
  border-right: 0;
}

.public-proof span {
  color: var(--muted);
  font-size: 14px;
}

.public-showcase {
  padding: 58px clamp(22px, 6vw, 92px) 72px;
  background: #f3f8f6;
}

.public-section-heading {
  max-width: 1180px;
  margin: 0 auto 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.public-section-heading h2 {
  font-size: 30px;
  line-height: 1.2;
}

.public-section-heading > p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.showcase-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.showcase-loading,
.showcase-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.showcase-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.showcase-card.featured {
  grid-column: span 2;
}

.showcase-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #17201c;
}

.showcase-media img,
.showcase-media iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
  pointer-events: none;
}

.showcase-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #f2c14f;
  background: #17201c;
}

.showcase-placeholder svg {
  width: 38px;
  height: 38px;
}

.showcase-placeholder span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.showcase-official {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  color: #fff;
  background: rgba(16, 32, 26, 0.86);
  font-size: 11px;
  font-weight: 800;
}

.showcase-card-body {
  min-height: 138px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.showcase-card-copy {
  min-width: 0;
}

.showcase-card-copy h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.showcase-card-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.showcase-card-copy span {
  color: var(--muted);
  font-size: 12px;
}

.modal {
  width: min(440px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--surface);
  color: var(--ink);
}

.modal::backdrop {
  background: rgba(19, 30, 26, 0.46);
}

.modal-shell {
  position: relative;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 18px;
  font-weight: 800;
}

.modal-brand img {
  width: 36px;
  height: 36px;
}

.modal h2 {
  margin-bottom: 7px;
  font-size: 24px;
}

.modal p {
  line-height: 1.55;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(22, 33, 29, 0.1);
}

.auth-tabs {
  width: 100%;
  margin-bottom: 24px;
}

.auth-tabs button {
  flex: 1;
}

.field {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field textarea,
.search-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}

.field input {
  min-height: 44px;
  padding: 0 12px;
}

.field textarea {
  padding: 11px 12px;
  resize: vertical;
}

.form-message {
  min-height: 20px;
  margin: 8px 0;
  color: var(--danger);
  font-size: 13px;
}

.app-shell {
  min-height: 100dvh;
  display: block;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f8faf9;
}

.app-brand {
  min-height: 44px;
  padding: 0 8px;
}

.app-brand img {
  width: 34px;
  height: 34px;
}

.new-game-button {
  width: 100%;
  margin: 22px 0 12px;
}

.main-nav {
  display: grid;
  gap: 4px;
}

.main-nav button {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  text-align: left;
}

.main-nav button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.main-nav button.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.sidebar-account {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.account-button {
  width: 100%;
  min-height: 50px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.account-button:hover {
  background: var(--surface-soft);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.account-copy {
  min-width: 0;
  display: grid;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 13px;
}

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

.mobile-header,
.mobile-nav {
  display: none;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-main {
  min-width: 0;
  min-height: 100dvh;
  margin-left: var(--sidebar-width);
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.make-view.active {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
}

.workspace-bar {
  min-width: 0;
  padding: 10px 18px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.workspace-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.workspace-title-wrap > div {
  min-width: 0;
}

.workspace-title-wrap h1 {
  max-width: min(52vw, 620px);
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.workspace-title-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.workspace-version::before {
  content: " · ";
}

#workspace-project-state::before {
  content: " · ";
}

.mode-handoff {
  margin: 0 18px 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b8d5cc;
  border-radius: 7px;
  background: #f1f8f5;
}

.mode-handoff > div,
.mode-handoff > div > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.mode-handoff > div > span {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.mode-handoff > div > svg {
  width: 17px;
  color: var(--brand-strong);
}

.mode-handoff strong {
  font-size: 13px;
}

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

.mode-handoff-actions {
  flex: 0 0 auto;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.status-dot.making {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.status-dot.ready,
.status-dot.published {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.status-dot.failed {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.compact-action {
  min-height: 40px;
}

.mobile-studio-tabs {
  display: none;
}

.studio-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.28fr);
  background: var(--surface);
}

.conversation-pane,
.preview-pane {
  min-width: 0;
  min-height: 0;
}

.conversation-pane {
  height: calc(100dvh - 72px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.messages {
  min-height: 0;
  padding: 26px clamp(18px, 3vw, 40px) 20px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.welcome-message {
  max-width: 520px;
  margin: 9vh auto 0;
}

.welcome-message h2 {
  margin-bottom: 10px;
  font-size: 25px;
}

.welcome-message p {
  color: var(--muted);
  line-height: 1.75;
}

.prompt-examples {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.prompt-examples button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.prompt-examples button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.message-row {
  max-width: 720px;
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.message-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.message-row.user .message-avatar {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.message-body {
  min-width: 0;
  padding-top: 4px;
}

.message-meta {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.message-text {
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-row.progress .message-text {
  color: var(--muted);
  font-size: 13px;
}

.approval-card {
  max-width: 674px;
  margin: -4px auto 22px 46px;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
}

.approval-card header,
.approval-card-actions,
.approval-option-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.approval-card header {
  justify-content: space-between;
}

.approval-card header strong {
  font-size: 14px;
}

.approval-card header span {
  color: var(--muted);
  font-size: 11px;
}

.approval-request {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.approval-options {
  display: grid;
  gap: 9px;
}

.approval-option {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.approval-option > span {
  color: var(--muted);
  font-size: 11px;
}

.approval-option-items {
  flex-wrap: wrap;
}

.approval-option-items button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}

.approval-option-items button.active {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 700;
}

.approval-card-actions {
  justify-content: flex-end;
}

.conversation-retry {
  max-width: 674px;
  margin: 0 auto 22px 46px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.conversation-retry > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.conversation-retry strong {
  font-size: 13px;
}

.conversation-retry span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.attachment-list {
  padding: 0 18px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attachment-chip {
  min-height: 30px;
  max-width: 220px;
  padding: 0 7px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 12px;
}

.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.composer {
  margin: 0 18px 18px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(22, 33, 29, 0.07);
}

.composer:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 122, 102, 0.1);
}

.composer-mode-row {
  min-width: 0;
  margin-bottom: 5px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.composer-mode-control,
.composer-decision-control {
  flex: 0 0 auto;
  padding: 2px;
}

.composer-mode-control button,
.composer-decision-control button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

#composer-mode-note {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-cost {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--brand-strong);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 180px;
  padding: 4px 5px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.55;
}

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

.composer-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-tools .icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-color: transparent;
}

#composer-context {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
}

.send-button.stop {
  background: var(--ink);
}

.send-button.stop svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.composer-status {
  min-height: 18px;
  margin: 4px 5px -2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
}

.composer-status:empty {
  display: none;
}

.composer-status[data-kind="error"] {
  color: var(--danger);
}

.composer-status[data-kind="success"] {
  color: var(--brand-strong);
}

.preview-pane {
  height: calc(100dvh - 72px);
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  background: #eef3f1;
}

.preview-toolbar {
  min-width: 0;
  padding: 7px 12px 7px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.preview-toolbar > div:first-child {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.preview-toolbar strong {
  font-size: 13px;
}

.preview-toolbar span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-toolbar .icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.inspector-heading {
  flex: 1 1 auto;
  flex-direction: column;
}

.inspector-tabs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.inspector-tabs button {
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.inspector-tabs button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.inspector-tabs button.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.preview-toolbar .inspector-tabs button.active span {
  color: var(--brand-strong);
}

.inspector-tabs svg {
  width: 15px;
  height: 15px;
}

.inspector-heading > #preview-label {
  max-width: min(46vw, 560px);
  padding-left: 8px;
}

.inspector-panels {
  min-width: 0;
  min-height: 0;
}

.inspector-panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: none;
}

.inspector-panel.active {
  display: grid;
}

#inspector-preview {
  grid-template-rows: minmax(0, 1fr);
}

.inspector-panel-header {
  min-width: 0;
  min-height: 56px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.inspector-panel-header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inspector-panel-header strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-panel-header span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-panel,
.activity-panel,
.versions-panel {
  grid-template-rows: auto minmax(0, 1fr);
  background: #f7f9f8;
}

.project-source-control {
  flex: 0 0 auto;
  padding: 2px;
}

.project-source-control button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.project-browser {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
}

.project-file-tree {
  min-width: 0;
  min-height: 0;
  padding: 8px 6px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.project-file-row {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px 5px calc(8px + var(--file-depth, 0) * 10px);
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.project-file-row:hover {
  background: var(--surface-soft);
}

.project-file-row.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.project-file-row svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.project-file-row span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-code-viewer {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  background: #171b1f;
}

.project-code-viewer > header {
  min-width: 0;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #30363d;
  color: #f1f4f6;
  background: #20252a;
}

.project-code-viewer > header strong,
.project-code-viewer > header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-code-viewer > header strong {
  font-size: 12px;
}

.project-code-viewer > header span {
  color: #aab4bc;
  font-size: 10px;
}

.project-code-viewer pre {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #d9e2e7;
  background: #171b1f;
  font: 12px/1.65 Consolas, "Courier New", monospace;
  tab-size: 2;
  white-space: pre;
}

.versions-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
}

.version-list {
  min-height: 0;
  padding: 8px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.version-row {
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.version-row:hover,
.version-row.active {
  background: var(--brand-soft);
}

.version-row > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.version-row em {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--brand-strong);
  background: #fff;
  font-size: 9px;
  font-style: normal;
}

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

.version-change-view {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.version-detail-header {
  min-width: 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.version-detail-header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.version-detail-header > div > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-groups {
  display: grid;
  gap: 10px;
}

.change-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.change-group h3 {
  min-height: 38px;
  margin: 0;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.change-group.added h3 { color: var(--brand-strong); background: var(--brand-soft); }
.change-group.modified h3 { color: #77540f; background: var(--warning-soft); }
.change-group.removed h3 { color: var(--danger); background: var(--danger-soft); }

.change-group > div {
  min-height: 34px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  font: 11px/1.4 Consolas, "Courier New", monospace;
}

.change-group > div:last-child {
  border-bottom: 0;
}

.change-group > div svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.change-group > div span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inspector-empty {
  min-height: 180px;
  padding: 24px 16px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.inspector-empty.compact {
  min-height: 120px;
}

.inspector-empty svg {
  width: 25px;
  height: 25px;
  color: var(--brand);
}

.inspector-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.inspector-empty span {
  max-width: 260px;
  font-size: 11px;
  line-height: 1.5;
}

.preview-stage {
  min-height: 0;
  padding: clamp(14px, 2.5vw, 30px);
  display: grid;
  place-items: center;
  overflow: auto;
  container-type: size;
}

.preview-empty {
  max-width: 330px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.preview-empty strong {
  color: var(--ink);
}

.preview-empty span {
  line-height: 1.6;
  font-size: 13px;
}

.preview-symbol {
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.preview-symbol svg {
  width: 26px;
  height: 26px;
  color: var(--brand);
}

#preview-frame {
  width: min(100%, 620px);
  height: auto;
  max-height: calc(100dvh - 156px);
  aspect-ratio: var(--preview-aspect, 2 / 3);
  border: 1px solid #aabbb4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 47, 39, 0.16);
}

.preview-pane[data-orientation="landscape"] #preview-frame {
  width: min(100%, 1120px);
  height: auto;
}

@supports (width: 1cqh) {
  .preview-pane[data-orientation="portrait"] #preview-frame {
    width: min(100cqw, calc(100cqh * var(--preview-ratio, 0.6667)), 620px);
    height: auto;
  }

  .preview-pane[data-orientation="landscape"] #preview-frame {
    width: min(100cqw, calc(100cqh * var(--preview-ratio, 1.7778)), 1120px);
  }
}

body.preview-focus-active {
  overflow: hidden;
}

.preview-pane.preview-focus-mode,
.preview-pane:fullscreen,
.preview-pane:-webkit-full-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  display: grid !important;
  grid-template-rows: calc(50px + env(safe-area-inset-top)) minmax(0, 1fr);
  background: #0f1117;
}

.preview-pane.preview-focus-mode .inspector-panels,
.preview-pane.preview-focus-mode #inspector-preview,
.preview-pane:fullscreen .inspector-panels,
.preview-pane:fullscreen #inspector-preview,
.preview-pane:-webkit-full-screen .inspector-panels,
.preview-pane:-webkit-full-screen #inspector-preview {
  min-height: 0;
}

.preview-pane.preview-focus-mode .preview-toolbar,
.preview-pane:fullscreen .preview-toolbar,
.preview-pane:-webkit-full-screen .preview-toolbar {
  padding: calc(7px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.96);
}

.preview-pane.preview-focus-mode .preview-stage,
.preview-pane:fullscreen .preview-stage,
.preview-pane:-webkit-full-screen .preview-stage {
  padding: 0;
  overflow: hidden;
  background: #0f1117;
}

.preview-pane.preview-focus-mode #preview-frame,
.preview-pane:fullscreen #preview-frame,
.preview-pane:-webkit-full-screen #preview-frame {
  width: min(100cqw, calc(100cqh * var(--preview-ratio, 0.6667)));
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: var(--preview-aspect, 2 / 3);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-view.active {
  min-height: 100dvh;
  padding: 42px clamp(24px, 5vw, 72px) 70px;
}

.page-header {
  max-width: 1420px;
  margin: 0 auto 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-header h1 {
  margin-bottom: 8px;
  font-size: 30px;
}

.page-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.search-field {
  width: 240px;
  height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.search-field input {
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  outline: 0;
}

.filter-row {
  max-width: 1420px;
  margin: 0 auto 20px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.filter-row button {
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
}

.filter-row button.active {
  color: var(--brand-strong);
  border-bottom-color: var(--brand);
  font-weight: 700;
}

.game-grid {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px rgba(25, 46, 39, 0.09);
}

.game-visual {
  position: relative;
  height: 190px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #e6eeeb;
}

.game-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.game-visual-placeholder {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.game-visual-placeholder svg {
  width: 30px;
  height: 30px;
}

.game-visual-placeholder.making {
  color: #765511;
}

.game-visual-placeholder.failed {
  color: var(--danger);
}

.game-visual-placeholder.ready {
  color: var(--accent);
}

.game-card-body {
  padding: 15px;
}

.game-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.game-card h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  min-height: 24px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.ready,
.status-badge.published {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.status-badge.making {
  color: #765511;
  background: var(--warning-soft);
}

.status-badge.failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.game-meta {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.game-actions .button:first-child {
  flex: 1;
}

.game-actions .button {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 12px;
}

.game-menu-wrap {
  position: relative;
}

.game-menu {
  position: absolute;
  right: 0;
  bottom: 44px;
  z-index: 10;
  width: 150px;
  padding: 5px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.game-menu button:hover {
  background: var(--surface-soft);
}

.game-menu button.danger-text {
  color: var(--danger);
}

.page-empty {
  max-width: 540px;
  min-height: 360px;
  margin: 30px auto;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.page-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  color: var(--brand);
}

.page-empty h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.page-empty p {
  max-width: 390px;
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.publish-layout {
  max-width: 1420px;
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.publish-client-band {
  max-width: 1420px;
  min-height: 78px;
  margin: 0 auto 18px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.publish-client-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
}

.publish-client-icon svg {
  width: 20px;
  height: 20px;
}

.publish-client-band > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.publish-client-band span {
  color: var(--muted);
  font-size: 12px;
}

.publish-client-band.connected .publish-client-icon {
  color: var(--brand-strong);
  border-color: #a9d5c9;
  background: var(--brand-soft);
}

.publish-game-list {
  padding: 16px 14px 16px 0;
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid var(--line);
}

.publish-game-option {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.publish-game-option:hover,
.publish-game-option.active {
  background: var(--surface-strong);
}

.publish-game-option strong,
.publish-game-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-game-option span {
  color: var(--muted);
  font-size: 11px;
}

.publish-detail {
  min-width: 0;
  padding: 28px 0 28px 32px;
}

.compact-empty {
  min-height: 430px;
}

.publish-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.publish-hero h2 {
  margin-bottom: 8px;
  font-size: 26px;
}

.publish-hero p {
  color: var(--muted);
}

.publish-preview {
  position: relative;
  height: 142px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.publish-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.publish-steps {
  margin-top: 26px;
  display: grid;
  gap: 0;
}

.publish-step {
  padding: 20px 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.step-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

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

.wallet-summary,
.section-block,
.settings-layout,
.admin-tabs,
.admin-panels,
.admin-metrics {
  max-width: 1420px;
  margin-left: auto;
  margin-right: auto;
}

.wallet-summary {
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(160px, 0.55fr) minmax(160px, 0.55fr) minmax(280px, 1.1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.balance-block {
  padding: 25px 28px 25px 0;
  display: grid;
  align-content: center;
  border-right: 1px solid var(--line);
}

.wallet-stat {
  padding: 25px 22px;
  display: grid;
  align-content: center;
  border-right: 1px solid var(--line);
}

.wallet-stat span,
.wallet-stat small {
  color: var(--muted);
}

.wallet-stat strong {
  margin: 6px 0;
  font-size: 25px;
}

.balance-block span,
.balance-block small {
  color: var(--muted);
}

.balance-block strong {
  margin: 4px 0;
  font-size: 42px;
}

.wallet-note {
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.wallet-note svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--brand);
}

.section-block {
  margin-top: 34px;
}

.section-heading {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.wallet-pricing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.wallet-rate {
  min-width: 0;
  padding: 18px 18px 18px 0;
  display: grid;
  gap: 5px;
  border-right: 1px solid var(--line);
}

.wallet-rate + .wallet-rate {
  padding-left: 18px;
}

.wallet-rate:last-child {
  border-right: 0;
}

.wallet-rate span,
.wallet-rate small {
  color: var(--muted);
  font-size: 12px;
}

.wallet-rate strong {
  font-size: 17px;
}

.usage-list,
.job-list,
.invite-list,
.system-status {
  display: grid;
}

.usage-row,
.job-row,
.invite-row,
.status-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.usage-row > div,
.job-row > div,
.invite-row > div,
.status-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.usage-row span,
.job-row span,
.invite-row span,
.status-row span {
  color: var(--muted);
  font-size: 12px;
}

.wallet-task-row {
  min-height: 76px;
}

.wallet-task-row > div {
  padding: 10px 0;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.package-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.package-card:hover,
.package-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(16, 91, 76, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.package-card strong,
.package-card span {
  display: block;
}

.package-card strong {
  margin: 7px 0 14px;
  font-size: 24px;
}

.package-card span {
  color: var(--muted);
  font-size: 12px;
}

.package-card .package-action {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--brand);
  font-weight: 700;
}

.package-action svg {
  width: 16px;
  height: 16px;
}

.wallet-order-note {
  color: var(--danger) !important;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topup-modal {
  width: min(620px, calc(100vw - 28px));
  max-height: min(90dvh, 820px);
  overflow-y: auto;
}

.topup-dialog-icon {
  color: var(--brand);
  background: var(--brand-soft);
}

.topup-order-summary {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topup-order-summary > div {
  min-width: 0;
  padding: 16px 14px 16px 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.topup-order-summary > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.topup-order-summary span,
.topup-order-summary small {
  color: var(--muted);
  font-size: 12px;
}

.topup-order-summary strong {
  font-size: 21px;
}

.topup-methods {
  width: 100%;
  margin-bottom: 14px;
}

.topup-methods button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.topup-methods svg {
  width: 17px;
  height: 17px;
}

.topup-payment {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.topup-payment img {
  width: 176px;
  height: 176px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.topup-payment > div {
  min-width: 0;
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.topup-payment p {
  margin: 0;
}

.topup-payment small {
  color: var(--muted);
}

.settings-layout {
  border-top: 1px solid var(--line);
}

.settings-section {
  min-height: 128px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(360px, 1.4fr);
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.settings-copy h2 {
  margin-bottom: 7px;
  font-size: 17px;
}

.settings-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.account-summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.large-avatar {
  width: 46px;
  height: 46px;
}

.account-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-summary span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-control {
  width: min(100%, 520px);
}

.mode-control button {
  min-height: 64px;
  flex: 1;
  display: grid;
  align-content: center;
  gap: 3px;
}

.mode-control span {
  font-size: 11px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.metric {
  min-height: 98px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 27px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.admin-tabs {
  margin-bottom: 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.admin-tabs button {
  min-width: max-content;
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tabs button:hover,
.admin-tabs button.active {
  color: var(--text);
  border-bottom-color: var(--brand);
}

.admin-tabs svg {
  width: 16px;
  height: 16px;
}

.admin-tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
  line-height: 1;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-panel > .admin-section + .admin-section,
.admin-settings-form > .admin-section + .admin-section {
  margin-top: 28px;
}

.admin-section {
  padding: 0 0 18px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.admin-section .section-heading {
  min-height: 70px;
}

.admin-section .section-heading > div:first-child {
  min-width: 0;
}

.admin-section .section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.admin-summary-list,
.audit-list {
  display: grid;
}

.admin-summary-row,
.audit-row {
  min-height: 58px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-summary-row > div,
.audit-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-summary-row span,
.audit-row span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-summary-row strong:last-child {
  font-size: 18px;
}

.admin-toolbar {
  align-items: end;
}

.admin-filters {
  display: flex;
  gap: 8px;
}

.admin-filters input,
.admin-filters select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
}

.admin-filters input {
  width: min(320px, 38vw);
}

.admin-user-table td:first-child {
  max-width: 260px;
  white-space: normal;
}

.admin-user-table td:first-child span {
  overflow-wrap: anywhere;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
}

.admin-row-actions .icon-button {
  width: 34px;
  height: 34px;
}

.showcase-review-list {
  display: grid;
}

.showcase-review-row {
  min-height: 92px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(180px, 0.7fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.showcase-review-copy,
.showcase-review-owner {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.showcase-review-copy span,
.showcase-review-owner span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.showcase-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.feedback-review-list {
  display: grid;
}

.feedback-review-row {
  min-height: 108px;
  padding: 16px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.feedback-review-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.feedback-review-heading,
.feedback-review-meta,
.feedback-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-review-heading strong {
  overflow-wrap: anywhere;
}

.feedback-review-meta,
.feedback-review-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feedback-review-note {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
}

.feedback-status.open {
  color: var(--danger);
  background: var(--danger-soft);
}

.feedback-status.in_progress {
  color: #765511;
  background: var(--warning-soft);
}

.feedback-status.resolved {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.admin-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
}

.admin-status.enabled::before,
.admin-status.confirmed::before,
.admin-status.settled::before {
  background: #16836d;
}

.admin-status.disabled::before,
.admin-status.rejected::before {
  background: #c34c3e;
}

.admin-status.pending::before {
  background: #bd7d14;
}

.admin-status.reserved::before {
  background: #2967a3;
}

.admin-status.released::before {
  background: #6b7280;
}

.admin-form-grid {
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.billing-rate-table {
  margin-top: 14px;
  display: grid;
  border-top: 1px solid var(--line);
}

.billing-rate-head,
.billing-rate-table > label {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.billing-rate-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.billing-rate-table > label > span {
  font-size: 13px;
  font-weight: 700;
}

.billing-rate-table input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.admin-settings-form textarea {
  width: 100%;
  resize: vertical;
}

.toggle-field {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.payment-channel-grid {
  padding: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-channel {
  min-height: 216px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 150px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.payment-channel > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.payment-channel > div span {
  color: var(--muted);
  font-size: 12px;
}

.payment-channel img {
  width: 150px;
  height: 150px;
  grid-column: 2;
  grid-row: 1 / span 2;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.payment-channel img:not([src]) {
  visibility: hidden;
}

.payment-channel .button {
  width: fit-content;
}

.admin-form-actions {
  min-height: 72px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.admin-form-actions .form-message {
  margin-right: auto;
}

.admin-dialog-fields {
  display: grid;
  gap: 13px;
}

.admin-dialog-fields select,
.admin-dialog-fields textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.admin-dialog-fields textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-section {
  min-width: 0;
  padding: 0 0 18px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.table-wrap {
  overflow-x: auto;
}

.admin-section .table-wrap,
.admin-section .invite-list {
  max-height: 620px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  min-height: 44px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: var(--surface);
  font-weight: 650;
}

.dialog-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--warning);
  background: var(--warning-soft);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 22px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
  font-size: 13px;
  line-height: 1.45;
}

.toast.error {
  color: var(--danger);
  border-color: #e7b9b5;
  background: #fff8f7;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

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

  .studio-grid {
    grid-template-columns: minmax(340px, 0.9fr) minmax(380px, 1.1fr);
  }

  .inspector-heading > #preview-label {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    height: var(--mobile-header-total);
    padding: calc(7px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(248, 250, 249, 0.96);
  }

  .app-brand.compact {
    padding: 0;
    font-size: 17px;
  }

  .app-brand.compact img {
    width: 32px;
    height: 32px;
  }

  .app-main {
    margin-left: 0;
    padding-top: var(--mobile-header-total);
    padding-bottom: var(--mobile-nav-total);
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 45;
    height: var(--mobile-nav-total);
    padding: 5px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
  }

  .mobile-nav button {
    min-width: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 3px;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
  }

  .mobile-nav button.active {
    color: var(--brand-strong);
    background: var(--brand-soft);
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  .make-view.active {
    min-height: calc(100dvh - var(--mobile-header-total) - var(--mobile-nav-total));
    grid-template-rows: 62px 47px minmax(0, 1fr);
  }

  .workspace-bar {
    padding-inline: 14px;
  }

  .workspace-title-wrap h1 {
    max-width: 50vw;
    font-size: 15px;
  }

  .workspace-actions .compact-action {
    display: none;
  }

  .mobile-studio-tabs {
    width: calc(100% - 24px);
    margin: 7px 12px;
    display: flex;
  }

  .mobile-studio-tabs button {
    flex: 1;
    min-width: 0;
    padding-inline: 7px;
  }

  .studio-grid {
    min-height: 0;
    display: block;
  }

  .conversation-pane,
  .preview-pane {
    height: calc(100dvh - var(--mobile-header-total) - var(--mobile-nav-total) - 109px);
    border-right: 0;
  }

  .preview-pane {
    display: none;
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .studio-grid.preview-active .conversation-pane {
    display: none;
  }

  .studio-grid.preview-active .preview-pane {
    display: grid;
  }

  .inspector-tabs {
    display: none;
  }

  .inspector-heading > #preview-label {
    display: block;
    padding-left: 0;
  }

  .preview-stage {
    padding: 12px;
  }

  #preview-frame {
    width: min(100%, 520px);
    max-height: calc(100dvh - 238px);
  }

  @supports (width: 1cqh) {
    #preview-frame {
      width: min(100cqw, calc(100cqh * var(--preview-ratio, 0.6667)), 520px);
    }
  }

  .page-view.active {
    min-height: calc(100dvh - var(--mobile-header-total) - var(--mobile-nav-total));
    padding: 26px 18px 40px;
  }

  .page-header {
    align-items: start;
  }

  .page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .publish-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

  .admin-split,
  .admin-form-grid,
  .payment-channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) and (orientation: landscape) and (max-height: 520px) {
  body.mobile-preview-active .mobile-header,
  body.mobile-preview-active .mobile-nav,
  body.mobile-preview-active .workspace-bar {
    display: none;
  }

  body.mobile-preview-active .app-main {
    padding: 0;
  }

  body.mobile-preview-active .make-view.active {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    grid-template-rows: 40px minmax(0, 1fr);
  }

  body.mobile-preview-active .mobile-studio-tabs {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 3px max(8px, env(safe-area-inset-right)) 3px max(8px, env(safe-area-inset-left));
    border-radius: 0;
  }

  body.mobile-preview-active .studio-grid {
    min-height: 0;
  }

  body.mobile-preview-active .conversation-pane,
  body.mobile-preview-active .preview-pane {
    height: calc(100dvh - 40px);
  }

  body.mobile-preview-active .preview-pane {
    grid-template-rows: 44px minmax(0, 1fr);
  }

  body.mobile-preview-active .preview-toolbar {
    min-height: 44px;
    padding: 5px max(8px, env(safe-area-inset-right)) 5px max(8px, env(safe-area-inset-left));
  }

  body.mobile-preview-active .preview-stage {
    padding: 0;
  }

  body.mobile-preview-active #preview-frame {
    max-height: calc(100dvh - 84px);
  }
}

@media (max-width: 680px) {
  .public-hero {
    min-height: calc(100svh - 60px);
    padding: 84px 20px 58px;
    align-items: end;
    background-position: 61% center;
  }

  .public-hero-shade {
    background: rgba(243, 249, 247, 0.52);
  }

  .public-header {
    min-height: 68px;
    padding: 12px 16px;
  }

  .public-brand {
    font-size: 17px;
  }

  .public-brand img {
    width: 34px;
    height: 34px;
  }

  .public-actions .ghost-on-image {
    display: none;
  }

  .public-actions .button {
    min-height: 38px;
    padding-inline: 12px;
  }

  .vpn-public-button span,
  .client-public-button span {
    display: none;
  }

  .hero-copy {
    width: 100%;
    padding: 20px 0;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-lead {
    max-width: 380px;
    font-size: 20px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-next {
    left: 20px;
    bottom: 18px;
  }

  .public-proof {
    grid-template-columns: 1fr;
  }

  .public-proof > div {
    min-height: 80px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .public-showcase {
    padding: 42px 18px 56px;
  }

  .public-section-heading {
    display: grid;
    gap: 10px;
  }

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

  .showcase-card.featured {
    grid-column: auto;
  }

  .showcase-card-body {
    grid-template-columns: 1fr;
  }

  .showcase-card-body .button {
    width: 100%;
  }

  .showcase-review-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .showcase-review-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .feedback-review-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .feedback-review-actions {
    justify-content: flex-start;
  }

  .workspace-actions {
    gap: 6px;
  }

  .messages {
    padding: 20px 14px 14px;
  }

  .welcome-message {
    margin-top: 4vh;
  }

  .message-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
  }

  .approval-card {
    margin-left: 39px;
    padding: 12px;
  }

  .conversation-retry {
    margin-left: 39px;
    align-items: stretch;
    flex-direction: column;
  }

  .approval-option {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .composer-mode-row {
    gap: 6px;
  }

  #composer-mode-note {
    display: none;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
  }

  .mode-handoff,
  .composer {
    margin-left: 10px;
    margin-right: 10px;
  }

  .composer {
    margin-bottom: 10px;
  }

  .mode-handoff {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-handoff-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .project-browser,
  .versions-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(132px, 0.34fr) minmax(0, 1fr);
  }

  .project-file-tree,
  .version-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .inspector-panel-header {
    min-height: 52px;
    padding-inline: 10px;
  }

  .project-source-control button {
    padding-inline: 7px;
  }

  .version-change-view {
    padding: 12px;
  }

  .page-header {
    display: grid;
  }

  .page-actions {
    width: 100%;
    justify-content: stretch;
  }

  .search-field {
    width: auto;
    flex: 1;
  }

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

  .game-visual {
    height: 176px;
  }

  .publish-layout {
    min-height: 0;
    display: block;
    border-top: 0;
  }

  .publish-client-band {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .publish-client-band .button {
    grid-column: 2;
    justify-self: start;
  }

  .publish-game-list {
    padding: 0 0 14px;
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .publish-game-option {
    min-width: 190px;
  }

  .publish-detail {
    padding: 22px 0 0;
  }

  .publish-hero {
    grid-template-columns: 1fr;
  }

  .publish-preview {
    display: none;
  }

  .publish-step {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .publish-step .button {
    grid-column: 2;
    justify-self: start;
  }

  .wallet-summary {
    grid-template-columns: 1fr;
  }

  .balance-block {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wallet-stat {
    padding-inline: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wallet-note {
    padding-inline: 0;
  }

  .wallet-pricing {
    grid-template-columns: 1fr 1fr;
  }

  .wallet-rate:nth-child(2) {
    border-right: 0;
  }

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

  .package-grid,
  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

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

  .section-heading {
    align-items: flex-start;
  }

  .section-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .topup-payment {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
  }

  .topup-payment img {
    width: 132px;
    height: 132px;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-filters input,
  .admin-filters select {
    width: 100%;
  }

  .payment-channel {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .payment-channel img {
    width: 112px;
    height: 112px;
  }

  .settings-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .billing-rate-head,
  .billing-rate-table > label {
    grid-template-columns: minmax(110px, 1fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr);
  }

  .account-summary {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .account-summary .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .mode-control {
    width: 100%;
  }

  .modal-shell {
    padding: 24px 20px;
  }

  .topup-modal {
    max-height: calc(100dvh - 20px);
  }

  .client-pair-code {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }

  .client-pair-code strong {
    text-align: left;
  }

  .client-pair-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toast-region {
    right: 12px;
    bottom: calc(var(--mobile-nav-total) + 12px);
  }
}

.text-button {
  width: max-content;
  padding: 0;
  border: 0;
  color: var(--brand-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.account-settings {
  display: grid;
  gap: 18px;
}

.profile-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.profile-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.community-view.active {
  height: 100dvh;
  min-height: 680px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.community-page-header {
  width: 100%;
  align-items: center;
}

.community-header-actions,
.community-identity {
  display: flex;
  align-items: center;
}

.community-header-actions {
  gap: 12px;
}

.community-identity {
  gap: 9px;
}

.community-identity > div {
  display: grid;
  gap: 2px;
}

.community-identity strong {
  max-width: 200px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-shell {
  width: min(100%, 1060px);
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.community-chat {
  min-height: 0;
  padding: 22px clamp(12px, 3vw, 34px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f8faf9;
}

.community-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.community-empty svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.community-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.community-empty span {
  font-size: 13px;
}

.community-message {
  width: min(78%, 720px);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.community-message.own {
  margin-left: auto;
}

.community-message-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.community-message-body {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.community-message.own .community-message-body {
  border-color: #bddfd6;
  background: #eaf6f2;
}

.community-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-message-meta strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message-meta time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.community-message-body p,
.admin-community-text {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.community-message-body p {
  font-size: 14px;
  line-height: 1.58;
}

.community-composer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.community-composer textarea {
  width: 100%;
  min-height: 62px;
  max-height: 150px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  font: inherit;
  line-height: 1.5;
}

.community-composer textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 135, 111, 0.12);
}

.community-composer-footer {
  min-height: 40px;
  margin-top: 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.community-composer-footer > span {
  color: var(--muted);
  font-size: 11px;
}

.community-composer-footer .form-message {
  margin: 0;
}

.admin-community-text {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .mobile-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .community-view.active {
    height: calc(100dvh - var(--mobile-header-total) - var(--mobile-nav-total));
    min-height: 0;
    padding: 18px 16px 12px;
  }

  .community-view .page-header {
    margin-bottom: 14px;
  }
}

@media (max-width: 640px) {
  .community-page-header {
    align-items: flex-start;
  }

  .community-page-header h1 {
    font-size: 24px;
  }

  .community-page-header p:last-child {
    font-size: 12px;
  }

  .community-header-actions {
    gap: 7px;
  }

  .community-identity strong {
    max-width: 100px;
  }

  .community-message {
    width: 94%;
  }

  .community-chat {
    padding: 16px 10px;
  }

  .community-composer {
    padding: 10px;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-form .button {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
