:root {
  --brand-deep-teal: #0e4d4f;
  --brand-teal: #157a7d;
  --brand-mint: #7ee2c6;
  --brand-lime: #b7f15a;
  --brand-dark-ink: #1a1f23;
  --brand-off-white: #f8fafc;
  --accent-blue: #1e6fd9;
  --border-subtle: #e2e8f0;
  --text-muted: #5b6773;
  --surface-white: #ffffff;
  --shadow-soft: 0 10px 30px -10px rgba(14, 77, 79, 0.1);
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.05);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Prompt", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--brand-dark-ink);
  background: var(--brand-off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

.hidden {
  display: none !important;
}

/* ============================================================================
   Top Navigation
   ============================================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(21, 122, 125, 0.22);
  background: #ffffff;
  padding: 3px;
  object-fit: contain;
}

.brand-title {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--brand-deep-teal);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
}

.badge-subdomain {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.12);
  color: var(--brand-deep-teal);
  border: 1px solid rgba(21, 122, 125, 0.25);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.nav-link:hover {
  color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.08);
}

/* ============================================================================
   Pills & Buttons
   ============================================================================ */
.worker-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.worker-pill.online {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.worker-pill.offline {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.worker-pill.online .dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.worker-pill.offline .dot {
  background: #f59e0b;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-deep-teal);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-teal);
  transform: translateY(-1px);
}

.btn-lime {
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(183, 241, 90, 0.35);
}

.btn-lime:hover:not(:disabled) {
  background: #a7e449;
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--brand-dark-ink);
  border-color: var(--border-subtle);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--brand-teal);
  color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.04);
}

.btn-sm {
  padding: 0.38rem 0.78rem;
  font-size: 0.8rem;
  border-radius: 10px;
}

/* ============================================================================
   Sale Page (/) Hero & Sections
   ============================================================================ */
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-section {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at 85% 15%, rgba(126, 226, 198, 0.22), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(183, 241, 90, 0.16), transparent 40%),
              linear-gradient(180deg, #ffffff 0%, var(--brand-off-white) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
  border: 1px solid rgba(21, 122, 125, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-title .accent {
  color: var(--brand-teal);
}

.hero-desc {
  font-size: 1.06rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 640px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.hero-terminal-card {
  background: var(--brand-dark-ink);
  color: #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  box-shadow: 0 20px 45px -15px rgba(14, 77, 79, 0.3);
  border: 1px solid rgba(126, 226, 198, 0.25);
}

.terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  color: #94a3b8;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-code {
  font-size: 0.8rem;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cbd5e1;
}

.terminal-code .hl-lime {
  color: var(--brand-lime);
  font-weight: 600;
}

.terminal-code .hl-mint {
  color: var(--brand-mint);
}

.section-block {
  padding: 3.75rem 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0 0 0.6rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.feature-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(21, 122, 125, 0.4);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Architecture Steps */
.arch-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.arch-step {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.2rem;
  position: relative;
}

.arch-num {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arch-step h4 {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.98rem;
}

.arch-step p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ============================================================================
   Studio Workspace (/studio)
   ============================================================================ */
.studio-shell {
  max-width: 1420px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3.5rem;
}

.studio-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(21, 122, 125, 0.09);
  color: var(--brand-deep-teal);
  border: 1px solid rgba(21, 122, 125, 0.22);
}

.studio-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.panel-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
}

.panel-header h2, .panel-header h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.panel-body {
  padding: 1.2rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark-ink);
  margin-bottom: 0.35rem;
}

.input, .select, .textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.62rem 0.85rem;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--brand-dark-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(21, 122, 125, 0.14);
}

.textarea {
  min-height: 290px;
  resize: vertical;
  line-height: 1.55;
}

.brd-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.mode-chip {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
}

.mode-chip.inline {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.mode-chip.tempfile {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.digest-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 0.8rem;
}

.digest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.digest-tag {
  padding: 0.14rem 0.5rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--brand-deep-teal);
}

