:root {
  color-scheme: light;
  --ink: #181915;
  --ink-soft: #393a35;
  --muted: #84857d;
  --quiet: #a8a8a1;
  --paper: #fbfaf7;
  --paper-deep: #f1f0eb;
  --surface: rgba(255, 255, 252, 0.72);
  --surface-strong: rgba(255, 255, 252, 0.96);
  --line: rgba(24, 25, 21, 0.14);
  --line-strong: rgba(24, 25, 21, 0.24);
  --sage: #828f79;
  --sage-deep: #748269;
  --sage-dark: #6d7c64;
  --champagne: #d6d2c7;
  --champagne-soft: rgba(214, 210, 199, 0.22);
  --success: #687d68;
  --warning: #9a7d54;
  --danger: #9a4f56;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-soft: 0 14px 38px rgba(24, 25, 21, 0.07);
  --shadow-quiet: none;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.mobile-surface-open {
  overflow: hidden;
}

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

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

button {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(56px + env(safe-area-inset-bottom));
}

.lux-header {
  display: grid;
  gap: 24px;
  padding-bottom: 0;
  border-bottom: 0;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.mobile-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.surface-switch-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.header-action-button {
  cursor: pointer;
}

.eyebrow,
.metric-label,
.micro-copy,
.muted,
.model-help,
.file-meta,
.state-pill,
.session-code,
.provider-models,
.case-source,
.output-id,
.output-provider,
.history-detail,
.v2-history-note,
.v2-template-card p,
.v2-template-head span,
.v2-brain-row span:first-child,
.v2-status-tile small,
.sample-step,
.prompt-trigger small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.eyebrow {
  margin: 0 0 7px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

#mobileV3Notice { overflow-wrap: anywhere; }
#mobileV3Notice:empty { display: none; }

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.brand-lockup h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.module-tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tab {
  min-width: max-content;
  min-height: 58px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.tab.active {
  border-color: var(--sage);
  color: var(--sage-deep);
  background: transparent;
  box-shadow: none;
}

.tab.lab-tab {
  min-width: 104px;
  text-align: center;
}

.tab.v3-link-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  text-decoration: none;
}

.header-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.header-status #providerState,
.header-status #sessionLabel {
  display: none;
}

body.h5-simplified .header-status {
  display: none;
}

.state-pill,
.session-code,
.auto-save-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  font-weight: 500;
}

.global-toast {
  position: fixed;
  z-index: 90;
  left: 16px;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  max-width: 448px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.homepage {
  padding: 26px 0 0;
}

.hero-band {
  display: grid;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 0;
  min-width: 0;
  max-width: 100%;
}

.hero-copy h2 {
  font-size: 38px;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}

.hero-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

body.h5-simplified .hero-band {
  gap: 12px;
  padding-bottom: 14px;
}

body.h5-simplified .hero-copy h2 {
  font-size: 37px;
}

body.h5-simplified .hero-line {
  margin-top: 8px;
}

body.h5-simplified .hero-gallery-lane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

body.h5-simplified .hero-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.42);
}

body.h5-simplified .hero-card-head {
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-bottom: 9px;
}

body.h5-simplified .hero-card-head span,
body.h5-simplified .hero-card-head strong {
  white-space: normal;
}

body.h5-simplified .hero-card-head span {
  font-size: 15px;
  font-weight: 520;
}

body.h5-simplified .hero-card-head strong,
body.h5-simplified .hero-card-head .case-source {
  justify-self: end;
}

body.h5-simplified .hero-card-head .case-source {
  min-height: 28px;
  max-width: 78px;
  padding: 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.h5-simplified .hero-gallery-lane .case-carousel {
  display: block;
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

body.h5-simplified .hero-gallery-lane .case-slide {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

body.h5-simplified .hero-gallery-lane .synced-carousel .case-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 520ms ease, transform 620ms ease;
}

body.h5-simplified .hero-gallery-lane .synced-carousel .case-slide:first-child {
  position: relative;
}

body.h5-simplified .hero-gallery-lane .synced-carousel .case-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

body.h5-simplified .hero-gallery-lane .case-slide img {
  min-height: 0;
}

body.h5-simplified .hero-gallery-lane .case-slide div {
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border-color: rgba(255, 253, 247, 0.36);
  border-radius: 9px;
  background: rgba(31, 35, 28, 0.34);
  backdrop-filter: blur(10px);
}

body.h5-simplified .hero-gallery-lane .case-slide div span,
body.h5-simplified .hero-gallery-lane .case-slide div strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 253, 247, 0.9);
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

body.h5-simplified .hero-gallery-lane .case-slide div span {
  font-size: 9px;
  line-height: 1.25;
  font-weight: 420;
  opacity: 0.78;
}

body.h5-simplified .hero-gallery-lane .case-slide div strong {
  font-size: 10px;
  line-height: 1.22;
  font-weight: 520;
}

.hero-actions,
.composer-actions,
.history-actions,
.v2-status-actions,
.sample-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.button,
.download-link,
.delete-link,
.prompt-trigger,
.case-source {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 252, 0.62);
  text-decoration: none;
  font-weight: 500;
}

.button.primary {
  min-height: 54px;
  border-color: transparent;
  border-radius: 999px;
  color: var(--paper);
  background: linear-gradient(90deg, #829178, #748368);
  box-shadow: none;
  font-size: 17px;
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink-soft);
  background: rgba(255, 255, 252, 0.58);
}

.button.ghost,
.button.compact.ghost,
.download-link,
.delete-link {
  color: var(--sage-deep);
  background: transparent;
}

.button.danger,
.button.compact.danger {
  border-color: rgba(154, 79, 86, 0.28);
  color: var(--danger);
  background: rgba(154, 79, 86, 0.08);
}

.button.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.button.full-width,
.full-width {
  width: 100%;
}

.hero-gallery-lane {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.hero-card,
.panel,
.studio-panel,
.gallery-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-card {
  padding: 12px;
  overflow: hidden;
}

.hero-card-head,
.panel-head,
.mini-head,
.prompt-card-head,
.lightbox-head,
.lightbox-foot,
.v2-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-card-head {
  margin-bottom: 10px;
}

.hero-card-head strong,
.hero-card-head span,
.provider-title strong,
.v2-template-head strong,
.v2-history-meta strong,
.history-meta,
.output-id {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-carousel,
.history-carousel {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 70%);
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.case-slide {
  min-height: 170px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-deep);
  scroll-snap-align: start;
}

.case-slide img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  display: block;
  object-fit: cover;
}

.case-slide div {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 253, 247, 0.5);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(40, 44, 34, 0.48);
  backdrop-filter: blur(12px);
}

.module-panel {
  margin-top: 18px;
}

.module-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.mode-switch-row {
  display: grid;
  gap: 8px;
  padding: 12px 0 2px;
}

.mode-switch-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.mode-switch-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
}

.mode-switch {
  min-height: 42px;
  padding: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 999px;
  background: rgba(24, 25, 21, 0.055);
  cursor: pointer;
}

.mode-switch .segment {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 680;
}

.mode-switch .segment.active {
  color: #fffdf8;
  background: var(--sage-deep);
  box-shadow: 0 8px 18px rgba(24, 25, 21, 0.12);
}

.mode-workspace[data-current-mode="simple"] [data-mode-area] {
  display: none !important;
}

.simple-mode-panel {
  display: grid;
  gap: 14px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

.simple-mode-panel[hidden] {
  display: none !important;
}

.simple-mode-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.simple-prompt-field,
.simple-drop-grid,
.simple-file-list,
.simple-actions {
  display: grid;
  gap: 10px;
}

.simple-prompt-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
}

.simple-file-drop {
  min-height: 104px;
  align-content: center;
  border-radius: var(--radius);
}

.simple-file-list {
  min-height: 84px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.52);
}

.simple-file-list.empty-simple-list {
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.simple-file-row {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(24, 25, 21, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.72);
  font-size: 12px;
}

.simple-file-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-file-row span {
  flex: 0 0 auto;
  color: var(--muted);
}

.simple-case-summary {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(47, 90, 69, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 252, 0.62);
}

.simple-case-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simple-case-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.simple-case-summary strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.simple-case-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.simple-case-summary.matching {
  border-color: rgba(47, 90, 69, 0.28);
  background: rgba(247, 250, 244, 0.78);
}

.simple-case-summary.selected {
  border-color: rgba(47, 90, 69, 0.34);
  background: rgba(246, 250, 242, 0.9);
}

.simple-case-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.simple-case-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  border: 1px solid rgba(47, 90, 69, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.78);
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
}

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

.flow-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.h5-quick-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.h5-quick-guide strong {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.h5-quick-guide span {
  min-height: 32px;
  flex: 1 1 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 400;
}

.h5-advanced-panel {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.h5-advanced-head {
  margin-bottom: 0;
}

.h5-advanced-summary {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.h5-advanced-body {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.h5-advanced-body[hidden] {
  display: none;
}

.h5-advanced-body > .h5-advanced-item {
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.h5-advanced-body > .h5-advanced-item + .h5-advanced-item {
  margin-top: 16px;
}

.h5-advanced-body > .v2-side-controls,
.h5-advanced-body > .v2-asset-panel {
  display: grid;
  gap: 12px;
}

.h5-advanced-body > .v2-side-controls {
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.h5-advanced-body > .v2-asset-panel {
  margin-top: 16px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.h5-advanced-collapsed {
  box-shadow: none;
}

.h5-advanced-toggle {
  min-width: 74px;
  border-radius: 999px;
}

.mobile-action-panel {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

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

.mobile-entry-card {
  min-height: 82px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink-soft);
  background: rgba(255, 255, 252, 0.54);
  text-align: left;
}

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

.mobile-entry-card strong {
  width: 100%;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 560;
}

.mobile-entry-card:active {
  border-color: rgba(125, 139, 111, 0.55);
  background: rgba(255, 255, 252, 0.82);
}

.mobile-account-module {
  display: none;
}

.mobile-view .mobile-account-module {
  display: grid;
  gap: 14px;
}

.mobile-account-module .panel {
  padding: 16px;
  border-radius: var(--radius);
}

.mobile-account-module .panel-head,
.mobile-account-module .v2-status-actions {
  display: grid;
  gap: 10px;
}

.mobile-account-module .v2-status-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mobile-account-module > .account-data-notice {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.account-center-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--line);
}

.account-center-nav-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  font: inherit;
}

.account-center-nav-button.active {
  color: var(--sage-deep);
  border-bottom-color: var(--sage);
}

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

.account-access-panel {
  display: grid;
  gap: 12px;
}

.account-access-hero,
.account-access-card-head {
  display: grid;
  gap: 10px;
}

.account-access-hero {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(241, 237, 222, 0.92), rgba(255, 255, 252, 0.86));
}

.account-access-hero h3 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
}

.account-access-hero p:not(.eyebrow),
.account-access-card-head p,
.account-access-explain span,
.account-access-dialog > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.account-access-explain {
  display: grid;
  gap: 8px;
}

.account-access-explain article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 252, 0.62);
}

.account-access-endpoint {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 243, 232, 0.48);
}

