﻿:root {
  --bg: #06051a;
  --bg2: #0f0b2e;
  --card: rgba(255, 255, 255, 0.08);
  --card-solid: #ffffff;
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --ink: #151827;
  --soft: #f7f7fb;
  --primary: #7b4dff;
  --primary2: #16e4bd;
  --danger: #ff5d71;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: radial-gradient(circle at 50% 0%, #24105a 0, #08051d 44%, #03020d 100%); }
a { color: inherit; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden, .hidden-select { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(7, 5, 29, 0.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.brand { min-width: 0; flex: 0 1 auto; }
.brand img { width: min(320px, 26vw); max-width: 100%; height: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); color: var(--muted); font-size: 15px; white-space: nowrap; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: #fff; }
.user-chip { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.plain-btn { min-height: 34px; padding: 0 14px; color: #fff; background: rgba(255,255,255,.1); border-radius: 999px; }
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  place-content: center;
  gap: 5px;
  flex: 0 0 auto;
  color: #fff;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
}
.mobile-nav-toggle span { width: 20px; height: 2px; display: block; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
.mobile-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background-size: cover;
  background-position: center top;
}
.lightfall-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .82; mix-blend-mode: screen; }
.lightfall-layer canvas { width: 100%; height: 100%; display: block; }
.lightfall-layer.motion-static { background: rgba(82, 39, 255, .2); }
.hero-inner { position: relative; z-index: 2; width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 118px 0 40px; text-align: center; }
.top-tip { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 18px; margin: 0 0 20px; color: #c4fff4; background: rgba(22,228,189,.12); border: 1px solid rgba(22,228,189,.28); border-radius: 999px; }
h1 { margin: 0; font-size: clamp(46px, 7vw, 86px); line-height: 1.05; letter-spacing: 0; }
.hero-subtitle { width: min(720px, 100%); margin: 22px auto 34px; color: var(--muted); font-size: 20px; line-height: 1.8; }
.hero-create { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 10px; width: min(720px, 100%); padding: 10px; margin: 0 auto; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.hero-create input { height: 56px; padding: 0 20px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid transparent; border-radius: 12px; outline: none; }
.hero-create input::placeholder { color: rgba(255,255,255,.55); }
.hero-create button, .generate-btn { min-height: 56px; color: #07051e; background: linear-gradient(135deg, #1affc7, #ccff35); border-radius: 12px; font-weight: 900; }
.hero-points { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); }
.hero-points strong { color: #ccff35; }
.logo-rain { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(6, 96px); gap: 24px; justify-content: center; width: min(900px, 100%); margin: 24px auto 0; padding-bottom: 56px; }
.logo-rain img { width: 96px; height: 96px; object-fit: contain; padding: 14px; background: rgba(255,255,255,.92); border-radius: 22px; box-shadow: 0 16px 46px rgba(0,0,0,.28); }
.logo-rain img:nth-child(2n) { transform: translateY(18px); }
.logo-rain img:nth-child(3n) { transform: translateY(-10px); }

.panel { background: rgba(255,255,255,.94); color: var(--ink); border: 1px solid rgba(255,255,255,.55); border-radius: 24px; box-shadow: 0 26px 70px rgba(0,0,0,.22); }
.creator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); gap: 24px; width: min(1180px, calc(100% - 40px)); margin: 36px auto 88px; position: relative; z-index: 3; scroll-margin-top: 104px; isolation: isolate; }
.soft-aurora-layer {
  position: absolute;
  top: -90px;
  bottom: -92px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .88;
}
.soft-aurora-layer canvas { width: 100%; height: 100%; display: block; }
.soft-aurora-layer.motion-static { background: rgba(123, 77, 255, .12); }
.creator > .panel { position: relative; z-index: 1; }
.form-panel, .result-panel { padding: 28px; }
.result-panel { display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; width: min(1180px, calc(100% - 40px)); margin: 0 auto 22px; }
.panel-head.compact { display: block; width: auto; margin: 0 0 22px; }
.panel-head.centered { display: block; text-align: center; }
.panel-head span { display: block; margin-bottom: 8px; color: var(--primary); font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.panel-head h2 { margin: 0; font-size: 30px; letter-spacing: 0; }
.panel-head p { margin: 8px 0 0; color: #6b7280; }

.logo-form { display: grid; gap: 18px; }
.logo-form label { display: grid; gap: 8px; color: #303447; font-weight: 800; }
.optional-text { color: #9ca3af; font-style: normal; font-weight: 500; font-size: 13px; }
.logo-form input, .account-card input { width: 100%; min-height: 50px; padding: 0 16px; color: var(--ink); background: #f6f7fb; border: 1px solid #e5e7ef; border-radius: 12px; outline: none; }
.logo-form input:focus, .account-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(123,77,255,.1); }
.field-group { display: grid; gap: 10px; }
.field-title { color: #303447; font-weight: 900; }
.segmented, .option-grid, .palette-grid, .mode-grid { display: grid; gap: 10px; }
.segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.palette-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.segmented button, .option-grid button, .palette-grid button, .mode-grid button { min-height: 46px; color: #34384d; background: #f3f4f9; border: 1px solid #e5e7ef; border-radius: 12px; font-weight: 800; }
.segmented button.selected, .option-grid button.selected, .palette-grid button.selected, .mode-grid button.selected { color: #fff; background: linear-gradient(135deg, #7b4dff, #34d9bf); border-color: transparent; }
.mode-grid button { min-height: 50px; font-size: 15px; }
.palette-grid button { display: grid; place-items: center; gap: 6px; min-height: 66px; font-size: 13px; }
.palette-grid i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.65); }
.form-message { min-height: 24px; margin: 0; color: #667085; line-height: 1.6; }
.form-message.success { color: #059669; font-weight: 900; }
.form-message.error { color: var(--danger); }
.preview-stage { display: grid; place-items: center; min-height: 428px; overflow: hidden; background: linear-gradient(145deg, #f6f7fb, #ebeef8); border: 1px dashed #d8ddec; border-radius: 20px; text-align: center; }
.preview-stage img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.preview-placeholder { display: grid; place-items: center; width: 132px; height: 132px; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, #7b4dff, #16e4bd); border-radius: 30px; font-size: 46px; font-weight: 900; }
.result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.download-btn { display: grid; place-items: center; min-height: 54px; color: #07051e; background: linear-gradient(135deg, #1affc7, #ccff35); border-radius: 14px; text-decoration: none; font-weight: 900; }
.secondary-action { display: grid; place-items: center; min-height: 54px; color: #151827; background: #edf0f8; border: 1px solid #dfe5f0; border-radius: 14px; text-decoration: none; font-weight: 900; }
.result-disclaimer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.result-disclaimer-note { min-width: 0; color: #8b8d96; font-size: 16px; line-height: 1.5; }
.result-disclaimer button {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  color: #707176;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  font-size: 13px;
  font-weight: 900;
}
.disclaimer-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  color: #707176;
  border: 1.5px solid #707176;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}
.disclaimer-bubble {
  position: absolute;
  right: 0;
  bottom: 42px;
  z-index: 10;
  width: min(430px, calc(100vw - 48px));
  padding: 14px 16px;
  color: #707176;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15,23,42,.18);
  font-size: 14px;
  line-height: 1.62;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.disclaimer-bubble::after {
  content: "";
  position: absolute;
  right: 38px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid #e8ecf4;
  border-bottom: 1px solid #e8ecf4;
  transform: rotate(45deg);
}
.result-disclaimer button:hover + .disclaimer-bubble,
.result-disclaimer button:focus + .disclaimer-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.account, .cases, .records { width: min(1180px, calc(100% - 40px)); margin: 0 auto 88px; }
.account > .panel-head, .cases > .panel-head, .records > .panel-head { width: auto; color: #fff; }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.account-card, .recharge-panel { padding: 22px; color: var(--ink); background: #fff; border-radius: 20px; box-shadow: 0 22px 60px rgba(0,0,0,.18); }
.account-card { display: grid; gap: 12px; }
.account-card h3 { margin: 0 0 4px; }
.account-card button, .plan-card button { min-height: 46px; color: #fff; background: #151827; border-radius: 12px; font-weight: 900; }
.balance-card strong { font-size: 36px; color: var(--primary); }
.balance-card p { margin: 0; color: #6b7280; line-height: 1.6; }
.recharge-panel { margin-top: 20px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan-card { padding: 18px; background: #f7f8fc; border: 1px solid #e8ebf4; border-radius: 16px; }
.plan-card span { color: #6b7280; }
.plan-card strong { display: block; margin: 8px 0; font-size: 28px; }
.plan-card p { margin: 0 0 14px; color: var(--primary); font-weight: 900; }
.plan-card button { width: 100%; margin-top: 8px; }
.plan-card button.ghost { color: #151827; background: #edf0f8; }
.pay-box { position: relative; display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 14px; color: var(--ink); background: #fff; border: 1px solid #e8ebf4; border-radius: 16px; }
.pay-box img { width: 150px; height: 150px; border-radius: 10px; border: 1px solid #e5e7ef; }
.pay-box strong, .pay-box span { display: block; }
.pay-box span { margin-top: 8px; color: #6b7280; }
.pay-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; color: #64748b; background: #f1f4f8; border-radius: 50%; font-size: 22px; line-height: 1; }
.case-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.case-strip img, .record-card img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px; background: rgba(255,255,255,.94); border-radius: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.record-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.record-card { padding: 14px; color: var(--ink); background: #fff; border-radius: 20px; }
.record-card strong { display: block; margin-top: 12px; }
.record-card p { margin: 6px 0 10px; color: #6b7280; }
.record-card a { color: var(--primary); font-weight: 900; text-decoration: none; }
.footer { display: flex; align-items: center; flex-direction: column; gap: 12px; padding: 32px 20px 48px; color: var(--muted); text-align: center; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-service strong { color: rgba(255,255,255,.92); font-weight: 800; }
.footer-filing { font-size: 13px; }
.footer-filing a { color: rgba(255,255,255,.58); }

@media (max-width: 980px) {
  .site-header { padding-left: 18px; padding-right: 18px; }
  .brand img { width: 220px; }
  .mobile-nav-toggle { display: grid; order: 3; }
  .user-chip { margin-left: auto; order: 2; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 18px;
    right: 18px;
    order: 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 12px;
    background: #0b0826;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,.34);
    white-space: normal;
  }
  .main-nav.open { display: grid; }
  .main-nav a { min-height: 42px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; }
  .main-nav a:hover { background: rgba(255,255,255,.08); }
  .creator, .account-grid, .plan-grid { grid-template-columns: 1fr; }
  .logo-rain { grid-template-columns: repeat(4, 80px); gap: 16px; }
  .logo-rain img { width: 80px; height: 80px; }
  .case-strip, .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-header { height: 64px; padding: 10px 12px; align-items: center; gap: 8px; }
  .brand img { width: min(156px, calc(100vw - 142px)); min-width: 120px; }
  .user-chip { gap: 6px; }
  .user-chip #userBadge { display: none; }
  .plain-btn { min-height: 38px; padding: 0 10px; border-radius: 8px; }
  .main-nav { left: 12px; right: 12px; grid-template-columns: 1fr; }
  .hero { min-height: 680px; }
  .hero-inner { padding-top: 72px; }
  .hero-inner h1 { font-size: 38px; overflow-wrap: anywhere; }
  .hero-subtitle { font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
  .hero-create { grid-template-columns: 1fr; }
  .hero-points { display: grid; gap: 7px; font-size: 14px; }
  .logo-rain { grid-template-columns: repeat(3, 76px); gap: 12px; }
  .logo-rain img { width: 76px; height: 76px; }
  .option-grid, .palette-grid, .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-strip, .record-grid { grid-template-columns: 1fr; }
  #rechargeMessage:has(.pay-box) {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 100;
    max-height: calc(100vh - 24px);
    margin: 0;
    padding: 0;
    overflow: auto;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    box-shadow: 0 18px 54px rgba(15,23,42,.28);
  }
  #rechargeMessage:has(.pay-box) .pay-box {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0;
    padding: 18px;
    border: 0;
    border-radius: 14px;
  }
  #rechargeMessage:has(.pay-box) .pay-box img { grid-row: span 2; }
  #rechargeMessage:has(.pay-box) .pay-box > div { padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lightfall-layer canvas, .soft-aurora-layer canvas { display: none; }
}

/* Standalone auth pages */
.auth-page {
  min-height: 100vh;
  color: #111827;
  background:
    radial-gradient(circle at 52% 8%, rgba(118, 122, 255, .18), transparent 26%),
    radial-gradient(circle at 0% 72%, rgba(54, 211, 191, .18), transparent 25%),
    #fff;
}
.auth-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid #eef0f5;
}
.auth-brand img { width: 148px; display: block; }
.auth-header nav, .auth-actions { display: flex; align-items: center; gap: 28px; }
.auth-header a { color: #111827; text-decoration: none; font-weight: 800; }
.auth-actions { gap: 12px; }
.blue-pill { color: #fff !important; background: #0969ff; min-height: 36px; padding: 8px 14px; border-radius: 999px; }
.auth-main { min-height: calc(100vh - 74px); display: grid; place-items: start center; padding: 70px 20px 60px; }
.register-main { padding-top: 48px; }
.auth-card {
  width: min(384px, 100%);
  padding: 34px 18px 30px;
  background: rgba(255,255,255,.92);
  border: 1px solid #e8ebf2;
  border-radius: 14px;
  box-shadow: 0 20px 70px rgba(26, 30, 50, .08);
}
.register-card { width: min(416px, 100%); }
.auth-logo { width: 42px; height: 42px; object-fit: contain; display: block; margin: -88px auto 18px; }
.register-card .auth-logo { margin-top: -68px; }
.auth-card h1 { color: #111827; text-align: center; font-size: 28px; margin-bottom: 42px; }
.auth-form { display: grid; gap: 22px; }
.auth-form label { display: grid; gap: 8px; color: #111827; font-weight: 900; }
.auth-form input {
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  color: #111827;
  background: #edf4ff;
  border: 0;
  border-radius: 6px;
  outline: none;
}
.auth-form input:focus { box-shadow: 0 0 0 3px rgba(9, 105, 255, .12); }
.auth-form button[type="submit"] {
  min-height: 34px;
  color: #fff;
  background: #0969ff;
  border-radius: 999px;
  font-weight: 900;
}
.auth-form button:disabled { color: #8b95a7; background: #e5e7eb; cursor: not-allowed; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; }
.code-row button {
  min-height: 32px;
  color: #0969ff;
  background: #eaf2ff;
  border-radius: 6px;
  font-weight: 900;
}
.agree-row { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; font-weight: 500 !important; font-size: 13px; }
.agree-row input { width: 16px; min-height: 16px; }
.agree-row a { color: #0969ff; text-decoration: none; font-weight: 800; }
.auth-switch { margin: 22px 0 0; color: #111827; text-align: center; }
.auth-switch a { color: #0969ff; text-decoration: none; font-weight: 900; }

/* Legal pages */
.legal-page { min-height: 100vh; color: #1f2937; background: #f6f8fc; }
.legal-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: #fff;
  border-bottom: 1px solid #e7ebf2;
}
.legal-header img { width: 148px; max-width: 100%; display: block; }
.legal-header nav { display: flex; align-items: center; gap: 24px; }
.legal-header a { color: #263244; text-decoration: none; font-weight: 800; }
.legal-header a:hover { color: #7554ff; }
.legal-main { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 80px; }
.legal-main h1 { margin: 0; color: #111827; font-size: 36px; line-height: 1.25; }
.legal-updated { margin: 12px 0 28px; color: #7c8799; }
.legal-main section { padding: 22px 0; border-top: 1px solid #e1e6ee; }
.legal-main h2 { margin: 0 0 12px; color: #202838; font-size: 19px; }
.legal-main p { margin: 8px 0 0; color: #526074; line-height: 1.9; }

/* Dashboard */
.dashboard-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  color: #111827;
  background: #f8fafc;
}
.dashboard-side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 0;
  background: #fff;
  border-right: 1px solid #e8edf5;
}
.dash-brand { display: block; padding: 0 18px 34px; }
.dash-brand img { width: 148px; display: block; }
.dashboard-side nav { display: grid; gap: 6px; padding: 0 14px; }
.dashboard-side a { min-height: 40px; display: flex; align-items: center; padding: 0 14px; color: #394150; text-decoration: none; border-radius: 8px; font-weight: 800; }
.dashboard-side a.active, .dashboard-side a:hover { color: #0969ff; background: #eaf3ff; }
.dashboard-main { padding: 34px clamp(22px, 4vw, 46px) 60px; overflow: hidden; }
.dashboard-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.dashboard-top p { margin: 0 0 6px; color: #64748b; font-weight: 800; }
.dashboard-top h1 { color: #111827; font-size: 30px; }
.dashboard-top button { min-height: 38px; padding: 0 16px; color: #fff; background: #111827; border-radius: 8px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.stats-grid article, .dash-panel {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15,23,42,.04);
}
.stats-grid article { padding: 20px; }
.stats-grid span { display: block; color: #64748b; font-weight: 800; }
.stats-grid strong { display: block; margin: 8px 0; color: #111827; font-size: 32px; }
.stats-grid small { color: #94a3b8; }
.dash-panel { padding: 18px; margin-bottom: 18px; }
.dash-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #eef1f6; }
.dash-panel-head h2 { margin: 0; font-size: 18px; }
.dash-panel-head p { margin: 0; color: #64748b; }
.dash-panel-head-copy { display: grid; justify-items: end; gap: 5px; text-align: right; }
.dash-panel-head .support-wechat { color: #475569; font-size: 13px; }
.dash-panel-head .support-wechat strong { color: #7554ff; }
.dashboard-records { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.empty-text { margin: 0; color: #64748b; }
.usage-table-wrap { overflow-x: auto; }
.usage-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.usage-table th, .usage-table td { padding: 13px 12px; border-bottom: 1px solid #eef1f6; text-align: left; }
.usage-table th { color: #64748b; font-size: 13px; }
.plus { color: #16a34a; font-weight: 900; }
.minus { color: #ef4444; font-weight: 900; }
.password-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 14px; }
.password-form label { display: grid; gap: 8px; color: #334155; font-weight: 800; }
.password-form input { width: 100%; min-height: 44px; padding: 0 13px; color: #111827; background: #f7f9fc; border: 1px solid #dfe5ee; border-radius: 8px; outline: none; }
.password-form input:focus { border-color: #7554ff; box-shadow: 0 0 0 3px rgba(117,84,255,.1); }
.password-form button { min-height: 44px; padding: 0 20px; color: #fff; background: #7554ff; border-radius: 8px; font-weight: 900; white-space: nowrap; }
.password-form button:disabled { opacity: .6; cursor: wait; }
.dashboard-page .plan-card,
.dashboard-page .record-card { box-shadow: none; border: 1px solid #e8edf5; border-radius: 8px; }
.dashboard-page .record-card img { border-radius: 8px; box-shadow: none; }

@media (max-width: 980px) {
  .auth-header nav { display: none; }
  .dashboard-page { grid-template-columns: 1fr; }
  .dashboard-side { position: static; height: auto; }
  .dashboard-side nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid, .dashboard-records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .auth-header { align-items: flex-start; height: auto; padding-top: 14px; padding-bottom: 14px; flex-direction: column; }
  .auth-logo { margin-top: 0; }
  .legal-header { height: 64px; padding: 0 14px; }
  .legal-header img { width: 124px; }
  .legal-header nav { gap: 12px; font-size: 13px; }
  .legal-main { padding-top: 38px; }
  .legal-main h1 { font-size: 30px; }
  .stats-grid, .dashboard-records { grid-template-columns: 1fr; }
  .dash-panel-head { display: block; }
  .dash-panel-head-copy { justify-items: start; margin-top: 8px; text-align: left; }
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px 38px;
  color: #7b8493;
  font-size: 13px;
  text-align: center;
}

.legal-footer a { color: #667085; text-decoration: none; }
.legal-footer a:hover { color: #7554ff; }

/* Industry picker */
.industry-field { position: relative; display: grid; gap: 8px; color: #303447; font-weight: 800; }
.industry-trigger {
  width: 100%;
  min-height: 84px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #6b7280;
  background: #f7f8fc;
  border: 1px solid #f16983;
  border-right-color: #eab308;
  border-radius: 8px;
  text-align: left;
}
.industry-trigger:disabled { cursor: not-allowed; opacity: .62; }
.industry-trigger:focus { outline: none; box-shadow: 0 0 0 4px rgba(241,105,131,.12); }
.industry-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.industry-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(17,24,39,.08);
}
.industry-tags i { color: #9ca3af; font-style: normal; font-weight: 900; }
.industry-popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 16px);
  z-index: 12;
  padding: 24px 20px 20px;
  color: #111827;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
.industry-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}
.industry-popover strong { display: block; margin-bottom: 14px; font-size: 15px; }
.industry-options { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.industry-options button {
  min-height: 30px;
  padding: 0 18px;
  color: #4b5563;
  background: #eef1f5;
  border-radius: 999px;
  font-weight: 500;
}
.industry-options button.selected,
.industry-options button:hover { color: #ff6176; background: #fff0f3; }

/* Standalone records page */
.records-page {
  min-height: 100vh;
  color: #111827;
  background: linear-gradient(180deg, #f7f5ff 0%, #f8fafc 36%, #fff 100%);
}
.records-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid #edf0f5;
  backdrop-filter: blur(14px);
}
.records-brand img { width: 150px; display: block; }
.records-header nav { display: flex; align-items: center; gap: 26px; }
.records-header a { color: #111827; text-decoration: none; font-weight: 900; }
.records-header nav a.active { color: #7554ff; }
.records-create,
.records-titlebar > a,
.records-empty a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff !important;
  background: linear-gradient(135deg, #ff6f8a, #e6b900);
  border-radius: 999px;
  text-decoration: none;
}
.records-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 70px; }
.records-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.records-titlebar span { color: #7554ff; font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.records-titlebar h1 { color: #111827; margin: 8px 0 0; font-size: 32px; }
.records-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.records-item {
  overflow: hidden;
  background: #fff;
  border: 1px solid #ebeff5;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(15,23,42,.08);
}
.records-image { display: grid; place-items: center; aspect-ratio: 1; background: #f6f7fb; }
.records-image img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.records-meta { padding: 14px; }
.records-meta p { margin: 0 0 8px; color: #667085; font-size: 13px; }
.records-meta h2 { min-height: 44px; margin: 0 0 12px; color: #111827; font-size: 16px; line-height: 1.4; }
.records-meta div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.records-meta span { color: #7c3aed; font-weight: 800; font-size: 13px; }
.records-meta a { color: #0969ff; font-weight: 900; text-decoration: none; }
.records-meta .records-pending { color: #f59e0b; }
.records-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 360px;
  background: #fff;
  border: 1px solid #ebeff5;
  border-radius: 10px;
}
.records-empty strong { font-size: 22px; }
.records-empty p, .records-message { color: #64748b; }
.records-message.error { color: #ef4444; font-weight: 900; }
.records-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
}
.records-pager button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 14px;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 900;
}
.records-pager button.active {
  color: #fff;
  background: #7554ff;
  border-color: #7554ff;
}
.records-pager button:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}
.records-pager span { color: #64748b; font-weight: 800; }
.usage-pager { flex-wrap: wrap; margin-top: 18px; }

/* Tool pages */
.tool-page {
  min-height: 100vh;
  color: #111827;
  background: linear-gradient(180deg, #f7f5ff 0%, #f8fafc 38%, #fff 100%);
}
.tool-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 76px; }
.tool-hero {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 18px 0 24px;
}
.tool-hero div { width: min(760px, 100%); }
.tool-hero span, .tool-cases .panel-head span { color: #7554ff; font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.tool-hero h1 { margin: 8px 0 12px; color: #111827; font-size: clamp(34px, 5vw, 58px); }
.tool-hero p { margin: 0; color: #64748b; font-size: 18px; line-height: 1.8; }
.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  gap: 22px;
  align-items: stretch;
}
.upload-panel, .tool-result {
  padding: 24px;
  background: rgba(255,255,255,.94);
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
}
.drop-zone {
  min-height: 340px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px;
  color: #334155;
  background: #f8fafc;
  border: 2px dashed #cdd6e6;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.drop-zone.dragging {
  background: #eef6ff;
  border-color: #7554ff;
  box-shadow: 0 18px 45px rgba(117, 84, 255, .16);
}
.drop-zone input { display: none; }
.drop-zone img { max-width: 86%; max-height: 260px; object-fit: contain; }
.drop-zone strong { display: block; font-size: 24px; }
.drop-zone p { margin: 0; color: #64748b; }
.tool-controls { display: grid; gap: 16px; margin-top: 18px; }
.tool-controls label { display: grid; gap: 8px; color: #303447; font-weight: 800; }
.tool-controls input {
  min-height: 50px;
  padding: 0 16px;
  color: #111827;
  background: #f6f7fb;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  outline: none;
}
.format-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.format-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #303447;
  font-weight: 900;
}
.format-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 8px;
  color: #334155;
  background: #f6f7fb;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  cursor: pointer;
}
.format-options input {
  width: 16px;
  min-height: 16px;
  accent-color: #7554ff;
}
.ratio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ratio-grid button {
  min-height: 46px;
  color: #334155;
  background: #f3f4f9;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  font-weight: 900;
}
.ratio-grid button.selected { color: #fff; background: linear-gradient(135deg, #7b4dff, #34d9bf); border-color: transparent; }
.tool-result { display: flex; flex-direction: column; }
.tool-result .preview-stage { min-height: 420px; }
.tool-result .download-btn { margin-top: 18px; }
.vector-status {
  min-height: 420px;
  max-height: 420px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px;
  background: #f8fafc;
  border: 1px dashed #cdd6e6;
  border-radius: 12px;
  text-align: center;
  overflow: hidden;
}
.vector-status-inner {
  width: 100%;
  max-width: 100%;
  display: grid;
  place-items: center;
  gap: 12px;
  overflow: hidden;
}
.vector-source-frame {
  width: min(260px, 86%);
  height: 210px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  overflow: hidden;
}
.vector-source-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.vector-status strong { font-size: 26px; }
.vector-status p { margin: 0; color: #64748b; line-height: 1.8; }
.tool-cases { margin-top: 54px; }

@media (max-width: 980px) {
  .industry-popover { position: static; margin-bottom: 12px; }
  .industry-popover::after { display: none; }
  .records-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-workspace { grid-template-columns: 1fr; }
  .password-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .records-header { height: auto; align-items: flex-start; flex-direction: column; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
  .records-header nav { flex-wrap: wrap; gap: 16px; }
  .records-titlebar { align-items: flex-start; flex-direction: column; }
  .records-list { grid-template-columns: 1fr; }
  .result-actions, .ratio-grid { grid-template-columns: 1fr; }
  .tool-main { width: min(100% - 24px, 1180px); }
  .password-form { grid-template-columns: 1fr; }
}

/* Hidden prompt workspace */
.agent-page {
  min-height: 100vh;
  margin: 0;
  color: #151827;
  background: #f4f5f7;
}

.agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid #e6e8ec;
  background: rgba(255, 255, 255, 0.96);
}

.agent-brand img {
  display: block;
  width: auto;
  height: 38px;
}

.agent-account {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #667085;
  font-size: 14px;
}

.agent-account span:last-child {
  color: #151827;
  font-weight: 700;
}

.agent-main {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0;
}

.agent-composer {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(18, 24, 40, 0.08);
}

.agent-upload {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 140px;
  overflow: hidden;
  border: 1px dashed #cdd2da;
  border-radius: 6px;
  background: #f4f5f6;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.agent-upload:hover,
.agent-upload:focus-visible,
.agent-upload.dragging {
  border-color: #16b8c8;
  outline: none;
  background: #eefbfc;
}

.agent-upload-plus,
.agent-upload-plus::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #89919e;
  content: "";
}

.agent-upload-plus::after {
  transform: rotate(90deg);
}

.agent-upload-limit {
  position: absolute;
  bottom: 12px;
  color: #7b8492;
  font-size: 12px;
  line-height: 1;
}

.agent-upload-limit b {
  color: #151827;
  font-weight: 700;
}

.agent-upload.at-limit {
  cursor: default;
  opacity: 0.72;
}

.agent-image-list {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.agent-image-list[hidden] {
  display: none;
}

.agent-image-item {
  position: relative;
  height: 94px;
  overflow: hidden;
  border: 1px solid #e1e4e9;
  border-radius: 6px;
  background: #f4f5f6;
}

.agent-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.agent-image-order {
  position: absolute;
  bottom: 5px;
  left: 5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  color: #fff;
  background: rgba(21, 24, 39, 0.78);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.agent-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(21, 24, 39, 0.78);
  font-size: 20px;
  line-height: 28px;
  cursor: pointer;
}

.agent-prompt-wrap {
  display: flex;
  min-width: 0;
  min-height: 140px;
  flex-direction: column;
}

.agent-ratio-control {
  display: grid;
  gap: 8px;
  margin: 14px 12px 0;
}

.agent-ratio-control .ratio-grid { margin-top: 0; }

.agent-prompt-wrap textarea {
  width: 100%;
  min-height: 320px;
  flex: 1;
  resize: none;
  overflow-y: hidden;
  padding: 10px 12px;
  border: 0;
  outline: 0;
  color: #151827;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

.agent-prompt-wrap textarea::placeholder {
  color: #9299a5;
}

.agent-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 8px 4px 0 12px;
  border-top: 1px solid #eff1f4;
}

.agent-message {
  min-width: 0;
  color: #667085;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.agent-message.error {
  color: #d92d20;
}

.agent-submit {
  min-width: 112px;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #151827;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.agent-submit:disabled {
  cursor: wait;
  opacity: 0.56;
}

.agent-result {
  width: min(720px, 100%);
  margin: 64px auto 0;
}

.agent-result > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
}

.agent-result > img[data-ratio="3:4"] { aspect-ratio: 3 / 4; }
.agent-result > img[data-ratio="4:3"] { aspect-ratio: 4 / 3; }

.agent-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.agent-result-actions a {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 18px;
  border: 1px solid #d9dde4;
  border-radius: 6px;
  color: #303544;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.agent-result-actions a:first-child {
  border-color: #151827;
  color: #fff;
  background: #151827;
}

.agent-history {
  margin-top: 72px;
  scroll-margin-top: 24px;
}

.agent-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.agent-history-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.agent-history-head span {
  color: #667085;
  font-size: 13px;
}

.agent-history-list {
  display: grid;
  gap: 14px;
}

.agent-history-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
}

.agent-history-image {
  display: block;
  width: 180px;
  height: 180px;
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #f7f8fa;
}

.agent-history-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.agent-history-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.agent-history-body > p {
  margin: 0 0 5px;
  color: #7b8492;
  font-size: 12px;
}

.agent-history-body h3 {
  margin: 0 0 7px;
  font-size: 15px;
  letter-spacing: 0;
}

.agent-history-prompt {
  max-height: 104px;
  padding: 9px 10px;
  overflow-y: auto;
  color: #475467;
  background: #f7f8fb;
  border: 1px solid #e2e7f0;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}

.agent-history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
}

.agent-history-actions a,
.agent-history-actions button {
  min-height: 32px;
  padding: 0 11px;
  color: #151827;
  background: #fff;
  border: 1px solid #d9dde4;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.agent-history-actions a {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #151827;
  border-color: #151827;
}

.agent-history-actions button.delete {
  color: #b42318;
  border-color: #f1c7c3;
}

.agent-history-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.agent-history-empty {
  padding: 56px 20px;
  color: #7b8492;
  border: 1px dashed #cdd2da;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.agent-history-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.agent-history-pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  color: #344054;
  background: #fff;
  border: 1px solid #d9dde4;
  border-radius: 6px;
  cursor: pointer;
}

.agent-history-pager button.active {
  color: #fff;
  background: #151827;
  border-color: #151827;
}

.agent-history-pager button:disabled {
  cursor: default;
  opacity: 0.42;
}

.agent-history-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: #d92d20;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 640px) {
  .agent-header {
    min-height: 56px;
    padding: 0 16px;
  }

  .agent-brand img {
    height: 32px;
  }

  .agent-account {
    gap: 8px;
    font-size: 12px;
  }

  .agent-main {
    width: calc(100% - 24px);
    padding: 32px 0 56px;
  }

  .agent-composer {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .agent-upload {
    width: 82px;
    height: 112px;
  }

  .agent-prompt-wrap {
    min-height: 112px;
  }

  .agent-prompt-wrap textarea {
    min-height: 260px;
    padding: 4px 6px;
    font-size: 14px;
  }

  .agent-compose-footer {
    align-items: flex-end;
    gap: 8px;
    padding: 6px 0 0 6px;
  }

  .agent-ratio-control {
    margin-right: 6px;
    margin-left: 6px;
  }

  .agent-submit {
    min-width: 84px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .agent-result {
    margin-top: 36px;
  }

  .agent-history {
    margin-top: 48px;
  }

  .agent-history-item {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .agent-history-image {
    width: 112px;
    height: 112px;
  }

  .agent-history-prompt {
    max-height: 70px;
  }
}