/* Studio Tabs */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
  padding: 0.4rem 0.6rem 0;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.tab-btn {
  padding: 0.68rem 1.05rem;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  border-radius: 12px 12px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--brand-deep-teal);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--brand-deep-teal);
  border-color: var(--border-subtle);
  margin-bottom: -1px;
  padding-bottom: 0.74rem;
}

.tab-count {
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(21, 122, 125, 0.12);
  color: var(--brand-deep-teal);
}

/* Summary Banner & Task Cards */
.project-summary-banner {
  background: linear-gradient(135deg, rgba(14, 77, 79, 0.06), rgba(126, 226, 198, 0.14));
  border: 1px solid rgba(21, 122, 125, 0.22);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.1rem;
}

.project-summary-banner h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
  color: var(--brand-deep-teal);
}

.project-summary-banner p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: #334155;
}

.kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.kpi-pill {
  background: #ffffff;
  border: 1px solid rgba(21, 122, 125, 0.2);
  border-radius: 10px;
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-pill {
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
}

.role-pill.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-color: var(--brand-deep-teal);
}

.tasks-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.task-card {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.task-card:hover {
  border-color: rgba(21, 122, 125, 0.4);
  box-shadow: var(--shadow-card);
}

.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.task-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.task-id {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
  background: #f1f5f9;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
}

.badge-role {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
}

.role-Frontend { background: #eff6ff; color: #1d4ed8; }
.role-Backend { background: #ecfdf5; color: #047857; }
.role-Database { background: #f5f3ff; color: #6d28d9; }
.role-QA { background: #fffbeb; color: #b45309; }
.role-DevOps { background: #fff1f2; color: #be123c; }

.badge-prio {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.14rem 0.5rem;
  border-radius: 6px;
}

.prio-High { background: #fee2e2; color: #b91c1c; }
.prio-Medium { background: #fef3c7; color: #92400e; }
.prio-Low { background: #e2e8f0; color: #334155; }

.task-hours {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
}

.task-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.task-desc {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: #475569;
}

.task-criteria {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: #334155;
}

.task-criteria li {
  margin-bottom: 0.2rem;
}

.dep-row {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dep-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Chat Stream */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.chip-btn {
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  color: var(--brand-deep-teal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: rgba(21, 122, 125, 0.09);
  border-color: var(--brand-teal);
}

.chat-stream {
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  padding: 0.9rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.72rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.62;
  white-space: normal;
  word-break: break-word;
}

.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: #ffffff;
  color: var(--brand-dark-ink);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.chat-bubble.live-thinking {
  border-color: rgba(21, 122, 125, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  box-shadow: 0 6px 18px rgba(14, 77, 79, 0.08);
}

.typing-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand-deep-teal);
  font-weight: 600;
  font-size: 0.87rem;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-teal);
  display: inline-block;
  animation: kumiBounce 1.2s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.24s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.12s;
}

.stream-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--brand-teal);
  font-weight: 700;
  animation: kumiBlink 0.85s steps(2, start) infinite;
}

.img-skeleton-card {
  border: 1px dashed rgba(21, 122, 125, 0.45);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.img-skeleton-box {
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(110deg, #ecfeff 8%, #ccfbf1 18%, #ecfeff 33%);
  background-size: 200% 100%;
  animation: kumiShimmer 1.6s linear infinite;
  color: var(--brand-deep-teal);
  font-weight: 600;
  font-size: 0.86rem;
}

@keyframes kumiBounce {
  0%, 80%, 100% {
    transform: scale(0.55);
    opacity: 0.45;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes kumiBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes kumiShimmer {
  to {
    background-position-x: -200%;
  }
}

.chat-meta {
  font-size: 0.7rem;
  opacity: 0.72;
  margin-top: 0.32rem;
}

.chat-composer {
  display: flex;
  gap: 0.6rem;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.mockup-card {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.mockup-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
}

.mockup-body {
  padding: 0.85rem;
  font-size: 0.82rem;
}

/* Job Progress Status Banner */
.job-status-banner {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.job-status-banner.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Developer CLI & Raw JSON Inspector */
.inspector-card {
  margin-top: 1.25rem;
  background: var(--brand-dark-ink);
  color: #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #334155;
}

.inspector-header {
  padding: 0.8rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  font-weight: 600;
}

.inspector-body {
  padding: 1rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inspector-pre {
  background: #0f172a;
  color: #cbd5e1;
  padding: 0.85rem;
  border-radius: 10px;
  font-size: 0.78rem;
  max-height: 300px;
  overflow: auto;
  margin: 0.4rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2.6rem 1.25rem;
  color: var(--text-muted);
}

.empty-state h4 {
  margin: 0 0 0.4rem;
  color: var(--brand-dark-ink);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-box.modal-box-pay {
  max-width: 560px;
}

.sso-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  margin-bottom: 0.75rem;
}

.btn-google-sso {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.btn-google-sso:hover {
  background: #f8fafc;
  border-color: var(--brand-deep-teal);
  transform: translateY(-1px);
}

.sso-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.95rem 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.pay-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.pay-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.pay-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.pay-plan-card:hover {
  border-color: rgba(21, 122, 125, 0.45);
}

.pay-plan-card.active {
  border-color: var(--brand-deep-teal);
  background: linear-gradient(135deg, rgba(14, 77, 79, 0.06), rgba(126, 226, 198, 0.16));
}

.pay-plan-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
  white-space: nowrap;
}

.pay-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pay-method-tab {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-method-tab.active {
  border-color: var(--brand-deep-teal);
  background: var(--brand-deep-teal);
  color: #ffffff;
}

.pay-method-tab:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.pay-qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.9rem;
}

.pay-qr-frame img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.45rem;
  border: 1px solid #e2e8f0;
}

.pay-fee-box {
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  margin-bottom: 1rem;
}

.pay-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.28rem 0;
}

.pay-fee-row.total {
  margin-top: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #cbd5e1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
}

/* Admin Tables */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th, .data-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: #f8fafc;
}

/* Footer */
.site-footer {
  background: var(--brand-dark-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.86rem;
}

.footer-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 1040px) {
  .hero-grid, .studio-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid-3 {
    grid-template-columns: 1fr;
  }
  .arch-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .arch-strip {
    grid-template-columns: 1fr;
  }
  .chat-composer {
    flex-direction: column;
  }
}

/* ============================================================================
   Kumi Photo Retouch 4K & Creative Image Studio (Ported from kumivo.com/kumi)
   ============================================================================ */
.creative-grid {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.creative-side-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.05rem;
}

.creative-stage-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.05rem;
  min-height: 460px;
}

.submode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: #f1f5f9;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.submode-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.52rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.submode-btn:hover {
  color: var(--brand-deep-teal);
}

.submode-btn.active {
  background: #ffffff;
  color: var(--brand-deep-teal);
  border-color: rgba(21, 122, 125, 0.25);
  box-shadow: 0 2px 8px rgba(14, 77, 79, 0.08);
}

.upload-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 1.15rem 0.9rem;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--brand-teal);
  background: #f0fdfa;
}

.upload-preview-box {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
}

.upload-preview-box img {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.upload-preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}

.ref-thumbs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.ref-thumb-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
  aspect-ratio: 1 / 1;
}

.ref-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.retouch-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.style-preset-card {
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.style-preset-card:hover {
  border-color: rgba(21, 122, 125, 0.45);
}

.style-preset-card.active {
  border-color: var(--brand-deep-teal);
  background: linear-gradient(135deg, rgba(14, 77, 79, 0.06), rgba(126, 226, 198, 0.18));
  box-shadow: 0 2px 8px rgba(14, 77, 79, 0.08);
}

.style-preset-card .preset-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
}

.style-preset-card .preset-desc {
  display: block;
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.16rem;
}

.kumi-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.kumi-pill {
  padding: 0.32rem 0.66rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.14s ease;
}

.kumi-pill:hover {
  border-color: var(--brand-teal);
  color: var(--brand-deep-teal);
}

.kumi-pill.active {
  background: var(--brand-deep-teal);
  border-color: var(--brand-deep-teal);
  color: #ffffff;
}

.toggle-4k-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.6rem 0.78rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  margin: 0.75rem 0;
  font-size: 0.81rem;
  font-weight: 600;
}

/* Before / After Comparison Modes (Side-by-Side, Interactive Slider, Single) */
.compare-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.compare-pane {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-pane img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}

.compare-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.compare-badge.after {
  left: auto;
  right: 10px;
  background: rgba(14, 77, 79, 0.9);
  border: 1px solid rgba(183, 241, 90, 0.55);
}

.ba-slider-stage {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
  user-select: none;
  touch-action: none;
}

.ba-slider-stage img.ba-after-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.ba-before-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ba-before-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ba-divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
  z-index: 5;
  pointer-events: none;
}

.ba-divider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand-deep-teal);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 6;
  cursor: ew-resize;
}

.retouch-finetune-card {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f0fdfa 100%);
  border: 1px solid rgba(21, 122, 125, 0.22);
}

.finetune-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.finetune-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

.finetune-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.48rem 0.68rem;
}