.account-access-endpoint > div:first-child {
  display: grid;
  gap: 4px;
}

.account-access-endpoint strong {
  color: var(--ink);
  font-size: 13px;
}

.account-access-endpoint span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.account-access-endpoint-actions {
  display: flex;
  gap: 7px;
  min-width: 0;
}

.account-access-endpoint-actions input {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 11px;
}

.account-access-explain strong,
.account-access-card h4 {
  color: var(--ink);
  font-size: 14px;
}

.account-access-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.72);
}

.account-access-create-form {
  display: grid;
  gap: 9px;
}

.account-access-key-list {
  display: grid;
  gap: 8px;
}

.account-access-key-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 243, 232, 0.54);
}

.account-access-key-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-access-key-info p,
.account-access-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.account-access-key-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.account-access-key-title strong {
  color: var(--ink);
}

.account-access-key-info code {
  width: fit-content;
  color: var(--sage-deep);
  font-size: 11px;
}

.account-access-dialog {
  width: calc(100vw - 28px);
  max-width: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 72px rgba(25, 24, 20, 0.22);
}

.account-access-dialog::backdrop {
  background: rgba(31, 30, 26, 0.42);
  backdrop-filter: blur(8px);
}

.account-access-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-access-dialog h3 {
  margin-top: 4px;
  font-size: 20px;
}

.account-access-secret,
.account-access-manual-copy {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(247, 243, 232, 0.72);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.account-access-manual-copy {
  min-height: 130px;
  resize: vertical;
  white-space: pre-wrap;
}

.account-access-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.account-access-feedback {
  min-height: 18px;
  margin: 7px 0;
  color: var(--sage-deep);
  font-size: 11px;
}

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

.account-kpi {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.6);
}

.account-kpi span,
.account-kpi small,
.account-history-meta span,
.account-template-meta span,
.account-template-meta p,
.account-usage-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.account-kpi strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.balance-kpi strong {
  font-size: 22px;
}

.account-history-grid,
.account-template-list,
.account-usage-list {
  display: grid;
  gap: 10px;
}

.account-history-card,
.account-template-card,
.account-usage-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.64);
}

.account-history-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 11px;
  align-items: stretch;
}

.account-live-preview,
.account-mock-preview,
.account-template-preview {
  width: 100%;
  min-height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--sage-deep);
  background: rgba(23, 20, 17, 0.06);
  font-family: Georgia, "Times New Roman", serif;
}

.account-live-preview img,
.account-template-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-live-preview,
button.account-template-preview {
  cursor: pointer;
}

.account-history-meta,
.account-template-meta,
.account-usage-row div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-history-meta strong,
.account-template-meta strong,
.account-usage-row strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-template-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 11px;
}

.account-template-preview {
  min-height: 110px;
  font-size: 22px;
}

.account-template-meta p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-usage-row {
  display: grid;
  gap: 8px;
}

.account-empty-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 252, 0.42);
  text-align: center;
}

.account-empty-state p {
  margin: 0;
}

.mobile-v2-context-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}

.mobile-v2-context-icons {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.v2-context-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 252, 0.48);
}

.v2-context-chip.ready {
  border-color: rgba(125, 139, 111, 0.34);
  color: var(--sage-deep);
  background: rgba(125, 139, 111, 0.08);
}

.v2-context-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--quiet);
}

.v2-context-chip.ready .v2-context-dot {
  background: var(--sage-deep);
}

.v2-context-label {
  font-size: 10px;
  line-height: 1;
}

.v2-context-chip strong {
  max-width: 62px;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1;
  font-weight: 560;
}

.mobile-v2-asset-thumb {
  width: 54px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--quiet);
  background-color: rgba(255, 255, 252, 0.5);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 19px;
  font-weight: 300;
}

button.mobile-v2-asset-thumb {
  padding: 0;
  cursor: pointer;
}

.v2-upload-button {
  margin-top: 10px;
}

.mobile-view-layer,
.mobile-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 110;
}

.mobile-view-layer {
  background: var(--paper);
}

.mobile-sheet-layer {
  display: grid;
  place-items: end center;
  padding: 0 10px;
  background: rgba(30, 33, 26, 0.28);
  backdrop-filter: blur(12px);
}

.mobile-view {
  width: min(100%, 430px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--paper);
}

.mobile-view-head,
.mobile-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.mobile-view-head h3,
.mobile-sheet-head h3 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
  font-weight: 560;
}

.mobile-back-button {
  min-width: 58px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sage-deep);
  background: rgba(255, 255, 252, 0.62);
}

.mobile-view-body,
.mobile-sheet-body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px;
}

.mobile-view-footer,
.mobile-sheet-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.mobile-sheet {
  width: min(100%, 430px);
  max-height: min(80vh, 680px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 253, 247, 0.58);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -18px 48px rgba(24, 25, 21, 0.12);
}

.mobile-sheet-head {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.mobile-sheet-grabber {
  width: 42px;
  height: 4px;
  justify-self: center;
  border-radius: 999px;
  background: rgba(24, 25, 21, 0.18);
}

.mobile-subpage-section {
  margin: 0;
  padding: 0 0 18px;
  border-top: 0;
}

.mobile-subpage-section + .mobile-subpage-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mobile-view .panel-head,
.mobile-sheet .panel-head {
  margin-bottom: 12px;
}

.mobile-view .gallery,
.mobile-view .history-gallery,
.mobile-view .v2-template-grid,
.mobile-view .v2-history-grid,
.mobile-view .v2-output-grid,
.mobile-sheet .gallery,
.mobile-sheet .history-gallery,
.mobile-sheet .v2-template-grid,
.mobile-sheet .v2-history-grid,
.mobile-sheet .v2-output-grid {
  max-height: none;
  overflow: visible;
}

.mobile-view .v2-filter-row {
  position: sticky;
  top: -14px;
  z-index: 2;
  padding: 0 0 12px;
  background: var(--paper);
}

.mobile-view .v2-prompt-plan {
  max-height: 42vh;
  overflow: auto;
  white-space: pre-wrap;
}

.panel-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-title h3 {
  font-size: 24px;
  line-height: 1.16;
  font-weight: 500;
}

.section-title h4,
.mini-head h4,
.model-switch-card h4,
.v2-output-layout h4,
.api-subpanel h4,
.sample-card h3 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

textarea,
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 252, 0.7);
}

textarea {
  min-height: 190px;
  padding: 18px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.7;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

input[type="range"] {
  min-height: 32px;
  padding: 0;
  accent-color: var(--sage-deep);
}

textarea::placeholder,
input::placeholder {
  color: var(--quiet);
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(125, 139, 111, 0.62);
  box-shadow: 0 0 0 4px rgba(125, 139, 111, 0.11);
}

.notice-bar,
.v2-progress-panel,
.event-list,
.provider-list,
.v2-brain-panel,
.v2-prompt-plan,
.v2-selected-cases,
.v2-case-list,
.v2-asset-list,
.v2-status-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.56);
}

.notice-bar {
  margin-top: 12px;
  padding: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.notice-bar.success {
  border-color: rgba(85, 119, 97, 0.28);
  color: var(--success);
  background: rgba(85, 119, 97, 0.08);
}

.notice-bar.warning {
  border-color: rgba(157, 120, 66, 0.28);
  color: var(--warning);
  background: rgba(157, 120, 66, 0.09);
}

.notice-bar.error {
  border-color: rgba(162, 78, 84, 0.3);
  color: var(--danger);
  background: rgba(162, 78, 84, 0.08);
}

.composer-actions {
  margin-top: 14px;
}

.status-strip,
.compact-params,
.v2-status-grid,
.sample-grid {
  display: grid;
  gap: 10px;
}

.status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.status-strip > div,
.v2-status-tile {
  min-width: 0;
  padding: 12px;
}

.status-strip strong,
.v2-status-tile strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.tuning-grid,
.model-workbench-grid,
.advanced-api-grid,
.v2-run-grid,
.v2-output-layout,
.v2-model-control-grid,
.v2-model-card-grid {
  display: grid;
  gap: 12px;
}

.tuning-card,
.model-switch-card,
.api-subpanel,
.sample-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.48);
}

.control-block,
.field,
.field-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink-soft);
}

.control-block > span,
.field > span,
.field-row > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.segmented,
.model-options,
.advanced-role-checks,
.v2-asset-role-checks,
.model-strip {
  display: grid;
  gap: 8px;
}

.segmented,
.advanced-role-checks,
.v2-asset-role-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented.v2-transform-segmented {
  width: 188px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 188px;
  gap: 4px;
}

.v2-transform-control {
  position: relative;
  gap: 8px;
  isolation: isolate;
}

.v2-transform-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v2-transform-label {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}

.v2-transform-state {
  color: var(--sage-deep);
  font-weight: 720;
}

.v2-transform-state[hidden] {
  display: none !important;
}

.v2-transform-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.v2-aspect-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.v2-transform-segmented .segment {
  position: relative;
  z-index: 1;
  min-height: 40px;
  padding: 0 4px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: auto;
}

.v2-transform-segmented .segment[data-tooltip]:hover::after,
.v2-transform-segmented .segment[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(250px, 84vw);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
}

.segment,
.model-option,
.role-check,
.model-chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 252, 0.58);
  font-weight: 500;
}

.segment.active,
.model-option.active {
  border-color: var(--sage);
  color: var(--sage-deep);
  background: rgba(255, 255, 252, 0.78);
}

.model-option {
  display: grid;
  justify-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
}

.model-option strong,
.model-option span,
.model-option small {
  min-width: 0;
}

.role-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
}

.role-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--sage-deep);
}

.asset-preview,
.v2-asset-preview {
  min-height: 230px;
  display: grid;
  place-items: center;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--quiet);
  background-color: rgba(255, 255, 252, 0.48);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.asset-preview:not(.empty-asset-preview):not(.document-preview),
.v2-asset-preview:not(.empty-asset-preview) {
  background-size: contain;
}

.file-drop,
.v2-file-drop {
  min-height: 58px;
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(125, 139, 111, 0.42);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 252, 0.4);
}

.file-drop input,
.v2-file-drop input {
  display: none;
}

.file-title {
  font-weight: 760;
}

