:root {
    --ink: #101014;
    --muted: #696773;
    --paper: #f7f6f1;
    --surface: #ffffff;
    --line: #e5e2db;
    --accent: #94a9eb;
    --accent-dark: #94a9eb;
    --lime: #c8fa72;
    --danger: #bd3838;
    --radius: 22px;
    --shadow: 0 20px 60px rgba(24, 18, 48, .09);
}

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
svg { display: block; width: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-header {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; letter-spacing: .05em; }
.brand-mark {
    display: grid; place-items: center; width: 37px; height: 37px;
    border-radius: 12px; color: white; background: var(--ink); font-weight: 850; font-size: 1.1rem;
}
.brand strong { display: block; font-size: .88rem; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: .58rem; letter-spacing: .13em; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: .89rem; font-weight: 650; }
.top-nav a:hover { color: var(--accent); }
.top-nav .top-nav-create {
    min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px;
    border-radius: 12px; background: var(--ink); color: white; font-weight: 800;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.top-nav .top-nav-create span { color: var(--lime); font-size: 1.05rem; line-height: 1; }
.top-nav .top-nav-create:hover { background: var(--accent-dark); color: white; transform: translateY(-1px); }
.top-nav form { margin: 0; }
.nav-button { border: 0; padding: 0; background: none; color: var(--muted); }
.page-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 100px; }
/* Global feedback must be readable in both light and dark appearances. */
.flash { margin: -28px auto 28px; padding: 13px 16px; border: 1px solid #b8dc8b; border-radius: 14px; background: #effbdf; color: #213a1d; font-weight: 750; line-height: 1.55; opacity: 1; }
.flash--notice { border-color: #dfca91; background: #fff8df; color: #543909; }
body.pyg-prism .flash { background: #173328; color: #e3fff0; border-color: #448966; box-shadow: 0 4px 20px rgba(0,0,0,.17); }
body.pyg-prism .flash--notice { background: #382d20; color: #fff1cb; border-color: #a88346; }
.site-footer { width: min(1080px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -48px auto 34px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.site-footer span { font-weight: 750; letter-spacing: .08em; }
.site-footer a { color: var(--accent-dark); font-weight: 750; }

.hero { max-width: 720px; margin: 15px auto 42px; text-align: center; }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { text-wrap: pretty; }
.hero h1, .result-heading h1, .section-heading h1 { margin: 0; font-size: clamp(2.25rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy { max-width: 550px; margin: 18px auto 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.55; }
.creation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 850px; margin: 0 auto; }
.creation-choice {
    min-height: 132px; display: flex; align-items: center; gap: 17px; padding: 25px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    box-shadow: 0 6px 25px rgba(20, 17, 35, .035); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.creation-choice:hover { transform: translateY(-3px); border-color: #7f92bc; box-shadow: var(--shadow); }
.choice-icon { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; background: #f0edfb; color: var(--accent); }
.choice-icon svg { width: 26px; height: 26px; }
.creation-choice--music .choice-icon { background: #ecf8d9; color: #537a17; }
.creation-choice--video .choice-icon { background: #fff0e2; color: #b7641d; }
.creation-choice--text .choice-icon { background: #e5f3f5; color: #287480; }
.creation-choice strong { display: block; font-size: 1.2rem; }
.creation-choice small { display: block; margin-top: 5px; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.choice-arrow { margin-left: auto; font-size: 1.5rem; }
.promise { margin: 28px auto 0; color: var(--muted); text-align: center; font-size: .84rem; }
.promise span { color: var(--accent); }

.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.back-link:hover { color: var(--accent); }
.creator { max-width: 720px; margin: 0 auto; }
.creator-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.creator-heading p { margin: 0 0 1px; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.creator-heading h1 { margin: 0; font-size: 2.2rem; letter-spacing: -.04em; }
.choice-icon--large { width: 62px; height: 62px; }
.creation-form { padding: 26px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.prompt-label, .exact-lyrics > label, .modify-form label { display: block; margin-bottom: 10px; font-weight: 750; font-size: 1.02rem; }
textarea, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select {
    width: 100%; border: 1px solid #d8d5ce; border-radius: 15px; background: #fbfaf7; color: var(--ink); outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { display: block; padding: 17px; resize: vertical; line-height: 1.55; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select { min-height: 48px; padding: 0 14px; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(111,72,245,.11); }
textarea::placeholder, input::placeholder { color: #9b98a2; }
.lyrics-choice { margin: 24px 0 0; padding: 0; border: 0; }
.lyrics-choice legend { margin-bottom: 11px; font-size: .87rem; font-weight: 750; }
.choice-pill { display: inline-block; margin: 0 7px 8px 0; }
.choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill span { display: block; padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfaf7; color: var(--muted); font-size: .88rem; font-weight: 650; }
.choice-pill input:checked + span { border-color: var(--ink); background: var(--ink); color: white; }
.choice-pill input:focus-visible + span { outline: 3px solid rgba(111,72,245,.28); }
.exact-lyrics { margin: 15px 0 4px; padding: 18px; border-radius: 17px; background: #f4f1ff; }
.exact-lyrics p { margin: 9px 0 0; color: var(--muted); font-size: .79rem; }
.advanced-options { margin-top: 20px; border-top: 1px solid var(--line); }
.advanced-options summary { padding: 18px 2px 10px; font-weight: 750; }
.advanced-options summary span { margin-left: 5px; color: var(--muted); font-size: .72rem; font-weight: 550; }
.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 8px 0 12px; }
.options-grid label { font-size: .8rem; font-weight: 700; }
.options-grid input, .options-grid select { margin-top: 7px; }
.quality-field { display: block; margin-top: 20px; font-size: .84rem; font-weight: 750; }
.quality-field select { margin-top: 8px; }
.generation-mode-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; padding: 0; border: 0; }
.generation-mode-choice legend { grid-column: 1 / -1; margin-bottom: 2px; font-size: .86rem; font-weight: 750; }
.generation-mode-choice label { position: relative; }
.generation-mode-choice input { position: absolute; opacity: 0; pointer-events: none; }
.generation-mode-choice span { min-height: 84px; display: flex; flex-direction: column; justify-content: center; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fbfaf7; transition: border-color .16s ease, background .16s ease; }
.generation-mode-choice b { font-size: .88rem; }
.generation-mode-choice small { margin-top: 5px; color: var(--muted); font-size: .72rem; }
.generation-mode-choice input:checked + span { border-color: var(--accent); background: #f2efff; box-shadow: 0 0 0 3px rgba(111,72,245,.08); }
.generation-mode-choice input:focus-visible + span { outline: 3px solid rgba(111,72,245,.28); }
.source-image-field { margin: 0 0 22px; padding: 17px; border-radius: 18px; background: #f4f1ff; }
.source-image-field > label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .84rem; font-weight: 750; }
.source-image-field > label small { color: var(--muted); font-weight: 500; }
.source-image-field input[type="file"] { width: 100%; padding: 11px; border: 1px dashed #7f92bc; border-radius: 13px; background: white; font-size: .8rem; }
.source-image-preview { position: relative; overflow: hidden; margin-top: 12px; border-radius: 14px; background: #111; }
.source-image-preview img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.source-image-preview button { position: absolute; right: 10px; bottom: 10px; padding: 8px 11px; border: 0; border-radius: 10px; background: rgba(16,16,20,.88); color: white; font-size: .72rem; font-weight: 750; }
.image-edit-help { display: grid; gap: 5px; margin-top: 10px; padding: 13px 15px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: #f6f3ff; }
.image-edit-help span { color: var(--accent-dark); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.image-edit-help small { color: var(--muted); line-height: 1.4; }
.primary-button, .secondary-button {
    min-height: 51px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 21px;
    border: 1px solid transparent; border-radius: 15px; font-weight: 800; transition: transform .15s ease, background .15s ease;
}
.primary-button { background: var(--ink); color: white; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { border-color: var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { border-color: #bcb7c5; background: #faf9f6; }
.create-button { width: 100%; margin-top: 16px; min-height: 58px; background: var(--accent); font-size: 1rem; letter-spacing: .04em; }
.form-hint { margin: 11px 0 0; color: var(--muted); text-align: center; font-size: .76rem; }
.field-error { margin: 7px 0; color: var(--danger); font-size: .84rem; }
.creation-cost-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; color: var(--muted); font-size: .82rem; }
.creation-cost-summary > span { white-space: nowrap; }
.creation-cost-summary p { margin: 0; color: var(--danger); text-align: right; line-height: 1.45; }

.creation-loader { position: fixed; z-index: 20; inset: 0; display: grid; place-content: center; padding: 25px; background: rgba(247,246,241,.96); text-align: center; }
.creation-loader[hidden], [hidden] { display: none !important; }
.creation-loader h2, .waiting-state h1 { margin: 22px 0 8px; font-size: 1.7rem; letter-spacing: -.03em; }
.creation-loader p, .waiting-state p { margin: 0; color: var(--muted); }
.loader-orb { width: 95px; height: 95px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: var(--ink); color: var(--lime); box-shadow: 0 0 0 14px rgba(111,72,245,.08); animation: breathe 1.5s ease-in-out infinite; }
.progress-heading { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin-top: 26px; }
.progress-percent { font-size: 1.35rem; font-weight: 850; letter-spacing: -.04em; }
.progress-estimate { color: var(--muted); font-size: .67rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.progress-track { width: min(420px, 100%); height: 10px; overflow: hidden; margin: 12px auto 0; border-radius: 999px; background: #e6e2ef; box-shadow: inset 0 1px 2px rgba(16,16,20,.06); }
.progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #536a9e); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.progress-track--overlay { width: min(360px, 78vw); }
.waiting-state small { display: block; margin-top: 12px; color: #908d98; font-size: .76rem; line-height: 1.45; }
.loader-orb span { font-size: 2rem; }
@keyframes breathe { 50% { transform: scale(1.07); box-shadow: 0 0 0 24px rgba(111,72,245,.03); } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

.result-page { max-width: 820px; margin: 0 auto; }
.result-heading { margin-bottom: 25px; text-align: center; }
.result-heading h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
.waiting-state, .empty-state { max-width: 580px; margin: 50px auto; padding: 45px 25px; text-align: center; }
.empty-state h1, .empty-state h2 { margin: 16px 0 8px; }
.empty-state p { margin: 0 auto 23px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto; border-radius: 50%; background: #eeebf7; color: var(--accent); font-size: 1.7rem; }
.result-preview { overflow: hidden; padding: 12px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.result-preview img, .result-preview video { display: block; width: 100%; max-height: 670px; border-radius: 17px; object-fit: contain; background: #111; }
.result-preview audio { display: block; width: calc(100% - 24px); margin: -26px 12px 12px; position: relative; }
.result-source-image { display: grid; grid-template-columns: 1fr 160px; align-items: center; gap: 18px; margin: 0 0 15px; padding: 14px 14px 14px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.result-source-image span, .result-source-image small { display: block; }
.result-source-image span { font-size: .83rem; font-weight: 800; }
.result-source-image small { margin-top: 4px; color: var(--muted); }
.result-source-image img { width: 160px; height: 105px; border-radius: 13px; object-fit: cover; background: #111; }
.result-input-media{margin:18px 0 0;padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.result-input-media-heading{display:grid;gap:3px;margin-bottom:12px}
.result-input-media-heading span{color:var(--muted);font-size:.67rem;font-weight:850;letter-spacing:.07em;text-transform:uppercase}
.result-input-media-heading strong{font-size:.88rem}
.result-input-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:10px}
.result-input-media figure{min-width:0;overflow:hidden;margin:0;border:1px solid var(--line);border-radius:14px;background:#111}
.result-input-media img,.result-input-media video{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain}
.result-input-media figcaption{padding:8px 9px;background:var(--surface);font-size:.68rem;font-weight:800}
.audio-art { min-height: 330px; display: grid; place-content: center; justify-items: center; gap: 18px; border-radius: 17px; background: var(--ink); color: var(--lime); }
.audio-art svg { width: 76px; height: 76px; }
.audio-art span { font-size: .72rem; font-weight: 800; letter-spacing: .2em; }
.text-result { padding: clamp(20px, 5vw, 50px); font-family: ui-serif, Georgia, serif; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.8; white-space: normal; }
.text-result--markdown { overflow-wrap: anywhere; }
.text-result--markdown > :first-child { margin-top: 0; }
.text-result--markdown > :last-child { margin-bottom: 0; }
.text-result--markdown h1, .text-result--markdown h2, .text-result--markdown h3 { margin: 1.25em 0 .55em; line-height: 1.2; letter-spacing: -.025em; }
.text-result--markdown h1 { font-size: 1.55rem; }
.text-result--markdown h2 { font-size: 1.3rem; }
.text-result--markdown h3 { font-size: 1.08rem; }
.text-result--markdown p, .text-result--markdown ul, .text-result--markdown ol, .text-result--markdown blockquote, .text-result--markdown pre { margin: .8em 0; }
.text-result--markdown ul, .text-result--markdown ol { padding-left: 1.35rem; }
.text-result--markdown blockquote { padding: .15rem 0 .15rem 1rem; border-left: 3px solid #7f92bc; color: var(--muted); }
.text-result--markdown code { padding: .15em .35em; border-radius: 6px; background: #efedf4; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.text-result--markdown pre { overflow-x: auto; padding: 14px; border-radius: 14px; background: #17161d; color: #f5f4f8; }
.text-result--markdown pre code { padding: 0; background: transparent; color: inherit; }
.text-result--markdown a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.result-actions form { display: contents; }
.modify-form { margin-top: 18px; padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.modify-form .primary-button { margin-top: 12px; }
.result-lyrics { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 35px rgba(20,17,35,.05); }
.result-lyrics-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: #f5f2ff; }
.result-lyrics-heading span { color: var(--accent-dark); font-size: .68rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.result-lyrics-heading strong { font-size: .93rem; }
.result-lyrics pre { margin: 0; padding: 22px 20px 25px; overflow-wrap: anywhere; white-space: pre-wrap; color: #2d2b33; font: 500 1rem/1.75 ui-serif, Georgia, serif; }

.creation-summary { margin-top: 32px; padding: 18px 20px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.55); }
.creation-summary span { color: var(--muted); font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.creation-summary p { margin: 6px 0 0; line-height: 1.5; }

.contact-page { max-width: 720px; margin: 0 auto; }
.contact-heading { margin-bottom: 24px; }
.contact-heading h1 { margin: 0; font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1.02; letter-spacing: -.055em; }
.contact-heading > p:not(.eyebrow) { max-width: 590px; margin: 16px 0 0; color: var(--muted); line-height: 1.55; }
.contact-form { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.contact-form > label, .contact-grid label { display: block; margin-top: 17px; font-size: .84rem; font-weight: 750; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-grid label { margin-top: 0; }
.contact-form input, .contact-form textarea { margin-top: 8px; }
.contact-submit { width: 100%; margin-top: 19px; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.contact-admin-panel { margin-top: 14px; }
.contact-message-list { margin-top: 16px; }
.contact-message-row { display: grid; grid-template-columns: minmax(210px, .85fr) 2fr auto; gap: 18px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-message-meta strong, .contact-message-meta span, .contact-message-meta time { display: block; }
.contact-message-meta span, .contact-message-meta time { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.contact-message-meta a { color: var(--accent-dark); }
.contact-message-row > p { margin: 0; color: #494752; font-size: .9rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-message-status { white-space: nowrap; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-heading h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
.compact { min-height: 44px; padding: 0 16px; }
.history-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.history-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.history-preview { position: relative; height: 185px; display: grid; place-items: center; overflow: hidden; background: #191820; color: var(--lime); }
.history-preview img, .history-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.history-preview video { pointer-events: none; }
.history-preview svg { width: 55px; height: 55px; }
.history-play {
    position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
    display: grid; place-items: center; width: 48px; height: 48px; padding-left: 3px;
    border-radius: 50%; background: rgba(16,16,20,.72); color: white;
    font-size: 1rem; box-shadow: 0 6px 22px rgba(0,0,0,.28); pointer-events: none;
}
.history-body { position: relative; z-index: 1; padding: 16px; background: var(--surface); color: var(--ink); }
.history-body > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-body time { color: #5f5b66; font-size: .72rem; }
.history-body p { min-height: 42px; margin: 13px 0; color: var(--ink); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.history-body > a { color: var(--accent-dark); font-size: .84rem; font-weight: 800; }
.status { display: inline-block; padding: 5px 8px; border-radius: 20px; background: #eeeaf9; color: var(--accent-dark); font-size: .68rem; font-weight: 800; }
.status--failed { background: #fde7e7; color: var(--danger); }
.status--completed { background: #e9f6d6; color: #4b7016; }

.app-pagination {
    display: flex;
    justify-content: center;
    margin: 34px 0 0;
}
.app-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}
.app-pagination__button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: .86rem;
    font-weight: 800;
    line-height: 1;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
a.app-pagination__button:hover {
    transform: translateY(-1px);
    border-color: #7f92bc;
    background: #f4f1ff;
    color: var(--accent-dark);
}
.app-pagination__button.is-current {
    border-color: var(--ink);
    background: var(--ink);
    color: white;
}
.app-pagination__button.is-disabled {
    color: #aaa6b0;
    background: #f2f0eb;
    cursor: default;
}
.app-pagination__ellipsis {
    min-width: 24px;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

.auth-card { max-width: 490px; margin: 10px auto; padding: clamp(25px, 6vw, 42px); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0; font-size: 2.4rem; letter-spacing: -.045em; }
.auth-card > p:not(.eyebrow):not(.auth-switch) { margin: 9px 0 25px; color: var(--muted); }
.auth-card label { display: block; margin: 14px 0; font-size: .82rem; font-weight: 750; }
.auth-card label small { color: var(--muted); font-weight: 500; }
.auth-card input { margin-top: 7px; }
.auth-card .primary-button { width: 100%; margin-top: 8px; }
.auth-card .check-label { display: flex; align-items: center; gap: 7px; font-weight: 550; }
.auth-card .check-label input { width: auto; margin: 0; }
.auth-switch { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: .86rem; }
.auth-switch a { color: var(--accent); font-weight: 750; }

.credit-balance-link { padding: 7px 11px; border-radius: 20px; background: #eeebf9; color: var(--accent-dark); }
.credits-page { max-width: 1000px; margin: 0 auto; }
.credits-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.credits-page-heading .eyebrow { margin-bottom: 5px; }
.credits-page-heading h1 { margin: 0; font-size: clamp(2.65rem, 6vw, 4.25rem); line-height: 1; letter-spacing: -.06em; }
.credits-create-link { display: inline-flex; align-items: center; gap: 9px; padding: 10px 0; color: var(--muted); font-size: .87rem; font-weight: 750; }
.credits-create-link span { color: var(--accent); font-size: 1.1rem; transition: transform .15s ease; }
.credits-create-link:hover { color: var(--ink); }
.credits-create-link:hover span { transform: translateX(3px); }
.credits-wallet { position: relative; min-height: 270px; display: flex; align-items: center; overflow: hidden; padding: 39px 44px; border-radius: 32px; background: var(--ink); color: white; box-shadow: 0 26px 70px rgba(16,16,20,.16); }
.credits-wallet-copy { position: relative; z-index: 1; }
.credits-wallet-label { color: #b8b6c1; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.credits-wallet-value { display: flex; align-items: end; gap: 15px; margin-top: 15px; }
.credits-wallet-value strong { font-size: clamp(4.7rem, 11vw, 6.7rem); font-weight: 850; line-height: .78; letter-spacing: -.08em; }
.credits-wallet-value span { padding-bottom: 1px; color: #d0ced7; font-size: .9rem; font-weight: 700; line-height: 1.2; }
.credits-wallet-copy > p { margin: 26px 0 0; color: #9f9da8; font-size: .83rem; }
.credits-wallet-mark { position: absolute; top: 50%; right: 68px; width: 142px; height: 142px; display: grid; place-items: center; transform: translateY(-50%); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 18px rgba(111,72,245,.16), 0 0 0 38px rgba(255,255,255,.045); }
.credits-wallet-mark span { display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; font-size: 2.15rem; font-weight: 850; }
.pending-credit-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 10px 35px rgba(20,17,35,.06); }
.pending-credit-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; background: #ede8ff; color: var(--accent-dark); font-size: 1.15rem; font-weight: 850; }
.pending-credit-card div > span, .pending-credit-card div > strong { display: block; }
.pending-credit-card div > span { color: var(--accent-dark); font-size: .67rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.pending-credit-card div > strong { margin-top: 3px; font-size: 1.04rem; }
.pending-credit-card p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.pending-credit-card p b { color: var(--ink); }
.promo-redeem { max-width: 520px; margin: 18px auto 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.72); }
.promo-redeem summary { color: var(--muted); text-align: center; font-size: .82rem; font-weight: 750; }
.promo-redeem form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 13px; }
.promo-redeem input { text-transform: uppercase; }
.promo-redeem .field-error { text-align: center; }
.payment-feedback { margin: 16px 0 0; padding: 13px 16px; border-radius: 14px; background: #eef7de; color: #3f5d16; text-align: center; font-size: .86rem; }
.payment-feedback--error { background: #fde9e9; color: var(--danger); }
.credits-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-top: 72px; }
.credits-section-heading .eyebrow { margin-bottom: 6px; }
.credits-section-heading h2 { margin: 0; font-size: clamp(2.15rem, 5vw, 3.35rem); line-height: 1; letter-spacing: -.055em; }
.credits-section-heading > p { max-width: 300px; margin: 0 0 4px; color: var(--muted); font-size: .9rem; line-height: 1.45; text-align: right; }
.credit-packages { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; gap: 16px; margin-top: 30px; }
.credit-package { position: relative; display: flex; min-height: 340px; flex-direction: column; padding: 26px; border-radius: 28px; background: var(--surface); box-shadow: 0 15px 48px rgba(20,17,35,.065); }
.credit-package--featured { background: var(--ink); color: white; box-shadow: 0 24px 65px rgba(16,16,20,.17); transform: translateY(-7px); }
.credit-package-topline { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.credit-package-topline > span { font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.credit-package-topline em { padding: 6px 9px; border-radius: 20px; background: var(--lime); color: var(--ink); font-size: .61rem; font-style: normal; font-weight: 850; white-space: nowrap; }
.credit-package-amount { margin-top: 35px; }
.credit-package-amount strong { display: block; font-size: 4rem; line-height: .85; letter-spacing: -.07em; }
.credit-package-amount span { display: block; margin-top: 11px; color: var(--muted); font-size: .84rem; }
.credit-package--featured .credit-package-amount span { color: #aaa8b2; }
.credit-package-price { margin: 25px 0 0; }
.credit-package-price strong { font-size: 1.27rem; }
.credit-package-fit { min-height: 30px; margin: 13px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.credit-package-fit > span { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 3px; border-radius: 50%; background: #f1eff3; font-weight: 850; }
.credit-package-fit.is-enough { color: #4c7117; }
.credit-package-fit.is-enough > span { background: #e9f5d7; }
.credit-package--featured .credit-package-fit { color: #aaa8b2; }
.credit-package--featured .credit-package-fit > span { background: #302f38; }
.credit-package--featured .credit-package-fit.is-enough { color: var(--lime); }
.credit-package--featured .credit-package-fit.is-enough > span { background: rgba(200,250,114,.12); }
.credit-package form { display: contents; }
.credit-package .primary-button { width: 100%; margin-top: auto; }
.credit-package--featured .primary-button { background: var(--accent); }
.credit-package--featured .primary-button:hover { background: #536a9e; }
.payment-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 26px 0 0; color: var(--muted); text-align: center; font-size: .75rem; }
.payment-note > span { width: 20px; height: 20px; display: inline-grid; place-items: center; margin-right: 2px; border-radius: 50%; background: #ebe8f5; color: var(--accent-dark); font-size: .68rem; font-weight: 850; }
.payment-note strong { color: #4d4a56; }
.payment-dialog { width: min(450px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; padding: 0; border: 0; border-radius: 29px; background: transparent; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.payment-dialog::backdrop { background: rgba(16,16,20,.62); backdrop-filter: blur(6px); }
.payment-dialog form { position: relative; padding: 35px; border-radius: 29px; background: var(--surface); }
.payment-dialog-heading { padding-right: 38px; }
.payment-dialog h2 { margin: 0; font-size: 2.25rem; line-height: 1; letter-spacing: -.05em; }
.payment-dialog-summary { display: inline-block; margin: 13px 0 0; padding: 7px 10px; border-radius: 10px; background: #eeebfa; color: var(--accent-dark); font-size: .78rem; font-weight: 800; }
.payment-dialog-fields { margin-top: 25px; }
.payment-dialog label { display: block; margin-top: 14px; font-size: .8rem; font-weight: 750; }
.payment-dialog label:first-of-type { margin-top: 0; }
.payment-dialog label input { margin-top: 7px; }
.payment-dialog .primary-button { width: 100%; margin-top: 20px; }
.payment-dialog small { display: block; margin-top: 12px; color: var(--muted); text-align: center; line-height: 1.4; }
.payment-dialog-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #efedf3; color: var(--ink); font-size: 1.35rem; }

.metrics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.metrics-grid article, .admin-panel { padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.metrics-grid span { display: block; color: var(--muted); font-size: .76rem; }
.metrics-grid strong { display: block; margin-top: 8px; font-size: 1.7rem; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.admin-panel h2 { margin: 0 0 15px; font-size: 1rem; }
.stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.providers-panel { margin-top: 14px; }
.providers-panel form { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-top: 1px solid var(--line); }
.providers-panel small { display: block; margin-top: 3px; color: var(--muted); }
.model-pricing-panel { margin-top: 14px; }
.vertex-admin-panel { margin-top: 14px; }
.vertex-status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.vertex-status-grid > span { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.vertex-status-grid strong { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.vertex-status-grid b { font-size: .75rem; overflow-wrap: anywhere; }
.vertex-actions { display: grid; gap: 14px; margin-top: 14px; }
.vertex-video-test-form { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f6; }
.vertex-video-test-form label { display: grid; gap: 6px; font-size: .75rem; font-weight: 700; }
.vertex-video-test-form textarea, .vertex-video-test-form select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); padding: 10px 11px; font: inherit; }
.vertex-test-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vertex-video-test-form small { color: var(--muted); font-size: .7rem; }
.vertex-test-result { display: grid; gap: 9px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.vertex-test-result > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vertex-test-result video { width: min(100%, 720px); max-height: 520px; border-radius: 12px; background: #111; }
.vertex-proof { color: #356a1b; font-size: .76rem; }
.credit-rate-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.credit-rate-strip span { padding: 8px 10px; border-radius: 999px; background: #f2efff; color: var(--accent-dark); font-size: .72rem; }
.credit-rate-strip strong { margin-right: 4px; }
.model-pricing-note { margin: 10px 0 0; color: var(--muted); font-size: .75rem; }
.model-pricing-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
.model-pricing-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .76rem; }
.model-pricing-table th, .model-pricing-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.model-pricing-table th { background: #faf9f6; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; }
.model-pricing-table tbody tr:last-child td { border-bottom: 0; }
.model-pricing-table td > strong, .model-pricing-table td small { display: block; }
.model-pricing-table td small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.model-pricing-table code { font-size: .72rem; overflow-wrap: anywhere; }
.model-route-cell { min-width: 310px; }
.model-route-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 7px; align-items: center; }
.model-route-form select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: .72rem; }
.model-route-save { min-height: 40px; padding: 8px 11px; }
.model-route-override { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.model-route-override > span { color: var(--accent-dark); font-size: .68rem; font-weight: 800; }
.model-route-override form { margin: 0; }
.model-route-override button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: .68rem; text-decoration: underline; cursor: pointer; }
.route-state { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: .67rem; font-weight: 800; }
.route-state.is-active { background: #e8f8df; color: #3b6e1e; }
.route-state.is-inactive { background: #f3ecec; color: #8b4a4a; }
.credit-admin-panel { margin-top: 14px; }
.promo-admin-panel { margin-top: 14px; }
.promo-create-form { display: grid; grid-template-columns: 1.2fr .7fr .9fr 1.2fr auto auto; align-items: end; gap: 8px; margin-top: 18px; }
.promo-create-form label { color: var(--muted); font-size: .7rem; font-weight: 750; }
.promo-create-form label small { font-weight: 500; }
.promo-create-form input:not([type="checkbox"]) { margin-top: 6px; }
.promo-active-label { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 8px; color: var(--ink) !important; white-space: nowrap; }
.promo-code-list { margin-top: 20px; }
.promo-code-list > article { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-top: 1px solid var(--line); }
.promo-code-list strong, .promo-code-list small { display: block; }
.promo-code-list small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.promo-history { margin-top: 25px; }
.promo-history h3 { margin: 0 0 8px; font-size: .85rem; }
.promo-history-row { display: grid; grid-template-columns: .7fr 1.4fr .8fr .8fr; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: .76rem; }
.promo-history-row small { display: block; margin-top: 2px; color: var(--muted); }
.promo-history-row time { color: var(--muted); text-align: right; }
.admin-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.admin-panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.user-search { display: flex; gap: 8px; }
.user-search input { min-width: 240px; }
.credit-users { margin-top: 18px; }
.credit-user-row { display: grid; grid-template-columns: minmax(180px, .8fr) 2fr; gap: 18px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.credit-user-identity strong, .credit-user-identity small, .credit-user-identity span { display: block; }
.credit-user-identity small { margin-top: 3px; color: var(--muted); }
.credit-user-identity span { margin-top: 7px; color: var(--accent-dark); font-size: .82rem; font-weight: 800; }
.credit-user-row form { display: grid; grid-template-columns: 120px 110px minmax(150px, 1fr) auto; gap: 8px; }
.credit-user-row input, .credit-user-row select, .credit-user-row button { min-height: 44px; }
.toggle { width: 48px; height: 28px; padding: 3px; border: 0; border-radius: 20px; background: #d6d3dc; }
.toggle span { display: block; width: 22px; height: 22px; border-radius: 50%; background: white; transition: transform .15s ease; }
.toggle.is-on { background: var(--accent); }
.toggle.is-on span { transform: translateX(20px); }
.mobile-nav { display: none; }

@media (max-width: 760px) {
    .site-header { width: calc(100% - 28px); height: 67px; }
    .top-nav { display: none; }
    .page-shell { width: calc(100% - 28px); padding: 34px 0 112px; }
    .site-footer { width: calc(100% - 28px); margin: -72px auto 94px; padding: 16px 0; }
    .hero { margin-top: 7px; margin-bottom: 30px; text-align: left; }
    .hero h1 { font-size: clamp(2.3rem, 12vw, 3.35rem); }
    .hero-copy { margin-left: 0; }
    .creation-grid { grid-template-columns: 1fr; gap: 10px; }
    .creation-choice { min-height: 94px; padding: 17px; border-radius: 18px; }
    .choice-icon { width: 50px; height: 50px; border-radius: 15px; }
    .promise { text-align: left; line-height: 1.5; }
    .creation-form { margin: 0 -3px; padding: 19px; border-radius: 21px; }
    .creator-heading h1 { font-size: 1.85rem; }
    .options-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 20px; border-radius: 21px; }
    .contact-message-row { grid-template-columns: 1fr; gap: 10px; }
    .lyrics-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .generation-mode-choice { grid-template-columns: 1fr; }
    .generation-mode-choice span { min-height: 72px; }
    .source-image-field > label { display: block; }
    .source-image-field > label small { display: block; margin-top: 4px; }
    .choice-pill { margin: 0; }
    .choice-pill span { height: 100%; display: grid; place-items: center; padding: 10px; text-align: center; }
    .result-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .result-actions .primary-button { grid-column: 1 / -1; }
    .result-actions .secondary-button { width: 100%; }
    .result-source-image { grid-template-columns: 1fr 105px; padding: 12px 12px 12px 16px; }
    .result-source-image img { width: 105px; height: 82px; }
    .history-grid { grid-template-columns: 1fr; }
    .history-card { display: grid; grid-template-columns: 116px 1fr; }
    .history-preview { height: 100%; min-height: 145px; }
    .history-body p { min-height: 0; }
    .section-heading { align-items: center; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .admin-columns { grid-template-columns: 1fr; }
    .credit-rate-strip { gap: 6px; }
    .credit-rate-strip span { border-radius: 12px; }
    .model-route-form { grid-template-columns: 1fr; }
    .model-route-save { width: 100%; }
    .vertex-status-grid { grid-template-columns: 1fr 1fr; }
    .vertex-test-options { grid-template-columns: 1fr; }
    .credit-packages { grid-template-columns: 1fr; }
    .credits-page-heading { align-items: center; gap: 15px; margin-bottom: 22px; }
    .credits-page-heading h1 { font-size: clamp(2.45rem, 12vw, 3.2rem); }
    .credits-create-link { padding: 9px 0; font-size: .76rem; white-space: nowrap; }
    .credits-wallet { min-height: 235px; align-items: end; padding: 28px 25px; border-radius: 26px; }
    .credits-wallet-value { gap: 10px; margin-top: 14px; }
    .credits-wallet-value strong { font-size: clamp(4.4rem, 22vw, 5.8rem); }
    .credits-wallet-value span { padding-bottom: 0; font-size: .75rem; }
    .credits-wallet-copy > p { margin-top: 23px; }
    .credits-wallet-mark { top: 25px; right: -15px; width: 100px; height: 100px; transform: none; box-shadow: 0 0 0 13px rgba(111,72,245,.14), 0 0 0 27px rgba(255,255,255,.04); }
    .credits-wallet-mark span { width: 48px; height: 48px; font-size: 1.45rem; }
    .pending-credit-card { align-items: start; gap: 13px; padding: 16px; border-radius: 18px; }
    .pending-credit-icon { width: 39px; height: 39px; border-radius: 12px; }
    .pending-credit-card div > strong { font-size: .96rem; }
    .credits-section-heading { display: block; margin-top: 52px; }
    .credits-section-heading h2 { font-size: clamp(2.1rem, 10vw, 2.7rem); }
    .credits-section-heading > p { margin: 10px 0 0; text-align: left; }
    .credit-packages { gap: 13px; margin-top: 24px; }
    .credit-package, .credit-package--featured { min-height: 300px; padding: 24px; border-radius: 24px; transform: none; }
    .credit-package-amount { margin-top: 31px; }
    .credit-package-amount strong { font-size: 3.75rem; }
    .credit-package-price { margin-top: 22px; }
    .payment-note { max-width: 290px; flex-wrap: wrap; margin-right: auto; margin-left: auto; line-height: 1.45; }
    .creation-cost-summary { display: block; }
    .creation-cost-summary p { margin-top: 9px; text-align: left; }
    .payment-dialog form { padding: 28px 22px 24px; }
    .admin-panel-heading { display: block; }
    .user-search { margin-top: 14px; }
    .user-search input { min-width: 0; }
    .credit-user-row { grid-template-columns: 1fr; }
    .credit-user-row form { grid-template-columns: 1fr 1fr; }
    .credit-user-row form input[name="reason"] { grid-column: 1 / -1; }
    .credit-user-row form button { grid-column: 1 / -1; }
    .promo-create-form { grid-template-columns: 1fr 1fr; }
    .promo-create-form label:first-child, .promo-create-form label:nth-child(4), .promo-create-form button { grid-column: 1 / -1; }
    .promo-active-label { padding: 0; }
    .promo-history-row { grid-template-columns: 1fr 1fr; }
    .promo-history-row time { text-align: left; }
    .mobile-nav {
        position: fixed; z-index: 15; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom));
        display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 7px;
        border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(16,16,20,.95); color: white; box-shadow: 0 14px 45px rgba(0,0,0,.25); backdrop-filter: blur(14px);
    }
    .mobile-nav a, .mobile-nav button { width: 100%; display: grid; place-items: center; gap: 2px; padding: 5px; border: 0; background: transparent; color: #dddbe2; font-size: .65rem; }
    .mobile-nav span { color: var(--lime); font-size: 1.2rem; }
    .mobile-nav form { margin: 0; }
}

@media (max-width: 390px) {
    .history-card { grid-template-columns: 98px 1fr; }
    .metrics-grid { grid-template-columns: 1fr; }
}


.ai-routing-page { max-width: 1500px; }
.ai-routing-heading { align-items: flex-start; }
.ai-routing-intro { max-width: 860px; margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.ai-routing-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 18px 0 14px; }
.ai-routing-summary article { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ai-routing-summary span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.ai-routing-summary strong { font-size: 1.05rem; }
.ai-routing-summary small { color: var(--muted); line-height: 1.4; }
.ai-routing-principles, .ai-routing-group { margin-top: 14px; }
.ai-routing-principle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.ai-routing-principle-grid span { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; font-size: .76rem; line-height: 1.45; }
.ai-routing-credit-rates { margin-top: 14px; }
.ai-routing-table { min-width: 1720px; }
.ai-routing-recommendation p { margin: 7px 0 4px; max-width: 380px; line-height: 1.4; }
.ai-routing-evidence { font-style: italic; }
.ai-routing-current { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-state.is-warning { background: #fff2d8; color: #8b5b00; }
.ai-routing-preset-form { margin-top: 9px; }
.ai-routing-expert { margin-top: 9px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ai-routing-expert summary { cursor: pointer; font-weight: 800; font-size: .72rem; }
.ai-routing-expert form { display: grid; gap: 8px; margin-top: 9px; padding: 10px; background: #faf9f6; border-radius: 10px; }
.ai-routing-expert label { display: grid; gap: 4px; font-size: .68rem; font-weight: 800; }
.ai-routing-expert input, .ai-routing-expert select, .ai-routing-expert textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 8px 9px; font: inherit; }
.ai-routing-expert textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.ai-routing-reset { margin-top: 7px; }
.ai-routing-reset button { border: 0; background: transparent; color: #8b4a4a; padding: 0; font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.ai-routing-entry-panel .admin-panel-heading { align-items: center; }

/* Les fonctions en pause restent consultables depuis le panneau admin. */
.admin-paused-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.admin-paused-links .secondary-button { white-space: nowrap; }
@media (max-width: 740px) {
    .admin-paused-links { justify-content: flex-start; width: 100%; }
}

@media (max-width: 900px) {
    .ai-routing-summary, .ai-routing-principle-grid { grid-template-columns: 1fr; }
}

.ai-routing-reset-all { border: 0; background: transparent; color: #8b4a4a; padding: 2px 0 0; font: inherit; font-size: .7rem; font-weight: 800; text-align: left; cursor: pointer; }


.ai-reco-economics { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ai-reco-economics strong { color: var(--ink); font-size: .7rem; }
.ai-economics-cell { min-width: 265px; }
.ai-profit-badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: .67rem; font-weight: 850; }
.ai-profit-badge.is-excellent { background: #ddf7d5; color: #285f17; }
.ai-profit-badge.is-healthy { background: #ebf7df; color: #4f6d18; }
.ai-profit-badge.is-watch { background: #fff2c9; color: #7c5900; }
.ai-profit-badge.is-weak { background: #ffe4cb; color: #8b4700; }
.ai-profit-badge.is-loss { background: #fde0e0; color: #9a2828; }
.ai-profit-badge.is-unknown { background: #ecebf0; color: #65616d; }
.ai-profit-value { display: block; margin-top: 8px; font-size: 1.05rem; }
.ai-profit-value.is-negative, .ai-economics-pack-table .is-negative { color: #a12c2c; }
.ai-economics-pack-table .is-positive { color: #326b1f; }
.ai-economics-details { margin-top: 9px; }
.ai-economics-details summary { cursor: pointer; color: var(--accent-dark); font-size: .7rem; font-weight: 800; }
.ai-economics-assumptions { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.ai-economics-assumptions span { padding: 4px 6px; border-radius: 7px; background: #f5f3f8; color: var(--muted); font-size: .64rem; }
.ai-economics-pack-table { width: 100%; min-width: 650px; border-collapse: collapse; margin-top: 8px; font-size: .67rem; }
.ai-economics-pack-table th, .ai-economics-pack-table td { padding: 7px 8px; border: 1px solid var(--line); white-space: nowrap; }
.ai-economics-pack-table th { background: #faf9f6; color: var(--muted); text-transform: none; letter-spacing: 0; }
.ai-economics-preview { grid-column: 1 / -1; min-height: 31px; padding: 7px 9px; border-radius: 9px; background: #f7f6fa; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.ai-economics-preview.is-excellent, .ai-economics-preview.is-healthy { background: #edf8e7; color: #3d651f; }
.ai-economics-preview.is-watch { background: #fff4d8; color: #765700; }
.ai-economics-preview.is-weak { background: #ffead8; color: #804900; }
.ai-economics-preview.is-loss { background: #fde8e8; color: #932f2f; }
.ai-economics-preview.is-unknown { background: #efedf2; color: #66616d; }


.ai-route-usage-cell, .ai-route-recommendation-cell, .ai-route-price-cell { background: #fcfbf8; }
.ai-route-chain-start td { border-top: 2px solid #ded9e7; }
.ai-route-chain-fallback td { background-clip: padding-box; }
.ai-route-chain-mini { display: grid; gap: 4px; margin: 10px 0; }
.ai-route-chain-mini span { display: block; font-size: .68rem; line-height: 1.35; }
.ai-route-chain-mini b { display: inline-block; min-width: 68px; color: var(--accent-dark); }
.ai-route-chain-mini i { margin-left: 9px; color: var(--muted); font-size: .62rem; font-style: normal; }
.ai-recommended-chain { display: grid; gap: 7px; margin-top: 10px; }
.ai-recommended-chain > span { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: .68rem; }
.ai-recommended-chain b { color: var(--accent-dark); }
.ai-route-role-cell { min-width: 145px; }
.ai-route-role { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .67rem; }
.ai-route-role.is-primary { background: #e8f8df; color: #356a1b; }
.ai-route-role.is-fallback { background: #eef0f5; color: #5a5f6d; }
.ai-route-price-cell { min-width: 135px; }
.ai-economics-unknown-detail { margin-top: 7px !important; color: #5f5b66 !important; }
.ai-economics-override-warning { margin-top: 6px !important; padding: 7px 8px; border-radius: 8px; background: #fff2d8; color: #805700 !important; }
.ai-economics-config-warning { margin-top: 6px !important; padding: 7px 8px; border-radius: 8px; background: #fde8e8; color: #8f3030 !important; }
.ai-routing-howto { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #faf9f6; font-size: .75rem; line-height: 1.5; }
.ai-routing-howto strong { color: var(--accent-dark); }


.ai-price-protection { display: inline-flex; margin-bottom: 6px; padding: 5px 8px; border-radius: 999px; background: #fde8e8; color: #942f2f; font-size: .64rem; font-weight: 850; }

.generation-debug { max-width: 760px; margin: 20px auto; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f6; text-align: left; }
.generation-debug summary { cursor: pointer; font-weight: 800; }
.generation-debug article { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.generation-debug article:first-of-type { margin-top: 12px; }
.generation-debug strong { display: block; font-size: .78rem; overflow-wrap: anywhere; }
.generation-debug p { margin: 5px 0 0 !important; color: #8b3030 !important; font-size: .74rem; line-height: 1.45; overflow-wrap: anywhere; }
.generation-debug small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.generation-debug .generation-debug-note {
    margin: 12px 0 4px !important;
    padding: 11px 12px;
    border: 1px solid #ead69b;
    border-radius: 11px;
    background: #fff8df;
    color: #6f5200 !important;
    font-size: .76rem;
    line-height: 1.5;
}


/* Legal pages and consent */
.legal-page{max-width:880px;margin:0 auto;padding:18px 0 48px}
.legal-page h1{margin-bottom:8px}
.legal-page h2{margin-top:28px;font-size:1.12rem}
.legal-page p{line-height:1.7}
.legal-lead{font-size:1.04rem;opacity:.88}
.legal-consent{display:flex!important;align-items:flex-start;gap:10px;margin:10px 0 4px}
.legal-consent input{width:auto!important;margin-top:4px;flex:0 0 auto}
.legal-consent span{font-size:.92rem;line-height:1.45}
.credit-user-controls{display:flex;flex-direction:column;gap:8px;min-width:min(100%,560px)}
.credit-user-controls form{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.credit-user-controls form input,.credit-user-controls form select{min-width:120px}


/* === PYGMALION PRISM — cinematic creative suite === */
body.pyg-prism{
    --pr-bg:#07101f;
    --pr-bg2:#0b1630;
    --pr-panel:rgba(14,28,55,.76);
    --pr-panel-strong:rgba(12,24,49,.93);
    --pr-line:rgba(163,194,255,.18);
    --pr-line-strong:rgba(142,181,255,.36);
    --pr-text:#f8f9ff;
    --pr-muted:#b3bdd2;
    --pr-violet:#94a9eb;
    --pr-purple:#94a9eb;
    --pr-blue:#22a7ff;
    --pr-cyan:#61e6ff;
    --pr-orange:#ff791f;
    --pr-green:#18d96b;
    --pr-lime:#a8ff8a;
    min-height:100vh;
    color:var(--pr-text);
    background:
        radial-gradient(circle at 50% 8%,rgba(33,117,255,.22),transparent 34rem),
        radial-gradient(circle at 14% 36%,rgba(144,53,255,.17),transparent 27rem),
        radial-gradient(circle at 88% 44%,rgba(0,207,255,.14),transparent 30rem),
        linear-gradient(180deg,#07101f 0%,#0a1530 54%,#101f39 100%);
    color-scheme:dark;
    overflow-x:hidden;
}
body.pyg-prism::before{
    content:"";
    position:fixed;
    z-index:-2;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(115deg,rgba(255,255,255,.025),transparent 20% 80%,rgba(255,255,255,.02)),
        repeating-linear-gradient(90deg,transparent 0 79px,rgba(131,172,255,.027) 80px),
        repeating-linear-gradient(0deg,transparent 0 79px,rgba(131,172,255,.02) 80px);
}
body.pyg-prism::after{
    content:"";
    position:fixed;
    z-index:-1;
    left:50%;
    bottom:-180px;
    width:min(1220px,92vw);
    height:420px;
    transform:translateX(-50%);
    border-radius:50%;
    background:radial-gradient(ellipse at center,rgba(54,136,255,.18),rgba(124,46,255,.07) 40%,transparent 68%);
    filter:blur(20px);
    pointer-events:none;
}

body.pyg-prism .site-header{
    position:sticky;
    z-index:60;
    top:8px;
    width:min(1280px,calc(100% - 28px));
    height:70px;
    margin:8px auto 0;
    padding:0 17px;
    border:1px solid rgba(183,207,255,.20);
    border-radius:22px;
    background:linear-gradient(90deg,rgba(12,27,54,.78),rgba(7,17,37,.92),rgba(20,30,55,.80));
    box-shadow:
        0 18px 60px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.09);
    backdrop-filter:blur(24px) saturate(135%);
}
body.pyg-prism .brand{gap:11px}
body.pyg-prism .brand-mark{
    width:42px;
    height:42px;
    border:1px solid rgba(97,230,255,.52);
    border-radius:13px;
    background:rgba(7,16,34,.82);
    color:#fff;
    box-shadow:
        0 0 0 1px rgba(139,69,255,.18),
        0 0 28px rgba(38,159,255,.17);
}
body.pyg-prism .brand strong{color:#fff;font-size:.92rem}
body.pyg-prism .brand small{color:#9da9c0}
body.pyg-prism .top-nav{gap:7px}
body.pyg-prism .top-nav>a,
body.pyg-prism .nav-button{
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 13px;
    border-radius:13px;
    color:#eef2ff;
    font-size:.79rem;
    font-weight:780;
    transition:transform .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease;
}
body.pyg-prism .top-nav>a:not(.top-nav-tool):not(.credit-balance-link):hover,
body.pyg-prism .nav-button:hover{
    background:rgba(255,255,255,.07);
    color:#fff;
}
body.pyg-prism .top-nav-tool{
    gap:7px;
    border:1px solid rgba(255,255,255,.07);
}
body.pyg-prism .top-nav-analyse{
    background:rgba(3,9,21,.82);
    color:#fff!important;
}
body.pyg-prism .top-nav-analyse span{color:#9dff75}
body.pyg-prism .top-nav-create{
    min-width:116px;
    background:linear-gradient(100deg,#536a9e,#1d9dff);
    color:#fff!important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.22),
        0 8px 26px rgba(73,75,255,.30),
        inset 0 1px 0 rgba(255,255,255,.22);
}
body.pyg-prism .top-nav-create span{color:#fff}
body.pyg-prism .top-nav-tool:hover{transform:translateY(-1px)}
body.pyg-prism .top-nav-create:hover{
    background:linear-gradient(100deg,#536a9e,#25b2ff);
    box-shadow:0 10px 34px rgba(69,81,255,.42);
}
body.pyg-prism .credit-balance-link{
    gap:6px;
    background:rgba(114,62,228,.19);
    color:#b3c3f1!important;
    font-weight:900!important;
}
body.pyg-prism .credit-balance-link span{color:#b3c3f1}
body.pyg-prism .nav-avatar{
    width:39px;
    min-height:39px;
    padding:0;
    border:2px solid rgba(255,255,255,.85);
    border-radius:50%;
    background:#fff;
    color:#07101f;
    font-weight:900;
}
body.pyg-prism .page-shell{
    width:min(1320px,calc(100% - 30px));
    padding:36px 0 110px;
}
body.pyg-prism .site-footer{
    width:min(1180px,calc(100% - 30px));
    border-top-color:rgba(255,255,255,.10);
    color:#8995ad;
}
body.pyg-prism .site-footer a{color:#b5c3de}

/* Cinematic home */
.prism-home{
    position:relative;
    min-height:calc(100vh - 120px);
    isolation:isolate;
}
.prism-stage{
    position:absolute;
    z-index:-1;
    inset:-35px -3vw auto;
    height:640px;
    overflow:hidden;
    pointer-events:none;
}
.prism-stage::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 50% 47%,rgba(255,255,255,.10),transparent 21rem),
        radial-gradient(ellipse at 50% 100%,rgba(48,157,255,.32),transparent 43%),
        linear-gradient(180deg,rgba(0,0,0,.05),rgba(8,15,31,.38));
}
.prism-stage::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:0;
    width:110%;
    height:165px;
    transform:translateX(-50%) perspective(400px) rotateX(62deg);
    transform-origin:center bottom;
    background:
        linear-gradient(90deg,transparent,rgba(77,182,255,.13),transparent),
        repeating-linear-gradient(90deg,rgba(106,191,255,.08) 0 1px,transparent 1px 85px),
        repeating-linear-gradient(0deg,rgba(106,191,255,.08) 0 1px,transparent 1px 60px);
    mask-image:linear-gradient(to top,black,transparent);
}
.prism-stage-orb{
    position:absolute;
    border-radius:50%;
    filter:blur(55px);
    opacity:.22;
}
.prism-stage-orb--violet{width:420px;height:420px;left:-110px;top:95px;background:#536a9e}
.prism-stage-orb--cyan{width:390px;height:390px;right:-90px;top:110px;background:#27caff}

.prism-floating{
    position:absolute;
    overflow:hidden;
    border:1px solid rgba(187,211,255,.34);
    border-radius:22px;
    background:rgba(13,26,52,.75);
    box-shadow:
        0 22px 60px rgba(0,0,0,.28),
        0 0 24px rgba(56,120,255,.15),
        inset 0 1px 0 rgba(255,255,255,.10);
    opacity:.88;
    backdrop-filter:blur(10px);
}
.prism-floating>b{
    position:absolute;
    display:flex;
    align-items:center;
    gap:7px;
    padding:9px 12px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:13px;
    background:rgba(247,249,255,.90);
    color:#1c2140;
    font-size:.72rem;
    box-shadow:0 8px 22px rgba(0,0,0,.18);
}
.prism-floating>b span{font-size:.9rem}
.prism-floating--image{
    width:290px;height:235px;
    left:-8px;top:58px;
    transform:rotate(6deg);
    border-color:rgba(183,87,255,.62);
    box-shadow:0 0 34px rgba(158,65,255,.23),0 24px 60px rgba(0,0,0,.30);
}
.prism-floating--image>b{left:15px;bottom:18px;color:#879ad1}
.prism-floating--video{
    width:310px;height:230px;
    right:-8px;top:44px;
    transform:rotate(-5deg);
    border-color:rgba(80,175,255,.62);
    box-shadow:0 0 34px rgba(38,162,255,.22),0 24px 60px rgba(0,0,0,.30);
}
.prism-floating--video>b{left:18px;bottom:18px;color:#a63d12}
.prism-floating--music{
    width:260px;height:170px;
    right:-3px;top:290px;
    transform:rotate(6deg);
    border-color:rgba(41,224,123,.48);
}
.prism-floating--music>b{right:18px;bottom:17px;color:#14793d}
.prism-floating--analyse{
    width:255px;height:165px;
    left:-4px;top:305px;
    transform:rotate(-5deg);
    border-color:rgba(87,173,255,.46);
}
.prism-floating--analyse>b{left:18px;bottom:16px;color:#1a5b9c}

.prism-art{position:absolute;inset:0;overflow:hidden}
.prism-art--portrait{
    background:
        radial-gradient(circle at 56% 39%,#ffb37f 0 8%,transparent 9%),
        radial-gradient(circle at 58% 42%,#bd573c 0 16%,transparent 17%),
        radial-gradient(circle at 52% 38%,#0d111d 0 23%,transparent 24%),
        linear-gradient(140deg,#2b0a5a,#173ec8 50%,#536a9e);
}
.prism-art--portrait::before,
.prism-art--portrait::after{
    content:"";
    position:absolute;
    border-radius:50%;
    filter:blur(2px);
}
.prism-art--portrait::before{
    width:170px;height:230px;
    left:65px;top:6px;
    background:linear-gradient(150deg,#10172a 0 36%,#536a9e 37% 48%,#172d68 49% 100%);
    transform:rotate(-10deg);
    opacity:.92;
}
.prism-art--portrait::after{
    width:160px;height:90px;
    right:-30px;top:15px;
    border:1px solid rgba(104,223,255,.50);
    box-shadow:0 0 22px rgba(104,223,255,.35);
}
.prism-art-face{
    position:absolute;
    z-index:2;
    width:74px;height:104px;
    left:124px;top:50px;
    border-radius:48% 52% 46% 54%;
    background:linear-gradient(135deg,#ffcfad,#a84666 73%);
    transform:rotate(5deg);
    box-shadow:-18px -8px 0 10px #11192d;
}
.prism-art-face::before{
    content:"";
    position:absolute;
    left:45px;top:25px;
    width:9px;height:3px;
    border-radius:50%;
    background:#17121e;
    box-shadow:0 15px 0 -2px rgba(84,26,48,.8);
}
.prism-art-light{
    position:absolute;
    inset:0;
    background:
        linear-gradient(70deg,transparent 25%,rgba(64,233,255,.30) 26% 27%,transparent 28%),
        linear-gradient(115deg,transparent 65%,rgba(255,76,232,.38) 66% 67%,transparent 68%);
}

.prism-art--city{
    background:linear-gradient(180deg,#282c33 0,#ff8155 46%,#1b2349 47%);
}
.prism-city-sun{
    position:absolute;
    width:86px;height:86px;
    right:40px;top:29px;
    border-radius:50%;
    background:#ffd279;
    box-shadow:0 0 40px rgba(255,159,82,.65);
}
.prism-city-tower{
    position:absolute;
    bottom:0;
    width:34px;
    background:linear-gradient(180deg,#27263d,#0d1227);
    box-shadow:inset 4px 0 rgba(42,192,255,.18);
}
.prism-city-tower--1{height:130px;right:75px}
.prism-city-tower--2{height:96px;right:118px}
.prism-city-tower--3{height:160px;right:25px}
.prism-wave{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    background:linear-gradient(135deg,#221042,#113954 50%,#12412c);
}
.prism-wave i{
    width:4px;
    height:36px;
    border-radius:6px;
    background:#536a9e;
    box-shadow:0 0 9px #667bae;
}
.prism-wave i:nth-child(3n){height:72px}
.prism-wave i:nth-child(4n){height:50px;background:#47d8ff;box-shadow:0 0 9px #47d8ff}
.prism-art--landscape{
    background:linear-gradient(180deg,#6ba2e3 0,#ffb273 47%,#1f2759 48%);
}
.prism-art--landscape i{
    position:absolute;
    left:50%;
    bottom:-24px;
    width:145px;height:105px;
    transform:translateX(-50%) rotate(45deg);
    background:#172349;
}
.prism-art--landscape i:nth-child(2){left:25%;width:115px;height:85px;background:#222e68}
.prism-art--landscape i:nth-child(3){left:79%;width:125px;height:90px;background:#17265a}

.prism-hero{
    position:relative;
    z-index:4;
    max-width:860px;
    margin:0 auto;
    padding:30px 0 24px;
    text-align:center;
}
.prism-kicker{
    width:max-content;
    max-width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 auto 12px;
    padding:8px 16px;
    border:1px solid rgba(66,201,255,.72);
    border-radius:999px;
    background:rgba(49,26,105,.64);
    color:#f2f5ff;
    box-shadow:0 0 22px rgba(89,94,255,.22),inset 0 0 20px rgba(130,46,255,.14);
    font-size:.66rem;
    font-weight:900;
    letter-spacing:.27em;
}
.prism-kicker span{
    color:#fff;
    text-shadow:0 0 11px #667bae;
}
.prism-hero h1{
    margin:0;
    font-size:clamp(3.9rem,8.4vw,7rem);
    line-height:.89;
    letter-spacing:-.07em;
    color:#fff;
    text-shadow:0 3px 28px rgba(2,5,16,.48);
}
.prism-hero h1 em{
    display:inline-block;
    font-style:normal;
    color:transparent;
    background:linear-gradient(90deg,#db3fe9 0,#536a9e 40%,#16b3ff 92%);
    -webkit-background-clip:text;
    background-clip:text;
}
.prism-hero>p{
    margin:17px auto 0;
    color:#e2e8f4;
    font-size:1rem;
    text-shadow:0 2px 14px rgba(0,0,0,.45);
}

.prism-composer{
    max-width:850px;
    min-height:72px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto auto;
    align-items:center;
    gap:10px;
    margin:22px auto 0;
    padding:7px 8px 7px 13px;
    border:1px solid rgba(92,174,255,.85);
    border-radius:22px;
    background:linear-gradient(180deg,rgba(20,41,77,.90),rgba(11,24,50,.96));
    box-shadow:
        0 0 0 1px rgba(143,57,255,.45),
        0 0 35px rgba(25,154,255,.28),
        0 18px 55px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter:blur(20px);
}
.prism-composer:focus-within{
    box-shadow:
        0 0 0 1px rgba(186,72,255,.72),
        0 0 44px rgba(43,161,255,.36),
        0 20px 62px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.15);
}
.prism-composer-spark{
    width:45px;height:45px;
    display:grid;place-items:center;
    border-radius:13px;
    background:rgba(107,55,196,.30);
    color:#fff;
    font-size:1.35rem;
    text-shadow:0 0 10px #667bae;
}
.prism-composer input{
    width:100%;
    min-width:0;
    border:0;
    outline:0;
    background:transparent;
    color:#fff;
    font-size:.98rem;
}
.prism-composer input::placeholder{color:#808ba0}
.prism-type-switch{
    display:flex;
    align-items:center;
    gap:4px;
    padding:0 9px;
    border-left:1px solid rgba(255,255,255,.12);
}
.prism-type-switch button{
    width:36px;height:36px;
    display:grid;place-items:center;
    border:0;
    border-radius:10px;
    background:transparent;
    color:#a5afc0;
}
.prism-type-switch button:hover,
.prism-type-switch button.is-active{
    background:rgba(89,138,229,.16);
    color:#fff;
}
.prism-type-switch button.is-active{
    box-shadow:inset 0 0 0 1px rgba(113,202,255,.25);
}
.prism-create{
    min-width:126px;
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid rgba(255,255,255,.44);
    border-radius:16px;
    background:linear-gradient(100deg,#536a9e,#189fff);
    color:#fff;
    box-shadow:0 0 24px rgba(89,102,255,.32),inset 0 1px 0 rgba(255,255,255,.25);
    font-size:.88rem;
    font-weight:900;
}
.prism-create:hover{
    background:linear-gradient(100deg,#536a9e,#27b5ff);
    transform:translateY(-1px);
}

.prism-tools{
    position:relative;
    z-index:5;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    max-width:1040px;
    margin:0 auto;
}
.prism-tool{
    --tool:#94a9eb;
    --tool-deep:#94a9eb;
    position:relative;
    min-height:270px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    padding:18px;
    border:1px solid color-mix(in srgb,var(--tool) 72%,white);
    border-radius:24px;
    background:
        radial-gradient(circle at 60% 25%,color-mix(in srgb,var(--tool) 22%,transparent),transparent 40%),
        linear-gradient(155deg,color-mix(in srgb,var(--tool-deep) 86%,#0a1530),#0d1a39 74%);
    box-shadow:
        0 0 0 1px color-mix(in srgb,var(--tool) 17%,transparent),
        0 0 28px color-mix(in srgb,var(--tool) 15%,transparent),
        0 18px 42px rgba(0,0,0,.26),
        inset 0 1px 0 rgba(255,255,255,.12);
    isolation:isolate;
    transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s ease;
}
.prism-tool--video{--tool:#ff7c24;--tool-deep:#682306}
.prism-tool--music{--tool:#26ea70;--tool-deep:#073f24}
.prism-tool--text{--tool:#24aaff;--tool-deep:#063d76}
.prism-tool::before{
    content:"";
    position:absolute;
    z-index:-1;
    width:145px;height:145px;
    right:-40px;top:-40px;
    border-radius:50%;
    background:var(--tool);
    filter:blur(50px);
    opacity:.15;
}
.prism-tool:hover{
    transform:translateY(-6px);
    box-shadow:
        0 0 0 1px color-mix(in srgb,var(--tool) 38%,transparent),
        0 0 42px color-mix(in srgb,var(--tool) 23%,transparent),
        0 24px 56px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.16);
}
.prism-tool-icon{
    width:43px;height:43px;
    display:grid;place-items:center;
    border:1px solid color-mix(in srgb,var(--tool) 65%,white);
    border-radius:12px;
    background:rgba(5,10,24,.48);
    color:var(--tool);
    box-shadow:0 0 18px color-mix(in srgb,var(--tool) 13%,transparent);
}
.prism-tool-icon svg{width:21px;height:21px}
.prism-tool-visual{
    position:relative;
    height:102px;
    display:block;
    margin:8px -4px 3px;
    overflow:hidden;
}
.prism-tool-copy{display:block;margin-top:auto}
.prism-tool-copy strong{
    display:block;
    color:#fff;
    font-size:1.45rem;
    letter-spacing:-.035em;
}
.prism-tool-copy small{
    display:block;
    margin-top:5px;
    color:#f0f2f7;
    font-size:.74rem;
}
.prism-tool-arrow{
    position:absolute;
    right:16px;
    bottom:69px;
    width:43px;height:43px;
    display:grid;place-items:center;
    border-radius:50%;
    background:rgba(245,248,255,.92);
    color:color-mix(in srgb,var(--tool) 74%,#061124);
    font-size:1.25rem;
    font-weight:900;
    box-shadow:0 7px 18px rgba(0,0,0,.18);
    transition:transform .18s ease;
}
.prism-tool:hover .prism-tool-arrow{transform:translateX(3px)}
.prism-tool-chips{
    display:flex;
    gap:6px;
    margin-top:13px;
}
.prism-tool-chips b{
    min-width:0;
    flex:1;
    padding:6px 7px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--tool) 44%,rgba(255,255,255,.16));
    border-radius:999px;
    background:rgba(4,10,23,.25);
    color:#eef3ff;
    font-size:.57rem;
    font-weight:760;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.pv-sun{
    position:absolute;right:22px;top:12px;
    width:62px;height:62px;border-radius:50%;
    background:#ffa0ef;
    box-shadow:0 0 30px #667bae;
}
.pv-mountain{
    position:absolute;bottom:-42px;
    width:130px;height:130px;
    transform:rotate(45deg);
    background:linear-gradient(135deg,#536a9e,#150f48);
}
.pv-mountain--a{left:0}.pv-mountain--b{right:-20px;background:linear-gradient(135deg,#2a54ad,#29105e)}
.pv-camera{
    position:absolute;left:34px;top:35px;
    width:88px;height:50px;
    border-radius:11px;
    background:linear-gradient(145deg,#172337,#02070d);
    box-shadow:0 0 20px rgba(255,112,30,.28);
}
.pv-camera::before{
    content:"";
    position:absolute;
    left:-19px;top:7px;
    width:25px;height:36px;
    clip-path:polygon(100% 0,100% 100%,0 74%,0 26%);
    background:#111c2b;
}
.pv-lens{
    position:absolute;left:91px;top:26px;
    width:58px;height:58px;border-radius:50%;
    border:9px solid #20140d;
    background:radial-gradient(circle,#ffba59,#8f2a05 32%,#111 35%);
    box-shadow:0 0 20px rgba(255,116,28,.55);
}
.pv-beam{
    position:absolute;left:137px;top:28px;
    width:100px;height:58px;
    clip-path:polygon(0 32%,100% 0,100% 100%,0 68%);
    background:linear-gradient(90deg,rgba(255,130,42,.28),transparent);
}
.pv-note{
    position:absolute;
    left:50%;top:3px;
    transform:translateX(-50%);
    color:#52ff83;
    font-size:5.3rem;
    font-style:normal;
    text-shadow:0 0 26px #1bff68;
}
.pv-wave{
    position:absolute;
    left:0;right:0;bottom:17px;
    display:flex;align-items:center;justify-content:center;gap:4px;
}
.pv-wave b{
    width:3px;height:24px;border-radius:5px;
    background:#2bff86;
    box-shadow:0 0 8px #2bff86;
}
.pv-wave b:nth-child(3n){height:39px}.pv-wave b:nth-child(4n){height:16px}
.pv-doc{
    position:absolute;
    right:30px;top:10px;
    width:74px;height:88px;
    border-radius:7px;
    background:linear-gradient(145deg,#f8fbff,#a7d8ff);
    transform:rotate(8deg);
    box-shadow:0 0 23px rgba(68,175,255,.34);
}
.pv-letter{
    position:absolute;
    left:46px;top:25px;
    width:58px;height:58px;
    display:grid;place-items:center;
    border-radius:10px;
    background:linear-gradient(145deg,#3e8eff,#164dce);
    color:#eaf7ff;
    font-size:2.4rem;
    font-style:italic;
    font-weight:900;
    transform:rotate(-8deg);
    box-shadow:0 0 20px rgba(25,142,255,.38);
}
.pv-line{
    position:absolute;right:42px;height:5px;border-radius:5px;background:#5ca7d9;z-index:2
}
.pv-line--a{width:42px;top:43px}.pv-line--b{width:31px;top:56px}

.prism-benefits{
    max-width:1040px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    margin:18px auto 0;
    padding:12px;
    border:1px solid rgba(255,255,255,.42);
    border-radius:24px;
    background:rgba(243,247,255,.88);
    color:#131933;
    box-shadow:0 15px 42px rgba(3,9,26,.20);
    backdrop-filter:blur(18px);
}
.prism-benefits>span{
    min-height:54px;
    display:grid;
    grid-template-columns:42px 1fr;
    grid-template-rows:auto auto;
    align-content:center;
    column-gap:10px;
    padding:3px 17px;
    border-right:1px solid rgba(43,55,93,.16);
}
.prism-benefits>span:last-child{border-right:0}
.prism-benefits i{
    grid-row:1/3;
    width:38px;height:38px;
    display:grid;place-items:center;
    border-radius:13px;
    background:#fff;
    color:#b3c3f1;
    font-size:1.2rem;
    font-style:normal;
    font-weight:900;
}
.prism-benefits>span:nth-child(3) i{color:#11aa50}
.prism-benefits>span:nth-child(4) i{color:#168cea}
.prism-benefits b{font-size:.78rem}
.prism-benefits small{color:#57617a;font-size:.65rem}

/* Creation / result / history / credits */
body.pyg-prism .back-link{color:#9eabc2}
body.pyg-prism .creator,
body.pyg-prism .result-page,
body.pyg-prism .history-page,
body.pyg-prism .credits-page{
    position:relative;
    max-width:980px;
    margin:0 auto;
}
body.pyg-prism .creator-heading{
    gap:14px;
    margin-bottom:20px;
}
body.pyg-prism .creator-heading .choice-icon--large{
    width:58px;height:58px;
    border:1px solid rgba(80,184,255,.44);
    border-radius:17px;
    background:linear-gradient(145deg,rgba(127,63,255,.25),rgba(23,126,255,.16));
    color:#87ddff;
    box-shadow:0 0 26px rgba(76,122,255,.18);
}
body.pyg-prism .creator-heading p{
    color:#83dfff;
    font-size:.63rem;
    font-weight:900;
    letter-spacing:.14em;
    text-transform:uppercase;
}
body.pyg-prism .creator-heading h1,
body.pyg-prism .result-heading h1,
body.pyg-prism .section-heading h1,
body.pyg-prism .credits-page-heading h1{color:#fff}
body.pyg-prism .creation-form{
    padding:24px;
    border:1px solid rgba(125,181,255,.24);
    border-radius:27px;
    background:linear-gradient(180deg,rgba(14,29,57,.88),rgba(9,20,43,.93));
    box-shadow:
        0 24px 70px rgba(0,0,0,.30),
        inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter:blur(18px);
}
body.pyg-prism .generation-mode-choice span{
    border-color:rgba(139,179,255,.17);
    background:rgba(8,18,40,.72);
    color:#fff;
}
body.pyg-prism .generation-mode-choice small{color:#8e9ab2}
body.pyg-prism .generation-mode-choice input:checked+span{
    border-color:#7f92bc;
    background:linear-gradient(145deg,rgba(100,58,222,.28),rgba(36,79,159,.20));
    box-shadow:0 0 0 3px rgba(105,70,255,.10),0 0 22px rgba(61,123,255,.12);
}
body.pyg-prism .prompt-label,
body.pyg-prism .quality-field,
body.pyg-prism .lyrics-choice legend{color:#e9effc}
body.pyg-prism textarea,
body.pyg-prism input[type=text],
body.pyg-prism input[type=email],
body.pyg-prism input[type=tel],
body.pyg-prism input[type=password],
body.pyg-prism select{
    border-color:rgba(139,179,255,.18);
    background:rgba(4,12,29,.72);
    color:#f7f9ff;
}
body.pyg-prism textarea::placeholder,
body.pyg-prism input::placeholder{color:#67738c}
body.pyg-prism textarea:focus,
body.pyg-prism input:focus,
body.pyg-prism select:focus{
    border-color:#6dc9ff;
    background:rgba(7,17,38,.90);
    box-shadow:0 0 0 4px rgba(65,158,255,.12),0 0 24px rgba(93,66,255,.10);
}
body.pyg-prism select option{background:#0a1730;color:#fff}
body.pyg-prism .source-image-field,
body.pyg-prism .exact-lyrics,
body.pyg-prism .modify-form{
    border-color:rgba(139,179,255,.18);
    background:rgba(7,18,40,.64);
    color:#d9e2f2;
}
body.pyg-prism .advanced-options{
    border-top-color:rgba(139,179,255,.15);
}
body.pyg-prism .advanced-options summary{color:#dfe7f6}
body.pyg-prism .advanced-options summary span{color:#8e9bb2}
body.pyg-prism .primary-button{
    background:linear-gradient(100deg,#536a9e,#1e9cff);
    color:#fff;
    box-shadow:0 10px 28px rgba(75,82,255,.24);
}
body.pyg-prism .primary-button:hover{
    background:linear-gradient(100deg,#536a9e,#25b0ff);
}
body.pyg-prism .secondary-button{
    border-color:rgba(139,179,255,.20);
    background:rgba(8,19,42,.82);
    color:#eaf0fb;
}
body.pyg-prism .form-hint,
body.pyg-prism .field-hint{color:#78859d}
body.pyg-prism .creation-loader{
    background:
        radial-gradient(circle at 50% 42%,rgba(91,63,255,.24),transparent 24rem),
        rgba(4,9,21,.97);
    color:#fff;
}
body.pyg-prism .loader-orb{
    position:relative;
    background:linear-gradient(145deg,#536a9e,#1c9dff);
    color:#fff;
    box-shadow:0 0 0 14px rgba(98,85,255,.07),0 0 45px rgba(59,111,255,.28);
}
body.pyg-prism .loader-orb::after{
    content:"";
    position:absolute;
    inset:-20px;
    border:1px solid rgba(120,216,255,.28);
    border-top-color:#7f92bc;
    border-radius:50%;
    animation:prismSpin 2.4s linear infinite;
}
body.pyg-prism .progress-track{background:rgba(129,159,211,.16)}
body.pyg-prism .progress-track>span{
    background:linear-gradient(90deg,#536a9e,#21b7ff);
    box-shadow:0 0 18px rgba(73,141,255,.32);
}
body.pyg-prism .result-preview,
body.pyg-prism .result-source-image,
body.pyg-prism .result-input-media,
body.pyg-prism .result-lyrics,
body.pyg-prism .history-card,
body.pyg-prism .credit-package{
    border-color:rgba(139,179,255,.17);
    background:linear-gradient(180deg,rgba(15,31,61,.86),rgba(8,20,43,.90));
    color:#eef3ff;
    box-shadow:0 16px 46px rgba(0,0,0,.20);
}
body.pyg-prism .result-input-media figure{border-color:rgba(139,179,255,.17)}
body.pyg-prism .result-input-media figcaption{background:rgba(8,20,43,.96);color:#dce8fb}
body.pyg-prism .result-input-media-heading span{color:#8390a9}
body.pyg-prism .history-card{
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
body.pyg-prism .history-card:hover{
    transform:translateY(-4px);
    border-color:rgba(90,183,255,.37);
    box-shadow:0 22px 54px rgba(0,0,0,.28);
}
body.pyg-prism .history-body p{color:#d9e2f0}
body.pyg-prism .history-body time{color:#8692aa}
body.pyg-prism .history-body>a{color:#70d1ff}
body.pyg-prism .credits-wallet{
    border:1px solid rgba(139,179,255,.18);
    background:linear-gradient(135deg,#0b1730,#131d40 60%,#20155b);
    box-shadow:0 24px 70px rgba(0,0,0,.30);
}
body.pyg-prism .credits-wallet-mark{
    background:linear-gradient(145deg,#536a9e,#198fff);
    box-shadow:0 0 0 18px rgba(109,81,255,.12),0 0 0 38px rgba(255,255,255,.03),0 0 60px rgba(61,100,255,.24);
}
body.pyg-prism .credit-package--featured{
    border-color:rgba(156,82,255,.38);
    background:linear-gradient(150deg,#151944,#17113f);
}
body.pyg-prism .credit-package-amount span,
body.pyg-prism .credit-package-fit{color:#8995ad}
body.pyg-prism .credit-package-topline em{
    background:#a9ff87;
    color:#08101e;
}

/* Mobile */
body.pyg-prism .mobile-nav{
    border:1px solid rgba(142,181,255,.17);
    background:rgba(7,17,36,.92);
    box-shadow:0 16px 48px rgba(0,0,0,.35);
    backdrop-filter:blur(20px);
}
body.pyg-prism .mobile-nav a,
body.pyg-prism .mobile-nav button{color:#9aa6ba}
body.pyg-prism .mobile-nav span{color:#b3c3f1}

@keyframes prismSpin{to{transform:rotate(360deg)}}
@keyframes prismFloatA{
    50%{transform:translateY(-8px) rotate(7deg)}
}
@keyframes prismFloatB{
    50%{transform:translateY(7px) rotate(-6deg)}
}
@keyframes prismEnter{
    from{opacity:.01;transform:translateY(12px)}
    to{opacity:1;transform:translateY(0)}
}
body.pyg-prism.prism-ready .prism-hero,
body.pyg-prism.prism-ready .prism-tools,
body.pyg-prism.prism-ready .prism-benefits,
body.pyg-prism.prism-ready .creator,
body.pyg-prism.prism-ready .result-page,
body.pyg-prism.prism-ready .history-page,
body.pyg-prism.prism-ready .credits-page{
    animation:prismEnter .48s cubic-bezier(.2,.8,.2,1) both;
}
body.pyg-prism.prism-ready .prism-floating--image{animation:prismFloatA 7s ease-in-out infinite}
body.pyg-prism.prism-ready .prism-floating--video{animation:prismFloatB 8s ease-in-out infinite}
body.pyg-prism.prism-ready .prism-floating--music{animation:prismFloatA 9s ease-in-out infinite reverse}
body.pyg-prism.prism-ready .prism-floating--analyse{animation:prismFloatB 8.5s ease-in-out infinite reverse}

@media(max-width:1080px){
    .prism-floating--image{left:-110px;opacity:.50}
    .prism-floating--video{right:-115px;opacity:.48}
    .prism-floating--analyse{left:-110px;opacity:.34}
    .prism-floating--music{right:-100px;opacity:.34}
}
@media(max-width:760px){
    body.pyg-prism .site-header{
        top:6px;
        width:calc(100% - 14px);
        height:59px;
        margin-top:6px;
        padding:0 9px;
        border-radius:17px;
    }
    body.pyg-prism .brand-mark{width:37px;height:37px}
    body.pyg-prism .page-shell{
        width:calc(100% - 16px);
        padding:22px 0 150px;
    }
    .prism-stage{
        inset:-26px -8px auto;
        height:390px;
    }
    .prism-floating{display:none}
    .prism-stage::after{height:100px}
    .prism-hero{
        padding:12px 0 18px;
        text-align:left;
    }
    .prism-kicker{
        margin:0 0 15px;
        padding:7px 11px;
        font-size:.55rem;
        letter-spacing:.17em;
    }
    .prism-hero h1{
        font-size:clamp(3.1rem,15vw,5rem);
        line-height:.91;
    }
    .prism-hero>p{
        max-width:360px;
        margin:12px 0 0;
        font-size:.82rem;
        line-height:1.45;
    }
    .prism-composer{
        grid-template-columns:auto 1fr auto;
        grid-template-areas:
            "spark input create"
            "types types types";
        min-height:0;
        gap:7px;
        margin-top:17px;
        padding:7px;
        border-radius:18px;
    }
    .prism-composer-spark{
        grid-area:spark;
        width:40px;height:40px;
        border-radius:11px;
    }
    .prism-composer input{
        grid-area:input;
        font-size:.84rem;
    }
    .prism-create{
        grid-area:create;
        min-width:92px;
        min-height:46px;
        padding:0 13px;
        border-radius:13px;
        font-size:.76rem;
    }
    .prism-type-switch{
        grid-area:types;
        justify-content:center;
        width:100%;
        padding:6px 0 0;
        border-top:1px solid rgba(255,255,255,.09);
        border-left:0;
    }
    .prism-type-switch button{
        flex:1;
        max-width:64px;
        height:34px;
    }
    .prism-tools{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
    }
    .prism-tool{
        min-height:200px;
        padding:13px;
        border-radius:18px;
    }
    .prism-tool-icon{
        width:38px;height:38px;
        border-radius:10px;
    }
    .prism-tool-icon svg{width:18px;height:18px}
    .prism-tool-visual{
        height:66px;
        margin-top:5px;
    }
    .prism-tool-copy strong{font-size:1.14rem}
    .prism-tool-copy small{
        max-width:110px;
        font-size:.63rem;
        line-height:1.3;
    }
    .prism-tool-arrow{
        width:34px;height:34px;
        right:11px;bottom:55px;
        font-size:1rem;
    }
    .prism-tool-chips{margin-top:10px}
    .prism-tool-chips b{
        padding:5px 6px;
        font-size:.50rem;
    }
    .pv-sun{width:42px;height:42px;right:12px}
    .pv-mountain{width:90px;height:90px;bottom:-37px}
    .pv-camera{left:13px;top:23px;width:62px;height:35px}
    .pv-camera::before{left:-13px;width:18px;height:26px}
    .pv-lens{left:53px;top:17px;width:43px;height:43px;border-width:7px}
    .pv-beam{left:88px;top:20px;width:70px;height:40px}
    .pv-note{font-size:3.9rem;top:-3px}
    .pv-doc{width:51px;height:64px;right:13px}
    .pv-letter{left:21px;top:17px;width:43px;height:43px;font-size:1.8rem}
    .pv-line{right:20px}
    .pv-line--a{width:30px;top:31px}.pv-line--b{width:23px;top:42px}
    .prism-benefits{
        grid-template-columns:1fr 1fr;
        gap:0;
        margin-top:10px;
        padding:7px;
        border-radius:18px;
    }
    .prism-benefits>span{
        min-height:52px;
        grid-template-columns:34px 1fr;
        column-gap:7px;
        padding:5px 8px;
        border-right:0;
        border-bottom:1px solid rgba(43,55,93,.11);
    }
    .prism-benefits>span:nth-child(3),
    .prism-benefits>span:nth-child(4){border-bottom:0}
    .prism-benefits i{width:31px;height:31px;border-radius:10px;font-size:1rem}
    .prism-benefits b{font-size:.69rem}
    .prism-benefits small{font-size:.56rem}

    body.pyg-prism .creator-heading{margin-bottom:14px}
    body.pyg-prism .creation-form{
        margin:0;
        padding:15px;
        border-radius:21px;
    }
    body.pyg-prism .generation-mode-choice{
        grid-template-columns:1fr 1fr;
        gap:7px;
    }
    body.pyg-prism .generation-mode-choice span{
        min-height:63px;
        padding:10px;
        border-radius:12px;
    }
    body.pyg-prism .generation-mode-choice b{font-size:.72rem}
    body.pyg-prism .generation-mode-choice small{font-size:.61rem}
    body.pyg-prism textarea{
        min-height:155px;
        border-radius:15px;
    }
    body.pyg-prism .create-button{
        position:sticky;
        z-index:25;
        bottom:88px;
        min-height:58px;
        border-radius:15px;
        box-shadow:0 0 0 7px rgba(7,16,31,.88),0 14px 34px rgba(80,76,255,.28);
    }
    body.pyg-prism .form-hint{display:none}
    body.pyg-prism .mobile-nav{
        left:7px;right:7px;
        bottom:max(7px,env(safe-area-inset-bottom));
        border-radius:19px;
    }
}
@media(max-width:390px){
    .prism-tool{
        min-height:184px;
        padding:11px;
    }
    .prism-tool-copy small{display:none}
    .prism-tool-chips b:nth-child(2){display:none}
    .prism-composer-spark{display:none}
    .prism-composer{
        grid-template-columns:1fr auto;
        grid-template-areas:
            "input create"
            "types types";
    }
}
@media(prefers-reduced-motion:reduce){
    body.pyg-prism.prism-ready .prism-hero,
    body.pyg-prism.prism-ready .prism-tools,
    body.pyg-prism.prism-ready .prism-benefits,
    body.pyg-prism.prism-ready .creator,
    body.pyg-prism.prism-ready .result-page,
    body.pyg-prism.prism-ready .history-page,
    body.pyg-prism.prism-ready .credits-page,
    body.pyg-prism.prism-ready .prism-floating,
    body.pyg-prism .loader-orb::after{
        animation:none!important;
    }
}


/* === PRISM REAL SHOWCASE ARTWORK === */
.prism-floating > img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    transform:scale(1.015);
    filter:saturate(1.05) contrast(1.02);
}
.prism-floating::before{
    content:"";
    position:absolute;
    z-index:1;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(180deg,transparent 42%,rgba(4,10,26,.18) 72%,rgba(4,10,26,.42)),
        linear-gradient(90deg,rgba(8,16,34,.08),transparent 45%);
}
.prism-floating>b{
    z-index:2;
}
.prism-floating--image > img{object-position:50% 43%}
.prism-floating--video > img{object-position:52% 48%}
.prism-floating--music > img{object-position:48% 47%}
.prism-floating--analyse > img{object-position:50% 50%}

.prism-tool-visual{
    position:relative;
    height:122px;
    margin:9px -5px 5px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--tool) 42%,rgba(255,255,255,.12));
    border-radius:17px;
    background:#081226;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 10px 24px rgba(0,0,0,.14);
}
.prism-tool-visual::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(180deg,transparent 52%,rgba(5,10,24,.42) 100%),
        linear-gradient(135deg,color-mix(in srgb,var(--tool) 10%,transparent),transparent 48%);
}
.prism-tool-visual img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    transition:transform .35s cubic-bezier(.2,.8,.2,1),filter .25s ease;
    filter:saturate(1.08) contrast(1.03);
}
.prism-tool:hover .prism-tool-visual img{
    transform:scale(1.055);
    filter:saturate(1.15) contrast(1.05);
}
.prism-tool-visual--image img{object-position:52% 46%}
.prism-tool-visual--video img{object-position:52% 49%}
.prism-tool-visual--music img{object-position:51% 45%}
.prism-tool-visual--text img{object-position:50% 48%}

@media(max-width:760px){
    .prism-tool-visual{
        height:86px;
        margin:6px -2px 4px;
        border-radius:13px;
    }
    .prism-tool-visual--image img{object-position:54% 45%}
    .prism-tool-visual--video img{object-position:53% 48%}
    .prism-tool-visual--music img{object-position:50% 43%}
    .prism-tool-visual--text img{object-position:50% 47%}
}


/* === IMAGE TO VIDEO GUIDED UX === */
.video-media-workspace{display:block}
.prompt-workspace{min-width:0}
.workflow-field-heading{display:flex;align-items:center;gap:11px;margin-bottom:12px}
.workflow-field-heading strong{display:block;font-size:.9rem}
.workflow-field-heading small{display:block;margin-top:2px;color:var(--muted);font-size:.72rem;font-weight:500}
.workflow-step{flex:0 0 auto;width:28px;height:28px;display:inline-grid;place-items:center;border-radius:9px;background:var(--ink);color:#fff;font-size:.72rem;font-weight:900}
.prompt-label--workflow{display:flex;align-items:center;gap:10px}
.quality-field-heading{display:flex;align-items:center;gap:10px}
.source-image-dropzone{min-height:190px;display:grid;place-items:center;align-content:center;gap:7px;padding:22px;border:1px dashed #7f92bc;border-radius:16px;background:#fff;cursor:pointer;text-align:center;transition:border-color .16s ease,background .16s ease,transform .16s ease}
.source-image-dropzone:hover,.source-image-dropzone.is-dragging{border-color:var(--accent);background:#faf8ff;transform:translateY(-1px)}
.source-image-dropzone__icon{width:43px;height:43px;display:grid;place-items:center;margin-bottom:3px;border-radius:13px;background:#f0edfb;color:var(--accent);font-size:1.25rem;font-weight:900}
.source-image-dropzone>strong{font-size:.95rem}
.source-image-dropzone>span:not(.source-image-dropzone__icon){color:var(--muted);font-size:.78rem}
.source-image-dropzone>small{color:#908b99;font-size:.68rem}
.source-image-native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.source-image-field.has-file .source-image-dropzone{display:none}
.source-image-field.has-file .source-image-preview{margin-top:0}
.source-image-client-error{margin:8px 0 0!important}
.video-motion-help{margin-top:11px;padding:12px 13px;border:1px solid rgba(111,72,245,.16);border-radius:14px;background:#f7f4ff}
.video-motion-help p{margin:0;color:#5f5a69;font-size:.76rem;line-height:1.45}
.motion-suggestion-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.motion-suggestion-list button{min-height:34px;padding:0 10px;border:1px solid #7f92bc;border-radius:999px;background:#fff;color:#4d465c;font-size:.7rem;font-weight:750;cursor:pointer;transition:border-color .15s ease,background .15s ease,transform .15s ease}
.motion-suggestion-list button:hover{border-color:#7f92bc;background:#f4f0ff;transform:translateY(-1px)}
.creation-form.is-image-to-video .quality-field{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.creation-form.is-image-to-video .source-image-field{margin-bottom:0}
.creation-form.is-image-to-video .source-image-preview{min-height:250px;display:grid;place-items:center}
.creation-form.is-image-to-video .source-image-preview[hidden]{display:none!important}
.creation-form.is-image-to-video .source-image-preview img{max-height:360px}

body.pyg-prism .workflow-step{border:1px solid rgba(122,203,255,.34);background:linear-gradient(145deg,#536a9e,#1e9fff);box-shadow:0 0 18px rgba(72,113,255,.20)}
body.pyg-prism .workflow-field-heading strong{color:#edf3ff}
body.pyg-prism .workflow-field-heading small{color:#8290aa}
body.pyg-prism .source-image-dropzone{border-color:rgba(122,190,255,.32);background:rgba(5,14,33,.64);color:#eef5ff}
body.pyg-prism .source-image-dropzone:hover,
body.pyg-prism .source-image-dropzone.is-dragging{border-color:#57c8ff;background:rgba(26,70,123,.26);box-shadow:0 0 0 4px rgba(59,156,255,.08),0 0 28px rgba(71,102,255,.11)}
body.pyg-prism .source-image-dropzone__icon{background:linear-gradient(145deg,rgba(151,62,255,.25),rgba(35,153,255,.22));color:#86dcff}
body.pyg-prism .source-image-dropzone>span:not(.source-image-dropzone__icon),
body.pyg-prism .source-image-dropzone>small{color:#8390a9}
body.pyg-prism .video-motion-help{border-color:rgba(126,169,255,.17);background:rgba(9,20,45,.66)}
body.pyg-prism .video-motion-help p{color:#a6b2c8}
body.pyg-prism .motion-suggestion-list button{border-color:rgba(130,177,255,.20);background:rgba(6,16,36,.78);color:#c9d6ed}
body.pyg-prism .motion-suggestion-list button:hover{border-color:rgba(91,203,255,.50);background:rgba(29,79,135,.34);color:#fff}
body.pyg-prism .creation-form.is-image-to-video .quality-field{border-top-color:rgba(139,179,255,.15)}

@media (min-width:820px){
    body.pyg-prism .prism-create-page--video.is-image-to-video{max-width:960px}
    .creation-form.is-image-to-video .video-media-workspace{display:grid;grid-template-columns:minmax(300px,.92fr) minmax(350px,1.08fr);gap:22px;align-items:stretch}
    .creation-form.is-image-to-video .source-image-field{height:100%}
    .creation-form.is-image-to-video .prompt-workspace{display:flex;flex-direction:column}
    .creation-form.is-image-to-video .prompt-workspace textarea{min-height:220px;flex:1}
}
@media (max-width:819px){
    .source-image-dropzone{min-height:155px;padding:18px}
    .creation-form.is-image-to-video .source-image-field{margin-bottom:20px}
    .creation-form.is-image-to-video .source-image-preview{min-height:190px}
}


/* === UNIFIED VIDEO CAPABILITY COMPOSER === */
.optional-chip{display:inline-flex;align-items:center;margin-left:7px;padding:3px 7px;border:1px solid rgba(120,150,210,.22);border-radius:999px;color:var(--muted);font-size:.62rem;font-weight:800;letter-spacing:.02em;vertical-align:middle}
.video-source-optional{margin-bottom:18px}
.video-reference-field{display:grid;gap:12px;margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.46)}
.video-reference-field .workflow-field-heading{justify-content:space-between;margin-bottom:0}
.video-reference-mode{flex:0 0 auto;padding:5px 8px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:.64rem;font-weight:850}
.video-reference-dropzone{min-height:112px;display:grid;place-items:center;align-content:center;gap:6px;padding:16px;border:1px dashed #7f92bc;border-radius:15px;background:#fff;cursor:pointer;text-align:center;transition:border-color .16s ease,background .16s ease,transform .16s ease}
.video-reference-dropzone:hover,.video-reference-dropzone.is-dragging{border-color:var(--accent);background:#faf8ff;transform:translateY(-1px)}
.video-reference-dropzone>strong{font-size:.88rem}
.video-reference-dropzone>span:not(.source-image-dropzone__icon){color:var(--muted);font-size:.73rem}
.video-reference-dropzone>small{color:#908b99;font-size:.66rem}
.video-reference-preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}
.video-reference-preview{position:relative;overflow:hidden;margin:0;border:1px solid var(--line);border-radius:14px;background:#111}
.video-reference-preview img,.video-reference-preview video{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.video-reference-preview figcaption{padding:8px 9px;background:#fff;color:var(--ink);font-size:.68rem;font-weight:800}
.video-reference-preview .video-reference-remove{position:absolute;top:7px;right:7px;width:29px;height:29px;border:0;border-radius:999px;background:rgba(10,10,15,.82);color:#fff;font-size:1rem;line-height:1;cursor:pointer}
.video-reference-preview.is-first-frame{border-color:#648ff8;box-shadow:0 0 0 1px rgba(100,143,248,.65)}
.video-reference-preview .video-reference-set-start{display:block;width:calc(100% - 12px);margin:6px;border:1px solid rgba(116,162,246,.44);border-radius:8px;background:rgba(12,28,59,.96);color:#dbe8ff;font-size:.65rem;font-weight:800;padding:7px 2px;cursor:pointer}
.video-reference-preview .video-reference-set-start[aria-pressed="true"]{background:#2255af;color:#fff}
.video-reference-hint{margin:0;color:var(--muted);font-size:.7rem;line-height:1.45}
.video-last-frame-field{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding-top:12px;border-top:1px solid var(--line)}
.video-last-frame-field>div:first-child strong,.video-last-frame-field>div:first-child small{display:block}
.video-last-frame-field>div:first-child strong{font-size:.78rem}
.video-last-frame-field>div:first-child small{margin-top:3px;color:var(--muted);font-size:.66rem}
.compact-upload{position:relative;display:inline-flex;align-items:center;min-height:38px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:.7rem;font-weight:800;cursor:pointer}
.compact-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}
.video-last-frame-preview{grid-column:1/-1;position:relative;width:min(180px,100%);overflow:hidden;border:1px solid var(--line);border-radius:13px;background:#111}
.video-last-frame-preview img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}
.video-last-frame-preview button{position:absolute;right:7px;bottom:7px;padding:6px 9px;border:0;border-radius:9px;background:rgba(10,10,15,.82);color:#fff;font-size:.65rem;font-weight:800}
.video-advanced-media{grid-column:1/-1;display:grid;gap:12px;margin-top:4px;padding-top:16px;border-top:1px solid var(--line)}
.advanced-media-heading{display:grid;gap:3px}
.advanced-media-heading strong{font-size:.86rem}
.advanced-media-heading small,.option-help{color:var(--muted);font-size:.69rem;line-height:1.45}
.advanced-upload{display:grid;gap:7px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.58)}
.advanced-upload>span{font-size:.78rem;font-weight:800}
.advanced-upload>small{color:var(--muted);font-size:.68rem;line-height:1.4}
.advanced-upload input[type="file"]{width:100%;font-size:.72rem}
.advanced-upload em{color:var(--muted);font-size:.67rem;font-style:normal}
.capability-routing-hint{grid-column:1/-1;margin:2px 0 0;padding:11px 12px;border-radius:12px;background:rgba(111,72,245,.07);color:var(--muted);font-size:.7rem;line-height:1.45}
body.pyg-prism .optional-chip{border-color:rgba(119,183,255,.23);color:#8390a9}
body.pyg-prism .video-reference-field{border-color:rgba(130,177,255,.17);background:rgba(6,16,36,.54)}
body.pyg-prism .video-reference-mode{border-color:rgba(130,177,255,.17);color:#9eb0ca;background:rgba(15,35,67,.72)}
body.pyg-prism .video-reference-dropzone{border-color:rgba(122,190,255,.32);background:rgba(5,14,33,.64);color:#eef5ff}
body.pyg-prism .video-reference-dropzone:hover,
body.pyg-prism .video-reference-dropzone.is-dragging{border-color:#57c8ff;background:rgba(26,70,123,.26);box-shadow:0 0 0 4px rgba(59,156,255,.08),0 0 28px rgba(71,102,255,.11)}
body.pyg-prism .video-reference-dropzone>span:not(.source-image-dropzone__icon),
body.pyg-prism .video-reference-dropzone>small,
body.pyg-prism .video-reference-hint,
body.pyg-prism .video-last-frame-field>div:first-child small{color:#8390a9}
body.pyg-prism .video-reference-preview{border-color:rgba(130,177,255,.17)}
body.pyg-prism .video-reference-preview figcaption{background:rgba(10,24,50,.96);color:#dce8fb}
body.pyg-prism .video-last-frame-field{border-top-color:rgba(139,179,255,.15)}
body.pyg-prism .compact-upload{border-color:rgba(130,177,255,.20);background:rgba(10,25,51,.86);color:#c9d6ed}
body.pyg-prism .video-last-frame-preview{border-color:rgba(130,177,255,.17)}
body.pyg-prism .video-advanced-media{border-top-color:rgba(139,179,255,.15)}
body.pyg-prism .advanced-media-heading strong{color:#edf3ff}
body.pyg-prism .advanced-media-heading small,
body.pyg-prism .option-help,
body.pyg-prism .advanced-upload>small,
body.pyg-prism .advanced-upload em{color:#8390a9}
body.pyg-prism .advanced-upload{border-color:rgba(130,177,255,.17);background:rgba(6,16,36,.54)}
body.pyg-prism .advanced-upload>span{color:#dce8fb}
body.pyg-prism .advanced-upload input[type="file"]{color:#aab8d0}
body.pyg-prism .capability-routing-hint{border:1px solid rgba(112,180,255,.14);background:rgba(18,45,82,.38);color:#9fb0ca}

@media (min-width:820px){
    .video-advanced-media{grid-template-columns:1fr 1fr}
    .advanced-media-heading{grid-column:1/-1}
}


/* === PRISM LIBRARY / CONTACT REFINEMENT === */
body.prism-library-page .page-shell,
body.prism-contact-page .page-shell{
    width:min(1120px,calc(100% - 32px));
    padding-top:36px;
}
body.prism-library-page .history-page{max-width:1080px}
body.prism-library-page .library-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:28px;
    margin-bottom:22px;
}
body.prism-library-page .library-heading .eyebrow{
    margin-bottom:7px;
    color:#75dcff;
    font-size:.65rem;
}
body.prism-library-page .library-heading h1{
    margin:0;
    color:#fff;
    font-size:clamp(2.7rem,6vw,5.2rem);
    line-height:.95;
    letter-spacing:-.065em;
}
body.prism-library-page .library-heading>div:first-child>p:last-child{
    margin:13px 0 0;
    color:#8998b2;
    font-size:.92rem;
}
body.prism-library-page .library-heading-actions{
    display:flex;
    align-items:center;
    gap:12px;
}
body.prism-library-page .library-count{
    min-width:82px;
    display:grid;
    justify-items:end;
}
body.prism-library-page .library-count b{
    color:#fff;
    font-size:1.25rem;
    line-height:1;
}
body.prism-library-page .library-count small{
    margin-top:4px;
    color:#77869f;
    font-size:.62rem;
    text-transform:uppercase;
    letter-spacing:.07em;
    font-weight:800;
}
body.prism-library-page .history-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
body.prism-library-page .history-card{
    position:relative;
    overflow:hidden;
    border-color:rgba(130,177,255,.14);
    border-radius:20px;
    background:rgba(8,19,42,.82);
    box-shadow:0 12px 32px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.035);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
body.prism-library-page .history-card:hover{
    transform:translateY(-3px);
    border-color:rgba(101,204,255,.36);
    box-shadow:0 22px 50px rgba(0,0,0,.24),0 0 28px rgba(62,96,255,.07);
}
body.prism-library-page .history-preview{
    height:218px;
    background:
        radial-gradient(circle at 50% 35%,rgba(87,74,255,.18),transparent 40%),
        #071228;
    color:#84dcff;
}
body.prism-library-page .history-preview::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(180deg,transparent 60%,rgba(4,10,24,.48));
}
body.prism-library-page .history-preview img,
body.prism-library-page .history-preview video{
    transition:transform .35s cubic-bezier(.2,.8,.2,1),filter .25s ease;
}
body.prism-library-page .history-card:hover .history-preview img,
body.prism-library-page .history-card:hover .history-preview video{
    transform:scale(1.035);
    filter:saturate(1.07) contrast(1.03);
}
body.prism-library-page .history-type{
    position:absolute;
    z-index:2;
    left:10px;
    bottom:10px;
    padding:5px 8px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:999px;
    background:rgba(4,12,28,.74);
    color:#dce7f7;
    backdrop-filter:blur(10px);
    font-size:.58rem;
    font-weight:850;
    letter-spacing:.06em;
    text-transform:uppercase;
}
body.prism-library-page .history-play{
    z-index:2;
    width:45px;
    height:45px;
    border:1px solid rgba(255,255,255,.15);
    background:rgba(4,12,28,.68);
    backdrop-filter:blur(10px);
}
body.prism-library-page .history-body{
    padding:14px;
    border-top:1px solid rgba(139,179,255,.10);
    background:rgba(8,19,42,.92);
    color:#eef4ff;
}
body.prism-library-page .history-meta{min-height:25px}
body.prism-library-page .history-body time{color:#71809a}
body.prism-library-page .history-body p{
    min-height:48px;
    margin:12px 0 15px;
    color:#c3cee1;
    font-size:.82rem;
    line-height:1.45;
}
body.prism-library-page .history-open{
    display:flex;
    align-items:center;
    justify-content:space-between;
    color:#89dcff!important;
    font-size:.75rem!important;
}
body.prism-library-page .history-open b{
    font-size:.95rem;
    transition:transform .15s ease;
}
body.prism-library-page .history-card:hover .history-open b{transform:translateX(3px)}
body.prism-library-page .status{
    border:1px solid rgba(127,177,255,.15);
    background:rgba(86,91,255,.13);
    color:#c0caff;
    font-size:.59rem;
}
body.prism-library-page .status--completed{
    border-color:rgba(82,214,141,.16);
    background:rgba(39,160,94,.13);
    color:#72dea3;
}
body.prism-library-page .status--failed{
    border-color:rgba(244,105,112,.18);
    background:rgba(185,49,58,.15);
    color:#ff8f94;
}
body.prism-library-page .library-empty{
    max-width:620px;
    margin:70px auto 0;
    padding:44px 26px;
    border:1px solid rgba(130,177,255,.14);
    border-radius:24px;
    background:rgba(7,18,40,.62);
    box-shadow:0 18px 55px rgba(0,0,0,.16);
}
body.prism-library-page .library-empty .empty-icon{
    border:1px solid rgba(116,190,255,.21);
    background:rgba(73,84,255,.14);
    color:#86ddff;
}
body.prism-library-page .library-empty h2{color:#fff}
body.prism-library-page .library-empty p{color:#8391a9}
body.prism-library-page .app-pagination__button{
    border-color:rgba(130,177,255,.16);
    background:rgba(7,18,40,.72);
    color:#aab8cf;
}
body.prism-library-page a.app-pagination__button:hover{
    border-color:rgba(95,206,255,.38);
    background:rgba(20,48,88,.72);
    color:#fff;
}
body.prism-library-page .app-pagination__button.is-current{
    border-color:transparent;
    background:linear-gradient(135deg,#536a9e,#1f9cff);
    color:#fff;
}
body.prism-library-page .app-pagination__button.is-disabled{
    color:#50607a;
    background:rgba(6,15,33,.50);
}

/* Contact */
body.prism-contact-page .contact-page{
    max-width:1040px;
    margin:0 auto;
}
body.prism-contact-page .contact-layout{
    display:grid;
    grid-template-columns:minmax(0,.82fr) minmax(430px,1.18fr);
    gap:22px;
    align-items:start;
}
body.prism-contact-page .contact-intro{
    position:sticky;
    top:24px;
    padding:8px 10px 0 0;
}
body.prism-contact-page .contact-intro .back-link{
    margin-bottom:52px;
    color:#8290a7;
}
body.prism-contact-page .contact-intro .eyebrow{
    margin-bottom:8px;
    color:#76ddff;
    font-size:.65rem;
}
body.prism-contact-page .contact-intro h1{
    margin:0;
    color:#fff;
    font-size:clamp(2.8rem,6vw,5.25rem);
    line-height:.94;
    letter-spacing:-.065em;
}
body.prism-contact-page .contact-lead{
    max-width:430px;
    margin:18px 0 0;
    color:#93a2bb;
    font-size:.95rem;
    line-height:1.6;
}
body.prism-contact-page .contact-reasons{
    display:grid;
    gap:8px;
    margin-top:30px;
}
body.prism-contact-page .contact-reasons article{
    display:grid;
    grid-template-columns:34px 1fr;
    gap:10px;
    align-items:start;
    padding:12px 0;
    border-top:1px solid rgba(139,179,255,.10);
}
body.prism-contact-page .contact-reasons article>span{
    width:30px;height:30px;display:grid;place-items:center;
    border:1px solid rgba(107,203,255,.20);
    border-radius:9px;
    color:#70d8ff;
    font-size:.58rem;
    font-weight:900;
}
body.prism-contact-page .contact-reasons strong,
body.prism-contact-page .contact-reasons small{display:block}
body.prism-contact-page .contact-reasons strong{color:#eaf1fc;font-size:.76rem}
body.prism-contact-page .contact-reasons small{margin-top:4px;color:#71809a;font-size:.65rem;line-height:1.4}
body.prism-contact-page .contact-note{
    display:flex;
    gap:8px;
    align-items:flex-start;
    margin:22px 0 0;
    color:#73839d;
    font-size:.66rem;
    line-height:1.45;
}
body.prism-contact-page .contact-note span{
    color:#6be3a3;
    font-weight:900;
}

body.prism-contact-page .contact-form{
    padding:22px;
    border-color:rgba(125,181,255,.20);
    border-radius:26px;
    background:linear-gradient(180deg,rgba(13,28,56,.90),rgba(8,19,41,.94));
    box-shadow:0 24px 70px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter:blur(18px);
}
body.prism-contact-page .contact-form-heading{
    margin-bottom:18px;
    padding-bottom:16px;
    border-bottom:1px solid rgba(139,179,255,.11);
}
body.prism-contact-page .contact-form-heading>span{
    display:block;
    color:#70d9ff;
    font-size:.61rem;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
}
body.prism-contact-page .contact-form-heading h2{
    margin:5px 0 0;
    color:#fff;
    font-size:1.45rem;
    letter-spacing:-.035em;
}
body.prism-contact-page .contact-form-heading p{
    margin:7px 0 0;
    color:#7887a0;
    font-size:.71rem;
}
body.prism-contact-page .contact-form>label,
body.prism-contact-page .contact-grid label{
    color:#dce6f7;
    font-size:.71rem;
}
body.prism-contact-page .contact-form input,
body.prism-contact-page .contact-form textarea{
    border-color:rgba(139,179,255,.18);
    background:rgba(3,11,27,.76);
    color:#f5f8ff;
}
body.prism-contact-page .contact-form input::placeholder,
body.prism-contact-page .contact-form textarea::placeholder{color:#60708b}
body.prism-contact-page .contact-form input:focus,
body.prism-contact-page .contact-form textarea:focus{
    border-color:#64cfff;
    background:rgba(5,15,34,.92);
    box-shadow:0 0 0 4px rgba(63,158,255,.10),0 0 24px rgba(75,75,255,.10)
}
body.prism-contact-page .contact-submit{
    min-height:56px;
    justify-content:space-between;
    background:linear-gradient(100deg,#536a9e,#1d9fff);
    box-shadow:0 12px 30px rgba(74,82,255,.24)
}
body.prism-contact-page .contact-submit:hover{
    background:linear-gradient(100deg,#536a9e,#28b0ff)
}

@media(max-width:900px){
    body.prism-library-page .history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    body.prism-contact-page .contact-layout{grid-template-columns:1fr}
    body.prism-contact-page .contact-intro{position:static;padding:0}
    body.prism-contact-page .contact-intro .back-link{margin-bottom:32px}
    body.prism-contact-page .contact-reasons{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
    body.prism-contact-page .contact-reasons article{display:block;padding:12px;border:1px solid rgba(139,179,255,.10);border-radius:14px}
    body.prism-contact-page .contact-reasons article>span{margin-bottom:12px}
}
@media(max-width:650px){
    body.prism-library-page .page-shell,
    body.prism-contact-page .page-shell{width:min(100% - 20px,1120px);padding-top:24px}
    body.prism-library-page .library-heading{align-items:flex-start;flex-direction:column}
    body.prism-library-page .library-heading-actions{width:100%;justify-content:space-between}
    body.prism-library-page .history-grid{grid-template-columns:1fr}
    body.prism-library-page .history-preview{height:250px}
    body.prism-contact-page .contact-intro h1{font-size:clamp(2.7rem,14vw,4rem)}
    body.prism-contact-page .contact-reasons{grid-template-columns:1fr}
    body.prism-contact-page .contact-grid{grid-template-columns:1fr}
    body.prism-contact-page .contact-form{padding:15px;border-radius:21px}
}


/* === MEDIA LIBRARY === */
body.prism-media-library-page .page-shell{
    width:min(1160px,calc(100% - 32px));
    padding-top:34px;
}
body.prism-media-library-page .media-library-page{
    max-width:1120px;
    margin:0 auto;
    padding-bottom:56px;
}
body.prism-media-library-page .media-library-heading{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:28px;
    align-items:start;
    margin-bottom:22px;
}
body.prism-media-library-page .media-library-heading .eyebrow{
    margin-bottom:8px;
    color:#75dcff;
    font-size:.65rem;
}
body.prism-media-library-page .media-library-heading h1{
    margin:0;
    color:#fff;
    font-size:clamp(2.8rem,6vw,5.35rem);
    line-height:.94;
    letter-spacing:-.065em;
}
body.prism-media-library-page .media-library-heading h1 span{color:#8796b0}
body.prism-media-library-page .media-library-heading>div>p:last-child{
    max-width:670px;
    margin:16px 0 0;
    color:#8c9ab3;
    font-size:.93rem;
    line-height:1.56;
}
body.prism-media-library-page .library-import{
    border:1px solid rgba(125,181,255,.18);
    border-radius:20px;
    background:linear-gradient(180deg,rgba(13,28,56,.90),rgba(8,19,41,.94));
    box-shadow:0 18px 50px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.04);
    overflow:hidden;
}
body.prism-media-library-page .library-import>summary{
    list-style:none;
    min-height:58px;
    display:flex;
    align-items:center;
    gap:9px;
    padding:0 16px;
    cursor:pointer;
    color:#eef5ff;
    font-size:.78rem;
    font-weight:850;
}
body.prism-media-library-page .library-import>summary::-webkit-details-marker{display:none}
body.prism-media-library-page .library-import>summary span{
    width:30px;height:30px;display:grid;place-items:center;
    border:1px solid rgba(102,202,255,.22);
    border-radius:10px;background:rgba(57,108,255,.13);color:#81ddff
}
body.prism-media-library-page .library-import[open]>summary{border-bottom:1px solid rgba(139,179,255,.10)}
body.prism-media-library-page .library-import form{display:grid;gap:12px;padding:14px}
body.prism-media-library-page .library-upload-zone{
    position:relative;
    min-height:128px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:5px;
    border:1px dashed rgba(113,197,255,.34);
    border-radius:15px;
    background:rgba(4,13,31,.58);
    text-align:center;
    cursor:pointer;
}
body.prism-media-library-page .library-upload-zone:hover{
    border-color:#67d1ff;
    background:rgba(25,70,124,.23);
}
body.prism-media-library-page .library-upload-zone input{
    position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer
}
body.prism-media-library-page .library-upload-zone>span{color:#88e0ff;font-size:1.25rem}
body.prism-media-library-page .library-upload-zone strong{color:#eef5ff;font-size:.78rem}
body.prism-media-library-page .library-upload-zone small{color:#71809a;font-size:.63rem}
body.prism-media-library-page .library-import-fields{
    display:grid;
    grid-template-columns:1fr 140px;
    gap:9px;
}
body.prism-media-library-page .library-import-fields label,
body.prism-media-library-page .library-role-filter label,
body.prism-media-library-page .media-asset-menu label{
    display:grid;
    gap:5px;
    color:#9cabc2;
    font-size:.64rem;
    font-weight:800;
}
body.prism-media-library-page .library-import-fields label span small{color:#63718a;font-weight:650}
body.prism-media-library-page .library-import-fields input,
body.prism-media-library-page .library-import-fields select,
body.prism-media-library-page .library-role-filter select,
body.prism-media-library-page .media-asset-menu input,
body.prism-media-library-page .media-asset-menu select{
    width:100%;
    min-height:40px;
    border:1px solid rgba(139,179,255,.16);
    border-radius:10px;
    background:rgba(3,11,27,.76);
    color:#eef5ff;
    padding:0 10px;
}
body.prism-media-library-page .library-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:16px 0;
}
body.prism-media-library-page .library-type-filters{
    display:flex;
    gap:6px;
    overflow:auto;
    padding:4px;
    border:1px solid rgba(130,177,255,.12);
    border-radius:14px;
    background:rgba(7,18,40,.58);
}
body.prism-media-library-page .library-type-filters a{
    white-space:nowrap;
    display:flex;
    align-items:center;
    gap:7px;
    min-height:38px;
    padding:0 11px;
    border-radius:10px;
    color:#8392ab;
    font-size:.7rem;
    font-weight:800;
}
body.prism-media-library-page .library-type-filters a b{
    min-width:20px;
    padding:3px 6px;
    border-radius:999px;
    background:rgba(133,161,211,.10);
    color:#aebcd2;
    font-size:.58rem;
    text-align:center;
}
body.prism-media-library-page .library-type-filters a.is-active{
    background:linear-gradient(100deg,rgba(142,62,255,.92),rgba(30,153,255,.92));
    color:#fff;
}
body.prism-media-library-page .library-type-filters a.is-active b{background:rgba(255,255,255,.15);color:#fff}
/* Collection d'abord : navigation principale de la Bibliothèque personnelle. */
body.prism-media-library-page .library-status-filters{
    width:max-content;
    max-width:100%;
    margin-top:16px;
    margin-bottom:4px;
    border-color:rgba(130,177,255,.2);
    background:rgba(13,28,56,.78);
}
body.prism-media-library-page .library-status-filters a{
    min-height:42px;
    padding-inline:14px;
    font-size:.76rem;
}
body.prism-media-library-page .library-status-filters a:focus-visible{
    outline:2px solid #75dcff;
    outline-offset:2px;
}

body.prism-media-library-page .library-role-filter label{
    grid-template-columns:auto 145px;
    align-items:center;
}
body.prism-media-library-page .library-role-filter label>span{color:#72819a}
body.prism-media-library-page .media-asset-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
body.prism-media-library-page .media-asset-card{
    min-width:0;
    overflow:visible;
    border:1px solid rgba(130,177,255,.13);
    border-radius:18px;
    background:rgba(8,19,42,.82);
    box-shadow:0 10px 30px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.03);
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
body.prism-media-library-page .media-asset-card:hover{
    transform:translateY(-2px);
    border-color:rgba(99,204,255,.30);
    box-shadow:0 18px 44px rgba(0,0,0,.20),0 0 26px rgba(76,94,255,.06)
}
body.prism-media-library-page .media-asset-preview{
    position:relative;
    display:block;
    overflow:hidden;
    height:190px;
    border-radius:17px 17px 0 0;
    background:
        radial-gradient(circle at 50% 35%,rgba(91,74,255,.17),transparent 42%),
        #071227;
}
body.prism-media-library-page .media-asset-preview img,
body.prism-media-library-page .media-asset-preview video{
    width:100%;height:100%;display:block;object-fit:cover
}
body.prism-media-library-page .media-asset-preview video{pointer-events:none}
body.prism-media-library-page .media-asset-role{
    position:absolute;
    z-index:2;
    left:9px;
    bottom:9px;
    padding:5px 7px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:999px;
    background:rgba(4,12,28,.78);
    color:#d9e5f6;
    backdrop-filter:blur(10px);
    font-size:.56rem;
    font-weight:850;
    text-transform:uppercase;
    letter-spacing:.05em
}
body.prism-media-library-page .media-asset-play{
    position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
    width:42px;height:42px;display:grid;place-items:center;
    border:1px solid rgba(255,255,255,.14);border-radius:999px;
    background:rgba(4,12,28,.68);color:#fff;font-size:.74rem;backdrop-filter:blur(10px)
}
body.prism-media-library-page .media-asset-audio-art{
    height:100%;
    display:grid;
    place-items:center;
    align-content:center;
    gap:6px;
    color:#8be1ff;
}
body.prism-media-library-page .media-asset-audio-art>span{font-size:2.5rem;text-shadow:0 0 28px rgba(85,208,255,.32)}
body.prism-media-library-page .media-asset-audio-art small{color:#6e80a0;font-size:.58rem;letter-spacing:.14em;font-weight:900}
body.prism-media-library-page .media-asset-body{
    position:relative;
    padding:12px;
    border-top:1px solid rgba(139,179,255,.09)
}
body.prism-media-library-page .media-asset-title{
    display:flex;
    gap:8px;
    align-items:flex-start;
    justify-content:space-between;
}
body.prism-media-library-page .media-asset-title strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#eef5ff;
    font-size:.76rem
}
body.prism-media-library-page .media-asset-title>span{
    flex:0 0 auto;
    color:#6c7b95;
    font-size:.56rem;
    font-weight:800
}
body.prism-media-library-page .media-asset-body>small{
    display:block;
    margin-top:5px;
    color:#687892;
    font-size:.59rem
}
body.prism-media-library-page .media-asset-body audio{
    width:100%;
    height:34px;
    margin-top:10px
}
body.prism-media-library-page .media-asset-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid rgba(139,179,255,.08)
}
body.prism-media-library-page .media-asset-actions>a{
    color:#83dfff;
    font-size:.65rem;
    font-weight:800
}
body.prism-media-library-page .media-asset-actions details{position:relative}
body.prism-media-library-page .media-asset-actions summary{
    width:31px;height:31px;display:grid;place-items:center;
    border:1px solid rgba(139,179,255,.14);
    border-radius:9px;background:rgba(5,14,31,.72);
    color:#8d9bb3;cursor:pointer;list-style:none;font-size:.72rem
}
body.prism-media-library-page .media-asset-actions summary::-webkit-details-marker{display:none}
body.prism-media-library-page .media-asset-menu{
    position:absolute;
    z-index:20;
    right:0;
    bottom:38px;
    width:230px;
    padding:10px;
    border:1px solid rgba(139,179,255,.19);
    border-radius:14px;
    background:#0a1730;
    box-shadow:0 18px 48px rgba(0,0,0,.42);
}
body.prism-media-library-page .media-asset-menu form:first-child{display:grid;gap:8px}
body.prism-media-library-page .media-asset-menu form:first-child button{
    min-height:36px;
    border:0;border-radius:9px;
    background:linear-gradient(100deg,#536a9e,#1f9cff);
    color:#fff;font-weight:850;font-size:.67rem
}
body.prism-media-library-page .media-asset-menu form:last-child{
    margin-top:9px;padding-top:9px;border-top:1px solid rgba(139,179,255,.10)
}
body.prism-media-library-page .danger-link{
    width:100%;
    border:0;background:transparent;
    color:#ff8d93;text-align:left;font-size:.63rem;font-weight:800;cursor:pointer
}
body.prism-media-library-page .library-assets-empty{
    max-width:620px;
    margin:58px auto 0;
    padding:42px 26px;
    border:1px solid rgba(130,177,255,.13);
    border-radius:22px;
    background:rgba(7,18,40,.58)
}
body.prism-media-library-page .library-assets-empty .empty-icon{
    border:1px solid rgba(118,195,255,.19);
    background:rgba(73,84,255,.13);
    color:#85ddff
}
body.prism-media-library-page .library-assets-empty h2{color:#fff}
body.prism-media-library-page .library-assets-empty p{color:#8291a9}
body.prism-media-library-page .app-pagination__button{
    border-color:rgba(130,177,255,.16);
    background:rgba(7,18,40,.72);
    color:#aab8cf
}
body.prism-media-library-page .app-pagination__button.is-current{
    border-color:transparent;
    background:linear-gradient(135deg,#536a9e,#1f9cff);
    color:#fff
}

@media(max-width:980px){
    body.prism-media-library-page .media-library-heading{grid-template-columns:1fr}
    body.prism-media-library-page .library-import{max-width:520px}
    body.prism-media-library-page .media-asset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
    body.prism-media-library-page .media-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    body.prism-media-library-page .library-toolbar{align-items:stretch;flex-direction:column}
    body.prism-media-library-page .library-role-filter label{grid-template-columns:auto 1fr}
}
@media(max-width:560px){
    body.prism-media-library-page .page-shell{width:min(100% - 20px,1160px);padding-top:24px}
    body.prism-media-library-page .media-library-heading h1{font-size:clamp(2.65rem,14vw,4rem)}
    body.prism-media-library-page .library-import-fields{grid-template-columns:1fr}
    body.prism-media-library-page .media-asset-grid{grid-template-columns:1fr 1fr;gap:8px}
    body.prism-media-library-page .media-asset-preview{height:155px}
    body.prism-media-library-page .media-asset-menu{width:min(230px,80vw)}
}
@media(max-width:390px){
    body.prism-media-library-page .media-asset-grid{grid-template-columns:1fr}
    body.prism-media-library-page .media-asset-preview{height:230px}
}


body.prism-media-library-page .media-asset-actions>form{
    margin:0;
}
body.prism-media-library-page .library-keep-button{
    min-height:31px;
    padding:0 9px;
    border:1px solid rgba(105,204,255,.18);
    border-radius:9px;
    background:rgba(38,92,151,.15);
    color:#89dcff;
    font-size:.62rem;
    font-weight:850;
    cursor:pointer;
}
body.prism-media-library-page .library-keep-button:hover{
    border-color:rgba(105,214,255,.40);
    background:rgba(38,112,179,.25);
    color:#fff;
}


/* Library filters */
body.prism-media-library-page .library-filter-groups{
    display:grid;
    gap:9px;
    min-width:0;
    flex:1 1 auto;
}
body.prism-media-library-page .library-source-filters{
    display:flex;
    align-items:center;
    gap:6px;
    overflow:auto;
    padding:4px;
    border:1px solid rgba(130,177,255,.12);
    border-radius:14px;
    background:rgba(7,18,40,.48);
}
body.prism-media-library-page .library-source-filters>span{
    flex:0 0 auto;
    padding:0 7px;
    color:#6f7f99;
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
body.prism-media-library-page .library-source-filters a{
    white-space:nowrap;
    display:flex;
    align-items:center;
    gap:7px;
    min-height:36px;
    padding:0 10px;
    border-radius:10px;
    color:#8392ab;
    font-size:.67rem;
    font-weight:800;
}
body.prism-media-library-page .library-source-filters a b{
    min-width:19px;
    padding:3px 6px;
    border-radius:999px;
    background:rgba(133,161,211,.10);
    color:#aebcd2;
    font-size:.56rem;
    text-align:center;
}
body.prism-media-library-page .library-source-filters a.is-active{
    background:rgba(51,105,180,.24);
    color:#dff6ff;
    box-shadow:inset 0 0 0 1px rgba(102,204,255,.20);
}
body.prism-media-library-page .library-source-filters a.is-active b{
    background:rgba(110,213,255,.13);
    color:#bcefff;
}
body.prism-media-library-page .library-secondary-filters{
    display:grid;
    grid-template-columns:repeat(2,minmax(150px,1fr));
    gap:8px;
    flex:0 0 min(390px,36%);
}
body.prism-media-library-page .library-secondary-filters label{
    grid-template-columns:1fr;
    gap:5px;
    align-items:stretch;
}
body.prism-media-library-page .library-secondary-filters label>span{
    font-size:.58rem;
    letter-spacing:.04em;
    text-transform:uppercase;
}
body.prism-media-library-page .library-secondary-filters select{
    min-width:0;
    width:100%;
}
@media(max-width:900px){
    body.prism-media-library-page .library-toolbar{
        align-items:stretch;
        flex-direction:column;
    }
    body.prism-media-library-page .library-secondary-filters{
        width:100%;
        max-width:none;
        flex:1 1 auto;
        grid-template-columns:repeat(4,minmax(0,1fr));
    }
}
@media(max-width:650px){
    body.prism-media-library-page .library-secondary-filters{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    body.prism-media-library-page .library-source-filters>span{display:none}
}


/* === LIBRARY INTERNAL VIEWER === */
body.prism-media-library-page .media-asset-preview[data-library-viewer-open]{
    cursor:zoom-in;
}
body.prism-media-library-page .library-viewer{
    width:min(1180px,calc(100vw - 28px));
    max-width:none;
    height:min(820px,calc(100dvh - 28px));
    max-height:none;
    padding:0;
    border:1px solid rgba(136,185,255,.20);
    border-radius:22px;
    background:#071225;
    color:#eef5ff;
    box-shadow:0 30px 100px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,255,255,.04);
    overflow:hidden;
}
body.prism-media-library-page .library-viewer::backdrop{
    background:rgba(1,6,17,.82);
    backdrop-filter:blur(10px);
}
body.prism-media-library-page .library-viewer-shell{
    height:100%;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
}
body.prism-media-library-page .library-viewer-header,
body.prism-media-library-page .library-viewer-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:14px 18px;
    background:rgba(8,20,43,.94);
}
body.prism-media-library-page .library-viewer-header{
    border-bottom:1px solid rgba(139,179,255,.11);
}
body.prism-media-library-page .library-viewer-footer{
    border-top:1px solid rgba(139,179,255,.11);
}
body.prism-media-library-page .library-viewer-heading{
    min-width:0;
}
body.prism-media-library-page .library-viewer-kicker{
    display:block;
    margin-bottom:3px;
    color:#7edcff;
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}
body.prism-media-library-page .library-viewer-heading h2{
    max-width:min(760px,70vw);
    margin:0;
    overflow:hidden;
    color:#fff;
    font-size:clamp(.95rem,2vw,1.2rem);
    font-weight:850;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.prism-media-library-page .library-viewer-heading p{
    margin:4px 0 0;
    color:#7e8da6;
    font-size:.63rem;
}
body.prism-media-library-page .library-viewer-close{
    flex:0 0 auto;
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border:1px solid rgba(139,179,255,.16);
    border-radius:11px;
    background:rgba(5,14,31,.72);
    color:#b6c5da;
    font-size:1.35rem;
    line-height:1;
    cursor:pointer;
}
body.prism-media-library-page .library-viewer-close:hover{
    border-color:rgba(111,211,255,.40);
    color:#fff;
}
body.prism-media-library-page .library-viewer-stage{
    position:relative;
    min-height:0;
    display:grid;
    grid-template-columns:54px minmax(0,1fr) 54px;
    align-items:center;
    background:
        radial-gradient(circle at 50% 45%,rgba(70,94,194,.14),transparent 44%),
        #030a18;
}
body.prism-media-library-page .library-viewer-media{
    min-width:0;
    min-height:0;
    height:100%;
    display:grid;
    place-items:center;
    overflow:auto;
    overscroll-behavior:contain;
    padding:18px 8px;
}
body.prism-media-library-page .library-viewer-media>img,
body.prism-media-library-page .library-viewer-media>video{
    display:block;
    max-width:100%;
    max-height:100%;
    border-radius:12px;
    box-shadow:0 16px 50px rgba(0,0,0,.28);
}
body.prism-media-library-page .library-viewer-media>[hidden]{
    display:none;
}
body.prism-media-library-page .library-viewer-media>img{
    object-fit:contain;
    cursor:zoom-in;
    transition:max-width .16s ease,max-height .16s ease;
}
body.prism-media-library-page .library-viewer-media>img.is-zoomed{
    max-width:none;
    max-height:none;
    cursor:zoom-out;
}
body.prism-media-library-page .library-viewer-media>video{
    width:auto;
    height:auto;
    object-fit:contain;
    background:#000;
}
body.prism-media-library-page .library-viewer-audio{
    width:min(520px,90%);
    display:grid;
    place-items:center;
    gap:14px;
    padding:34px 24px;
    border:1px solid rgba(124,195,255,.16);
    border-radius:20px;
    background:
        radial-gradient(circle at 50% 25%,rgba(92,82,255,.18),transparent 50%),
        rgba(7,18,40,.82);
}
body.prism-media-library-page .library-viewer-audio[hidden]{display:none}
body.prism-media-library-page .library-viewer-audio>span{
    color:#8ce3ff;
    font-size:4rem;
    text-shadow:0 0 36px rgba(89,210,255,.30);
}
body.prism-media-library-page .library-viewer-audio strong{
    max-width:100%;
    overflow:hidden;
    color:#eef5ff;
    font-size:.88rem;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.prism-media-library-page .library-viewer-audio audio{
    width:100%;
}
body.prism-media-library-page .library-viewer-nav{
    z-index:2;
    width:40px;
    height:54px;
    justify-self:center;
    display:grid;
    place-items:center;
    border:1px solid rgba(137,183,255,.15);
    border-radius:12px;
    background:rgba(8,20,43,.72);
    color:#dce8f7;
    font-size:2rem;
    cursor:pointer;
    backdrop-filter:blur(8px);
}
body.prism-media-library-page .library-viewer-nav:hover:not(:disabled){
    border-color:rgba(101,211,255,.36);
    background:rgba(24,67,119,.48);
    color:#fff;
}
body.prism-media-library-page .library-viewer-nav:disabled{
    opacity:.22;
    cursor:default;
}
body.prism-media-library-page .library-viewer-position{
    display:grid;
    gap:2px;
    color:#a6b6cc;
    font-size:.67rem;
    font-weight:800;
}
body.prism-media-library-page .library-viewer-position small{
    color:#63738d;
    font-size:.55rem;
    font-weight:700;
}
body.prism-media-library-page .library-viewer-actions{
    display:flex;
    align-items:center;
    gap:8px;
}
body.prism-media-library-page .library-viewer-actions form{
    margin:0;
}
body.prism-media-library-page .library-viewer-actions .primary-button,
body.prism-media-library-page .library-viewer-actions .secondary-button{
    min-height:38px;
    padding:0 13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:.66rem;
}
@media(max-width:700px){
    body.prism-media-library-page .library-viewer{
        width:100vw;
        height:100dvh;
        border:0;
        border-radius:0;
    }
    body.prism-media-library-page .library-viewer-stage{
        grid-template-columns:42px minmax(0,1fr) 42px;
    }
    body.prism-media-library-page .library-viewer-nav{
        width:34px;
        height:48px;
    }
    body.prism-media-library-page .library-viewer-header,
    body.prism-media-library-page .library-viewer-footer{
        padding:11px 12px;
    }
    body.prism-media-library-page .library-viewer-position small{display:none}
    body.prism-media-library-page .library-viewer-actions .primary-button,
    body.prism-media-library-page .library-viewer-actions .secondary-button{
        padding:0 10px;
    }
}


/* === PYGMALION STUDIO · ASSEMBLY V1 === */
body.pyg-studio-page .page-shell{
    width:min(1320px,calc(100% - 30px));
    padding-top:34px;
}
body.pyg-studio-page .studio-page{
    max-width:1220px;
    margin:0 auto;
}
body.pyg-studio-page .studio-hero{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:28px;
    margin-bottom:22px;
}
body.pyg-studio-page .studio-hero>div:first-child{max-width:820px}
body.pyg-studio-page .studio-hero .eyebrow{
    margin-bottom:8px;
    color:#75dcff;
    font-size:.65rem;
}
body.pyg-studio-page .studio-hero h1{
    margin:0;
    color:#fff;
    font-size:clamp(3rem,6.6vw,5.8rem);
    line-height:.92;
    letter-spacing:-.065em;
}
body.pyg-studio-page .studio-hero h1 span{color:#8696b1}
body.pyg-studio-page .studio-hero>div:first-child>p:last-child{
    max-width:670px;
    margin:17px 0 0;
    color:#94a3ba;
    font-size:.94rem;
    line-height:1.55;
}
body.pyg-studio-page .studio-hero-note{
    flex:0 0 200px;
    display:grid;
    gap:3px;
    padding:16px;
    border:1px solid rgba(128,188,255,.18);
    border-radius:18px;
    background:rgba(8,20,43,.70);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
body.pyg-studio-page .studio-hero-note>span{
    color:#72ddff;
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.12em;
}
body.pyg-studio-page .studio-hero-note strong{color:#fff;font-size:.92rem}
body.pyg-studio-page .studio-hero-note small{color:#74839c;font-size:.61rem}

body.pyg-studio-page .studio-layout{
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(320px,.75fr);
    gap:14px;
    align-items:start;
}
body.pyg-studio-page .studio-source-panel,
body.pyg-studio-page .studio-order-panel,
body.pyg-studio-page .studio-result{
    border:1px solid rgba(132,181,255,.14);
    border-radius:22px;
    background:rgba(8,19,42,.76);
    box-shadow:0 18px 50px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.035);
}
body.pyg-studio-page .studio-source-panel{padding:15px}
body.pyg-studio-page .studio-order-panel{
    position:sticky;
    top:96px;
    padding:15px;
}
body.pyg-studio-page .studio-section-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:13px;
}
body.pyg-studio-page .studio-section-heading>div{
    display:flex;
    align-items:center;
    gap:10px;
}
body.pyg-studio-page .studio-section-heading>div>span{
    width:31px;height:31px;display:grid;place-items:center;
    border:1px solid rgba(105,204,255,.24);
    border-radius:10px;
    background:rgba(47,105,181,.16);
    color:#82e0ff;
    font-size:.66rem;
    font-weight:900;
}
body.pyg-studio-page .studio-section-heading h2{
    margin:0;
    color:#f7f9ff;
    font-size:.86rem;
}
body.pyg-studio-page .studio-section-heading p{
    margin:3px 0 0;
    color:#71809a;
    font-size:.61rem;
}
body.pyg-studio-page .studio-section-heading>a{
    color:#80dbff;
    font-size:.63rem;
    font-weight:850;
}
body.pyg-studio-page .studio-section-heading>b{
    color:#8190a9;
    font-size:.65rem;
}

body.pyg-studio-page .studio-source-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    max-height:620px;
    overflow:auto;
    padding-right:3px;
}
body.pyg-studio-page .studio-source-card{
    min-width:0;
    overflow:hidden;
    padding:0;
    border:1px solid rgba(135,182,255,.12);
    border-radius:15px;
    background:#08152e;
    color:inherit;
    text-align:left;
    cursor:pointer;
    transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
body.pyg-studio-page .studio-source-card:hover{
    transform:translateY(-1px);
    border-color:rgba(91,210,255,.30);
}
body.pyg-studio-page .studio-source-card.is-selected{
    border-color:#65d7ff;
    box-shadow:0 0 0 2px rgba(79,204,255,.14),0 12px 28px rgba(0,0,0,.22);
}
body.pyg-studio-page .studio-source-card:disabled{
    cursor:default;
    opacity:.62;
    transform:none;
}
body.pyg-studio-page .studio-source-preview{
    position:relative;
    height:128px;
    display:block;
    overflow:hidden;
    background:#030a17;
}
body.pyg-studio-page .studio-source-preview video{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    pointer-events:none;
}
body.pyg-studio-page .studio-source-play{
    position:absolute;
    left:50%;top:50%;
    transform:translate(-50%,-50%);
    width:34px;height:34px;
    display:grid;place-items:center;
    border:1px solid rgba(255,255,255,.15);
    border-radius:999px;
    background:rgba(4,12,28,.64);
    color:#fff;
    font-size:.62rem;
    backdrop-filter:blur(8px);
}
body.pyg-studio-page .studio-source-preview>b{
    position:absolute;
    top:8px;
    right:8px;
    width:29px;height:29px;
    display:grid;place-items:center;
    border-radius:999px;
    background:linear-gradient(135deg,#536a9e,#1f9cff);
    color:#fff;
    font-size:.66rem;
    box-shadow:0 5px 18px rgba(45,97,255,.34);
}
body.pyg-studio-page .studio-source-copy{
    display:grid;
    gap:4px;
    padding:10px;
}
body.pyg-studio-page .studio-source-copy strong{
    overflow:hidden;
    color:#eef5ff;
    font-size:.68rem;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.pyg-studio-page .studio-source-copy small{
    color:#697a94;
    font-size:.56rem;
}

body.pyg-studio-page .studio-selected-empty,
body.pyg-studio-page .studio-empty{
    display:grid;
    place-items:center;
    align-content:center;
    text-align:center;
    border:1px dashed rgba(124,190,255,.20);
    border-radius:16px;
    background:rgba(4,13,30,.47);
    color:#75849d;
}
body.pyg-studio-page .studio-selected-empty{
    min-height:155px;
    gap:7px;
}
body.pyg-studio-page .studio-selected-empty>span{
    width:40px;height:40px;display:grid;place-items:center;
    border:1px solid rgba(111,202,255,.17);
    border-radius:12px;
    background:rgba(51,89,164,.13);
    color:#82ddff;
    font-size:1.1rem;
}
body.pyg-studio-page .studio-selected-empty p{margin:0;font-size:.68rem}
body.pyg-studio-page .studio-empty{
    min-height:300px;
    gap:8px;
    padding:30px;
}
body.pyg-studio-page .studio-empty>span{color:#8ce4ff;font-size:2rem}
body.pyg-studio-page .studio-empty h3{margin:2px 0 0;color:#fff}
body.pyg-studio-page .studio-empty p{margin:0 0 10px;font-size:.72rem}

body.pyg-studio-page .studio-order-list{
    display:grid;
    gap:7px;
}
body.pyg-studio-page .studio-order-item{
    display:grid;
    grid-template-columns:28px 58px minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    padding:7px;
    border:1px solid rgba(129,180,255,.11);
    border-radius:12px;
    background:rgba(4,13,29,.58);
}
body.pyg-studio-page .studio-order-item.is-dragging{opacity:.42}
body.pyg-studio-page .studio-order-number{
    width:25px;height:25px;
    display:grid;place-items:center;
    border-radius:8px;
    background:rgba(97,83,255,.15);
    color:#a8b6ff;
    font-size:.6rem;
    font-weight:900;
}
body.pyg-studio-page .studio-order-item video{
    width:58px;height:42px;
    display:block;
    border-radius:8px;
    object-fit:cover;
    background:#020711;
}
body.pyg-studio-page .studio-order-info{min-width:0}
body.pyg-studio-page .studio-order-info strong,
body.pyg-studio-page .studio-order-info small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.pyg-studio-page .studio-order-info strong{color:#eaf2ff;font-size:.64rem}
body.pyg-studio-page .studio-order-info small{margin-top:3px;color:#697990;font-size:.54rem}
body.pyg-studio-page .studio-order-controls{
    display:flex;
    gap:3px;
}
body.pyg-studio-page .studio-order-controls button{
    width:26px;height:26px;
    display:grid;place-items:center;
    border:1px solid rgba(137,182,255,.13);
    border-radius:7px;
    background:rgba(11,27,53,.72);
    color:#9fb0c8;
    font-size:.65rem;
    cursor:pointer;
}
body.pyg-studio-page .studio-order-controls button:hover:not(:disabled){color:#fff;border-color:rgba(99,210,255,.34)}
body.pyg-studio-page .studio-order-controls button:disabled{opacity:.25;cursor:default}

body.pyg-studio-page .studio-assembly-action{
    display:grid;
    gap:7px;
    margin-top:13px;
    padding-top:13px;
    border-top:1px solid rgba(139,179,255,.09);
}
body.pyg-studio-page .studio-start-button{
    width:100%;
    min-height:48px;
}
body.pyg-studio-page .studio-start-button:disabled{
    opacity:.42;
    cursor:not-allowed;
}
body.pyg-studio-page .studio-assembly-action small{
    color:#66758d;
    text-align:center;
    font-size:.56rem;
}
body.pyg-studio-page .studio-progress{
    display:grid;
    gap:7px;
    margin-top:12px;
    padding:11px;
    border:1px solid rgba(111,202,255,.15);
    border-radius:12px;
    background:rgba(4,13,29,.58);
}
body.pyg-studio-page .studio-progress[hidden]{display:none}
body.pyg-studio-page .studio-progress-track{
    height:6px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(136,174,238,.10);
}
body.pyg-studio-page .studio-progress-track>span{
    width:0;
    height:100%;
    display:block;
    border-radius:inherit;
    background:linear-gradient(90deg,#536a9e,#25b0ff);
    transition:width .22s ease;
}
body.pyg-studio-page .studio-progress p{
    margin:0;
    color:#dcecff;
    font-size:.65rem;
    font-weight:800;
}
body.pyg-studio-page .studio-progress small{color:#687892;font-size:.55rem}
body.pyg-studio-page .studio-feedback{
    margin:10px 0 0;
    padding:10px 11px;
    border-radius:10px;
    background:rgba(31,148,100,.12);
    color:#95f0c7;
    font-size:.62rem;
    line-height:1.4;
}
body.pyg-studio-page .studio-feedback[hidden]{display:none}
body.pyg-studio-page .studio-feedback.is-error{
    background:rgba(193,54,71,.13);
    color:#ffabb5;
}
body.pyg-studio-page.is-processing .studio-source-grid{pointer-events:none}

body.pyg-studio-page .studio-result{
    display:grid;
    grid-template-columns:minmax(250px,.72fr) minmax(0,1.28fr);
    gap:18px;
    align-items:center;
    margin-top:16px;
    padding:18px;
}
body.pyg-studio-page .studio-result[hidden]{display:none}
body.pyg-studio-page .studio-result-copy .eyebrow{margin-bottom:7px;color:#7be2ff;font-size:.58rem}
body.pyg-studio-page .studio-result-copy h2{margin:0;color:#fff;font-size:1.35rem}
body.pyg-studio-page .studio-result-copy>p:not(.eyebrow){
    margin:8px 0 14px;
    color:#7f8fa7;
    font-size:.68rem;
}
body.pyg-studio-page .studio-result-copy>div{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}
body.pyg-studio-page .studio-result video{
    width:100%;
    max-height:430px;
    border-radius:14px;
    background:#000;
}

body.prism-media-library-page .library-heading-actions{
    display:grid;
    gap:8px;
}
body.prism-media-library-page .library-heading-actions>.secondary-button{
    justify-self:end;
    min-height:38px;
    padding:0 13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-color:rgba(99,205,255,.20);
    background:rgba(32,88,153,.15);
    color:#8fe4ff;
    font-size:.65rem;
}

@media(max-width:980px){
    body.pyg-studio-page .studio-layout{grid-template-columns:1fr}
    body.pyg-studio-page .studio-order-panel{position:static}
    body.pyg-studio-page .studio-source-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}
}
@media(max-width:720px){
    body.pyg-studio-page .studio-hero{display:block}
    body.pyg-studio-page .studio-hero-note{display:none}
    body.pyg-studio-page .studio-hero h1{font-size:clamp(2.8rem,14vw,4.2rem)}
    body.pyg-studio-page .studio-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    body.pyg-studio-page .studio-source-preview{height:132px}
    body.pyg-studio-page .studio-result{grid-template-columns:1fr}
    body.prism-media-library-page .library-heading-actions>.secondary-button{justify-self:start}
}
@media(max-width:430px){
    body.pyg-studio-page .page-shell{width:min(100% - 20px,1320px)}
    body.pyg-studio-page .studio-source-panel,
    body.pyg-studio-page .studio-order-panel{padding:11px;border-radius:18px}
    body.pyg-studio-page .studio-source-grid{gap:7px}
    body.pyg-studio-page .studio-source-preview{height:116px}
    body.pyg-studio-page .studio-order-item{grid-template-columns:25px 48px minmax(0,1fr);gap:6px}
    body.pyg-studio-page .studio-order-item video{width:48px;height:38px}
    body.pyg-studio-page .studio-order-controls{grid-column:1 / -1;justify-content:flex-end}
}


body.pyg-studio-page .studio-format-control{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:6px 10px;
    align-items:center;
    margin-top:13px;
    padding:11px;
    border:1px solid rgba(132,181,255,.11);
    border-radius:12px;
    background:rgba(4,13,29,.48);
}
body.pyg-studio-page .studio-format-control label{
    color:#7e8da5;
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
}
body.pyg-studio-page .studio-format-control select{
    width:100%;
    min-height:38px;
    border:1px solid rgba(126,187,255,.16);
    border-radius:10px;
    background:#07162e;
    color:#eef5ff;
    padding:0 10px;
    font-size:.66rem;
    font-weight:800;
}
body.pyg-studio-page .studio-format-control small{
    grid-column:1 / -1;
    color:#65758e;
    font-size:.55rem;
    line-height:1.4;
}
body.pyg-studio-page .studio-format-control select:disabled{
    opacity:.5;
}

/* Project tools complement the direct creation form, including on mobile. */
.prism-project-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px auto 0;max-width:1000px}.prism-project-tools a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;border:1px solid #ffffff14;border-radius:14px;background:#121219;color:#f1f1f6;text-decoration:none}.prism-project-tools a:hover{border-color:#d7f47d55}.prism-project-tools strong{display:block;font-size:14px;font-weight:550}.prism-project-tools small{display:block;color:#9898aa;font-size:11px;margin-top:5px}.prism-project-tools b{color:#d7f47d;font-weight:400}.prism-project-tools a:focus-visible{outline:2px solid #d7f47d;outline-offset:3px}@media(max-width:650px){.prism-project-tools{grid-template-columns:1fr;gap:10px}.prism-project-tools a{padding:15px 13px;gap:8px}.prism-project-tools small{line-height:1.55}}


/* Global navigation and form feedback: predictable across all Pygmalion tools. */
.skip-to-content{position:fixed;z-index:9999;top:10px;left:12px;padding:12px 17px;background:#fff;color:#13131b;border:2px solid #7f92bc;border-radius:11px;font-weight:800;transform:translateY(-180%);box-shadow:0 12px 32px #0004}
.skip-to-content:focus{transform:translateY(0)}
#main-content:focus{outline:none}
.global-form-errors{max-width:1180px;margin:0 auto 22px;padding:15px 18px;border:1px solid #b83e5a;border-radius:14px;background:#4e1223;color:#fff;line-height:1.55}
.global-form-errors strong{display:block;margin-bottom:5px}
.global-form-errors ul{margin:0;padding-left:22px}
.top-nav a[aria-current="page"]:not(.top-nav-create),.mobile-nav a[aria-current="page"]{color:#fff!important;background:rgba(127,101,247,.22)!important;border-radius:11px;font-weight:800}
.top-nav a[aria-current="page"]:not(.top-nav-create){box-shadow:inset 0 -2px 0 #667bae}
.mobile-nav a[aria-current="page"] span{color:#d7f47d!important}
@media(max-width:760px){
  .mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;gap:2px}
  .mobile-nav>a,.mobile-nav>.nav-create-split,.mobile-nav>.mobile-more{min-width:0}
  .mobile-nav>a,.mobile-nav>.nav-create-split>.mobile-create-link,.mobile-more>summary{min-height:47px}
  .mobile-nav>a,.mobile-nav>.nav-create-split>.mobile-create-link{font-size:clamp(.55rem,2vw,.68rem)}
  .mobile-nav a:focus-visible,.mobile-nav button:focus-visible,.mobile-more>summary:focus-visible{outline:2px solid #d7f47d;outline-offset:-2px}
  .mobile-more{position:relative;display:flex;align-items:stretch;min-width:0}
  .mobile-more>summary{cursor:pointer;list-style:none;width:100%;display:grid;place-items:center;align-content:center;gap:2px;color:#dddbe2;font-size:.65rem;padding:5px 0;border-radius:10px;user-select:none}
  .mobile-more>summary::-webkit-details-marker{display:none}
  .mobile-more>summary::marker{content:""}
  .mobile-more>summary span{font-size:1.2rem;color:#b3c3f1}
  .mobile-more[open]>summary{background:#ffffff16;color:#fff}
  .mobile-more-panel{position:absolute;z-index:95;bottom:calc(100% + 14px);right:0;width:min(250px,calc(100vw - 32px));padding:8px;background:#0b1730;border:1px solid #6274a6;border-radius:15px;box-shadow:0 18px 55px #0009;display:grid;gap:3px}
  .mobile-more-panel a,.mobile-more-panel button{display:block;text-align:left;width:100%;color:#f3f5ff!important;background:transparent;border:0;border-radius:9px;padding:12px;font-size:.84rem;white-space:normal}
  .mobile-more-panel a:hover,.mobile-more-panel button:hover{background:#20345c}
  .mobile-more-panel form{margin:0}
}
@media(max-width:430px){
  .mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr));padding:5px}
  .mobile-nav>a,.mobile-nav>.nav-create-split>.mobile-create-link,.mobile-more>summary{font-size:.56rem}
}

/* Small but explicit login controls and admin section shortcuts. */
.password-show-label{display:inline-flex!important;align-items:center;gap:8px;margin:4px 0 14px!important;font-size:.84rem!important;font-weight:600!important;cursor:pointer}
.password-show-label input[type=checkbox]{width:17px;height:17px;accent-color:#94a9eb;cursor:pointer;flex:0 0 17px}
.admin-quicknav{display:flex;gap:9px;overflow-x:auto;padding:8px 0 20px;scrollbar-width:thin;scrollbar-color:#7776a0 transparent}
.admin-quicknav a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:40px;padding:9px 14px;border:1px solid #ffffff25;border-radius:11px;background:#ffffff0c;color:inherit;font-size:.83rem;font-weight:700}
.admin-quicknav a:hover,.admin-quicknav a:focus-visible{border-color:#7f92bc;outline-offset:2px}
.admin-page section[id]{scroll-margin-top:22px}

/* Tableau de maintenance limité à Pygmalion Sandbox. */
.admin-sandbox-maintenance{display:grid;gap:17px}
.admin-sandbox-maintenance .admin-panel-heading{align-items:flex-start}
.admin-maintenance-status{display:grid;gap:4px;padding:13px 16px;border:1px solid var(--line);border-radius:13px;background:var(--paper)}
.admin-maintenance-status strong{font-size:.86rem}
.admin-maintenance-status span{font-size:.79rem;color:var(--muted);line-height:1.5}
.admin-maintenance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.admin-maintenance-group{display:grid;align-content:start;gap:9px;min-width:0}
.admin-maintenance-group h3{margin:0 0 3px;font-size:.91rem}
.admin-maintenance-link{display:grid;gap:5px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:var(--surface);text-decoration:none;transition:border-color .15s,background .15s}
.admin-maintenance-link strong{font-size:.83rem;line-height:1.35}
.admin-maintenance-link small{font-size:.73rem;color:var(--muted);line-height:1.5}
.admin-maintenance-link:hover,.admin-maintenance-link:focus-visible{border-color:var(--accent);background:var(--paper);outline-offset:3px}
.admin-maintenance-link--primary{border-color:var(--accent);background:var(--paper)}
@media (max-width:700px){
  .admin-maintenance-grid{grid-template-columns:minmax(0,1fr)}
  .admin-maintenance-link{min-height:64px}
}


/* Actionable, accessible help for failed generations. */
.result-page .generation-failure-guide {max-width:760px;}
.result-page .generation-failure-next {
    max-width:610px;margin:18px auto;padding:14px 18px;
    background:rgba(93,120,182,.1);border:1px solid rgba(151,171,220,.23);
    border-radius:12px;line-height:1.6;
}
.result-page .generation-failure-actions {
    display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
    gap:12px;margin-top:20px;
}
.result-page .generation-failure-actions form {margin:0;}
.result-page .generation-failure-actions :is(a,button) {
    display:inline-flex;align-items:center;justify-content:center;min-height:44px;
}
.result-page .generation-failure-note {display:block;margin:15px auto 0;max-width:560px;line-height:1.5;}