.finetune-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
  margin-bottom: 0.22rem;
}

.finetune-range {
  width: 100%;
  accent-color: var(--brand-deep-teal);
  cursor: pointer;
}

.retouch-history-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.history-thumb-card {
  position: relative;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.history-thumb-card:hover,
.history-thumb-card.active {
  border-color: var(--brand-deep-teal);
  transform: translateY(-1px);
}

.history-thumb-card img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  display: block;
}

.history-thumb-meta {
  padding: 0.32rem 0.45rem;
  font-size: 0.69rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* Lightbox & Sticker Splitter Modals */
.modal-box.modal-box-wide {
  max-width: 780px;
}

.lightbox-img-wrap {
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 74vh;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.sticker-slice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.sticker-slice-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.sticker-cell-card {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.5rem;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 14px 14px;
  text-align: center;
}

.sticker-cell-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  display: block;
  margin-bottom: 0.35rem;
}

@media (max-width: 980px) {
  .creative-grid {
    grid-template-columns: 1fr;
  }
  .compare-split-grid,
  .finetune-grid {
    grid-template-columns: 1fr;
  }
  .sticker-slice-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   Minimalist App UI — Desktop & Native Mobile Shell (AI.Kumivo.com)
   ============================================================================ */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.mobile-drawer-locked {
  overflow: hidden !important;
}

@media (min-width: 861px) {
  .app-mobile-only,
  .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .app-desktop-only {
    display: none !important;
  }
}

/* --- Minimalist Single-Row App Bar --- */
body.studio-app-body .topbar,
body.sale-page-body .topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #eef2f6;
}

.studio-topbar-inner {
  max-width: 1240px;
  height: 56px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

body.studio-app-body .brand-group,
body.sale-page-body .brand-group {
  gap: 0.55rem;
  min-width: 0;
  flex-shrink: 0;
}

body.studio-app-body .brand-avatar,
body.sale-page-body .brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  padding: 2px;
  flex-shrink: 0;
}

body.studio-app-body .brand-title,
body.sale-page-body .brand-title {
  font-size: 0.98rem;
  font-weight: 700;
  gap: 0.38rem;
  white-space: nowrap;
}

.mobile-worker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: #f59e0b;
}