.advanced-asset-panel,
.v2-asset-panel {
  margin-top: 12px;
}

#assetIntentNotesInput,
#v2AssetNotesInput {
  min-height: 42px;
  max-height: 96px;
}

.gallery,
.history-gallery,
.v2-template-grid,
.v2-history-grid,
.v2-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 2px 2px 8px;
}

body.h5-simplified .module-panel > .module-stack > .gallery-wrap.mobile-primary-results .gallery {
  max-height: none;
  overflow: visible;
}

body.h5-simplified #imageTab > .module-stack > .gallery-wrap.mobile-primary-results .gallery .output-card:nth-of-type(n + 3) {
  display: none;
}

body.h5-simplified #v2Tab > .module-stack > .gallery-wrap.mobile-v2-home-results .v2-output-grid {
  max-height: none;
  overflow: visible;
}

body.h5-simplified .mobile-v2-home-results {
  padding-top: 20px;
}

.gallery.empty-gallery,
.history-gallery.empty-history,
.v2-template-grid.empty-v2-list,
.v2-history-grid.empty-v2-list,
.v2-output-grid.empty-v2-list {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 120px;
  place-items: center;
  color: var(--quiet);
}

.output-card,
.history-card,
.v2-template-card,
.v2-history-card,
.v2-output-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 252, 0.58);
}

.v2-template-card {
  cursor: pointer;
}

.favorite-star-button {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 252, 0.82);
  border-radius: 999px;
  color: rgba(24, 25, 21, 0.48);
  background: rgba(255, 255, 252, 0.9);
  box-shadow: 0 10px 24px rgba(24, 25, 21, 0.18);
  font-size: 20px;
}

.favorite-star-button.active {
  color: #fffdf8;
  border-color: rgba(116, 130, 105, 0.52);
  background: var(--sage-deep);
}

.favorite-star-button:disabled {
  opacity: 0.68;
}

.is-favorite {
  border-color: rgba(116, 130, 105, 0.52);
}

.output-preview,
.v2-template-preview,
.v2-live-preview,
.v2-mock-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: var(--paper-deep);
}

.output-preview img,
.v2-template-preview img,
.v2-live-preview img,
.v2-mock-preview img,
.history-card .output-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.output-meta,
.history-meta,
.v2-output-meta,
.v2-history-meta,
.v2-template-body {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.history-card-actions,
.v2-history-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 10px;
}

.download-link,
.delete-link {
  min-height: 32px;
  flex: 1;
  padding: 0 8px;
  font-size: 12px;
}

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

.history-load-more,
.v2-template-load-more {
  min-height: 44px;
  grid-column: 1 / -1;
}

.revision-grid {
  display: grid;
  gap: 12px;
}

.provider-list,
.event-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}

.provider-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.64);
}

.provider-row.ready {
  border-color: rgba(85, 119, 97, 0.32);
}

.model-option:disabled,
.model-option.temporarily-disabled {
  cursor: not-allowed;
  filter: grayscale(0.38);
  opacity: 0.5;
}

.provider-row.temporarily-disabled {
  filter: grayscale(0.28);
  opacity: 0.66;
}

.advanced-api-panel,
.v2-template-vars {
  margin-top: 12px;
}

.advanced-api-panel summary,
.v2-template-vars summary {
  min-height: 46px;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 253, 247, 0.62);
  font-weight: 760;
}

.advanced-api-panel summary small,
.v2-template-vars summary small {
  color: var(--muted);
  font-weight: 500;
}

.v2-filter-row,
.v2-asset-mini-grid {
  display: grid;
  gap: 10px;
}

.v2-search-thinking {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(125, 139, 111, 0.28);
  border-radius: 14px;
  background: rgba(125, 139, 111, 0.08);
}

.v2-search-thinking small {
  grid-column: 2;
  color: var(--muted);
}

.lab-library-tools {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.lab-search-thinking {
  margin: 0 0 10px;
}

.lab-search-thinking[hidden] {
  display: none;
}

.lab-style-score {
  color: var(--sage-deep);
  font-weight: 720;
}

.thinking-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(125, 139, 111, 0.22);
  border-top-color: var(--sage-deep);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.v2-facet-bar,
.v2-tag-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0 10px;
  scrollbar-width: thin;
}

.v2-facet,
.v2-tag,
.v2-tag-row span,
.mini-pill,
.v2-output-badge {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sage-deep);
  background: rgba(255, 253, 247, 0.62);
  font-size: 12px;
  font-weight: 680;
}

.v2-facet.active,
.v2-template-card.selected {
  border-color: rgba(125, 139, 111, 0.74);
  box-shadow: 0 0 0 2px rgba(125, 139, 111, 0.11);
}

.v2-template-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.v2-template-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-template-body p {
  display: -webkit-box;
  min-height: 58px;
  max-height: 76px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.v2-template-body .v2-tag-row {
  min-height: 34px;
  padding-bottom: 0;
}

.v2-template-body .button {
  min-height: 36px;
  font-size: 12px;
}

.v2-template-card .button {
  width: 100%;
  margin-top: 4px;
}

.run-progress-panel,
.v2-progress-panel {
  margin-top: 12px;
  padding: 12px;
}

.run-progress-panel[hidden],
.v2-progress-panel[hidden] {
  display: none !important;
}

.run-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.run-progress-head strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.run-progress-head span,
.run-progress-detail {
  color: var(--muted);
  font-size: 11px;
}

.run-progress-meter,
.v2-progress-meter {
  height: 8px;
  overflow: hidden;
  margin: 10px 0;
  border-radius: 999px;
  background: rgba(125, 139, 111, 0.14);
}

.run-progress-meter span,
.v2-progress-meter span,
#v2ProgressFill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--champagne));
}

.run-progress-steps,
.v2-progress-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.run-progress-step,
.v2-progress-step {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.48);
  font-size: 11px;
}

.run-progress-step.done,
.run-progress-step.active,
.v2-progress-step.done,
.v2-progress-step.active {
  border-color: rgba(125, 139, 111, 0.55);
  color: var(--sage-deep);
}

.run-progress-step.failed,
.v2-progress-step.failed {
  border-color: rgba(181, 73, 59, 0.42);
  color: #9f3a2d;
}

.run-progress-detail,
.v2-progress-detail {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.v2-case-list,
.v2-brain-panel,
.v2-prompt-plan,
.v2-asset-list {
  min-height: 92px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  color: var(--muted);
  white-space: pre-wrap;
}

.v2-case-row,
.v2-brain-row,
.v2-asset-row {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.v2-case-row:last-child,
.v2-brain-row:last-child,
.v2-asset-row:last-child {
  border-bottom: 0;
}

.v2-brain-row {
  grid-template-columns: 86px minmax(0, 1fr);
}

.v2-brain-row.status-ok strong {
  color: var(--success);
}

.v2-brain-row.status-warn strong {
  color: var(--warning);
}

.v2-output-error {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid rgba(162, 78, 84, 0.28);
  border-radius: 14px;
  color: var(--danger);
  background: rgba(162, 78, 84, 0.08);
}

.sample-modal,
.image-lightbox {
  position: fixed;
  z-index: 360;
  inset: 0;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  background: rgba(30, 33, 26, 0.32);
  backdrop-filter: blur(14px);
}

.sample-dialog,
.lightbox-panel {
  width: min(100%, 460px);
  max-height: 100%;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(255, 253, 247, 0.52);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.sample-dialog {
  padding: 18px;
}

.modal-close,
.lightbox-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sage-deep);
  background: rgba(255, 253, 247, 0.8);
}

.sample-hero {
  padding: 12px 0 16px;
}

.sample-hero h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1;
}

.lightbox-backdrop,
.sample-modal::before {
  position: absolute;
  inset: 0;
}

.lightbox-panel {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.lightbox-close {
  position: sticky;
  top: 0;
  justify-self: end;
  z-index: 3;
}

.lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-deep);
}

.lightbox-stage img,
#lightboxImage {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.lightbox-foot {
  align-items: stretch;
}

.lightbox-action-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  padding-bottom: 2px;
}

.lightbox-action-bar[hidden] {
  display: none;
}

.lightbox-danger-action {
  color: var(--danger);
}

.wechat-share-guide {
  position: fixed;
  z-index: 150;
  top: calc(14px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 253, 247, 0.56);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow-soft);
  text-align: left;
  backdrop-filter: blur(14px);
}

.wechat-share-guide span {
  color: var(--sage-deep);
  font-size: 11px;
  font-weight: 700;
}

.wechat-share-guide strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.wechat-share-guide small {
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.45;
}

.share-poster-sheet {
  position: fixed;
  inset: 0;
  z-index: 154;
  display: grid;
  align-items: end;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.share-poster-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 253, 247, 0.2), transparent 40%),
    rgba(35, 32, 26, 0.56);
  backdrop-filter: blur(14px);
}

.share-poster-card {
  position: relative;
  max-height: min(86vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 253, 247, 0.56);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(246, 239, 222, 0.96)),
    var(--paper);
  box-shadow: 0 28px 88px rgba(32, 28, 22, 0.32);
}

.share-poster-copy {
  display: grid;
  gap: 5px;
}

