:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --sidebar: #1f2933;
  --sidebar-hover: #2d3748;
  --primary: #d4af37;
  --primary-hover: #c6a030;
  --primary-pressed: #b89424;
  --text: #1f2933;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --input-border: #d1d5db;
  --success: #22a06b;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow: 0 12px 36px rgba(31, 41, 51, .08);
  --shadow-soft: 0 4px 18px rgba(31, 41, 51, .06);
  --radius: 10px;
  --radius-lg: 18px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #e5c957, var(--primary)); color: #1b2430; font: 800 21px/1 Georgia, serif; box-shadow: 0 7px 18px rgba(212, 175, 55, .28); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 17px; letter-spacing: .08em; }
.brand small { margin-top: 4px; font-size: 8px; letter-spacing: .16em; color: var(--text-secondary); }
.brand-inverse { color: #fff; }
.brand-inverse small { color: #9ca7b5; }

.button { min-height: 36px; padding: 8px 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-primary { background: var(--primary); color: #202934; box-shadow: 0 6px 16px rgba(212, 175, 55, .22); }
.button-primary:hover { background: var(--primary-hover); }
.button-primary:active { background: var(--primary-pressed); }
.button-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.button-secondary:hover { border-color: #c7cdd5; background: #fafafa; }
.button-danger { background: var(--danger); color: #fff; }
.button-block { width: 100%; min-height: 42px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 9px; color: var(--text-secondary); background: #fff; font-size: 18px; }
.icon-button:hover { color: var(--text); border-color: #c5cbd3; }

label { display: flex; flex-direction: column; gap: 7px; color: #374151; font-size: 13px; font-weight: 700; }
label small { color: var(--text-muted); font-size: 11px; font-weight: 400; }
input, textarea, select { width: 100%; border: 1px solid var(--input-border); border-radius: 8px; background: #fff; color: var(--text); outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input, select { min-height: 38px; padding: 8px 11px; }
textarea { min-height: 120px; padding: 12px; resize: vertical; line-height: 1.65; }
input:hover, textarea:hover, select:hover { border-color: #b9c0c9; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(212, 175, 55, .14); }
input::placeholder, textarea::placeholder { color: #a7afb9; }
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, #727c88 50%), linear-gradient(135deg, #727c88 50%, transparent 50%); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-message { min-height: 20px; margin-top: 10px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.form-message.is-error { color: var(--danger); }
.form-message.is-success { color: var(--success); }

/* Landing */
.landing-body { background: #f7f8f9; overflow-x: hidden; }
.landing-body::before { content: ""; position: absolute; z-index: 0; top: 0; right: -12vw; width: 58vw; height: 670px; background: radial-gradient(circle at 35% 35%, rgba(212, 175, 55, .22), rgba(212, 175, 55, .04) 38%, transparent 69%); pointer-events: none; }
.landing-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; width: min(1180px, calc(100% - 40px)); height: 84px; margin: 0 auto; }
.landing-nav nav { display: flex; align-items: center; gap: 30px; color: #4b5563; font-size: 13px; }
.landing-nav nav a:hover { color: var(--text); }
.hero { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(350px, .68fr); gap: clamp(40px, 7vw, 100px); align-items: center; width: min(1180px, calc(100% - 40px)); min-height: 620px; margin: 0 auto; padding: 50px 0 82px; }
.hero-copy { max-width: 690px; }
.eyebrow, .page-kicker { display: block; color: #9a7b18; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero h1 { margin: 20px 0 24px; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.13; letter-spacing: -.045em; }
.hero h1 em { color: #af8b1e; font-style: normal; }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.9; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-pills span { padding: 8px 12px; border: 1px solid #e6dcc0; border-radius: 999px; background: rgba(255, 255, 255, .74); color: #66551e; font-size: 12px; }
.auth-card { position: relative; padding: 24px 28px 25px; border: 1px solid rgba(220, 223, 228, .85); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .94); box-shadow: 0 24px 70px rgba(34, 43, 53, .13); backdrop-filter: blur(12px); }
.auth-card::after { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border-radius: 20px; background: rgba(212, 175, 55, .1); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 9px; background: #f1f3f5; }
.auth-tab { min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.auth-tab.is-active { background: #fff; color: var(--text); box-shadow: 0 2px 9px rgba(31, 41, 51, .09); }
.auth-heading { margin: 24px 0 18px; }
.auth-heading h1, .auth-heading h2 { margin: 0 0 6px; font-size: 22px; }
.auth-heading p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.auth-form { display: grid; gap: 14px; }
.captcha-fields { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.captcha-question { min-width: 90px; padding: 10px 12px; border-radius: 8px; background: #f7f2e2; color: #6d5919; text-align: center; font-weight: 800; }
.auth-footnote { margin: 14px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.6; text-align: center; }
.feature-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 85px 0; }
.section-heading { margin-bottom: 30px; }
.section-heading span { color: #a38320; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(27px, 3vw, 40px); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.feature-card { min-height: 235px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-soft); }
.feature-card b { color: var(--primary); font: 700 34px/1 Georgia, serif; }
.feature-card h3 { margin: 32px 0 10px; font-size: 16px; }
.feature-card p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.75; }
.retention-banner { display: grid; grid-template-columns: .65fr 1.35fr; gap: 50px; align-items: center; width: min(1180px, calc(100% - 40px)); margin: 20px auto 95px; padding: 45px 50px; border-radius: 18px; background: var(--sidebar); color: #fff; box-shadow: 0 22px 58px rgba(31, 41, 51, .2); }
.retention-banner h2 { margin: 9px 0 0; font-size: 34px; }
.retention-banner p { margin: 0; color: #bac2cc; font-size: 14px; line-height: 1.9; }
.landing-footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 35px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }

/* App shell */
.app-body, .admin-body { overflow-x: hidden; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 24px 17px 18px; background: var(--sidebar); color: #dce1e7; }
.sidebar .brand { padding: 0 9px 24px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side-nav { display: grid; gap: 5px; margin-top: 24px; }
.side-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: #acb6c2; text-align: left; font-size: 13px; font-weight: 600; }
.side-link span { display: grid; place-items: center; width: 19px; color: #8e9aa8; font-size: 15px; }
.side-link:hover { background: var(--sidebar-hover); color: #fff; }
.side-link.is-active { background: rgba(212, 175, 55, .13); color: #f2d77e; }
.side-link.is-active span { color: var(--primary); }
.side-link-bottom { margin-top: auto; }
.sidebar-note { margin: auto 5px 10px; padding: 14px; border: 1px solid rgba(212, 175, 55, .17); border-radius: 10px; background: rgba(212, 175, 55, .07); }
.sidebar-note strong { color: #e6cc73; font-size: 12px; }
.sidebar-note p { margin: 6px 0 0; color: #929eaa; font-size: 10px; line-height: 1.6; }
.app-main { min-width: 0; padding: 0 26px 36px; }
.app-header { display: flex; align-items: center; justify-content: space-between; min-height: 92px; border-bottom: 1px solid var(--border); }
.app-header h1 { margin: 5px 0 0; font-size: 23px; }
.header-account { display: flex; align-items: center; gap: 12px; }
.wallet-chip { display: flex; align-items: baseline; gap: 9px; min-height: 42px; padding: 9px 14px; border: 1px solid #e4d9b7; border-radius: 10px; background: #fffdf6; }
.wallet-chip span { color: #856d23; font-size: 10px; }
.wallet-chip strong { font-size: 17px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--sidebar); color: var(--primary); font-weight: 800; }
.user-chip div { display: flex; flex-direction: column; max-width: 190px; }
.user-chip strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.app-section, .admin-section { display: none; padding-top: 24px; }
.app-section.is-active, .admin-section.is-active { display: block; }
.create-layout { display: grid; grid-template-columns: minmax(450px, 1.12fr) minmax(340px, .88fr); gap: 18px; }
.panel { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-heading > div { display: flex; align-items: center; gap: 10px; }
.panel-heading h2 { margin: 0; font-size: 16px; }
.step-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #f5efd9; color: #987919; font-size: 10px; font-weight: 800; }
.subtle-badge { padding: 5px 9px; border-radius: 999px; background: #eef7f2; color: #187b50; font-size: 9px; font-weight: 700; }
.field-label { flex-direction: row; align-items: center; margin: 14px 0 7px; }
.field-label small { margin-left: auto; }
.prompt-wrap { position: relative; }
.prompt-wrap textarea { min-height: 175px; padding-bottom: 30px; }
.prompt-wrap span { position: absolute; right: 11px; bottom: 10px; color: var(--text-muted); font-size: 9px; }
.textarea-small { min-height: 70px; }
.generation-panel .form-grid { margin-top: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reference-block { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 13px; border: 1px dashed #d3c391; border-radius: 9px; background: #fffdf7; }
.reference-block .field-label { margin: 0 0 4px; }
.reference-block p { margin: 0; color: var(--text-muted); font-size: 10px; }
.upload-button { display: inline-flex; align-items: center; justify-content: center; min-width: 110px; min-height: 34px; padding: 7px 10px; border: 1px solid #dfd2a7; border-radius: 8px; background: #fff; color: #735f20; font-size: 11px; cursor: pointer; }
.reference-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.reference-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px 5px 5px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font-size: 10px; }
.reference-item img { width: 32px; height: 32px; border-radius: 5px; object-fit: cover; }
.reference-item button { border: 0; background: transparent; color: var(--danger); }
.generation-submit { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--border); }
.generation-submit > div { display: flex; flex-direction: column; gap: 3px; }
.generation-submit span { color: var(--text-muted); font-size: 9px; }
.generation-submit strong { font-size: 15px; }
.generation-submit .button { min-width: 145px; }
.preview-panel { min-height: 600px; }
.empty-preview { display: grid; place-items: center; align-content: center; min-height: 500px; border: 1px dashed var(--border); border-radius: 10px; background: linear-gradient(145deg, #fafbfc, #f5f2e8); text-align: center; }
.preview-orb { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 17px; border-radius: 22px; background: var(--sidebar); color: var(--primary); font-size: 26px; box-shadow: 0 15px 35px rgba(31, 41, 51, .2); }
.empty-preview h3 { margin: 0 0 7px; font-size: 16px; }
.empty-preview p { max-width: 260px; margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.65; }
.active-job-card { min-height: 500px; padding: 18px; border-radius: 10px; background: #f7f8fa; }
.active-job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.active-job-top h3 { margin: 4px 0; font-size: 15px; }
.active-job-top p { margin: 0; color: var(--text-muted); font-size: 9px; }
.status-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #e8eefb; color: var(--info); font-size: 9px; font-weight: 800; }
.status-badge.completed { background: #e8f6ef; color: var(--success); }
.status-badge.failed, .status-badge.billing_review { background: #feeceb; color: var(--danger); }
.status-badge.needs_review { background: #fff3dc; color: #aa6b05; }
.progress-track { width: 100%; height: 7px; margin: 20px 0 8px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #e5e8ec; }
.progress-track::-webkit-progress-bar { border-radius: 999px; background: #e5e8ec; }
.progress-track::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--primary), #e9ce65); }
.progress-track::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--primary), #e9ce65); }
.progress-caption { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 9px; }
.active-assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.active-assets img { width: 100%; aspect-ratio: 1; border-radius: 8px; background: #e9ebee; object-fit: cover; }
.job-warning { margin-top: 18px; padding: 11px; border-radius: 8px; background: #fff2df; color: #8c5b10; font-size: 10px; line-height: 1.6; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.section-toolbar h2 { margin: 5px 0 0; font-size: 23px; }
.works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.work-card { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow-soft); }
.work-image { position: relative; aspect-ratio: 1; background: #edf0f3; }
.work-image img { width: 100%; height: 100%; object-fit: cover; }
.work-image .status-badge { position: absolute; top: 9px; left: 9px; }
.work-info { padding: 12px; }
.work-info strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.work-info p { margin: 6px 0 0; color: var(--text-muted); font-size: 9px; }
.work-actions { display: flex; gap: 7px; margin-top: 10px; }
.work-actions .button { flex: 1; min-height: 30px; padding: 5px; font-size: 10px; }
.loading-card { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); background: #fff; text-align: center; font-size: 12px; }
.billing-grid, .admin-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { display: flex; flex-direction: column; min-height: 140px; padding: 20px; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow-soft); }
.metric-card > span { color: var(--text-secondary); font-size: 11px; }
.metric-card strong { margin: auto 0 4px; font-size: 31px; }
.metric-card small { color: var(--text-muted); font-size: 9px; }
.metric-card-gold { border-color: #dfd1a3; background: linear-gradient(145deg, #fffdf6, #fff8dd); }
.info-panel h3 { margin: 0 0 8px; font-size: 15px; }
.info-panel p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.8; }

/* Admin */
.admin-login-view { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: radial-gradient(circle at 65% 15%, rgba(212, 175, 55, .18), transparent 38%), var(--sidebar); }
.admin-login-card { width: min(420px, 100%); }
.admin-login-card::after { display: none; }
.admin-login-card .brand { margin-bottom: 14px; }
.admin-login-card > label { margin-bottom: 13px; }
.admin-main { background: var(--bg); }
.admin-section { padding-bottom: 20px; }
.admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-metrics .metric-card { min-height: 125px; }
.admin-metrics .metric-card strong { font-size: 27px; }
.table-wrap { max-width: 100%; overflow: auto; }
.table-wrap.panel { padding: 0; }
table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 11px; }
th { height: 42px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #f8f9fa; color: var(--text-secondary); text-align: left; font-size: 10px; font-weight: 700; white-space: nowrap; }
td { height: 48px; padding: 8px 14px; border-bottom: 1px solid #eef0f2; color: #374151; }
tbody tr:nth-child(even) { background: #fcfcfd; }
tbody tr:hover { background: #fffaf0; }
tbody tr:last-child td { border-bottom: 0; }
td code { color: #535d69; font: 10px/1.5 Consolas, monospace; }
.table-empty { height: 110px; color: var(--text-muted); text-align: center; }
.table-actions { display: flex; gap: 6px; }
.table-button { min-height: 28px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text-secondary); font-size: 9px; }
.table-button:hover { color: var(--text); border-color: #c8cdd4; }
.review-actions { min-width: 132px; flex-wrap: wrap; }
.review-refund { color: var(--danger); border-color: rgba(220, 38, 38, .28); }
.review-refund:hover { color: #b91c1c; border-color: rgba(185, 28, 28, .55); }
.review-summary { display: grid; gap: 5px; padding: 11px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; }
.review-summary strong { color: var(--text); font: 600 12px/1.4 Consolas, monospace; }
.section-note { margin: 12px 3px; color: var(--text-secondary); font-size: 10px; line-height: 1.6; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 30; max-width: 360px; padding: 11px 15px; border-radius: 8px; background: var(--sidebar); color: #fff; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #9f2525; }
.modal { width: min(600px, calc(100% - 30px)); max-height: calc(100vh - 50px); padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 30px 90px rgba(16, 24, 32, .3); }
.modal::backdrop { background: rgba(17, 24, 32, .58); backdrop-filter: blur(2px); }
.modal form { display: grid; gap: 14px; padding: 23px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2px; }
.modal-heading h2 { margin: 6px 0 0; font-size: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; padding-top: 15px; border-top: 1px solid var(--border); }
.checkbox-row { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.checkbox-row input { width: 16px; min-height: 16px; accent-color: var(--primary); }

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .generation-panel .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-copy { text-align: center; margin: 0 auto; }
  .hero-pills { justify-content: center; }
  .auth-card { width: min(450px, 100%); margin: 0 auto; }
  .retention-banner { grid-template-columns: 1fr; gap: 16px; }
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 20px 10px; }
  .sidebar .brand > span:last-child, .side-link:not(.is-active) span + *, .sidebar-note { display: none; }
  .sidebar .brand { justify-content: center; padding: 0 0 20px; }
  .side-link { justify-content: center; padding: 9px; font-size: 0; }
  .side-link span { font-size: 16px; }
  .create-layout { grid-template-columns: 1fr; }
  .preview-panel { min-height: 480px; }
  .empty-preview, .active-job-card { min-height: 380px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .landing-nav { height: 70px; }
  .landing-nav nav a:not(:last-child) { display: none; }
  .hero { width: min(100% - 26px, 1180px); gap: 34px; padding-bottom: 50px; }
  .hero h1 { font-size: 39px; }
  .feature-section, .retention-banner, .landing-footer { width: calc(100% - 26px); }
  .feature-grid { grid-template-columns: 1fr; }
  .retention-banner { padding: 30px 25px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 20; flex-direction: row; width: 100%; height: 64px; padding: 8px; box-shadow: 0 -8px 24px rgba(31, 41, 51, .15); }
  .sidebar .brand, .sidebar-note, .side-link-bottom { display: none; }
  .side-nav { display: flex; justify-content: space-around; width: 100%; margin: 0; }
  .side-link { width: auto; min-width: 56px; }
  .app-main { padding: 0 13px 82px; }
  .app-header { min-height: 76px; }
  .app-header h1 { font-size: 18px; }
  .wallet-chip { padding: 7px 9px; }
  .user-chip div { display: none; }
  .generation-panel .form-grid, .form-grid, .billing-grid, .admin-metrics { grid-template-columns: 1fr; }
  .reference-block { align-items: flex-start; flex-direction: column; }
  .generation-submit { align-items: stretch; flex-direction: column; gap: 12px; }
  .generation-submit .button { width: 100%; }
  .works-grid { grid-template-columns: 1fr; }
  .section-toolbar { align-items: flex-start; gap: 10px; }
  .admin-sidebar .side-nav { overflow-x: auto; justify-content: flex-start; }
}