.mobile-worker-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.mobile-worker-dot.offline {
  background: #f59e0b;
}

/* Segmented Mode Switcher (Desktop > 860px) */
.header-seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.header-seg-tabs .tab-btn {
  padding: 0.36rem 0.92rem;
  border-radius: 999px;
  border: none;
  margin: 0;
  font-size: 0.83rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  transition: all 0.16s ease;
}

.header-seg-tabs .tab-btn:hover {
  color: var(--brand-deep-teal);
}

.header-seg-tabs .tab-btn.active {
  background: #ffffff;
  color: var(--brand-deep-teal);
  margin: 0;
  padding: 0.36rem 0.92rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.header-seg-tabs .tab-count {
  font-size: 0.68rem;
  padding: 0.04rem 0.42rem;
}

/* Minimal Right Header Actions */
.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-shrink: 0;
}

.header-pill-btn {
  height: 34px;
  padding: 0 0.78rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--brand-deep-teal);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.header-pill-btn:hover {
  border-color: var(--brand-teal);
  background: #f8fafc;
}

.header-auth-pill {
  height: 34px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: none;
  background: var(--brand-deep-teal);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.header-auth-pill:hover {
  background: var(--brand-teal);
}

.header-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.header-menu-btn:hover,
.header-menu-btn.active {
  border-color: var(--brand-teal);
  color: var(--brand-deep-teal);
  background: #f8fafc;
}

/* --- Unified Menu Drawer (Desktop Slide-Over & Mobile Bottom Sheet) --- */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body.studio-app-body .studio-toolbar.studio-drawer {
  display: none;
  margin: 0;
}

body.studio-app-body .studio-toolbar.studio-drawer.drawer-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.85rem;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 92vw;
  z-index: 95;
  padding: 1.15rem;
  background: #ffffff;
  border: none;
  border-left: 1px solid var(--border-subtle);
  border-radius: 20px 0 0 20px;
  box-shadow: -16px 0 42px rgba(15, 23, 42, 0.15);
  overflow-y: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #f1f5f9;
}