.share-poster-copy span {
  color: var(--sage-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-poster-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-poster-copy p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.share-poster-note {
  color: var(--sage-deep);
  font-size: 11px;
  line-height: 1.4;
}

.share-poster-preview {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(45deg, rgba(112, 122, 96, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(112, 122, 96, 0.08) 25%, transparent 25%),
    #f4eddc;
  background-position: 0 0, 0 10px;
  background-size: 20px 20px;
}

.share-poster-preview img {
  width: 100%;
  display: block;
}

.share-poster-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-poster-actions .button {
  min-width: 0;
  min-height: 42px;
  padding-inline: 10px;
}

.prompt-trigger {
  min-width: 0;
  flex: 1;
  display: grid;
  justify-items: start;
}

.lightbox-prompt-panel {
  max-height: 46vh;
  overflow: auto;
}

.prompt-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.7);
}

.prompt-card-actions {
  display: flex;
  gap: 8px;
}

.prompt-scroll-box {
  max-height: 32vh;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(239, 233, 218, 0.5);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
}

.empty-hero-history .case-slide,
.empty-gallery,
.empty-history,
.empty-v2-list {
  color: var(--quiet);
}

.empty-hero-history .case-slide::after,
.empty-gallery::before,
.empty-history::before,
.empty-v2-list:empty::before {
  content: "等待数据";
}

.history-carousel:not(.empty-hero-history) .case-slide::after,
.history-carousel:not(.empty-hero-history) .case-slide div,
.v2-template-grid:not(.empty-v2-list)::before,
.v2-history-grid:not(.empty-v2-list)::before,
.gallery:not(.empty-gallery)::before,
.history-gallery:not(.empty-history)::before {
  content: none;
}

@media (min-width: 430px) {
  .module-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tab {
    min-height: 52px;
    font-size: 13px;
  }

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

@media (max-width: 374px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gallery,
  .history-gallery,
  .v2-template-grid,
  .v2-history-grid,
  .v2-output-grid {
    grid-template-columns: 1fr;
  }

  .segmented,
  .advanced-role-checks,
  .v2-asset-role-checks,
  .v2-progress-steps {
    grid-template-columns: 1fr;
  }
}

/* Mobile app polish: quieter iOS-like proportions while preserving the ivory/sage atmosphere. */
.app-shell {
  width: min(100%, 430px);
  padding: calc(22px + env(safe-area-inset-top)) 16px calc(42px + env(safe-area-inset-bottom));
}

.lux-header {
  gap: 19px;
}

.brand-lockup {
  align-items: center;
}

.brand-lockup h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: 0;
}

.surface-switch-link {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
  border-color: rgba(24, 25, 21, 0.1);
  background: rgba(255, 255, 252, 0.46);
}

.eyebrow {
  margin-bottom: 5px;
  letter-spacing: 0;
  text-transform: none;
}

.eyebrow,
.metric-label,
.micro-copy,
.muted,
.model-help,
.file-meta,
.state-pill,
.session-code,
.provider-models,
.case-source,
.output-id,
.output-provider,
.history-detail,
.v2-history-note,
.v2-template-card p,
.v2-template-head span,
.v2-brain-row span:first-child,
.v2-status-tile small,
.sample-step,
.prompt-trigger small {
  font-size: 11px;
  line-height: 1.42;
}

.module-tabs {
  gap: 22px;
  margin: 0 -2px;
  padding: 0 2px;
}

.tab {
  min-height: 43px;
  padding-bottom: 10px;
  border-bottom-width: 2px;
  font-size: 12px;
  font-weight: 520;
}

.homepage {
  padding-top: 19px;
}

.hero-band {
  gap: 11px;
  padding-bottom: 13px;
}

.hero-copy h2,
body.h5-simplified .hero-copy h2 {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 340;
  letter-spacing: 0;
}

.hero-line {
  margin-top: 8px;
  max-width: 29em;
  font-size: 12px;
  line-height: 1.55;
}

.hero-actions,
.composer-actions,
.history-actions,
.v2-status-actions,
.sample-actions {
  gap: 8px;
}

.history-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.favorite-filter {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 252, 0.48);
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.favorite-filter input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  accent-color: var(--sage-deep);
}

.hero-actions {
  margin-top: 11px;
}

.button,
.download-link,
.delete-link,
.prompt-trigger,
.case-source {
  min-height: 38px;
  padding: 0 13px;
  gap: 6px;
  border-color: rgba(24, 25, 21, 0.11);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 520;
  background: rgba(255, 255, 252, 0.58);
}

.button.primary {
  min-height: 46px;
  color: #fffdfa;
  background: #78866f;
  font-size: 14px;
  font-weight: 560;
}

.button.compact,
.download-link,
.delete-link {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.state-pill,
.session-code,
.auto-save-pill {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 520;
  border-color: rgba(24, 25, 21, 0.1);
}

.module-panel {
  margin-top: 13px;
}

.module-stack {
  gap: 10px;
}

.flow-section {
  padding: 19px 0;
}

.panel-head {
  margin-bottom: 12px;
}

.section-title h3 {
  font-size: 19px;
  line-height: 1.18;
  font-weight: 560;
}

.section-title h4,
.mini-head h4,
.model-switch-card h4,
.v2-output-layout h4,
.api-subpanel h4,
.sample-card h3 {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 560;
}

textarea {
  min-height: 132px;
  padding: 13px;
  font-size: 13px;
  line-height: 1.58;
}

input,
select {
  min-height: 38px;
  padding: 0 11px;
  font-size: 13px;
}

input[type="range"] {
  min-height: 28px;
}

textarea:focus,
input:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(125, 139, 111, 0.1);
}

.notice-bar {
  margin-top: 10px;
  padding: 10px 11px;
  font-size: 11px;
  line-height: 1.48;
}

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

.status-strip,
.compact-params,
.v2-status-grid,
.sample-grid,
.tuning-grid,
.model-workbench-grid,
.advanced-api-grid,
.v2-run-grid,
.v2-output-layout,
.v2-model-control-grid,
.v2-model-card-grid {
  gap: 10px;
}

.status-strip {
  margin-top: 12px;
}

.status-strip > div,
.v2-status-tile {
  padding: 10px;
}

.status-strip strong,
.v2-status-tile strong {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 580;
}

.tuning-card,
.model-switch-card,
.api-subpanel,
.sample-card {
  padding: 12px;
  background: rgba(255, 255, 252, 0.43);
}

.control-block,
.field,
.field-row {
  gap: 7px;
  margin-top: 10px;
}

.control-block > span,
.field > span,
.field-row > span {
  font-size: 11px;
  font-weight: 590;
}

.segmented,
.model-options,
.advanced-role-checks,
.v2-asset-role-checks,
.model-strip {
  gap: 7px;
}

.segment,
.model-option,
.role-check,
.model-chip {
  min-height: 37px;
  font-size: 11px;
  font-weight: 520;
}

.mode-switch .segment {
  min-height: 34px;
  font-size: 12px;
  font-weight: 680;
}

.v2-transform-segmented .segment {
  min-height: 36px;
}

@media (max-width: 380px) {
  .v2-transform-row {
    align-items: center;
    flex-direction: row;
    gap: 6px;
  }

  .v2-transform-label {
    gap: 4px;
  }

  .segmented.v2-transform-segmented {
    width: 148px;
    flex: 0 0 148px;
  }
}

.model-option {
  padding: 10px 12px;
  border-radius: var(--radius);
}

.model-option strong {
  font-size: 12px;
  font-weight: 590;
}

.role-check {
  gap: 6px;
  padding: 0 8px;
}

.role-check input {
  width: 14px;
  min-height: 14px;
}

.asset-preview,
.v2-asset-preview {
  min-height: 190px;
  margin-top: 10px;
  background-size: contain;
}

.file-drop,
.v2-file-drop {
  min-height: 48px;
  gap: 2px;
  margin-top: 10px;
  padding: 10px 12px;
}

.file-title {
  font-size: 12px;
  font-weight: 620;
}

#assetIntentNotesInput,
#v2AssetNotesInput {
  min-height: 36px;
  max-height: 82px;
}

.gallery,
.history-gallery,
.v2-template-grid,
.v2-history-grid,
.v2-output-grid {
  gap: 8px;
  max-height: 560px;
  padding: 1px 1px 7px;
}

.output-card,
.history-card,
.v2-template-card,
.v2-history-card,
.v2-output-card {
  background: rgba(255, 255, 252, 0.5);
}

.output-meta,
.history-meta,
.v2-output-meta,
.v2-history-meta,
.v2-template-body {
  gap: 6px;
  padding: 8px;
}

.history-card-actions,
.v2-history-footer {
  gap: 6px;
  padding: 0 8px 8px;
}

.history-load-more,
.v2-template-load-more {
  min-height: 39px;
}

.h5-quick-guide {
  display: grid;
  grid-template-columns: repeat(var(--quick-guide-steps, 3), minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
  padding-bottom: 12px;
}

.h5-quick-guide[data-guide-steps="4"] {
  --quick-guide-steps: 4;
}

.h5-quick-guide strong {
  grid-column: 1 / -1;
  font-size: 10px;
}

.h5-quick-guide span {
  min-height: 26px;
  min-width: 0;
  flex: none;
  padding: 0 5px;
  font-size: 9.5px;
  white-space: nowrap;
}

.h5-advanced-panel {
  padding: 16px 0;
}

.h5-advanced-summary {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.46;
}

.h5-advanced-body {
  margin-top: 12px;
}

.h5-advanced-body > .h5-advanced-item,
.h5-advanced-body > .v2-side-controls,
.h5-advanced-body > .v2-asset-panel {
  padding-top: 13px;
}

.h5-advanced-body > .h5-advanced-item + .h5-advanced-item,
.h5-advanced-body > .v2-asset-panel {
  margin-top: 13px;
}

.h5-advanced-toggle {
  min-width: 62px;
}

.provider-list,
.event-list {
  max-height: 230px;
  padding: 8px;
}

.provider-row {
  padding: 9px;
}

.advanced-api-panel summary,
.v2-template-vars summary {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 620;
}

.v2-filter-row,
.v2-asset-mini-grid {
  gap: 8px;
}

.v2-asset-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "clear"
    "preview"
    "file"
    "roles"
    "controls"
    "list"
    "hint";
}

.v2-asset-panel > * {
  min-width: 0;
}

.v2-file-drop,
.v2-asset-role-checks,
.v2-asset-mini-grid,
#v2ClearAssetBtn,
#v2AssetLockHint,
.v2-asset-list {
  width: 100%;
  max-width: 100%;
}

.v2-file-drop {
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  gap: 6px;
}

.v2-file-drop .file-title {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.v2-asset-role-checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v2-asset-role-checks .role-check {
  min-width: 0;
  white-space: nowrap;
}

.v2-asset-mini-grid {
  grid-template-columns: minmax(0, 1fr);
}

.v2-asset-mini-grid .field {
  min-width: 0;
}

.v2-asset-mini-grid .field > span {
  display: block;
  white-space: normal;
}

#v2AssetNotesInput {
  width: 100%;
  min-width: 0;
}

.v2-search-thinking {
  gap: 7px 9px;
  margin: 10px 0;
  padding: 10px;
}

.thinking-spinner {
  width: 16px;
  height: 16px;
}

.v2-facet-bar,
.v2-tag-row {
  gap: 6px;
  padding-bottom: 8px;
}

.v2-facet,
.v2-tag,
.v2-tag-row span,
.mini-pill,
.v2-output-badge {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 560;
}

.v2-template-body p {
  min-height: 50px;
  max-height: 64px;
  font-size: 11px;
  line-height: 1.42;
}

.v2-template-body .v2-tag-row {
  min-height: 30px;
}

.v2-template-body .button {
  min-height: 32px;
  font-size: 11px;
}

.v2-progress-panel {
  margin-top: 10px;
  padding: 10px;
}

.v2-progress-meter {
  height: 6px;
  margin: 8px 0;
}

.v2-progress-steps {
  gap: 5px;
}

.v2-progress-step {
  min-height: 25px;
  font-size: 10px;
}

.v2-progress-detail {
  margin-top: 7px;
  font-size: 11px;
}

