:root {
    --navy: #17265a;
    --navy-2: #0e1b45;
    --ink: #182444;
    --muted: #6d7895;
    --line: #dfe4f0;
    --canvas: #f3f5fa;
    --white: #ffffff;
    --indigo: #5268d9;
    --indigo-soft: #eef0ff;
    --orange: #ff7138;
    --orange-dark: #e85a20;
    --green: #159a68;
    --red: #df4d5c;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(82, 104, 217, .25); outline-offset: 2px; }

.studio-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.studio-sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 24px 15px 18px; color: #eaf0ff; background: linear-gradient(180deg, #172b68 0%, #111f50 100%); box-shadow: 12px 0 35px rgba(18, 32, 78, .08); }
.studio-brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 30px; color: white; text-decoration: none; }
.studio-brand img { width: 42px; height: 42px; filter: drop-shadow(0 8px 13px rgba(0,0,0,.18)); }
.studio-brand span { display: grid; gap: 2px; }
.studio-brand b { font-size: 16px; line-height: 1.05; letter-spacing: -.2px; }
.studio-brand small { color: #ff9a69; font-size: 12px; font-weight: 900; letter-spacing: 2.6px; }
.studio-nav { display: grid; gap: 7px; }
.studio-nav-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 13px; color: #cbd5fa; background: transparent; border: 0; border-radius: 11px; text-align: left; transition: .18s ease; }
.studio-nav-item span { width: 25px; color: #aebaf0; font-size: 19px; text-align: center; }
.studio-nav-item b { font-size: 13px; }
.studio-nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.studio-nav-item.active { color: white; background: linear-gradient(135deg, #536ad8, #4158be); box-shadow: 0 9px 22px rgba(6, 13, 43, .25); }
.studio-nav-item.active span { color: white; }
.oto-nav-item { border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.15); margin-bottom: 2px; }
.oto-nav-item:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.sidebar-help { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.06); }
.sidebar-help > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #dce4ff; font-weight: 900; }
.sidebar-help div { display: grid; gap: 2px; }
.sidebar-help b { font-size: 12px; }
.sidebar-help small { color: #aeb9de; font-size: 9px; }
.sidebar-disclaimer { margin: 14px 8px 0; color: #8190bd; font-size: 9px; line-height: 1.5; }

.studio-main { min-width: 0; }
.studio-topbar { height: 82px; display: flex; align-items: center; gap: 24px; padding: 0 30px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }
.studio-topbar h1 { margin: 2px 0 0; font-size: 22px; line-height: 1; }
.studio-eyebrow { margin: 0; color: #8390b0; font-size: 9px; font-weight: 900; letter-spacing: 1.45px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.global-search { width: 240px; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #8a96b5; background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; }
.global-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.primary-action, .secondary-action, .danger-action { min-height: 40px; border-radius: 10px; padding: 0 16px; border: 1px solid transparent; font-size: 12px; font-weight: 850; transition: .18s ease; }
.primary-action { color: white; background: linear-gradient(135deg, #ff7d43, #ff642d); box-shadow: 0 8px 19px rgba(255,100,45,.22); }
.primary-action:hover { transform: translateY(-1px); background: linear-gradient(135deg, #ff6f35, #e95620); }
.secondary-action { color: #465683; background: white; border-color: #ccd4e8; }
.secondary-action:hover { border-color: #8998c3; }
.danger-action { color: white; background: var(--red); }
.avatar-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: white; background: #263b83; border: 3px solid #e7eaff; border-radius: 50%; font-size: 11px; font-weight: 900; }
.mobile-menu-button { display: none; border: 0; background: transparent; color: var(--navy); font-size: 22px; }
.studio-content { padding: 26px 30px 42px; }
.workspace-view { display: none; }
.workspace-view.active { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.dashboard-hero { min-height: 270px; overflow: hidden; display: grid; grid-template-columns: 1.35fr .85fr; border-radius: 20px; background: linear-gradient(122deg, #213a89 0%, #4359c2 61%, #6377e7 100%); box-shadow: 0 18px 42px rgba(30, 50, 116, .17); }
.hero-copy { padding: 34px 38px; color: white; position: relative; z-index: 2; }
.hero-badge { display: inline-flex; padding: 6px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.12); font-size: 8px; font-weight: 900; letter-spacing: 1.3px; }
.hero-copy h2 { margin: 14px 0 11px; font-size: clamp(29px, 3vw, 43px); line-height: 1.08; letter-spacing: -1.2px; }
.hero-copy h2 strong { color: #ffb087; }
.hero-copy p { max-width: 610px; margin: 0; color: #dce3ff; font-size: 13px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.hero-primary, .hero-secondary { min-height: 43px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-size: 12px; font-weight: 850; }
.hero-primary { color: var(--navy); background: white; box-shadow: 0 9px 23px rgba(10,20,70,.18); }
.hero-primary span { color: var(--orange); margin-left: 6px; }
.hero-secondary { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.32); }
.hero-preview { min-height: 270px; position: relative; overflow: hidden; background: radial-gradient(circle at 60% 50%, rgba(255,255,255,.2), transparent 58%); }
.book-back, .book-front { position: absolute; width: 150px; height: 202px; padding: 20px; border-radius: 7px 12px 12px 7px; box-shadow: -13px 22px 35px rgba(12,20,66,.28); }
.book-back { top: 37px; right: 170px; transform: rotate(-12deg); color: #fcdfd1; background: #ee7b58; }
.book-back span { font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.book-back i { display: block; height: 6px; margin-top: 15px; border-radius: 3px; background: rgba(255,255,255,.38); }
.book-back i:nth-of-type(2) { width: 76%; }
.book-back i:nth-of-type(3) { width: 46%; }
.book-front { top: 28px; right: 57px; transform: rotate(7deg); color: white; background: linear-gradient(150deg, #17265b, #2e469b); border: 1px solid rgba(255,255,255,.28); }
.book-front::before { content: ''; position: absolute; inset: 57px 20px 54px; border-radius: 50%; background: repeating-conic-gradient(#f1a65e 0 9deg, #f7cf83 9deg 18deg, #5b75cd 18deg 27deg); box-shadow: inset 0 0 0 11px #24397e; }
.book-front small, .book-front strong, .book-front span { position: relative; z-index: 1; display: block; }
.book-front small { font-size: 7px; letter-spacing: 1.2px; }
.book-front strong { margin-top: 14px; font-size: 18px; line-height: 1.05; }
.book-front span { position: absolute; bottom: 18px; left: 20px; font-size: 6px; font-weight: 900; letter-spacing: 1px; }
.ready-stamp { position: absolute; right: 230px; bottom: 25px; z-index: 4; width: 70px; height: 70px; display: grid; place-items: center; text-align: center; transform: rotate(-9deg); color: #157a58; background: #e8fff5; border: 4px solid white; border-radius: 50%; box-shadow: 0 8px 18px rgba(7,22,67,.25); font-size: 17px; }
.ready-stamp b { display: block; font-size: 7px; line-height: 1.05; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metric-grid article { min-height: 94px; display: flex; align-items: center; gap: 13px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(38,52,98,.05); }
.metric-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; font-size: 19px; font-weight: 900; }
.metric-icon.purple { color: #5368d8; background: #eef0ff; }
.metric-icon.green { color: #168b64; background: #e7f8f1; }
.metric-icon.orange { color: #e86a2e; background: #fff0e7; }
.metric-icon.red { color: #d84a59; background: #ffecef; }
.metric-grid article div { display: grid; gap: 2px; }
.metric-grid small { color: #8894b1; font-size: 8px; font-weight: 900; letter-spacing: .9px; }
.metric-grid strong { font-size: 25px; line-height: 1; }
.metric-grid em { color: #9aa3ba; font-size: 9px; font-style: normal; }

.panel { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(38,52,98,.045); }
.recent-panel { min-height: 220px; }
.panel-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 3px 0 0; font-size: 17px; }
.panel-heading p:not(.studio-eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { border: 0; color: #5268d8; background: transparent; font-size: 11px; font-weight: 850; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 17px; }
.project-card { min-width: 0; display: grid; grid-template-columns: 78px 1fr; gap: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: .18s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #bdc6e4; box-shadow: 0 10px 25px rgba(32,48,100,.08); }
.project-cover { min-height: 102px; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 10px; color: white; background: linear-gradient(145deg, #425bc3, #1f357d); border-radius: 7px; box-shadow: -5px 7px 12px rgba(31,49,110,.18); }
.project-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,24,67,.12), rgba(15,24,67,.78)); }
.project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-cover span, .project-cover b { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.project-cover span { font-size: 6px; font-weight: 900; letter-spacing: .7px; }
.project-cover b { font-size: 12px; line-height: 1.15; overflow-wrap: anywhere; }
.project-card-body { min-width: 0; display: flex; flex-direction: column; }
.project-card-body h3 { overflow: hidden; margin: 3px 0 4px; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.project-card-body > p { margin: 0; color: var(--muted); font-size: 9px; }
.project-progress { height: 5px; margin: auto 0 5px; overflow: hidden; background: #e9edf6; border-radius: 99px; }
.project-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #536bd8, #7e91ed); }
.project-meta { display: flex; justify-content: space-between; color: #8994ae; font-size: 8px; }
.empty-projects { display: none; min-height: 190px; place-items: center; align-content: center; padding: 25px; text-align: center; }
.empty-projects.visible { display: grid; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 8px; color: #5268d8; background: #eef0ff; border-radius: 13px; font-size: 21px; }
.empty-projects h3 { margin: 0 0 5px; font-size: 15px; }
.empty-projects p { margin: 0 0 14px; color: var(--muted); font-size: 10px; }
.empty-projects.compact { min-height: 280px; }

.workflow-panel { margin-top: 18px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.workflow-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 11px; padding: 21px; }
.workflow-steps > i { color: #b8c0d5; font-style: normal; }
.workflow-steps article { min-height: 135px; position: relative; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfe; }
.workflow-steps article > span { position: absolute; right: 12px; top: 10px; color: #d2d7e5; font-size: 19px; font-weight: 950; }
.workflow-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #5368d8; background: #eef0ff; border-radius: 9px; font-weight: 900; }
.workflow-steps h3 { margin: 12px 0 5px; font-size: 12px; }
.workflow-steps p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.view-intro { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.view-intro h2 { margin: 4px 0 6px; font-size: 25px; }
.view-intro p:not(.studio-eyebrow) { margin: 0; color: var(--muted); font-size: 11px; }
.project-toolbar { display: flex; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.project-toolbar label { min-width: 280px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfe; }
.project-toolbar input { width: 100%; height: 38px; border: 0; outline: 0; background: transparent; font-size: 11px; }
.project-toolbar select { min-width: 150px; padding: 0 10px; color: #4b587c; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 11px; }
.project-table-wrap { overflow-x: auto; }
.project-table { width: 100%; border-collapse: collapse; }
.project-table th { padding: 11px 15px; color: #8892aa; background: #fafbfe; border-bottom: 1px solid var(--line); text-align: left; font-size: 8px; letter-spacing: .7px; }
.project-table td { padding: 13px 15px; border-bottom: 1px solid #edf0f6; font-size: 10px; vertical-align: middle; }
.project-title-cell { display: flex; align-items: center; gap: 10px; }
.mini-cover { width: 34px; height: 45px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #5268d8, #273d8c); border-radius: 4px; font-size: 12px; }
.project-title-cell div { display: grid; gap: 2px; }
.project-title-cell b { font-size: 11px; }
.project-title-cell small { color: var(--muted); font-size: 8px; }
.table-progress { width: 120px; }
.table-progress div { height: 5px; overflow: hidden; background: #e8ebf4; border-radius: 99px; }
.table-progress i { display: block; height: 100%; background: #5368d8; }
.table-progress small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 99px; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.status-pill.draft { color: #9a6329; background: #fff3df; }
.status-pill.building { color: #4054b5; background: #edf0ff; }
.status-pill.ready { color: #137650; background: #e8f8f1; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions button { min-height: 30px; padding: 0 9px; color: #405181; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 9px; font-weight: 800; }
.row-actions button.delete { color: #c73e4d; }

.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.template-card { position: relative; overflow: hidden; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 10px 28px rgba(40,55,100,.06); }
.template-card.featured { border-color: #aab5eb; box-shadow: 0 14px 34px rgba(55,73,154,.12); }
.template-tag { display: inline-flex; padding: 5px 8px; color: #4c5fc4; background: #eef0ff; border-radius: 99px; font-size: 7px; font-weight: 900; letter-spacing: .8px; }
.template-art { height: 180px; margin: 13px 0 17px; overflow: hidden; border-radius: 12px; background: #eff2f8; }
.mosaic-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 22px; background: linear-gradient(145deg, #243a85, #5d71db); }
.mosaic-art i { display: block; background: #f6b06f; clip-path: polygon(20% 0, 100% 15%, 84% 100%, 0 82%); }
.mosaic-art i:nth-child(2n) { background: #f4d3a6; clip-path: polygon(0 12%, 82% 0, 100% 88%, 16% 100%); }
.geometry-art { display: grid; place-items: center; position: relative; background: #f7eee4; }
.geometry-art i { position: absolute; width: 118px; height: 118px; border: 8px solid #e08755; transform: rotate(45deg); }
.geometry-art i:nth-child(2) { width: 82px; height: 82px; border-color: #4159bd; }
.geometry-art i:nth-child(3) { width: 45px; height: 45px; border-color: #dfb760; }
.number-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: #1f337d; padding: 2px; }
.number-art b { display: grid; place-items: center; color: #344997; background: #f4cf8e; font-size: 23px; }
.number-art b:nth-child(2), .number-art b:nth-child(3) { background: #eda66f; }
.template-card h3 { margin: 0 0 5px; font-size: 17px; }
.template-card p { min-height: 36px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.template-card button { width: 100%; min-height: 39px; margin-top: 15px; color: #4559bc; background: #f4f5ff; border: 1px solid #d9def7; border-radius: 9px; font-size: 11px; font-weight: 850; }

.preflight-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 17px; }
.standards-badge { padding: 6px 9px; color: #177956; background: #e7f8f1; border-radius: 99px; font-size: 8px; font-weight: 900; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding: 8px 20px 18px; }
.check-list article { display: flex; align-items: center; gap: 11px; padding: 15px 8px; border-bottom: 1px solid #edf0f6; }
.check-list article > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: #16885e; background: #e8f8f1; border-radius: 50%; font-size: 12px; font-weight: 900; }
.check-list div { display: grid; gap: 3px; }
.check-list b { font-size: 11px; }
.check-list small { color: var(--muted); font-size: 8.5px; }
.compliance-note { align-self: start; padding: 22px; color: #3d4d77; background: #fff8ea; border: 1px solid #f2ddb5; border-radius: 15px; }
.compliance-note > span { width: 32px; height: 32px; display: grid; place-items: center; color: #986722; background: #ffe9ba; border-radius: 50%; font-family: Georgia, serif; font-weight: 900; }
.compliance-note h3 { margin: 15px 0 7px; font-size: 14px; }
.compliance-note p { margin: 0; color: #75684f; font-size: 10px; line-height: 1.6; }
.export-preview { min-height: 300px; display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 34px; }
.export-stack { width: 150px; height: 180px; position: relative; }
.export-stack span { position: absolute; width: 105px; height: 140px; display: grid; place-items: center; color: white; background: #5268d8; border-radius: 7px; box-shadow: 0 12px 25px rgba(25,42,100,.18); font-size: 16px; font-weight: 900; }
.export-stack span:nth-child(1) { left: 0; top: 25px; transform: rotate(-10deg); background: #ee9c61; }
.export-stack span:nth-child(2) { left: 38px; top: 11px; transform: rotate(5deg); }
.export-stack span:nth-child(3) { left: 20px; top: 31px; background: #1c327b; }
.export-preview h2 { margin: 0 0 7px; font-size: 20px; }
.export-preview p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.export-preview ul { margin: 0; padding-left: 18px; color: #4d5b7e; font-size: 10px; line-height: 1.8; }

.builder-intro { align-items: flex-end; }
.back-link { margin: 0 0 12px; padding: 0; color: #5268d8; background: transparent; border: 0; font-size: 10px; font-weight: 850; }
.builder-actions { display: flex; align-items: center; gap: 10px; }
.preview-pdf-action { color: #17265a; background: #e8ecf8; border-color: #ccd4fb; }
.preview-pdf-action:hover:not(:disabled) { background: #dde4f6; }
.listing-assistant-action { background: linear-gradient(135deg, #f4e8ff, #ede4ff); color: #7e22ce; border-color: #d8b4fe; font-weight: 750; }
.listing-assistant-action:hover { background: linear-gradient(135deg, #ede4ff, #e9d5ff); border-color: #c084fc; color: #6b21a8; }
.pdf-preview-dialog { width: min(840px, calc(100vw - 32px)); height: min(92vh, 860px); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: #0e1526; color: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.5); }
.pdf-preview-dialog:not([open]) { display: none; }
.pdf-preview-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #161e33; border-bottom: 1px solid rgba(255,255,255,.08); }
.pdf-preview-toolbar h2 { margin: 2px 0 0; font-size: 16px; color: #fff; }
.pdf-preview-controls { display: flex; align-items: center; gap: 8px; }
.pdf-preview-page { font-size: 12px; font-weight: 600; color: #9bb0dc; min-width: 90px; text-align: center; }
.pdf-preview-stage { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 24px; background: #0c1220; }
.pdf-preview-stage.loading { opacity: 0.5; pointer-events: none; }
.pdf-preview-stage canvas { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.4); background: white; }
.production-package-action { min-width: 176px; color: #4054b5; background: #f0f2ff; border-color: #ccd4fb; }
.production-package-action.busy { opacity: .72; cursor: progress; }
.source-safe { padding: 8px 10px; color: #177956; background: #e8f8f1; border-radius: 99px; font-size: 7px; font-weight: 900; letter-spacing: .7px; }
.builder-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 17px; }
.builder-sidebar { align-self: start; overflow: hidden; }
.builder-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; padding: 14px; background: #e8ebf3; }
.builder-specs div { min-height: 63px; padding: 11px; background: white; }
.builder-specs dt { color: #8b95ad; font-size: 7px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase; }
.builder-specs dd { margin: 5px 0 0; color: #2d3e71; font-size: 10px; font-weight: 850; }
.source-card { display: flex; gap: 10px; margin: 14px; padding: 13px; color: #365348; background: #effaf6; border: 1px solid #caeadd; border-radius: 11px; }
.source-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: #27a879; border-radius: 9px; font-size: 17px; }
.source-card div { display: grid; gap: 3px; }
.source-card small { color: #6b9184; font-size: 6.5px; font-weight: 900; letter-spacing: .7px; }
.source-card b { font-size: 10px; }
.source-card p { margin: 0; color: #678078; font-size: 8px; line-height: 1.45; }
.preflight-mini { display: grid; gap: 9px; margin: 0 18px 18px; }
.preflight-mini p { display: flex; align-items: center; gap: 8px; margin: 0; color: #586783; font-size: 9px; font-weight: 750; }
.preflight-mini span { width: 19px; height: 19px; display: grid; place-items: center; color: #16875f; background: #e8f8f1; border-radius: 50%; font-size: 8px; }
.kdp-status-card { display: grid; gap: 10px; margin: 14px; padding: 13px; background: #eef9f4; border: 1px solid #c5e7d8; border-radius: 11px; }
.kdp-status-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kdp-status-card small { color: #718078; font-size: 6.5px; font-weight: 950; letter-spacing: .8px; }
.kdp-status-card b { padding: 5px 7px; color: #147852; background: white; border-radius: 99px; font-size: 7px; }
.kdp-status-card > p { margin: 0; color: #52695f; font-size: 8px; line-height: 1.45; }
.kdp-status-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 0; }
.kdp-status-card dl div { padding: 7px 4px; text-align: center; background: rgba(255,255,255,.72); border-radius: 7px; }
.kdp-status-card dt { color: #788b82; font-size: 6px; }
.kdp-status-card dd { margin: 3px 0 0; color: #29493d; font-size: 9px; font-weight: 900; }
.kdp-status-card button { width: 100%; height: 34px; font-size: 8px; }
.kdp-status-card.attention { background: #fff5ed; border-color: #f0cfb7; }
.kdp-status-card.attention b { color: #bd572d; }
.kdp-status-card.loading { background: #f5f7fb; border-color: #dde3ee; }
.builder-canvas { overflow: hidden; }
.interior-showcase { display: grid; grid-template-columns: minmax(260px, .8fr) 1fr; gap: 26px; align-items: center; padding: 25px; background: radial-gradient(circle at 30% 40%, #eef1ff, transparent 60%); }
.paper-preview { width: 290px; height: 376px; position: relative; justify-self: center; padding: 26px; color: #1e2b4a; background: white; border: 1px solid #d6dcea; box-shadow: -10px 15px 27px rgba(25,42,92,.14); }
.paper-preview::after { content: ''; position: absolute; inset: 9px; pointer-events: none; border: 1px solid #edf0f6; }
.paper-kicker { display: inline-flex; padding: 5px 8px; color: white; background: #5268d8; border-radius: 99px; font-size: 6px; font-weight: 900; letter-spacing: .7px; }
.paper-preview h3 { margin: 13px 0 5px; font-size: 17px; }
.paper-preview > p { margin: 0; color: #7a849c; font-size: 7px; }
.paper-preview > small { position: absolute; bottom: 16px; left: 25px; right: 25px; padding-top: 8px; color: #8e98b0; border-top: 1px solid #e3e7f0; font-size: 6px; }
.fox-preview { width: 175px; height: 175px; position: absolute; left: 58px; bottom: 55px; background: #fff; border: 3px solid #25345c; border-radius: 48% 48% 52% 52%; }
.fox-preview > i { width: 74px; height: 74px; position: absolute; top: -31px; background: white; border: 3px solid #25345c; transform: rotate(45deg); z-index: -1; }
.fox-preview > i:first-child { left: 4px; }
.fox-preview > i:nth-child(2) { right: 4px; }
.fox-preview .eye { width: 26px; height: 31px; position: absolute; top: 51px; background: white; border: 3px solid #25345c; border-radius: 50%; }
.fox-preview .eye::after { content: ''; width: 7px; height: 7px; position: absolute; left: 7px; top: 9px; background: #25345c; border-radius: 50%; }
.fox-preview .eye.one { left: 37px; }
.fox-preview .eye.two { right: 37px; }
.fox-preview b, .fox-preview em, .fox-preview strong { width: 25px; height: 25px; position: absolute; display: grid; place-items: center; color: white; background: #5268d8; border-radius: 50%; font-size: 9px; font-style: normal; }
.fox-preview b { left: 74px; top: 13px; }
.fox-preview em { left: 20px; bottom: 30px; }
.fox-preview strong { right: 20px; bottom: 30px; }
.activity-plan { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.activity-plan article { min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 11px; background: white; border: 1px solid #dfe4f0; border-radius: 11px; }
.activity-plan article > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: #5368d8; background: #eef0ff; border-radius: 9px; font-size: 10px; font-weight: 900; }
.activity-plan article div { display: grid; gap: 4px; }
.activity-plan b { font-size: 10px; }
.activity-plan small { color: #7f89a1; font-size: 7.5px; line-height: 1.4; }
.builder-note { display: flex; align-items: center; gap: 10px; margin: 0 25px 24px; padding: 12px 14px; color: #5d6c88; background: #f7f8fc; border: 1px solid #e0e5ef; border-radius: 10px; }
.builder-note span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; color: #5268d8; background: #e9edff; border-radius: 50%; font-family: Georgia, serif; font-weight: 900; }
.builder-note p { margin: 0; font-size: 8.5px; line-height: 1.5; }
.quality-control-panel { margin: 0 25px 18px; padding: 17px; background: #f8faff; border: 1px solid #dce3f0; border-radius: 13px; }
.quality-control-heading { display: flex; justify-content: space-between; gap: 16px; }
.quality-control-heading h3 { margin: 3px 0 4px; font-size: 15px; }
.quality-control-heading p:not(.studio-eyebrow) { margin: 0; color: #75819a; font-size: 8px; }
.quality-control-heading > span { align-self: flex-start; padding: 6px 9px; color: #4f5e7d; background: #edf0f6; border-radius: 99px; font-size: 7px; font-weight: 950; }
.quality-control-heading > span.ready { color: #147852; background: #e6f7ef; }
.quality-control-heading > span.attention { color: #bd572d; background: #fff0e5; }
.book-information-panel, .artwork-organizer-panel, .cover-creator-panel { margin: 0 25px 18px; padding: 17px; background: white; border: 1px solid #dce3f0; border-radius: 13px; }
.book-information-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.book-information-form .field { margin: 0; }
.book-information-form .full, .book-information-form .rights-field, .book-information-actions { grid-column: 1 / -1; }
.book-information-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 2px; }
.book-information-actions small { color: #7b879f; font-size: 8px; }
.artwork-manager-actions { display: flex; align-items: center; gap: 7px; }
.artwork-manager-actions button { white-space: nowrap; }
.artwork-manager-status { margin-top: 12px; padding: 9px 11px; color: #60708f; background: #f3f6fb; border-radius: 8px; font-size: 8px; }
.artwork-manager-status.busy { color: #895524; background: #fff4e9; }
.artwork-organizer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.artwork-order-card { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 78px; padding: 8px; background: #f8faff; border: 1px solid #dce3f0; border-radius: 11px; cursor: grab; }
.artwork-order-card:active { cursor: grabbing; }
.artwork-order-card.dragging { opacity: .48; }
.artwork-order-card.drag-over { border-color: #5268d8; box-shadow: 0 0 0 3px rgba(82,104,216,.12); }
.artwork-order-card img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; }
.artwork-order-copy { min-width: 0; }
.artwork-order-copy b, .artwork-order-copy small { display: block; }
.artwork-order-copy b { color: #24345f; font-size: 9px; }
.artwork-order-copy small { margin-top: 4px; color: #8490a8; font-size: 7px; }
.artwork-order-actions { display: flex; gap: 5px; margin-top: 7px; }
.artwork-order-actions button { width: 27px; height: 25px; padding: 0; color: #506083; background: white; border: 1px solid #d6ddeb; border-radius: 6px; font-size: 10px; font-weight: 900; }
.artwork-order-actions button.replace { width: auto; padding: 0 7px; color: #4056c5; }
.artwork-order-actions button.remove { color: #b93848; }
.artwork-order-actions button:disabled { opacity: .35; }
.artwork-order-card::after { content: '⋮⋮'; position: absolute; right: 8px; top: 8px; color: #aab3c6; font-size: 11px; letter-spacing: -3px; }
.cover-creator-layout { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(410px, 1.3fr); gap: 18px; margin-top: 15px; }
.cover-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.cover-settings-form .field { margin: 0; }
.cover-settings-form .full, .cover-settings-actions { grid-column: 1 / -1; }
.cover-settings-form textarea { min-height: 104px; resize: vertical; }
.cover-tool-group { margin: 0; padding: 10px; border: 1px solid #dfe5ef; border-radius: 9px; }
.cover-tool-group legend { padding: 0 5px; color: #33436d; font-size: 8px; font-weight: 900; }
.cover-tool-group > small { display: block; margin-top: 7px; color: #8290aa; font-size: 7px; line-height: 1.4; }
.cover-tool-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.cover-tool-grid label { display: grid; gap: 5px; color: #5f6d8b; font-size: 7px; font-weight: 850; }
.cover-tool-grid label span { display: flex; justify-content: space-between; gap: 6px; }
.cover-tool-grid select { min-height: 33px; padding: 0 8px; color: #28395f; background: #fff; border: 1px solid #d6deeb; border-radius: 7px; font-size: 8px; }
.cover-tool-grid input[type="range"] { width: 100%; accent-color: #5268d8; }
.cover-tool-grid input[type="color"] { width: 100%; height: 34px; padding: 3px; background: white; border: 1px solid #d6deeb; border-radius: 7px; }
.cover-safety-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; background: #f5f7fb; border-radius: 8px; }
.cover-safety-toolbar label { display: flex; align-items: center; gap: 7px; color: #52617f; font-size: 8px; font-weight: 850; }
.cover-safety-toolbar input { accent-color: #27a879; }
.cover-safety-status { padding: 5px 7px; border-radius: 99px; font-size: 6.5px; line-height: 1.3; text-align: right; }
.cover-safety-status.pass { color: #147852; background: #e7f7ef; }
.cover-safety-status.warning { color: #a85c18; background: #fff0dc; }
.cover-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cover-settings-actions small { color: #6f7d98; font-size: 7.5px; line-height: 1.45; }
.cover-wrap-stage { min-width: 0; padding: 13px; background: #eef2f8; border-radius: 12px; }
.cover-wrap-preview { --cover-ink:#fff; --cover-text-color:#fff; --cover-overlay:.68; --title-left:8%; --title-bottom:7%; --title-size:1.65vw; aspect-ratio: 2.03 / 1; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 7px minmax(0, 1fr); overflow: hidden; color: var(--cover-ink); background: #17265a; border: 1px solid rgba(24,38,90,.22); border-radius: 4px; box-shadow: 0 12px 24px rgba(22,35,74,.18); }
.cover-wrap-preview.theme-ocean { background: linear-gradient(140deg,#073c58,#0c7290); }
.cover-wrap-preview.theme-sunset { background: linear-gradient(140deg,#70273f,#ef7849); }
.cover-wrap-preview.theme-forest { background: linear-gradient(140deg,#143e32,#2c7d59); }
.cover-back, .cover-front { position: relative; min-width: 0; overflow: hidden; }
.cover-back { padding: 9%; background: linear-gradient(145deg,rgba(255,255,255,.11),rgba(255,255,255,.02)); }
.cover-back-copy { width: 72%; position: relative; z-index: 2; }
.cover-back-copy b { display: block; font-size: clamp(9px,1.25vw,17px); line-height: 1.12; }
.cover-back-copy p { margin: 7% 0 0; font-size: clamp(5px,.62vw,8px); line-height: 1.45; }
.cover-back-copy small { display: block; margin-top: 8%; font-size: clamp(4px,.52vw,7px); font-weight: 900; letter-spacing: .6px; }
.cover-barcode-safe { width: 27%; height: 24%; position: absolute; z-index: 5; right: 6%; bottom: 7%; display: grid; place-items: center; color: #67738a; background: white; border: 1px dashed #aeb8c9; font-size: clamp(4px,.5vw,7px); font-weight: 900; line-height: 1.35; text-align: center; }
.cover-spine { background: rgba(7,15,47,.4); border-left: 1px dashed rgba(255,255,255,.45); border-right: 1px dashed rgba(255,255,255,.45); }
.cover-art-grid { position: absolute; inset: 0; display: grid; gap: 2px; }
.cover-art-cell { position: relative; min-width: 0; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
.cover-art-cell:active { cursor: grabbing; }
.cover-art-cell.selected { outline: 3px solid #ffb04f; outline-offset: -3px; z-index: 2; }
.cover-art-cell img { width: 100%; height: 100%; display: block; object-fit: cover; min-width: 0; min-height: 0; transform-origin: center; pointer-events: none; }
.layout-hero-mosaic .cover-art-grid { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3,1fr); }
.layout-hero-mosaic .cover-art-grid .cover-art-cell:first-child { grid-row: 1 / 4; }
.layout-gallery-grid .cover-art-grid { grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2,1fr); }
.layout-cinematic-strip .cover-art-grid { grid-template-columns: repeat(4,1fr); }
.cover-art-grid::after { content:''; position:absolute; inset:0; pointer-events:none; background: linear-gradient(180deg,rgba(7,15,47,.1),rgba(7,15,47,var(--cover-overlay))); }
.cover-title-block { width: 84%; position: absolute; z-index: 4; left: var(--title-left); bottom: var(--title-bottom); color: var(--cover-text-color); cursor: move; touch-action: none; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.font-modern .cover-title-block { font-family: Arial,sans-serif; }
.font-playful .cover-title-block { font-family: "Trebuchet MS",Arial,sans-serif; }
.font-classic .cover-title-block { font-family: Georgia,serif; }
.cover-title-block small { display: inline-block; padding: 4px 6px; background: #ff7138; border-radius: 20px; font-size: clamp(4px,.48vw,7px); font-weight: 950; letter-spacing: .5px; }
.cover-title-block strong { display: block; margin-top: 4%; font-size: clamp(11px,var(--title-size),30px); line-height: 1.04; }
.cover-title-block p { margin: 3% 0 0; font-size: clamp(5px,.7vw,9px); }
.cover-title-block em { display: block; margin-top: 4%; font-size: clamp(4px,.52vw,7px); font-style: normal; font-weight: 900; }
.cover-safe-area { position: absolute; z-index: 7; inset: 3.2%; display: none; align-items: flex-start; justify-content: flex-end; padding: 3px; pointer-events: none; color: #a9f2cb; border: 1px dashed #47df92; font-size: 5px; font-style: normal; font-weight: 950; letter-spacing: .4px; }
.cover-trim-guide { position: absolute; z-index: 8; inset: 1.43% .72%; display: none; pointer-events: none; border: 1px dashed #ffd46a; }
.cover-trim-guide span { position: absolute; left: 3px; top: 3px; padding: 2px 3px; color: #402f00; background: #ffd46a; font-size: 5px; font-weight: 950; }
.cover-bleed-label { position: absolute; z-index: 9; left: 3px; top: 3px; display: none; padding: 2px 3px; color: #7a3000; background: #ffb676; border-radius: 2px; font-size: 5px; font-weight: 950; }
.guides-on .cover-safe-area { display: flex; }
.guides-on .cover-trim-guide, .guides-on .cover-bleed-label { display: block; }
.cover-wrap-legend { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 8px; color: #7d89a1; font-size: 6px; font-weight: 950; letter-spacing: .7px; text-align: center; }
.cover-compliance-note { margin: 8px 0 0; color: #6d7b96; font-size: 7px; line-height: 1.45; }
.artwork-audit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.artwork-audit-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 62px; padding: 7px; background: white; border: 1px solid #dfe5ef; border-radius: 9px; }
.artwork-audit-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.artwork-audit-item b, .artwork-audit-item small { display: block; }
.artwork-audit-item b { font-size: 8px; }
.artwork-audit-item small { margin-top: 4px; color: #7e8aa3; font-size: 6.7px; }
.artwork-audit-item em { display: inline-block; margin-top: 5px; padding: 3px 5px; color: #147852; background: #e8f7f0; border-radius: 99px; font-size: 5.8px; font-style: normal; font-weight: 950; }
.artwork-audit-item.warning em { color: #a96a14; background: #fff5db; }
.artwork-audit-item.error em { color: #bd3747; background: #ffebee; }
.preflight-check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 12px; }
.preflight-check-list p { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 8px 10px; color: #56637d; background: white; border-radius: 8px; font-size: 7.5px; line-height: 1.4; }
.preflight-check-list p span { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 auto; color: #16875f; background: #e8f8f1; border-radius: 50%; font-weight: 950; }
.preflight-check-list p.warning span { color: #a96a14; background: #fff5db; }
.preflight-check-list p.error span { color: #bd3747; background: #ffebee; }
.sticker-board-preview { width: 88%; max-height: 295px; margin: 10px auto 0; display: block; }
.sticker-artwork-preview { width: 220px; height: 220px; margin: 13px auto 0; display: block; object-fit: cover; border: 2px solid #25345c; background: #eef1f8; }
.preview-numbers { fill: #42506d; font: 800 10px Arial, sans-serif; text-anchor: middle; }
.primary-action.busy { opacity: .72; cursor: wait; }

.optimizer-intro { align-items: center; }
.optimizer-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 17px; }
.optimizer-controls { align-self: start; overflow: hidden; padding-bottom: 16px; }
.optimizer-controls > .field, .optimizer-controls > .field-grid, .optimizer-controls > .optimizer-preset, .optimizer-controls > button { margin-left: 16px; margin-right: 16px; }
.optimizer-upload { min-height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin: 0 16px 15px; color: #4e5e87; background: linear-gradient(145deg, #f7f8ff, #eef1fb); border: 1px dashed #8796d8; border-radius: 13px; cursor: pointer; text-align: center; }
.optimizer-upload:hover { border-color: #5268d8; background: #f0f2ff; }
.optimizer-upload.dragging { color: #4056c5; background: #e8edff; border-color: #5268d8; box-shadow: 0 0 0 4px rgba(82,104,216,.12); }
.optimizer-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.optimizer-upload > span { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: #5268d8; border-radius: 10px; font-size: 18px; }
.optimizer-upload b { font-size: 11px; }
.optimizer-upload small { max-width: 220px; color: #8490aa; font-size: 8px; line-height: 1.45; }
.optimizer-batch-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 16px 8px; color: #344263; }
.optimizer-batch-heading b { font-size: 9px; text-transform: uppercase; letter-spacing: .6px; }
.optimizer-batch-heading span { padding: 4px 7px; color: #5268d8; background: #eef1ff; border-radius: 20px; font-size: 7px; font-weight: 900; }
.optimizer-batch-list { display: grid; gap: 7px; max-height: 248px; min-height: 44px; margin: -4px 16px 15px; overflow-y: auto; }
.optimizer-batch-list.empty { place-items: center; padding: 10px; color: #8a95ad; background: #fafbfe; border: 1px dashed #d8deea; border-radius: 9px; font-size: 8px; text-align: center; }
.optimizer-batch-list > p { margin: 0; }
.optimizer-batch-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px; color: #596681; background: #f7f8fc; border: 1px solid #e0e5ef; border-radius: 9px; }
.optimizer-batch-item.active { background: #eef1ff; border-color: #667be0; box-shadow: inset 3px 0 #5268d8; }
.optimizer-batch-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; }
.optimizer-batch-item > button { min-width: 0; padding: 0; overflow: hidden; color: inherit; background: transparent; border: 0; text-align: left; }
.optimizer-batch-item b, .optimizer-batch-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optimizer-batch-item b { color: #293756; font-size: 8.5px; }
.optimizer-batch-item small { margin-top: 3px; font-size: 7px; }
.optimizer-batch-actions { display: flex; gap: 3px; }
.optimizer-batch-actions button { width: 23px; height: 23px; padding: 0; color: #53617e; background: white; border: 1px solid #d7ddea; border-radius: 6px; font-size: 10px; cursor: pointer; }
.optimizer-batch-actions button:hover { color: #d13b4c; border-color: #e6a9b0; }
.compact-fields { gap: 9px; margin-top: 13px; }
.optimizer-preset { display: grid; gap: 4px; margin-top: 14px; padding: 12px; color: #3d527b; background: #f1f8f5; border: 1px solid #cae8dc; border-radius: 10px; }
.optimizer-preset span { color: #15825c; font-size: 6.5px; font-weight: 950; letter-spacing: .8px; }
.optimizer-preset strong { font-size: 10px; }
.optimizer-preset small { color: #73857e; font-size: 7.5px; line-height: 1.4; }
.optimizer-run, .optimizer-create { width: calc(100% - 32px); margin-top: 14px; }
.optimizer-create { height: 42px; }
.optimizer-run:disabled, .optimizer-create:disabled { opacity: .45; cursor: not-allowed; }
.optimizer-workspace { overflow: hidden; }
.optimizer-heading { align-items: center; }
.quality-score { width: 72px; height: 72px; display: grid; place-items: center; align-content: center; flex: 0 0 auto; color: #177956; background: #eaf9f3; border: 1px solid #c6eadc; border-radius: 50%; }
.quality-score span { font-size: 21px; font-weight: 950; line-height: 1; }
.quality-score small { margin-top: 4px; font-size: 5.5px; font-weight: 950; letter-spacing: .6px; }
.optimizer-tabs { display: flex; gap: 6px; padding: 0 24px 15px; overflow-x: auto; }
.optimizer-tabs button { min-height: 34px; padding: 0 12px; white-space: nowrap; color: #67738e; background: #f5f7fb; border: 1px solid #dce2ee; border-radius: 8px; font-size: 8px; font-weight: 850; }
.optimizer-tabs button.active { color: white; background: #5268d8; border-color: #5268d8; }
.optimizer-stage { min-height: 480px; display: grid; place-items: center; position: relative; margin: 0 24px; overflow: hidden; background: #e9eef7; border: 1px solid #d9e0ed; border-radius: 13px; }
.optimizer-stage canvas { width: min(100%, 600px); height: auto; display: block; background: white; box-shadow: 0 14px 35px rgba(28,43,91,.16); }
.optimizer-stage.empty canvas { visibility: hidden; }
.optimizer-placeholder { position: absolute; display: none; place-items: center; gap: 8px; color: #6e7b96; text-align: center; }
.optimizer-stage.empty .optimizer-placeholder { display: grid; }
.optimizer-placeholder span { width: 52px; height: 52px; display: grid; place-items: center; color: #5268d8; background: #eef0ff; border-radius: 14px; font-size: 22px; }
.optimizer-placeholder b { color: #344263; font-size: 12px; }
.optimizer-placeholder small { font-size: 8px; }
.quality-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 16px 24px 24px; }
.quality-grid article { min-height: 74px; display: grid; align-content: center; gap: 4px; padding: 11px; background: #fafbfe; border: 1px solid #e0e5ef; border-radius: 10px; }
.quality-grid span { color: #8a95ad; font-size: 6px; font-weight: 950; letter-spacing: .65px; }
.quality-grid b { color: #33436d; font-size: 10px; }
.quality-grid small { color: #8792aa; font-size: 7px; line-height: 1.35; }

dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(15, 25, 61, .68); backdrop-filter: blur(5px); }
.book-wizard { width: min(880px, calc(100vw - 32px)); max-height: min(92vh, 820px); overflow: hidden; border-radius: 19px; box-shadow: 0 28px 80px rgba(7,15,46,.34); }
.book-wizard form { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: min(92vh, 820px); background: white; }
.dialog-close { position: absolute; right: 18px; top: 17px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; color: #64708e; background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 20px; }
.wizard-header { display: flex; align-items: center; gap: 13px; padding: 21px 25px 17px; }
.wizard-header img { width: 45px; height: 45px; }
.wizard-header h2 { margin: 2px 0 3px; font-size: 21px; }
.wizard-header p:not(.studio-eyebrow) { margin: 0; color: var(--muted); font-size: 10px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 24px; padding: 10px 12px; list-style: none; background: #f5f7fb; border: 1px solid var(--line); border-radius: 11px; }
.wizard-progress li { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; color: #8994ad; font-size: 9px; }
.wizard-progress li:not(:last-child)::after { content: ''; position: absolute; right: -18%; width: 36%; height: 1px; background: #ccd3e4; }
.wizard-progress span { width: 22px; height: 22px; display: grid; place-items: center; color: white; background: #acb5ca; border-radius: 50%; font-size: 9px; font-weight: 900; }
.wizard-progress li.active, .wizard-progress li.complete { color: #34488f; }
.wizard-progress li.active span, .wizard-progress li.complete span { background: #5268d8; }
.wizard-body { overflow-y: auto; padding: 22px 25px; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: viewIn .22s ease; }
.step-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-heading > span { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; color: #5268d8; background: #eef0ff; border-radius: 10px; font-size: 11px; font-weight: 950; }
.step-heading h3 { margin: 0 0 3px; font-size: 17px; }
.step-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.field { display: grid; gap: 6px; }
.field > span, .choice-fieldset legend { color: #596682; font-size: 9px; font-weight: 900; }
.field input, .field select { width: 100%; height: 43px; padding: 0 12px; color: var(--ink); background: white; border: 1px solid #cfd6e8; border-radius: 9px; font-size: 11px; }
.field input:focus, .field select:focus { border-color: #7285df; }
.field small { color: #8a95ae; font-size: 8px; }
.field.full { width: 100%; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.choice-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 8px; }
.type-choice-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
.type-choice-grid label { min-height: 135px; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 17px; border: 1px solid #d5dbea; border-radius: 12px; background: #fbfcfe; cursor: pointer; }
.type-choice-grid input, .theme-grid input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice-grid label:has(input:checked) { border-color: #6d80dd; background: #f0f2ff; box-shadow: inset 0 0 0 1px #6d80dd; }
.choice-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 12px; color: #5268d8; background: #e7ebff; border-radius: 9px; font-size: 14px; font-weight: 900; }
.type-choice-grid b { font-size: 12px; }
.type-choice-grid small { margin-top: 4px; color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.type-choice-grid em { position: absolute; top: 10px; right: 10px; padding: 4px 6px; color: #177956; background: #e6f7f0; border-radius: 99px; font-size: 6px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.switch-card { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch-card input { position: absolute; opacity: 0; }
.switch-card i { width: 37px; height: 21px; position: relative; flex: 0 0 auto; background: #c9d0e0; border-radius: 99px; transition: .2s; }
.switch-card i::after { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s; }
.switch-card input:checked + i { background: #5268d8; }
.switch-card input:checked + i::after { transform: translateX(16px); }
.switch-card span { display: grid; gap: 2px; }
.switch-card b { font-size: 10px; }
.switch-card small { color: var(--muted); font-size: 8px; }
.spec-preview { display: grid; gap: 3px; margin-top: 14px; padding: 13px 15px; color: #465586; background: #f5f7fc; border-left: 4px solid #5268d8; border-radius: 8px; }
.spec-preview > span { color: #8590ac; font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.spec-preview strong { font-size: 12px; }
.spec-preview small { color: var(--muted); font-size: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.theme-grid label { position: relative; min-height: 58px; display: grid; place-items: center; padding: 10px; color: #53617f; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; font-weight: 800; cursor: pointer; }
.theme-grid label:has(input:checked) { color: #4055bb; background: #eef0ff; border-color: #7183df; box-shadow: inset 0 0 0 1px #7183df; }
.artwork-source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.artwork-source-grid label { position: relative; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 82px; padding: 10px; color: #53617f; background: #fafbfe; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.artwork-source-grid input { position: absolute; opacity: 0; pointer-events: none; }
.artwork-source-grid label:has(input:checked) { color: #4055bb; background: #eef0ff; border-color: #7183df; box-shadow: inset 0 0 0 1px #7183df; }
.artwork-source-grid b { align-self: end; font-size: 10px; }
.artwork-source-grid small { align-self: start; color: #7a86a1; font-size: 8px; line-height: 1.35; }
.source-preview { grid-row: 1 / 3; width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; color: #fff; background: #263a83; border-radius: 9px; font-size: 24px; font-weight: 900; }
.source-preview.cosmic { background: #1c2864 url('/assets/cosmic-rocket-thumb.png') center/cover no-repeat; }
.source-preview.gallery { background: linear-gradient(145deg, #177956, #2bb782); font-size: 28px; }
.gallery-select-header { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 8px; font-size: 11px; font-weight: 700; color: #435174; }
.compact-btn { padding: 4px 10px; font-size: 10px; border-radius: 6px; }
.dfy-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; padding: 8px; background: #f3f6fc; border-radius: 10px; border: 1px solid var(--line); }
.dfy-gallery-item { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; border: 2px solid transparent; background: #fff; transition: all .15s ease; }
.dfy-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dfy-gallery-item.selected { border-color: #5268d8; box-shadow: 0 0 0 2px #5268d8; }
.dfy-gallery-item .dfy-check { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.dfy-gallery-item.selected .dfy-check { background: #5268d8; }
.dfy-gallery-item .dfy-title { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(10,20,50,.85)); color: #fff; font-size: 7.5px; padding: 6px 3px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.structure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 17px 0; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.check-card input { position: absolute; opacity: 0; }
.check-card > span { width: 25px; height: 25px; display: grid; place-items: center; color: #a0abc0; background: #edf0f6; border-radius: 7px; font-size: 10px; font-weight: 900; }
.check-card:has(input:checked) { border-color: #afbae9; background: #f7f8ff; }
.check-card:has(input:checked) > span { color: white; background: #5268d8; }
.check-card div { display: grid; gap: 2px; }
.check-card b { font-size: 10px; }
.check-card small { color: var(--muted); font-size: 8px; }
.review-layout { display: grid; grid-template-columns: 210px 1fr; gap: 23px; align-items: center; }
.review-book { width: 195px; height: 220px; display: flex; align-items: stretch; filter: drop-shadow(-8px 14px 15px rgba(20,34,85,.2)); }
.review-cover { width: 175px; position: relative; display: flex; flex-direction: column; padding: 23px 19px; color: white; background: linear-gradient(145deg, #1d337c, #576cda); border-radius: 6px 10px 10px 6px; }
.review-cover::after { content: ''; position: absolute; width: 100px; height: 100px; right: 14px; bottom: 45px; border: 10px solid rgba(255,188,128,.9); transform: rotate(45deg); }
.review-cover small, .review-cover strong, .review-cover span { position: relative; z-index: 1; }
.review-cover small { font-size: 7px; letter-spacing: 1px; }
.review-cover strong { margin-top: 18px; font-size: 20px; line-height: 1.07; overflow-wrap: anywhere; }
.review-cover span { margin-top: auto; font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.review-spine { width: 12px; margin: 5px 0; background: #12235b; border-radius: 0 4px 4px 0; }
.review-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; margin: 0; background: #dfe4f0; border: 1px solid #dfe4f0; border-radius: 10px; }
.review-summary div { min-height: 66px; padding: 13px; background: white; }
.review-summary dt { color: #8994ae; font-size: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; }
.review-summary dd { margin: 5px 0 0; color: #2d3e71; font-size: 11px; font-weight: 850; }
.review-checks { margin-top: 17px; padding: 13px 15px; background: #f0faf6; border: 1px solid #c9eadc; border-radius: 10px; }
.review-checks p { display: flex; align-items: center; gap: 8px; margin: 5px 0; color: #3f5d52; font-size: 9px; }
.review-checks p span { color: #159568; font-weight: 950; }
.review-checks small { display: block; margin-top: 8px; color: #668176; font-size: 8px; line-height: 1.4; }
.wizard-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbfe; }
.wizard-footer > div { display: flex; gap: 8px; }
.hidden { display: none !important; }

.confirm-delete { width: min(430px, calc(100vw - 32px)); padding: 26px; text-align: center; border-radius: 17px; box-shadow: 0 25px 70px rgba(11,21,52,.32); }
.warning-mark { width: 47px; height: 47px; display: grid; place-items: center; margin: 0 auto 13px; color: #c83e4d; background: #ffebee; border-radius: 50%; font-size: 22px; font-weight: 950; }
.confirm-delete h2 { margin: 5px 0 8px; font-size: 20px; }
.confirm-delete > p:not(.studio-eyebrow) { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.confirm-delete > div:last-child { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.tier-badge-button { border: 0; background: transparent; padding: 0; cursor: pointer; }
.tier-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; font-size: 10px; font-weight: 850; letter-spacing: .5px; background: #e8ecf8; color: #324785; border: 1px solid #ccd6f4; transition: .18s ease; }
.tier-pill:hover { background: #dde5f9; }
.tier-pill.pro { background: linear-gradient(135deg, #ffeedd, #ffe1c6); color: #d65116; border-color: #ffc49e; box-shadow: 0 4px 12px rgba(255,100,45,.18); font-weight: 900; }
.tier-pill.pro::before { content: "★"; color: #ff642d; }

.license-dialog { width: min(520px, calc(100vw - 32px)); border-radius: 18px; border: 0; padding: 0; background: white; box-shadow: 0 30px 80px rgba(11,21,52,.35); overflow: hidden; }
.license-dialog:not([open]) { display: none; }
.license-modal-content { padding: 26px 28px; display: grid; gap: 20px; }
.license-modal-header { display: flex; align-items: flex-start; gap: 14px; position: relative; }
.pro-sparkle { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; background: linear-gradient(135deg, #ff7d43, #ff642d); color: white; box-shadow: 0 8px 18px rgba(255,100,45,.28); flex-shrink: 0; }
.license-modal-header h2 { margin: 3px 0 4px; font-size: 20px; color: var(--navy); }
.license-modal-header p:not(.studio-eyebrow) { margin: 0; color: #69789f; font-size: 11px; line-height: 1.5; }
.license-status-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: #f6f8fd; border: 1px solid #e1e7f5; }
.license-status-icon { width: 36px; height: 36px; display: grid; place-items: center; font-size: 18px; border-radius: 50%; background: white; border: 1px solid #d5ddf0; }
.license-status-info h3 { margin: 2px 0 2px; font-size: 14px; color: var(--navy); }
.license-status-info p { margin: 0; font-size: 10px; color: #7886a8; }
.pro-features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; border-radius: 12px; background: #fafbff; border: 1px dashed #cfdaf5; }
.pro-feat-item { display: flex; align-items: flex-start; gap: 9px; }
.pro-feat-check { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #e3f8ec; color: #158a5e; font-size: 10px; font-weight: 900; flex-shrink: 0; margin-top: 2px; }
.pro-feat-item b { display: block; font-size: 11px; color: var(--navy); }
.pro-feat-item small { display: block; font-size: 9px; color: #7d8baf; line-height: 1.35; margin-top: 1px; }
.license-activate-form { display: grid; gap: 14px; }
.license-modal-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 6px; }
.pro-btn { background: linear-gradient(135deg, #ff7d43, #e54e17); font-weight: 900; }

/* OTO 3 Listing Dialog */
.listing-dialog { width: min(880px, calc(100vw - 32px)); border-radius: 18px; border: 0; padding: 0; background: white; box-shadow: 0 30px 80px rgba(11,21,52,.35); overflow: hidden; }
.listing-dialog:not([open]) { display: none; }
.listing-modal-content { padding: 26px 28px; display: grid; gap: 18px; max-height: 90vh; overflow-y: auto; }
.listing-modal-header { display: flex; align-items: flex-start; gap: 14px; position: relative; }
.listing-sparkle { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 22px; background: linear-gradient(135deg, #a855f7, #7c3aed); color: white; box-shadow: 0 8px 18px rgba(168,85,247,.28); flex-shrink: 0; }
.listing-modal-header h2 { margin: 3px 0 4px; font-size: 20px; color: var(--navy); }
.listing-modal-header p:not(.studio-eyebrow) { margin: 0; color: #69789f; font-size: 11px; line-height: 1.5; }

.listing-toolbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #e1e7f5; }
.standards-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 850; background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.listing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.listing-block { background: #f8faff; border: 1px solid #e1e7f5; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.listing-block.full { grid-column: 1 / -1; }
.listing-block-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--navy); }
.listing-block-head b { font-weight: 850; }

.copy-chip { background: #f3e8ff; border: 1px solid #d8b4fe; color: #7e22ce; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 6px; cursor: pointer; transition: .15s ease; }
.copy-chip:hover { background: #e9d5ff; color: #6b21a8; }
.copy-chip-group { display: flex; gap: 6px; }

.listing-hint { font-size: 10px; color: #7886a8; line-height: 1.4; margin: 0; }
.listing-keywords { display: flex; flex-direction: column; gap: 6px; }
.listing-kw-row { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #e1e7f5; border-radius: 6px; padding: 6px 10px; }
.listing-kw-num { font-size: 10px; font-weight: 800; color: #7886a8; width: 16px; }
.listing-kw-text { flex: 1; font-family: monospace; font-size: 11px; color: #17265a; }
.listing-kw-len { font-size: 10px; color: #94a3b8; }
.listing-kw-copy { background: transparent; border: 0; color: #7e22ce; font-size: 10px; font-weight: 800; cursor: pointer; padding: 2px 6px; }
.listing-kw-copy:hover { text-decoration: underline; }

.listing-html-source { font-family: monospace; font-size: 11px; background: #0c1220; color: #6ee7b7; border: 1px solid #1e293b; border-radius: 6px; padding: 10px; resize: vertical; line-height: 1.5; }
.listing-description-preview { background: white; color: #334155; border: 1px solid #e1e7f5; border-radius: 6px; padding: 12px 14px; font-size: 12px; line-height: 1.6; max-height: 180px; overflow-y: auto; }
.listing-description-preview h3 { margin: 8px 0 4px; font-size: 13px; color: var(--navy); }
.listing-description-preview ul { margin: 4px 0; padding-left: 18px; }

.listing-categories { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #475569; }
.listing-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 11px; }
.listing-meta dt { color: #64748b; font-weight: 700; }
.listing-meta dd { margin: 0; color: var(--navy); }

.studio-toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: 360px; padding: 12px 16px; color: white; background: #17265a; border-radius: 10px; box-shadow: 0 13px 35px rgba(8,16,52,.27); font-size: 10px; font-weight: 800; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.studio-toast.visible { opacity: 1; transform: none; }
.studio-toast.error { background: #b93848; }
.studio-toast.success { background: #137b56; }

@media (max-width: 1120px) {
    .studio-shell { grid-template-columns: 205px minmax(0, 1fr); }
    .global-search { display: none; }
    .dashboard-hero { grid-template-columns: 1fr .7fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .ready-stamp { right: 190px; }
    .artwork-audit-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    .studio-shell { display: block; }
    .studio-sidebar { position: fixed; left: -250px; width: 230px; transition: left .22s ease; }
    body.nav-open .studio-sidebar { left: 0; }
    .mobile-menu-button { display: block; }
    .studio-topbar { padding: 0 16px; }
    .studio-content { padding: 18px 16px 34px; }
    .topbar-actions .avatar-button { display: none; }
    .primary-action { padding: 0 12px; }
    .dashboard-hero { grid-template-columns: 1fr; }
    .hero-preview { display: none; }
    .workflow-steps { grid-template-columns: repeat(2, 1fr); }
    .workflow-steps > i { display: none; }
    .template-grid { grid-template-columns: 1fr; }
    .preflight-layout { grid-template-columns: 1fr; }
    .artwork-audit-grid, .preflight-check-list { grid-template-columns: 1fr; }
    .export-preview { grid-template-columns: 140px 1fr; }
    .export-preview > button { grid-column: 1 / -1; }
    .builder-layout { grid-template-columns: 1fr; }
    .builder-sidebar { order: 2; }
    .artwork-organizer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .optimizer-layout { grid-template-columns: 1fr; }
    .optimizer-controls { order: 1; }
    .optimizer-workspace { order: 2; }
}

@media (max-width: 590px) {
    .studio-topbar { height: 72px; gap: 10px; }
    .studio-topbar h1 { font-size: 18px; }
    .topbar-actions { gap: 5px; }
    .topbar-actions .primary-action { width: 42px; overflow: hidden; white-space: nowrap; color: transparent; padding: 0; }
    .topbar-actions .primary-action span { display: grid; place-items: center; color: white; font-size: 18px; }
    .hero-copy { padding: 26px 22px; }
    .hero-copy h2 { font-size: 30px; }
    .hero-actions { flex-direction: column; }
    .metric-grid, .project-grid { grid-template-columns: 1fr; }
    .workflow-steps { grid-template-columns: 1fr; }
    .view-intro { align-items: flex-start; flex-direction: column; }
    .project-toolbar { flex-direction: column; }
    .project-toolbar label { min-width: 0; }
    .project-toolbar select { min-height: 40px; }
    .check-list { grid-template-columns: 1fr; }
    .export-preview { grid-template-columns: 1fr; text-align: center; }
    .export-stack { margin: 0 auto; }
    .book-wizard { width: calc(100vw - 16px); max-height: 96vh; }
    .book-wizard form { max-height: 96vh; }
    .wizard-header { padding: 18px 18px 14px; }
    .wizard-header img { display: none; }
    .wizard-header h2 { padding-right: 32px; font-size: 18px; }
    .wizard-progress { margin: 0 13px; }
    .wizard-progress b { display: none; }
    .wizard-progress li:not(:last-child)::after { right: -45%; width: 90%; }
    .wizard-body { padding: 18px; }
    .type-choice-grid, .theme-grid, .artwork-source-grid, .field-grid, .structure-grid { grid-template-columns: 1fr; }
    .type-choice-grid label { min-height: 94px; }
    .review-layout { grid-template-columns: 1fr; }
    .review-book { margin: auto; }
    .wizard-footer { padding: 12px 14px; }
    .builder-intro, .builder-actions { align-items: stretch; }
    .builder-actions { width: 100%; flex-direction: column; }
    .builder-actions .primary-action, .builder-actions .production-package-action { width: 100%; color: white; }
    .builder-actions .production-package-action { color: #4054b5; }
    .source-safe { text-align: center; }
    .interior-showcase { grid-template-columns: 1fr; padding: 17px; }
    .paper-preview { width: min(290px, 100%); }
    .activity-plan { grid-template-columns: 1fr; width: 100%; }
    .book-information-form { grid-template-columns: 1fr; }
    .book-information-form .field, .book-information-form .full, .book-information-form .rights-field, .book-information-actions { grid-column: 1; }
    .book-information-actions { align-items: stretch; flex-direction: column; }
    .artwork-manager-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .artwork-organizer { grid-template-columns: 1fr; }
    .cover-creator-layout, .cover-settings-form { grid-template-columns: 1fr; }
    .cover-settings-form .field, .cover-settings-form .full, .cover-settings-actions { grid-column: 1; }
    .cover-tool-grid { grid-template-columns: 1fr; }
    .cover-safety-toolbar { align-items: stretch; flex-direction: column; }
    .cover-safety-status { text-align: left; }
    .cover-settings-actions { align-items: stretch; flex-direction: column; }
    .cover-wrap-stage { padding: 8px; overflow-x: auto; }
    .cover-wrap-preview { min-width: 540px; }
    .optimizer-stage { min-height: 320px; margin: 0 14px; }
    .optimizer-tabs { padding-left: 14px; padding-right: 14px; }
    .quality-grid { grid-template-columns: repeat(2, 1fr); padding: 14px; }
}


/* ================= OTO 2 — AI PROMPT MACHINE & 500+ DFY VAULT ================= */
.prompt-workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 1180px) { .prompt-workspace-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }

.prompt-vault-status-badge .vault-tier-tag { display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .08em; background: #e8f7ee; color: #12805c; border: 1px solid #b7e7cf; }
.prompt-vault-status-badge .vault-tier-tag.locked { background: #fff3e0; color: #b25f00; border: 1px solid #ffd8a8; }

.prompt-generator-card .panel-heading, .prompt-vault-browser .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.badge-accent { font-size: 11px; font-weight: 800; padding: 6px 11px; border-radius: 999px; background: #eef1ff; color: #4054b5; border: 1px solid #ccd4ff; white-space: nowrap; }

.prompt-remix-grid { display: grid; gap: 14px; }
.remix-controls-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .remix-controls-row { grid-template-columns: 1fr; } }
.remix-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.remix-actions .primary-action { flex: 1; min-width: 210px; }

.prompt-outputs-container { display: grid; gap: 12px; margin-top: 16px; }
.model-output-box { border: 1px solid var(--line, #dfe5f2); border-radius: 12px; overflow: hidden; background: #fbfcff; }
.model-output-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #f1f4fb; border-bottom: 1px solid var(--line, #dfe5f2); }
.model-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; color: #fff; background: #5b6478; }
.model-tag.midjourney { background: #1f2a44; }
.model-tag.dalle { background: #10a37f; }
.model-tag.leonardo { background: #7c3aed; }
.model-tag.negative { background: #c2410c; }
.model-output-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; color: #2b3450; }
.negative-box { background: #fff8f5; }

.vault-filter-actions input[type="search"] { min-width: 220px; padding: 9px 12px; border: 1px solid var(--line, #dfe5f2); border-radius: 9px; font-size: 13px; background: #fff; }

.niche-pills-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.niche-pill { border: 1px solid var(--line, #dfe5f2); background: #fff; color: #4a5573; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .15s; }
.niche-pill:hover { border-color: #aab6e8; color: #2f3a66; }
.niche-pill.active { background: #4054b5; border-color: #4054b5; color: #fff; }

.vault-unlock-banner { margin: 6px 0 14px; }
.unlock-banner-content { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #fff7ec, #fff1f6); border: 1px dashed #f0b669; }
.unlock-banner-content .unlock-icon { font-size: 26px; }
.unlock-banner-content h4 { margin: 0 0 3px; font-size: 15px; color: #6b3f00; }
.unlock-banner-content p { margin: 0; font-size: 12.5px; color: #7a6248; max-width: 560px; }
.unlock-banner-content .unlock-btn { margin-left: auto; white-space: nowrap; }

.vault-prompts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vault-prompt-card { position: relative; border: 1px solid var(--line, #dfe5f2); border-radius: 13px; padding: 13px 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; transition: .15s; }
.vault-prompt-card:hover { border-color: #aab6e8; box-shadow: 0 6px 18px rgba(45, 60, 130, .08); }
.vault-prompt-card.filtered-out { display: none; }
.vault-prompt-card.locked-card { background: #fafbfd; }
.card-lock-overlay { position: absolute; top: 9px; right: 11px; font-size: 14px; opacity: .75; }
.vault-card-head { display: flex; gap: 6px; flex-wrap: wrap; }
.niche-badge, .target-badge { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: #eef1ff; color: #4054b5; }
.target-badge { background: #eefaf3; color: #12805c; }
.vault-prompt-card h4 { margin: 0; font-size: 14.5px; line-height: 1.35; color: #1f2740; }
.vault-card-subject { margin: 0; font-size: 12.5px; color: #6b7594; line-height: 1.5; flex: 1; }
.vault-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.vault-card-actions .copy-chip { font-size: 11px; padding: 5px 9px; }
.vault-card-actions .copy-chip.accent { background: #4054b5; color: #fff; border-color: #4054b5; }
.vault-preview-note { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: #7a6248; background: #fff8ec; border: 1px solid #f5dfb8; border-radius: 10px; padding: 9px 12px; }
.vault-empty { grid-column: 1 / -1; font-size: 13.5px; color: #6b7594; padding: 18px 4px; }

@media (max-width: 900px) {
    .unlock-banner-content .unlock-btn { margin-left: 0; width: 100%; }
    .vault-filter-actions input[type="search"] { min-width: 0; width: 100%; }
}


/* ---- License dialog add-on upsell cards (OTO 2 / OTO 3) ---- */
.upsell-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line, #dfe5f2); }
.upsell-section-head h3 { margin: 4px 0 3px; font-size: 17px; color: #1f2740; }
.upsell-section-head small { display: block; font-size: 12.5px; color: #6b7594; }
.upsell-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 780px) { .upsell-grid { grid-template-columns: 1fr; } }
.upsell-card { border: 1px solid var(--line, #dfe5f2); border-radius: 14px; padding: 15px 16px; background: #fbfcff; display: flex; flex-direction: column; gap: 11px; }
.upsell-card:hover { border-color: #aab6e8; }
.upsell-head { display: flex; align-items: flex-start; gap: 10px; }
.upsell-icon { font-size: 22px; line-height: 1.2; }
.upsell-head > div { flex: 1; min-width: 0; }
.upsell-head b { display: block; font-size: 13.5px; line-height: 1.4; color: #1f2740; }
.upsell-head small { display: block; font-size: 12px; line-height: 1.5; color: #6b7594; margin-top: 4px; }
.upsell-state { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: #fff3e0; color: #b25f00; border: 1px solid #ffd8a8; white-space: nowrap; }
.upsell-state.active { background: #e8f7ee; color: #12805c; border-color: #b7e7cf; }
.upsell-features { margin: 0; padding-left: 17px; display: grid; gap: 4px; }
.upsell-features li { font-size: 12.5px; color: #4a5573; line-height: 1.5; }
.upsell-activate-form { display: grid; gap: 9px; margin-top: auto; }
.upsell-activate-form .field { padding: 0; }
.upsell-activate-form input { width: 100%; }
.upsell-activate-form.is-active input { display: none; }
.upsell-activate-form .primary-action { width: 100%; }
.upsell-activate-form .primary-action:disabled { opacity: .75; cursor: default; }

/* Wider dialog to fit add-on upsell cards */
.license-dialog { width: min(780px, calc(100vw - 32px)); }
.license-modal-content { max-height: calc(100vh - 48px); overflow-y: auto; }
@media (max-width: 780px) { .license-dialog { width: calc(100vw - 24px); } }
