.image-ai-page {
    --ink: #152036;
    --muted: #667085;
    --violet: #5b4bd8;
    --violet-dark: #3f328f;
    --line: #dfe3ec;
    margin-top: 130px;
    color: var(--ink);
    background: #fff;
}
.image-ai-page * { box-sizing: border-box; }
.image-ai-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.image-ai-hero { overflow: hidden; padding: 68px 0; color: #fff; background: linear-gradient(125deg, #18213a 0%, #31296c 58%, #4e3ea6 100%); }
.image-ai-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .82fr); gap: 60px; align-items: center; }
.image-ai-kicker { display: block; color: #b8b0ff; font-size: 13px; font-weight: 800; line-height: 1.5; letter-spacing: .04em; }
.image-ai-hero h1 { margin: 14px 0 18px; font-size: clamp(42px, 5.5vw, 68px); line-height: 1.08; letter-spacing: -.06em; }
.image-ai-hero p { max-width: 660px; margin: 0; color: #e2e3ec; font-size: 17px; line-height: 1.7; }
.image-ai-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.image-ai-hero-actions a { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid rgba(255,255,255,.34); border-radius: 10px; color: #fff; font-size: 14px; font-weight: 800; }
.image-ai-hero-actions a.primary { border-color: #fff; background: #fff; color: #30266e; }
.image-ai-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.image-ai-tags span { padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.1); color: #e9e7ff; font-size: 12px; line-height: 1.4; }
.image-ai-hero-art { position: relative; min-height: 390px; }
.image-ai-hero-art img { display: block; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 24px 70px rgba(8,7,28,.4); }
.image-ai-hero-cover { position: absolute; top: 16px; right: 0; width: calc(100% - 30px); height: auto; border-radius: 24px; object-fit: contain; }
.image-ai-hero-product { position: absolute; left: 0; bottom: 0; width: 38%; border-radius: 18px; }
.image-ai-hero-art span { position: absolute; right: -8px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 13px 16px; border-radius: 12px; background: #fff; color: #332a75; box-shadow: 0 12px 34px rgba(8,7,28,.28); font-size: 13px; font-weight: 800; line-height: 1.35; }
.image-ai-hero-art span b { font-size: 22px; line-height: 1; }
.image-ai-workbench { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 38px; padding: 58px 0 42px; }
.image-ai-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(21,32,54,.09); }
.image-ai-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f4f5fa; }
.image-ai-tabs button { min-height: 50px; border: 0; background: transparent; color: #697086; font-weight: 800; cursor: pointer; }
.image-ai-tabs button.active { background: #fff; color: var(--violet); box-shadow: inset 0 -3px var(--violet); }
#image-ai-form { padding: 24px; }
#image-ai-form h2, .image-ai-results h2 { margin: 0 0 20px; font-size: 24px; line-height: 1.3; letter-spacing: -.03em; }
.image-ai-field { display: block; margin-bottom: 16px; }
.image-ai-field > span { display: flex; gap: 6px; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.image-ai-field > span em { color: #737c8e; font-size: 11px; font-style: normal; font-weight: 650; }
.image-ai-field textarea, .image-ai-field select, .image-ai-field input { width: 100%; min-height: 44px; border: 1px solid #cbd1dc; border-radius: 9px; background: #fff; padding: 10px 11px; color: var(--ink); font: inherit; }
.image-ai-field textarea:focus, .image-ai-field select:focus, .image-ai-field input:focus { outline: 3px solid rgba(91,75,216,.16); border-color: var(--violet); }
.image-ai-field textarea { height: 138px; resize: vertical; }
.image-ai-field small { display: block; margin-top: 6px; color: #737c8e; font-size: 11px; line-height: 1.5; }
.image-ai-field textarea + small { text-align: right; }
.image-ai-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.image-ai-total { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; padding: 13px 14px; border-radius: 9px; background: #f0efff; font-size: 13px; }
.image-ai-total strong { color: var(--violet-dark); font-size: 18px; }
.image-ai-no-cancel { margin: -7px 0 15px; color: #6a5160; font-size: 11px; line-height: 1.6; }
.image-ai-submit { width: 100%; min-height: 48px; border: 0; border-radius: 9px; background: var(--violet); color: #fff; font-size: 15px; font-weight: 850; cursor: pointer; }
.image-ai-submit:disabled { opacity: .55; }
.image-ai-login { margin: 12px 0 0; color: #b42318; font-size: 12px; text-align: center; }
.image-ai-result-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.image-ai-result-head .image-ai-kicker, .image-ai-samples-head .image-ai-kicker { color: var(--violet); }
.image-ai-result-head .image-ai-kicker { margin-bottom: 12px; }
.image-ai-job-actions { display: flex; gap: 8px; }
.image-ai-job-actions button, .image-ai-job-actions a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 750; cursor: pointer; }
.image-ai-status { min-height: 52px; margin-bottom: 14px; padding: 14px; border: 1px solid #e7e9f0; border-radius: 10px; background: #f8f9fb; color: #60687a; font-size: 13px; line-height: 1.55; }
.image-ai-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.image-ai-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f3f4f7; }
.image-ai-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.image-ai-card a { display: flex; min-height: 44px; align-items: center; justify-content: center; background: #fff; color: var(--violet); font-size: 12px; font-weight: 800; }
.image-ai-notes { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-bottom: 66px; border: 1px solid var(--line); background: var(--line); }
.image-ai-notes article { padding: 20px; background: #fff; }
.image-ai-notes strong, .image-ai-notes span { display: block; }
.image-ai-notes strong { line-height: 1.45; }
.image-ai-notes span { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.image-ai-samples { padding-bottom: 80px; }
.image-ai-samples-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.image-ai-samples-head h2 { margin: 10px 0 0; font-size: clamp(28px,4vw,40px); line-height: 1.22; letter-spacing: -.045em; }
.image-ai-samples-head > p { max-width: 310px; margin: 0 0 5px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: right; }
.image-ai-sample-grid { columns: 3; column-gap: 18px; }
.image-ai-sample-grid figure { break-inside: avoid; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #eef0f5; box-shadow: 0 12px 32px rgba(21,32,54,.07); }
.image-ai-sample-open { position: relative; display: block; width: 100%; min-height: 44px; overflow: hidden; padding: 0; border: 0; background: #eef0f5; cursor: zoom-in; }
.image-ai-sample-open.checker, .image-ai-lightbox-stage.checker { background-color: #eef0f5; background-image: linear-gradient(45deg,#dfe3ea 25%,transparent 25%),linear-gradient(-45deg,#dfe3ea 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe3ea 75%),linear-gradient(-45deg,transparent 75%,#dfe3ea 75%); background-position: 0 0,0 10px,10px -10px,-10px 0; background-size: 20px 20px; }
.image-ai-sample-open img { display: block; width: 100%; height: auto; object-fit: contain; }
.image-ai-sample-open > span { position: absolute; right: 12px; bottom: 12px; min-height: 32px; padding: 8px 11px; border-radius: 8px; background: rgba(18,25,43,.84); color: #fff; font-size: 11px; font-weight: 800; opacity: 0; }
.image-ai-sample-open:hover > span, .image-ai-sample-open:focus-visible > span { opacity: 1; }
.image-ai-sample-open:focus-visible { outline: 3px solid #8c7eff; outline-offset: -3px; }
.image-ai-compare-pair { display: grid; grid-template-columns: 1fr 1fr; }
.image-ai-compare-pair .image-ai-sample-open + .image-ai-sample-open { border-left: 1px solid var(--line); }
.image-ai-sample-grid figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); background: #fff; line-height: 1.45; }
.image-ai-sample-grid figcaption strong, .image-ai-sample-grid figcaption small { display: block; }
.image-ai-sample-grid figcaption strong { font-size: 13px; }
.image-ai-sample-grid figcaption small { color: var(--muted); font-size: 11px; font-weight: 600; text-align: right; }
.image-ai-lightbox { width: min(94vw, 1540px); max-width: none; height: min(92vh, 1080px); max-height: none; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: #101522; color: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.58); }
.image-ai-lightbox::backdrop { background: rgba(7,10,18,.82); backdrop-filter: blur(8px); }
.image-ai-lightbox-head { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px 10px 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.image-ai-lightbox-head strong, .image-ai-lightbox-head span { display: block; }
.image-ai-lightbox-head strong { font-size: 16px; line-height: 1.4; }
.image-ai-lightbox-head span { margin-top: 6px; color: #abb3c4; font-size: 12px; line-height: 1.4; }
.image-ai-lightbox-close { width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.image-ai-lightbox-close:focus-visible { outline: 3px solid #a89eff; outline-offset: 2px; }
.image-ai-lightbox-stage { display: grid; min-height: 0; height: calc(100% - 68px); place-items: center; overflow: auto; padding: 20px; }
.image-ai-lightbox-stage img { display: block; max-width: 100%; max-height: calc(92vh - 108px); width: auto; height: auto; object-fit: contain; }
body.image-ai-modal-open { overflow: hidden; }
@media (max-width: 900px) {
    .image-ai-page { margin-top: 80px; }
    .image-ai-hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .image-ai-hero-art { min-height: 330px; }
    .image-ai-workbench { grid-template-columns: 1fr; padding: 36px 0; }
    .image-ai-panel { border-radius: 14px; }
    .image-ai-results { min-width: 0; }
    .image-ai-notes { grid-template-columns: 1fr 1fr; }
    .image-ai-sample-grid { columns: 2; }
}
@media (max-width: 480px) {
    .image-ai-shell { width: min(calc(100% - 24px), 1180px); }
    .image-ai-hero { padding: 40px 0 34px; }
    .image-ai-hero h1 { font-size: 39px; }
    .image-ai-hero p { font-size: 14px; }
    .image-ai-hero-actions a { flex: 1; padding: 0 12px; }
    .image-ai-hero-art { min-height: 250px; }
    .image-ai-hero-cover { top: 10px; left: 18px; width: calc(100% - 18px); border-radius: 17px; }
    .image-ai-hero-product { width: 36%; border-radius: 12px; }
    .image-ai-hero-art span { right: 0; padding: 10px 12px; }
    .image-ai-workbench { gap: 26px; }
    #image-ai-form { padding: 20px; }
    .image-ai-options { grid-template-columns: 1fr; }
    .image-ai-gallery { grid-template-columns: 1fr; }
    .image-ai-notes { grid-template-columns: 1fr; }
    .image-ai-sample-grid { columns: 1; }
    .image-ai-sample-grid figcaption { flex-direction: column; gap: 4px; }
    .image-ai-sample-grid figcaption small { text-align: left; }
    .image-ai-samples-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .image-ai-samples-head > p { margin-top: 4px; text-align: left; }
    .image-ai-sample-open > span { opacity: 1; }
    .image-ai-lightbox { width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 14px; }
    .image-ai-lightbox-head { padding-left: 14px; }
    .image-ai-lightbox-stage { padding: 10px; }
    .image-ai-lightbox-stage img { max-height: calc(100vh - 104px); }
    .image-ai-result-head { align-items: start; flex-direction: column; }
    .image-ai-job-actions { width: 100%; }
    .image-ai-job-actions > * { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .image-ai-page * { scroll-behavior: auto !important; transition: none !important; } }