.v2-case-list,
.v2-brain-panel,
.v2-prompt-plan,
.v2-asset-list {
  min-height: 82px;
  max-height: 230px;
  padding: 10px;
  font-size: 12px;
}

.v2-case-row,
.v2-brain-row,
.v2-asset-row {
  gap: 3px;
  padding: 8px 0;
}

.v2-brain-row {
  grid-template-columns: 72px minmax(0, 1fr);
}

.lab-workbench,
.lab-layout,
.lab-composer,
.lab-module-detail,
.lab-style-panel,
.lab-results-panel,
.lab-style-result,
.lab-card-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lab-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.lab-layout,
.lab-control-row,
.lab-card-grid {
  grid-template-columns: 1fr;
}

.lab-mobile-action-panel {
  padding: 12px 0 0;
  border-top: 0;
}

.lab-mobile-action-panel .mobile-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-view-body .lab-control-row,
.mobile-sheet-body .lab-control-row,
.mobile-view-body .lab-reference-box,
.mobile-view-body .lab-style-panel {
  display: grid;
}

#rareStyleExplorerPanel > .lab-setup-panel .lab-composer > .lab-control-row,
#rareStyleExplorerPanel > .lab-setup-panel .lab-composer > .lab-reference-box,
#rareStyleExplorerPanel > .lab-setup-panel .lab-layout > .lab-style-panel {
  display: none;
}

.lab-module-detail[hidden] {
  display: none;
}

.lab-module-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.section-subcopy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.lab-back-button {
  min-width: max-content;
}

.lab-home-panel {
  min-height: 180px;
}

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

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

.lab-module-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(116, 130, 105, 0.08), rgba(180, 144, 78, 0.08)),
    rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.lab-module-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.lab-module-card strong {
  font-size: 14px;
  line-height: 1.24;
}

.lab-module-card small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.lab-idea-field textarea {
  min-height: 132px;
}

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

.lab-reference-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  overflow: hidden;
}

.lab-reference-head {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  padding: 11px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.lab-reference-head strong {
  font-size: 13px;
  line-height: 1.2;
}

.lab-reference-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.lab-reference-head em {
  flex: 0 0 auto;
  border: 1px solid rgba(116, 130, 105, 0.2);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--sage-deep);
  background: rgba(250, 248, 241, 0.88);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.lab-reference-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 11px;
}

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

.mobile-view-body .lab-reference-panel {
  display: grid;
}

.lab-reference-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.lab-reference-upload-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.lab-reference-file {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 90, 69, 0.24);
  border-radius: 14px;
  color: var(--sage-deep);
  background: rgba(245, 250, 244, 0.74);
  font-size: 13px;
  font-weight: 760;
}

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

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

.lab-reference-row,
.lab-card-reference {
  border: 1px solid rgba(116, 130, 105, 0.18);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(250, 248, 241, 0.72);
}

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

.lab-reference-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.lab-reference-remove {
  border: 0;
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 760;
}

.lab-card-reference {
  margin-top: 8px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.4;
}

.lab-intent-summary,
.lab-card-intent {
  border: 1px solid rgba(116, 130, 105, 0.18);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(246, 249, 241, 0.72);
}

.lab-intent-summary {
  display: grid;
  gap: 4px;
  padding: 9px;
  font-size: 12px;
  line-height: 1.45;
}

.lab-intent-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.lab-library-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.lab-library-tools input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.lab-library-panel {
  display: grid;
}

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

.mobile-view-body .lab-library-panel {
  display: grid;
}

.lab-style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  max-height: 450px;
  overflow: auto;
  padding-right: 2px;
}

.lab-style-grid.empty-v2-list,
.lab-comparison-grid.empty-v2-list,
.lab-history-grid.empty-v2-list {
  min-height: 118px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
}

.lab-style-tile {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(5rem, 30%) minmax(0, 1fr);
  align-items: start;
  gap: 4px;
}

.lab-style-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eeefe8;
}

button.lab-style-preview {
  cursor: zoom-in;
}

.lab-style-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lab-style-placeholder {
  width: 100%;
  padding: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  overflow-wrap: anywhere;
  background: linear-gradient(145deg, transparent 35%, #e4e8de);
}

.lab-style-selection:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.lab-style-selection .lab-style-preview {
  width: 54px;
}

.lab-style-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
}

.lab-style-card.active {
  border-color: rgba(34, 93, 168, 0.36);
  background:
    linear-gradient(135deg, rgba(34, 93, 168, 0.08), rgba(47, 90, 69, 0.07)),
    rgba(255, 255, 255, 0.82);
}

.lab-style-card span,
.lab-card-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.lab-style-card strong,
.lab-style-result h4 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.32;
}

.lab-style-card small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.42;
}

.lab-style-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.lab-style-more-note {
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid rgba(116, 130, 105, 0.24);
  border-radius: 14px;
  padding: 11px;
  color: var(--sage-deep);
  text-align: center;
  background: rgba(255, 253, 247, 0.74);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.42;
}

.lab-progress {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.lab-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 2px;
}

.lab-history-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  cursor: zoom-in;
}

.lab-history-preview.v2-live-preview,
.lab-history-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: var(--paper-deep);
}

.lab-history-preview img,
.lab-history-preview.v2-live-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lab-history-meta.v2-history-meta {
  display: grid;
  gap: 4px;
  padding: 9px;
}

.lab-history-meta strong {
  min-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lab-history-meta span {
  margin: 0;
  overflow-wrap: anywhere;
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.lab-history-footer.v2-history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px;
  border-top: 1px solid var(--line);
}

.lab-history-footer .output-id {
  display: none;
}

.lab-history-footer .history-card-actions {
  width: 100%;
  justify-content: space-between;
  padding: 0;
}

.lab-history-footer .download-link {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 0;
}

.lab-text-link {
  border: 0;
  background: transparent;
}

.lab-history-body,
.lab-history-tags,
.lab-history-card .lab-card-actions {
  display: none;
}

.lab-result-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.lab-result-card.is-running,
.lab-result-card.is-queued {
  border-color: rgba(79, 107, 82, 0.22);
  background: rgba(255, 255, 255, 0.6);
}

.lab-image-button,
.lab-error-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-deep);
}

.lab-image-button {
  padding: 0;
}

.lab-image-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lab-error-tile {
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--red);
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  background: rgba(184, 51, 51, 0.06);
}

.lab-result-card.is-running .lab-error-tile,
.lab-result-card.is-queued .lab-error-tile {
  color: var(--muted);
  background: rgba(79, 107, 82, 0.07);
}

.lab-card-meta {
  display: grid;
  gap: 8px;
  padding: 0 9px;
}

.lab-card-meta strong {
  min-height: 36px;
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lab-card-quality,
.lab-card-quality-detail {
  margin: 0;
  padding: 0 9px;
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lab-card-quality {
  color: var(--ink-soft);
  font-weight: 720;
}

.lab-card-intent {
  margin: 0 9px;
  padding: 7px 9px;
  overflow: hidden;
  display: -webkit-box;
  color: var(--sage-deep);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lab-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 0 9px 9px;
}

.lab-card-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.lab-favorite-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.lab-favorite-btn.active {
  border-color: rgba(154, 117, 53, 0.34);
  color: var(--brass);
  background: rgba(154, 117, 53, 0.1);
}

.lab-prompt-detail {
  border-top: 1px solid var(--line);
  padding: 8px 9px 9px;
}

.lab-prompt-detail summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lab-prompt-detail pre {
  max-height: 160px;
  margin: 8px 0 0;
  overflow: auto;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.global-toast {
  padding: 12px 13px;
  font-size: 13px;
}

.sample-modal,
.image-lightbox {
  padding: calc(12px + env(safe-area-inset-top)) 10px calc(12px + env(safe-area-inset-bottom));
}

.sample-dialog,
.lightbox-panel {
  border-radius: 18px;
}

.sample-dialog {
  padding: 14px;
}

.modal-close,
.lightbox-close {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.sample-hero {
  padding: 9px 0 13px;
}

.sample-hero h2 {
  font-size: 27px;
  line-height: 1.05;
}

.lightbox-panel {
  gap: 10px;
  padding: 12px;
}

.lightbox-stage {
  min-height: 250px;
  border-radius: 14px;
}

.lightbox-stage img,
#lightboxImage {
  max-height: 70vh;
}

.prompt-card {
  padding: 10px;
  border-radius: 12px;
}

.prompt-scroll-box {
  max-height: 30vh;
  margin-top: 8px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 374px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h2,
  body.h5-simplified .hero-copy h2 {
    font-size: 27px;
  }

  .tab {
    font-size: 12px;
  }
}

/* Final mobile navigation pass: fixed visual band with horizontal scrolling tabs. */
.module-tabs {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.module-tabs::-webkit-scrollbar {
  display: none;
}

.module-tabs .tab {
  flex: 0 0 auto;
  width: 108px;
  min-width: 92px;
  max-width: 108px;
  min-height: 50px;
  padding: 0 2px 10px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  scroll-snap-align: center;
}

.module-tabs .tab.lab-tab {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

.module-tabs .tab.v3-link-tab {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

.header-status {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.header-status > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-home-panel {
  display: grid;
  gap: 16px;
}

.lab-home-history-panel {
  margin-top: 0;
}

/* Starred history and continuation controls for the H5 shell. */
.revision-selected-card,
.v2-favorite-reference-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(116, 130, 105, 0.22);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.72);
}

.revision-selected-card.is-empty {
  border-style: dashed;
  background: rgba(255, 253, 247, 0.48);
}

.revision-selected-preview {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--quiet);
  background: rgba(239, 233, 218, 0.72);
  font-size: 12px;
  font-weight: 700;
}

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

.revision-selected-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.revision-selected-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.revision-selected-copy strong,
.v2-favorite-reference-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.revision-selected-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.revision-actions,
.v2-favorite-reference-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.revision-actions .button,
.v2-favorite-reference-actions .button {
  width: 100%;
}

.v2-favorite-reference-card {
  grid-template-columns: minmax(0, 1fr);
}

.v2-favorite-reference-card.is-empty {
  border-style: dashed;
  background: rgba(255, 253, 247, 0.52);
}

.v2-favorite-reference-card.has-selection {
  border-color: rgba(154, 117, 53, 0.42);
  background: rgba(255, 249, 232, 0.76);
}

.v2-favorite-reference-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.v2-reference-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v2-favorite-reference-copy span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.v2-reference-title-row em {
  flex: 0 0 auto;
  min-height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 1px 8px;
  border: 1px solid rgba(116, 130, 105, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}

.v2-favorite-reference-card.has-selection .v2-reference-title-row em {
  border-color: rgba(154, 117, 53, 0.34);
  color: #8a6423;
  background: rgba(255, 244, 203, 0.88);
}

.v2-favorite-reference-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.history-card .favorite-star-button,
.v2-history-card .favorite-star-button {
  width: 40px;
  height: 40px;
}

.favorite-picker-modal[hidden] {
  display: none !important;
}

.favorite-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  align-items: end;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
}

.favorite-picker-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 25, 21, 0.44);
}

.favorite-picker-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(82vh, 720px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 252, 0.58);
  border-radius: 22px 22px 18px 18px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 -18px 42px rgba(24, 25, 21, 0.24);
}

.favorite-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 14px 14px 0;
}