.drawer-title {
  font-size: 0.96rem;
  color: var(--brand-deep-teal);
  display: block;
}

.drawer-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-section {
  padding: 0.8rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.mobile-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mobile-account-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand-deep-teal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-account-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.drawer-quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.drawer-quota-row .quota-badge {
  font-size: 0.74rem;
  padding: 0.32rem 0.65rem;
  flex: 1;
  justify-content: center;
}

.mobile-account-actions {
  display: flex;
  gap: 0.45rem;
}

.drawer-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  margin: 0;
}

.drawer-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.drawer-conv-pill {
  font-size: 0.68rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-select,
.drawer-input {
  padding: 0.48rem 0.72rem;
  font-size: 0.83rem;
  border-radius: 10px;
}

.drawer-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.drawer-hint:empty {
  display: none;
}

.drawer-btn-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.drawer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

/* --- Compact Dismissible Banner --- */
body.studio-app-body .job-status-banner {
  max-width: 780px;
  width: calc(100% - 1.5rem);
  margin: 0.5rem auto;
  padding: 0.45rem 0.82rem;
  border-radius: 12px;
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.banner-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.banner-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.07);
  color: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   TAB 1: Minimalist Full-Viewport Chat AI (Desktop & Mobile)
   ============================================================================ */
body.studio-app-body[data-active-tab="chat"] {
  background: #ffffff;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.studio-app-body[data-active-tab="chat"] .studio-topbar {
  flex: 0 0 auto;
}

body.studio-app-body[data-active-tab="chat"] .studio-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.studio-app-body[data-active-tab="chat"] .studio-main-card {
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

body.studio-app-body[data-active-tab="chat"] .studio-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.studio-app-body[data-active-tab="chat"] .chat-tab-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.studio-app-body[data-active-tab="chat"] .chat-stream {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
  margin: 0;
  padding: 1.25rem max(1rem, calc(50% - 390px));
  background: #ffffff;
  border: none;
  border-radius: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-empty-state {
  margin: auto 0;
  padding: 1.5rem 0.5rem;
  text-align: center;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.chat-empty-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  object-fit: contain;
}

.chat-empty-state h4 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--brand-dark-ink);
  letter-spacing: -0.01em;
}

.chat-starter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  max-width: 560px;
}

.chat-starter-row .chip-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.chat-starter-row .chip-btn:hover {
  border-color: var(--brand-teal);
  color: var(--brand-deep-teal);
  background: #f0fdfa;
}

body.studio-app-body .chat-bubble {
  min-width: 0;
}

body.studio-app-body .chat-bubble.user {
  border-radius: 18px 18px 4px 18px;
  padding: 0.68rem 0.98rem;
  max-width: 82%;
}

body.studio-app-body .chat-bubble.assistant {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 18px 18px 18px 4px;
  padding: 0.72rem 1rem;
  max-width: 88%;
}

.chat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.36rem;
}

.chat-footer .chat-meta {
  margin-top: 0;
}

.chat-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.16rem 0.46rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 0.71rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.chat-bubble.assistant .chat-copy-btn {
  color: #64748b;
}

.chat-bubble.assistant .chat-copy-btn:hover {
  color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.09);
}