.favorite-picker-head h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.favorite-picker-grid {
  min-height: 180px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow: auto;
  padding: 0 14px 14px;
  scrollbar-width: thin;
}

.favorite-picker-grid.empty-v2-list::before,
.favorite-picker-grid.has-empty-message::before {
  content: none;
}

.favorite-picker-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  color: inherit;
  background: rgba(255, 255, 252, 0.76);
  text-align: left;
}

.favorite-picker-card.selected {
  border-color: rgba(116, 130, 105, 0.58);
  background: rgba(116, 130, 105, 0.11);
}

.favorite-picker-preview {
  width: 82px;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-deep);
}

.favorite-picker-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.favorite-picker-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
}

.favorite-picker-meta strong,
.favorite-picker-meta span,
.favorite-picker-meta em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-picker-meta strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

.favorite-picker-meta span {
  display: -webkit-box;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-picker-action {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--sage-deep);
  background: rgba(116, 130, 105, 0.12);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.empty-v2-message {
  margin: 0;
  align-self: center;
  justify-self: center;
  padding: 20px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 374px) {
  .revision-selected-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .revision-selected-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .revision-actions,
  .v2-favorite-reference-actions {
    grid-template-columns: 1fr;
  }

  .favorite-picker-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .favorite-picker-preview {
    width: 74px;
  }
}

/* H5 polish pass: make favorites and material controls feel lighter. */
.history-card .favorite-star-button,
.v2-history-card .favorite-star-button,
.favorite-star-button {
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-color: rgba(255, 253, 247, 0.72);
  color: rgba(24, 25, 21, 0.5);
  background: rgba(255, 253, 247, 0.74);
  box-shadow: 0 6px 16px rgba(24, 25, 21, 0.12);
  font-size: 15px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.favorite-star-button.active {
  color: #8f6b22;
  border-color: rgba(181, 140, 57, 0.36);
  background: rgba(255, 248, 221, 0.9);
  box-shadow: 0 6px 16px rgba(143, 107, 34, 0.14);
}

.is-favorite {
  border-color: rgba(181, 140, 57, 0.32);
}

.history-prompt,
.v2-history-meta strong {
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-detail,
.v2-history-meta span {
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.output-id {
  font-size: 10.5px;
}

.output-diagnostics {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.output-diagnostics summary,
.status-id-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.output-diagnostics .output-id {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 10px;
}

.status-id-details {
  min-width: 0;
}

.status-id-details strong {
  display: block;
  margin-top: 5px;
}

.v2-favorite-reference-card {
  gap: 8px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.58);
}

.v2-favorite-reference-copy {
  gap: 3px;
}

.v2-favorite-reference-copy span {
  color: var(--muted);
  font-size: 10.5px;
}

.v2-reference-title-row em {
  min-height: 20px;
  padding: 1px 7px;
  font-size: 10px;
}

.v2-favorite-reference-copy strong {
  font-size: 13px;
}

.v2-favorite-reference-copy small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.38;
}

.v2-favorite-reference-actions {
  gap: 7px;
}

.v2-favorite-reference-actions .button,
.revision-actions .button {
  min-height: 34px;
}

.v2-asset-panel .mini-head {
  margin-bottom: 6px;
}

.v2-asset-preview,
.asset-preview {
  min-height: 150px;
  margin-top: 9px;
  border-radius: 14px;
}

.v2-file-drop,
.file-drop {
  min-height: 42px;
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: 14px;
}

.v2-file-drop .file-title,
.file-title {
  font-size: 12px;
}

.file-meta {
  font-size: 10.5px;
}

.v2-asset-role-checks,
.advanced-role-checks {
  gap: 6px;
}

.v2-asset-role-checks .role-check,
.role-check {
  min-height: 34px;
  border-radius: 12px;
  font-size: 11px;
}

.role-check input {
  width: 13px;
  min-height: 13px;
}

.v2-asset-mini-grid {
  gap: 7px;
}

#v2AssetLockHint,
.micro-copy {
  font-size: 10.5px;
  line-height: 1.45;
}

.favorite-picker-head {
  padding-top: 12px;
}

.favorite-picker-panel {
  border-radius: 18px 18px 16px 16px;
}

.favorite-picker-grid {
  gap: 8px;
}

.favorite-picker-card {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px;
  border-radius: 14px;
  padding: 7px;
}

.favorite-picker-preview {
  width: 70px;
  border-radius: 10px;
}

.favorite-picker-meta {
  gap: 4px;
}

.favorite-picker-meta strong {
  font-size: 12px;
  line-height: 1.32;
}

.favorite-picker-meta span {
  font-size: 10.5px;
  -webkit-line-clamp: 1;
}

.favorite-picker-action {
  min-height: 25px;
  padding: 0 9px;
  font-size: 10.5px;
}

.v3-mobile-workbench,
.v3-mobile-home-panel,
.v3-mobile-projects-panel,
.v3-mobile-detail-panel,
.v3-mobile-compose-panel,
.v3-mobile-workflow-panel {
  display: grid;
  gap: 14px;
}

.v3-mobile-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#v3Tab > .v3-mobile-workbench > .v3-mobile-detail-panel,
#v3Tab > .v3-mobile-workbench > .v3-mobile-gallery-panel {
  display: none;
}

.mobile-view .v3-mobile-detail-panel,
.mobile-sheet .v3-mobile-gallery-panel {
  display: grid;
}

#v3Tab > .v3-mobile-workbench > .v3-mobile-visual-assets-panel,
#v3Tab > .v3-mobile-workbench > .v3-mobile-visual-asset-create-panel,
#v3Tab > .v3-mobile-workbench > .v3-mobile-visual-asset-detail-panel {
  display: none;
}

.mobile-sheet .v3-mobile-visual-assets-panel,
.mobile-sheet .v3-mobile-visual-asset-create-panel,
.mobile-sheet .v3-mobile-visual-asset-detail-panel {
  display: grid;
}

body[data-active-module="v3"] .hero-band {
  padding-bottom: 2px;
}

body[data-active-module="v3"] .hero-gallery-lane,
body[data-active-module="v3"] .h5-quick-guide {
  display: none;
}

body[data-active-module="v3"] .hero-actions {
  margin-top: 12px;
}

.v3-mobile-template-grid {
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.v3-mobile-professional-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(116, 130, 105, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(245, 240, 228, 0.9), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.v3-mobile-professional-panel[hidden] {
  display: none;
}

.v3-mobile-professional-panel h4,
.v3-mobile-professional-panel p {
  margin: 0;
}

.v3-mobile-professional-panel p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.v3-mobile-professional-actions {
  grid-template-columns: 1fr;
}

.v3-mobile-visual-asset-list,
.v3-mobile-visual-asset-detail,
.v3-mobile-visual-asset-module-list {
  display: grid;
  gap: 10px;
}

.v3-mobile-visual-asset-card,
.v3-mobile-visual-asset-detail-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.78);
}

.v3-mobile-visual-asset-card.active {
  border-color: rgba(47, 90, 69, 0.34);
  background: rgba(246, 250, 242, 0.9);
}

.v3-mobile-visual-asset-card span,
.v3-mobile-visual-asset-detail-card span,
.v3-mobile-visual-asset-card small,
.v3-mobile-visual-asset-detail-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.v3-mobile-visual-asset-card strong,
.v3-mobile-visual-asset-detail-card strong {
  color: var(--ink);
  line-height: 1.35;
}

.v3-mobile-visual-asset-module-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.v3-mobile-visual-asset-module-list p > strong {
  flex: 1 1 120px;
}

.v3-mobile-visual-asset-module-list p > span {
  flex: 0 0 auto;
}

.v3-mobile-visual-asset-module-list p > .button {
  flex: 0 0 100%;
}

.v3-mobile-character-card-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(116, 130, 105, 0.18);
  border-radius: 14px;
  background: rgba(248, 246, 238, 0.72);
}

.v3-mobile-character-card-preview > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.v3-mobile-character-card-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v3-mobile-character-card-thumb {
  display: grid;
  gap: 5px;
  padding: 0;
  border: 1px solid rgba(116, 130, 105, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.v3-mobile-character-card-thumb img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(242, 240, 232, 0.72);
}

.v3-mobile-character-card-thumb span {
  padding: 0 5px 6px;
  color: var(--ink);
}

.v3-mobile-character-card-preview-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.v3-mobile-confirm-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.v3-mobile-confirm-checkbox input {
  margin-top: 3px;
}

.v3-mobile-template-card.active {
  border-color: rgba(116, 130, 105, 0.46);
  background:
    linear-gradient(135deg, rgba(116, 130, 105, 0.12), rgba(214, 210, 199, 0.18)),
    rgba(255, 255, 255, 0.9);
}

.v3-mobile-template-card {
  min-height: 76px;
  padding: 9px;
  border-radius: 12px;
  gap: 5px;
}

.v3-mobile-template-card span {
  font-size: 11px;
}

.v3-mobile-template-card strong {
  font-size: 12px;
  line-height: 1.25;
}

.v3-mobile-template-card small {
  font-size: 10px;
  line-height: 1.32;
}

.v3-mobile-template-card:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.v3-mobile-goal-field textarea,
.v3-mobile-compose-panel textarea {
  min-height: 118px;
}

.v3-mobile-project-grid,
.v3-mobile-output-grid,
.v3-mobile-gallery-grid {
  display: grid;
  gap: 12px;
}

.v3-mobile-home-panel {
  position: relative;
}

.v3-mobile-loading-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 100vh;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background: rgba(246, 243, 235, 0.34);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  text-align: center;
  pointer-events: auto;
}

.v3-mobile-loading-layer[hidden] {
  display: none;
}

.v3-mobile-loading-layer::before {
  content: "";
  width: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 3px solid rgba(116, 130, 105, 0.18);
  border-top-color: rgba(93, 121, 70, 0.9);
  animation: mobileV3Spin 0.9s linear infinite;
}

.v3-mobile-loading-layer strong {
  color: var(--ink);
  font-size: 15px;
}

.v3-mobile-loading-layer small {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.v3-mobile-loading-active {
  overflow: hidden;
}

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

.v3-mobile-project-card,
.v3-mobile-output-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-review-hold {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(173, 93, 52, 0.28);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 248, 238, 0.92);
}

.v3-mobile-review-hold strong {
  color: var(--ink);
  font-size: 13px;
}

.v3-mobile-current-operation {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(173, 93, 52, 0.28);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 248, 238, 0.92);
}

.v3-mobile-current-operation > div {
  display: grid;
  gap: 4px;
}

.v3-mobile-current-operation strong {
  color: var(--ink);
  font-size: 14px;
}

.v3-mobile-current-operation span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.v3-mobile-current-operation .button {
  justify-self: start;
}

.v3-mobile-review-hold span,
.v3-mobile-review-hold small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.v3-mobile-output-card.review-only {
  border-color: rgba(173, 93, 52, 0.22);
  background: rgba(255, 248, 238, 0.78);
}

.v3-mobile-output-card.review-only .v3-mobile-output-copy span {
  color: var(--muted);
}

.v3-mobile-project-card.is-skeleton {
  min-height: 138px;
  pointer-events: none;
}

.v3-mobile-project-card.is-skeleton .v3-mobile-project-preview,
.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy strong,
.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy span,
.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy small {
  position: relative;
  overflow: hidden;
  color: transparent;
  background: linear-gradient(90deg, rgba(116, 130, 105, 0.08), rgba(255, 255, 255, 0.78), rgba(116, 130, 105, 0.08));
  background-size: 220% 100%;
  animation: v3MobileSkeleton 1.4s ease-in-out infinite;
}

.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy strong,
.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy span,
.v3-mobile-project-card.is-skeleton .v3-mobile-project-copy small {
  min-height: 12px;
  border-radius: 999px;
}

@keyframes v3MobileSkeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.v3-mobile-project-card > .button,
.v3-mobile-output-card > .button {
  grid-column: 1 / -1;
}

.v3-mobile-load-more-preview {
  color: var(--muted);
  font-weight: 780;
  text-align: center;
}

.v3-mobile-load-more-preview span {
  width: 46px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(47, 90, 69, 0.08);
  color: rgba(47, 90, 69, 0.88);
  font-size: 15px;
  font-weight: 840;
}

.v3-mobile-project-preview,
.v3-mobile-output-preview {
  position: relative;
  width: 112px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(24, 25, 21, 0.1);
  border-radius: 14px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(116, 130, 105, 0.08), rgba(214, 210, 199, 0.18)),
    rgba(250, 248, 241, 0.84);
}

.v3-mobile-project-preview img,
.v3-mobile-output-preview img {
  width: calc(100% - 13px);
  height: calc(100% - 13px);
  object-fit: cover;
  position: relative;
  z-index: 3;
  display: block;
  border: 5px solid #fff;
  border-radius: 7px;
  box-shadow: 0 12px 22px rgba(23, 20, 17, 0.18);
  transform: rotate(3deg);
}

.v3-mobile-output-preview img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.v3-mobile-history-stack {
  position: absolute;
  inset: 10% 13% 11% 12%;
  z-index: 1;
  pointer-events: none;
}

.v3-mobile-history-stack span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 20, 17, 0.12);
  border-radius: 5px;
  background: #fff;
  box-shadow:
    0 10px 18px rgba(23, 20, 17, 0.18),
    0 2px 7px rgba(23, 20, 17, 0.12);
}

.v3-mobile-history-stack span:nth-child(1) {
  transform: translate(-13px, 5px) rotate(-6deg);
  opacity: 0.62;
}

.v3-mobile-history-stack span:nth-child(2) {
  transform: translate(-7px, -5px) rotate(-3deg);
  opacity: 0.74;
}

.v3-mobile-history-stack span:nth-child(3) {
  transform: translate(2px, 7px) rotate(2deg);
  opacity: 0.82;
}

.v3-mobile-history-stack span:nth-child(4) {
  transform: translate(9px, -1px) rotate(4deg);
  opacity: 0.9;
}

.v3-mobile-history-stack span:nth-child(5) {
  transform: translate(15px, 7px) rotate(7deg);
  opacity: 0.78;
}

.v3-mobile-empty-thumb {
  position: relative;
  z-index: 3;
}

.v3-mobile-project-copy,
.v3-mobile-output-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.v3-mobile-project-open {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  font: inherit;
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.v3-mobile-project-open:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 4px;
  border-radius: 8px;
}

.v3-mobile-project-open:disabled {
  cursor: not-allowed;
}

.v3-mobile-project-copy strong,
.v3-mobile-output-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.28;
}

.v3-mobile-project-copy span,
.v3-mobile-output-copy span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.38;
}

.v3-mobile-project-copy small,
.v3-mobile-output-copy small {
  color: var(--muted);
  font-size: 11px;
}

.v3-mobile-output-prompt {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 9px;
  border: 1px solid rgba(116, 130, 105, 0.2);
  border-radius: 999px;
  color: var(--sage-deep);
  background: rgba(116, 130, 105, 0.08);
  font-size: 11px;
  font-weight: 760;
}