.chat-bubble.assistant .chat-copy-btn.copied {
  color: #059669;
  background: #ecfdf5;
  font-weight: 600;
}

.chat-bubble.user .chat-copy-btn {
  color: rgba(255, 255, 255, 0.78);
}

.chat-bubble.user .chat-copy-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.chat-bubble.user .chat-copy-btn.copied {
  color: var(--brand-mint);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 600;
}

.chat-code-card {
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #0f172a;
  color: #e2e8f0;
}

.chat-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.34rem 0.68rem;
  background: #1e293b;
  font-size: 0.72rem;
  color: #94a3b8;
}

.chat-code-head .chat-copy-code-btn {
  color: #cbd5e1;
}

.chat-code-head .chat-copy-code-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.chat-code-head .chat-copy-code-btn.copied {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  font-weight: 600;
}

.chat-code-pre {
  margin: 0;
  padding: 0.72rem 0.85rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #f1f5f9;
  white-space: pre;
}

.chat-composer-shell {
  flex: 0 0 auto;
  width: 100%;
  padding: 0.45rem max(0.85rem, calc(50% - 390px)) 1.1rem;
  background: #ffffff;
}

.chat-composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
  padding: 0.36rem 0.42rem 0.36rem 1rem;
  border-radius: 26px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chat-composer-bar:focus-within {
  background: #ffffff;
  border-color: var(--brand-teal);
  box-shadow: 0 6px 22px rgba(21, 122, 125, 0.12);
}

.chat-composer-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  max-height: 150px;
  height: 38px;
  padding: 0.42rem 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: none;
}

.chat-send-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--brand-deep-teal);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.chat-send-circle:hover:not(:disabled) {
  background: var(--brand-teal);
  transform: scale(1.04);
}

.chat-send-circle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================================================================
   TABS 2 & 3: Progressive-Disclosure Retouch 4K & AI Image Studio
   ============================================================================ */
body.studio-app-body[data-active-tab="retouch"],
body.studio-app-body[data-active-tab="image"] {
  background: #f8fafc;
}

body.studio-app-body[data-active-tab="retouch"] .studio-shell,
body.studio-app-body[data-active-tab="image"] .studio-shell {
  max-width: 1140px;
  padding: 1.15rem 1.25rem 2.5rem;
}

body.studio-app-body[data-active-tab="retouch"] .studio-main-card,
body.studio-app-body[data-active-tab="image"] .studio-main-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body.studio-app-body[data-active-tab="retouch"] .studio-panel-body,
body.studio-app-body[data-active-tab="image"] .studio-panel-body {
  padding: 0;
}

body.studio-app-body .creative-grid {
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

body.studio-app-body .creative-side-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.05rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body.studio-app-body .creative-stage-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.1rem;
  min-height: 410px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.compact-block {
  margin-bottom: 0.8rem;
}

body.studio-app-body .submode-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.24rem;
  border-radius: 12px;
  background: #f1f5f9;
  border: none;
  margin-bottom: 0.85rem;
}

body.studio-app-body .submode-bar.submode-bar-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.studio-app-body .submode-btn {
  padding: 0.45rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9px;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-dropzone-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.upload-icon-inline {
  font-size: 1.15rem;
  line-height: 1;
}

.upload-title-inline {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-deep-teal);
}

.style-preset-card.preset-compact {
  padding: 0.55rem 0.65rem;
  border-radius: 11px;
  text-align: center;
}

.style-preset-card.preset-compact .preset-title {
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.studio-app-body .retouch-style-grid {
  margin-bottom: 0;
}

.prompt-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.38rem;
}

.inline-attach-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--brand-deep-teal);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.inline-attach-pill:hover {
  border-color: var(--brand-teal);
  background: #f0fdfa;
}

.creative-textarea {
  min-height: 68px;
  max-height: 150px;
  padding: 0.56rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 12px;
}

/* Native Progressive Disclosure (<details>) */
details.advanced-fold {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 0.85rem;
  padding: 0.52rem 0.78rem;
}

details.advanced-fold > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

details.advanced-fold > summary::-webkit-details-marker {
  display: none;
}