.v3-mobile-action-grid,
.v3-mobile-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.v3-mobile-primary-entry {
  border-color: rgba(98, 125, 72, 0.56);
  background:
    linear-gradient(180deg, rgba(153, 180, 123, 0.96), rgba(109, 138, 79, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 24px rgba(74, 90, 53, 0.24);
}

.v3-mobile-primary-entry span {
  color: rgba(255, 255, 255, 0.78);
}

.v3-mobile-primary-entry strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.28;
}

.v3-mobile-mode-grid .mobile-entry-card.active {
  border-color: rgba(116, 130, 105, 0.5);
  background: rgba(255, 255, 252, 0.92);
  box-shadow: 0 10px 20px rgba(76, 93, 58, 0.14);
}

.v3-mobile-size-segmented .segment.active {
  border-color: rgba(116, 130, 105, 0.54);
  color: var(--sage-deep);
  background: rgba(116, 130, 105, 0.12);
}

.v3-mobile-compose-panel .composer-actions {
  display: grid;
  padding-top: 2px;
}

.v3-mobile-compose-panel .composer-actions .button {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 22px rgba(74, 90, 53, 0.22);
}

.v3-mobile-full-prompt-button {
  justify-self: start;
  margin-top: -6px;
  padding: 0;
  border: 0;
  color: var(--sage-deep);
  background: transparent;
  font-size: 12px;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v3-mobile-full-prompt-dialog {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: end stretch;
  padding: 18px;
  background: rgba(24, 25, 21, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.v3-mobile-full-prompt-dialog[hidden] {
  display: none;
}

.v3-mobile-full-prompt-card {
  display: grid;
  gap: 12px;
  max-height: min(76vh, 680px);
  padding: 18px;
  border: 1px solid rgba(116, 130, 105, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 252, 0.94);
  box-shadow: 0 22px 48px rgba(23, 20, 17, 0.18);
}

.v3-mobile-full-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3-mobile-full-prompt-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.v3-mobile-full-prompt-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.v3-mobile-full-prompt-card pre {
  max-height: 52vh;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-soft);
  font: 13px/1.7 var(--font-sans);
}

.v3-mobile-reference-upload {
  display: grid;
  gap: 8px;
}

.v3-mobile-upload-button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  min-height: 72px;
  padding: 13px 14px;
  border: 1px dashed rgba(116, 130, 105, 0.44);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 252, 0.92), rgba(243, 239, 229, 0.82)),
    rgba(250, 248, 241, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(23, 20, 17, 0.06);
  cursor: pointer;
  touch-action: manipulation;
}

.v3-mobile-upload-button::before {
  content: "+";
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(143, 165, 116, 0.98), rgba(100, 130, 74, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 16px rgba(75, 96, 54, 0.18);
}

.v3-mobile-upload-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.v3-mobile-upload-button span {
  grid-column: 2;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.22;
}

.v3-mobile-upload-button small {
  grid-column: 2;
}

.v3-mobile-upload-button:focus-within {
  border-color: rgba(100, 130, 74, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 3px rgba(116, 130, 105, 0.12),
    0 10px 20px rgba(23, 20, 17, 0.07);
}

.v3-mobile-upload-button small,
.v3-mobile-upload-list {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.v3-mobile-upload-list {
  display: grid;
  gap: 8px;
}

.v3-mobile-upload-list.is-empty {
  padding: 0 2px;
  color: var(--quiet);
}

.v3-mobile-upload-list.empty-v2-list::before {
  content: none;
}

.v3-mobile-template-state,
.v3-mobile-photography-fields,
.v3-mobile-photography-role-board {
  display: grid;
  gap: 10px;
}

.v3-mobile-template-state {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed rgba(116, 130, 105, 0.32);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

.v3-mobile-template-state.error {
  border-color: rgba(166, 71, 53, 0.36);
  color: #8b3d2e;
}

.v3-mobile-photography-fields,
.v3-mobile-photography-role-board {
  padding: 12px;
  border: 1px solid rgba(66, 109, 134, 0.22);
  border-radius: 15px;
  background: rgba(242, 248, 250, 0.76);
}

.v3-mobile-photo-role-grid {
  display: grid;
  gap: 8px;
}

.v3-mobile-photo-role-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px;
  border: 1px solid rgba(66, 109, 134, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
}

.v3-mobile-photo-role-grid article small { grid-column: 1 / -1; color: var(--muted); }
.v3-mobile-photo-role-grid article span { color: #427088; font-size: 12px; font-weight: 760; }
.v3-mobile-photo-role-grid article.blocked span { color: #a34330; }
.v3-mobile-photo-role-grid article.attention span { color: #8a651c; }

.v3-mobile-upload-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 9px 8px 8px;
  border: 1px solid rgba(116, 130, 105, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 252, 0.86);
  box-shadow: 0 8px 16px rgba(23, 20, 17, 0.045);
}

.v3-mobile-upload-thumb {
  width: 42px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(116, 130, 105, 0.1);
}

.v3-mobile-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v3-mobile-upload-row strong,
.v3-mobile-upload-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-mobile-upload-row strong {
  color: var(--ink);
  font-size: 12px;
}

.v3-mobile-upload-row button {
  padding: 7px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--danger, #8a3a2b);
  background: rgba(138, 58, 43, 0.08);
}

.v3-mobile-advanced-reference-controls {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(47, 90, 69, 0.16);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 243, 0.72)),
    rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 26px rgba(38, 58, 45, 0.08);
}

.v3-mobile-advanced-reference-controls summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 13px;
  list-style: none;
  background:
    linear-gradient(135deg, rgba(47, 90, 69, 0.08), rgba(255, 255, 255, 0.32)),
    rgba(255, 255, 255, 0.52);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.v3-mobile-advanced-reference-controls summary::-webkit-details-marker {
  display: none;
}

.v3-mobile-advanced-reference-controls summary span {
  position: relative;
  min-width: 0;
  padding-left: 30px;
}

.v3-mobile-advanced-reference-controls summary span::before {
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(47, 90, 69, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(47, 90, 69, 0.82) 0 4px, transparent 5px),
    rgba(255, 255, 255, 0.78);
  content: "";
  transform: translateY(-50%);
}

.v3-mobile-advanced-reference-controls summary small {
  max-width: 128px;
  padding: 6px 9px;
  border: 1px solid rgba(47, 90, 69, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.v3-mobile-advanced-reference-controls summary::after {
  padding: 6px 9px;
  border: 1px solid rgba(47, 90, 69, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  content: "展开";
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.v3-mobile-advanced-reference-controls[open] summary {
  border-bottom: 1px solid rgba(47, 90, 69, 0.12);
}

.v3-mobile-advanced-reference-controls[open] summary::after {
  content: "收起";
}

.v3-mobile-reference-priority-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.v3-mobile-reference-priority-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(47, 90, 69, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 246, 239, 0.56)),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.v3-mobile-reference-priority-list label:has(input:checked) {
  border-color: rgba(47, 90, 69, 0.32);
  background:
    linear-gradient(180deg, rgba(238, 248, 235, 0.9), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(47, 90, 69, 0.08);
}

.v3-mobile-reference-priority-list input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(47, 90, 69, 0.24);
  border-radius: 7px;
  accent-color: var(--primary);
}

.v3-mobile-reference-priority-list span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.v3-mobile-reference-priority-list strong {
  color: var(--ink);
  font-size: 13px;
}

.v3-mobile-reference-priority-list small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.v3-mobile-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.v3-mobile-project-meta,
.v3-mobile-project-snapshot,
.v3-mobile-reference-board,
.v3-mobile-timeline {
  display: grid;
  gap: 10px;
}

.v3-mobile-project-meta {
  padding: 0;
  border: 0;
  background: transparent;
}

.v3-mobile-project-meta-row {
  display: none;
}

.v3-mobile-project-meta-row strong,
.v3-mobile-project-meta-row span {
  font-size: 13px;
  line-height: 1.35;
}

.v3-mobile-style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v3-mobile-style-chips span {
  padding: 6px 10px;
  border: 1px solid rgba(24, 25, 21, 0.1);
  border-radius: 999px;
  background: rgba(250, 248, 241, 0.8);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.2;
}

.v3-mobile-project-snapshot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v3-mobile-snapshot-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  min-height: 118px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-snapshot-card span {
  color: var(--muted);
  font-size: 11px;
}

.v3-mobile-snapshot-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.28;
}

.v3-mobile-snapshot-card small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.v3-mobile-reference-board {
  grid-template-columns: minmax(0, 1fr);
}

.v3-mobile-reference-group {
  display: grid;
  gap: 8px;
}

.v3-mobile-reference-group > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.v3-continuity-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 120px));
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.v3-continuity-input-card {
  display: grid;
  grid-template-rows: 104px auto;
  gap: 5px;
  width: 120px;
  min-width: 0;
  margin: 0;
}

.v3-continuity-input-frame {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(250, 248, 241, 0.86);
}

.v3-continuity-input-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.v3-continuity-input-name {
  display: block;
  width: 104px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-continuity-anchor-unbind {
  width: max-content;
  max-width: 100%;
  justify-self: start;
}

.v3-continuity-anchor-unbind[aria-busy="true"],
.v3-mobile-output-actions button[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: progress;
}

.v3-continuity-loading-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: v3-continuity-spin 0.75s linear infinite;
}

.v3-continuity-loading-label {
  white-space: nowrap;
}

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

@media (prefers-reduced-motion: reduce) {
  .v3-continuity-loading-spinner { animation: none; opacity: 0.7; }
}

.v3-mobile-reference-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.v3-mobile-reference-group-head > div {
  display: grid;
  gap: 3px;
}

.v3-mobile-reference-group-head strong {
  color: var(--ink);
  font-size: 13px;
}

.v3-mobile-reference-group-head small,
.v3-mobile-reference-group-head > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.v3-mobile-reference-group-head > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.v3-mobile-reference-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v3-mobile-reference-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-reference-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(250, 248, 241, 0.86);
  display: grid;
  place-items: center;
}

.v3-mobile-reference-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.v3-mobile-reference-copy {
  display: grid;
  gap: 4px;
}

.v3-mobile-reference-origin {
  color: #53624c;
  font-size: 10px;
  font-weight: 760;
}

.v3-mobile-reference-copy strong {
  font-size: 12px;
  line-height: 1.35;
}

.v3-mobile-reference-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.v3-mobile-ecommerce-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v3-mobile-ecommerce-history-summary article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-ecommerce-history-summary span {
  color: #426d86;
  font-size: 10px;
  font-weight: 760;
}

.v3-mobile-ecommerce-history-summary strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
}

.v3-mobile-ecommerce-history-summary small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.v3-mobile-reference-actions,
.v3-mobile-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.v3-mobile-reference-actions button,
.v3-mobile-output-actions button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(47, 90, 69, 0.2);
  border-radius: 8px;
  color: #2f5a45;
  background: rgba(247, 250, 246, 0.9);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.v3-mobile-reference-actions button:disabled,
.v3-mobile-output-actions button:disabled {
  color: var(--muted);
  border-color: rgba(24, 25, 21, 0.1);
  background: rgba(24, 25, 21, 0.04);
}

.v3-mobile-timeline-details {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-process-details {
  padding: 10px 12px;
  border: 1px solid rgba(24, 25, 21, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.v3-mobile-process-details summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.v3-mobile-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.v3-mobile-process-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(138, 58, 43, 0.16);
  border-radius: 10px;
  background: rgba(138, 58, 43, 0.06);
}

.v3-mobile-process-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.v3-mobile-timeline-details summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.v3-mobile-timeline-details summary span {
  font-weight: 700;
}

.v3-mobile-timeline-details summary small {
  color: var(--muted);
  font-size: 11px;
}

.v3-mobile-timeline {
  margin-top: 8px;
}

.v3-mobile-timeline-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid rgba(24, 25, 21, 0.08);
}

.v3-mobile-timeline-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.v3-mobile-timeline-row strong {
  font-size: 12px;
  line-height: 1.35;
}

.v3-mobile-timeline-row span,
.v3-mobile-timeline-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.v3-mobile-progress .run-progress-steps span.active {
  color: var(--sage-deep);
}

.v3-mobile-output-card.pending .v3-mobile-output-preview {
  border-style: dashed;
}

.v3-mobile-gallery-panel {
  display: grid;
  gap: 12px;
}

.v3-mobile-gallery-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3-mobile-gallery-summary strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.v3-mobile-gallery-summary span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.v3-mobile-gallery-grid {
  max-height: 52vh;
  overflow-y: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-right: 2px;
}

.v3-mobile-gallery-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(24, 25, 21, 0.1);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(250, 248, 241, 0.86);
}

.v3-mobile-gallery-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.v3-mobile-gallery-review-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 3px 5px;
  border-radius: 999px;
  color: #fff;
  background: rgba(122, 65, 39, 0.88);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.v3-mobile-workflow-list {
  display: grid;
  gap: 10px;
}

.v3-mobile-workflow-list article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.v3-mobile-workflow-list article span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--sage-deep);
  background: rgba(116, 130, 105, 0.12);
  font-weight: 760;
}

.v3-mobile-workflow-list article strong {
  font-size: 14px;
}

.v3-mobile-workflow-list article small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

@media (max-width: 390px) {
  .v3-mobile-project-card,
  .v3-mobile-output-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .v3-mobile-project-preview,
  .v3-mobile-output-preview {
    width: 96px;
  }

  .v3-mobile-project-snapshot,
  .v3-mobile-reference-board {
    grid-template-columns: 1fr;
  }

  .v3-mobile-ecommerce-history-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep result labels readable on narrow screens without exposing model controls. */
.provider-panel[hidden],
.v2-provider-area[hidden],
.v2-model-card-grid-panel[hidden] {
  display: none !important;
}

.v2-output-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.v2-output-meta > strong {
  flex: 1 1 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.v2-output-meta .v2-route-badge,
.v2-output-meta .v2-review-badge {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: #49574c;
  background: rgba(47, 90, 69, 0.08);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v2-output-meta .v2-route-badge.unknown,
.v2-output-meta .v2-review-badge {
  color: var(--muted);
  background: rgba(23, 20, 17, 0.06);
}

.v2-output-meta .v2-review-details {
  flex: 1 1 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.v2-output-meta .v2-review-details summary {
  width: fit-content;
  cursor: pointer;
}

.v2-output-meta .v2-review-details p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.v3-mobile-source-badge {
  display: block;
  max-width: 100%;
  color: #46564c !important;
  font-size: 11px !important;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.v3-mobile-process-item {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.v3-mobile-gallery-source-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(47, 90, 69, 0.88);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.node-rewards-panel {
  display: grid;
  gap: 16px;
}

.node-rewards-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.node-rewards-summary .account-kpi {
  min-height: 100px;
  gap: 6px;
  padding: 10px;
}

.node-rewards-summary .account-kpi small {
  font-size: 11px;
  overflow-wrap: anywhere;
}

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

.node-rewards-code-row[hidden] {
  display: none;
}

.node-rewards-code {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(248, 247, 241, 0.82);
  font: 600 14px/1.4 ui-monospace, Consolas, monospace;
}

.node-rewards-code-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

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

.node-rewards-node {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(250, 249, 244, 0.75);
}

.node-rewards-node-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.node-rewards-node-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.node-rewards-status {
  flex: 0 0 auto;
  color: var(--sage-deep);
  font-size: 12px;
}

.node-rewards-identity,
.node-rewards-execution {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.node-rewards-node-stats {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.node-rewards-node-stats span,
.node-rewards-node-stats small {
  color: var(--muted);
  font-size: 12px;
}

.node-rewards-node-stats strong {
  color: var(--sage-deep);
}

.node-rewards-policy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .node-rewards-code-row {
    grid-template-columns: 1fr;
  }
}

.node-rewards-bind-form {
  display: grid;
  gap: 8px;
}

.node-rewards-id-label {
  color: var(--muted);
  font-size: 12px;
}

.node-rewards-id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.node-rewards-node-id {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(248, 247, 241, 0.82);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .node-rewards-id-row {
    grid-template-columns: 1fr;
  }
}