details.advanced-fold > summary::after {
  content: "▾";
  font-size: 0.78rem;
  color: #64748b;
  transition: transform 0.16s ease;
}

details.advanced-fold[open] > summary::after {
  transform: rotate(180deg);
}

.advanced-fold-body {
  padding-top: 0.68rem;
  margin-top: 0.52rem;
  border-top: 1px solid #e2e8f0;
}

.studio-primary-cta {
  width: 100%;
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
  border-radius: 12px;
}

.studio-empty-minimal {
  margin: auto;
  padding: 2.5rem 1rem;
  text-align: center;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.empty-icon-soft {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.empty-title-soft {
  font-size: 0.88rem;
  font-weight: 500;
  color: #94a3b8;
}

body.studio-app-body .inspector-card {
  max-width: 780px;
  width: calc(100% - 1.5rem);
  margin: 0.4rem auto 1rem;
  flex: 0 0 auto;
  max-height: 34dvh;
  overflow-y: auto;
}

/* ============================================================================
   Minimalist Sale Landing Page (/)
   ============================================================================ */
.sale-hero-minimal {
  padding: 4.5rem 0 3.75rem;
}

.sale-hero-center {
  max-width: 740px;
  text-align: center;
  margin: 0 auto;
}

.sale-hero-center .hero-desc {
  margin: 0 auto 1.75rem;
  max-width: 580px;
}

.sale-cta-center {
  justify-content: center;
  margin-bottom: 0;
}

.sale-features-minimal {
  padding: 3rem 0 3.5rem;
}

.sale-footer-minimal .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-links-row {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* ============================================================================
   MOBILE APPLICATION VIEWPORT (<= 860px)
   ============================================================================ */
@media (max-width: 860px) {
  /* Prevent iOS Safari input auto-zoom */
  input,
  select,
  textarea,
  .input,
  .select,
  .textarea {
    font-size: 16px !important;
  }

  .studio-topbar-inner {
    height: 52px;
    padding: 0 0.75rem;
    gap: 0.45rem;
  }

  .header-pill-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 700;
  }

  .header-auth-pill {
    height: 32px;
    padding: 0 0.68rem;
    font-size: 0.75rem;
  }

  .header-menu-btn {
    width: 34px;
    height: 34px;
  }

  /* Native Mobile Bottom App Navigation Bar */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.24rem 0.35rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #eef2f6;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
  }

  .mobile-nav-item {
    min-height: 46px;
    padding: 0.18rem 0.15rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item.active {
    color: var(--brand-deep-teal);
    background: rgba(21, 122, 125, 0.09);
    font-weight: 700;
  }

  .mobile-nav-icon {
    position: relative;
    font-size: 1.06rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-label {
    font-size: 0.66rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .mobile-nav-badge {
    position: absolute;
    top: -5px;
    right: -13px;
    min-width: 15px;
    height: 14px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--brand-deep-teal);
    color: #ffffff;
    font-size: 0.56rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
  }

  /* Bottom Sheet Menu Drawer on Mobile */
  body.studio-app-body .studio-toolbar.studio-drawer.drawer-open {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85dvh;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    border-radius: 22px 22px 0 0;
    padding: 0.55rem 0.95rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.22);
    gap: 0.7rem;
  }

  .mobile-drawer-grabber {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 0 auto 0.1rem;
  }

  /* Mobile Chat Adjustments */
  body.studio-app-body[data-active-tab="chat"] .chat-tab-pane {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  body.studio-app-body[data-active-tab="chat"] .chat-stream {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .chat-empty-state {
    padding: 1.25rem 0.5rem;
  }

  .chat-empty-state h4 {
    font-size: 1.04rem;
  }

  .chat-composer-shell {
    padding: 0.35rem 0.65rem 0.55rem;
  }

  /* Mobile Retouch 4K & AI Image Studio */
  body.studio-app-body[data-active-tab="retouch"] .studio-shell,
  body.studio-app-body[data-active-tab="image"] .studio-shell {
    padding: 0.65rem 0.65rem calc(74px + env(safe-area-inset-bottom, 0px));
  }

  body.studio-app-body .creative-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  body.studio-app-body .creative-side-card,
  body.studio-app-body .creative-stage-card {
    padding: 0.85rem;
    border-radius: 16px;
    min-width: 0;
  }

  /* Hide empty right-hand stage cards on mobile so there is zero clutter below CTA */
  body.studio-app-body .creative-stage-card.stage-empty {
    display: none !important;
  }

  .mobile-scroll-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.36rem;
    padding-bottom: 0.1rem;
  }

  .mobile-scroll-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-scroll-strip .kumi-pill,
  .mobile-scroll-strip .chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .retouch-actions-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .retouch-actions-row .btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .image-gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  body.studio-app-body .inspector-card {
    margin-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  /* Bottom-Sheet Modals on Mobile */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box,
  .modal-box.modal-box-pay,
  .modal-box.modal-box-wide {
    max-width: 100%;
    max-height: 90dvh;
    border-radius: 22px 22px 0 0;
    padding: 1.05rem 0.95rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  }

  .pay-method-tabs {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .pay-qr-frame img {
    width: 184px;
    height: 184px;
  }

  /* Mobile Sale Page (/) */
  body.sale-page-body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  body.sale-page-body .sale-nav-actions {
    gap: 0.38rem;
    flex-wrap: nowrap;
  }

  .sale-hero-minimal {
    padding: 2rem 0 1.85rem;
  }

  .sale-hero-center .hero-title {
    font-size: 1.56rem;
    line-height: 1.25;
  }

  .sale-hero-center .hero-desc {
    font-size: 0.88rem;
    margin-bottom: 1.15rem;
  }

  .sale-cta-center {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sale-cta-center .btn {
    width: 100%;
  }

  .sale-features-minimal {
    padding: 1.75rem 0 2rem;
  }

  .feature-grid-3 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .sale-footer-minimal {
    padding: 1.5rem 1rem;
    font-size: 0.78rem;
  }

  .footer-links-row {
    gap: 0.6rem 0.95rem;
  }
}

/* ============================================================================
   Admin Model Mapping Editor & Studio Saved Threads List
   ============================================================================ */
.admin-model-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.admin-model-table td {
  vertical-align: top;
  padding: 0.6rem 0.65rem;
}

.admin-model-table tr.row-disabled {
  opacity: 0.52;
  background: #f8fafc;
}

.admin-cell-input {
  width: 100%;
  padding: 0.36rem 0.55rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.effort-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.effort-badge.effort-low {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.effort-badge.effort-medium {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.effort-badge.effort-high {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.effort-badge.effort-xhigh {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.drawer-threads-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 184px;
  overflow-y: auto;
  margin-bottom: 0.45rem;
  padding-right: 0.1rem;
}

.drawer-thread-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drawer-thread-item:hover {
  border-color: rgba(21, 122, 125, 0.4);
  background: #f8fafc;
}

.drawer-thread-item.active {
  border-color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.08);
  font-weight: 600;
}

.drawer-thread-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.drawer-thread-count {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PWA Installable App Buttons & Responsive Guide Modal / Bottom Sheet
   ========================================================================== */
.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  border: 1.5px solid rgba(13, 148, 136, 0.35);
  background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.btn-pwa-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(14, 77, 79, 0.12);
}

.is-pwa-standalone [data-install-pwa] {
  display: none !important;
}

.pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pwa-modal.hidden {
  display: none !important;
}

.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

.pwa-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.3rem 1.3rem 1.2rem;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.24);
  border: 1px solid #e2e8f0;
}

.pwa-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  cursor: pointer;
}

.pwa-modal-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-right: 1.8rem;
  margin-bottom: 0.95rem;
}

.pwa-modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.16);
}

.pwa-modal-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0e4d4f;
}

.pwa-modal-sub {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 0.1rem;
}

.pwa-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.05rem;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.68rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #1e293b;
}

.pwa-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #0e4d4f;
  color: #ecfdf5;
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.pwa-modal-btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .btn-pwa-install {
    padding: 0.34rem 0.52rem;
    font-size: 0.74rem;
  }

  .pwa-modal {
    align-items: flex-end;
    padding: 0;
  }

  .pwa-modal-card {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 1.2rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  }
}
