:root {
    --bg: #10131a;
    --ink: #292014;
    --panel: #181b25;
    --panel-2: #222634;
    --parchment: #f4e9cf;
    --parchment-2: #ead8b4;
    --text: #fff8e9;
    --muted: #c8bda8;
    --line: rgba(255,255,255,.13);
    --accent: #d8a94d;
    --accent-light: #f0c977;
    --red: #8e3f34;
    --danger: #cf4f4f;
    --success: #7aa874;
    --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(216,169,77,.18), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(142,63,52,.18), transparent 36rem),
        linear-gradient(135deg, #0b0d12, var(--bg));
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

.shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0;
}

.topbar,
.hero,
.project-hero,
.panel,
.stat-card,
.status-ribbon {
    border: 1px solid var(--line);
    background: rgba(24,27,37,.94);
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
    margin-bottom: 22px;
}

.topbar__actions,
.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

h1, h2, h3, h4, p { margin-top: 0; }

h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: .02em;
    text-shadow: 0 3px 0 rgba(0,0,0,.25);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 10px;
    line-height: .95;
}

h3 { font-size: 1.6rem; margin-bottom: 8px; }
h4 { margin-bottom: 8px; }

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 700;
}

.lede,
.muted { color: var(--muted); line-height: 1.5; }

.topbar__badge,
.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(216,169,77,.45);
    background: rgba(216,169,77,.13);
    color: var(--accent-light);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .86rem;
    white-space: nowrap;
}

.ghost-link {
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
}

.ghost-link:hover { color: var(--text); border-color: rgba(216,169,77,.45); }

.hero,
.project-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border-radius: 22px;
    margin-bottom: 22px;
}

.project-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(20,23,31,.97), rgba(20,23,31,.82)),
        radial-gradient(circle at 15% 0%, rgba(216,169,77,.25), transparent 28rem);
}

.project-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(216,169,77,.12) 0 2px, transparent 2px),
        linear-gradient(0deg, rgba(216,169,77,.06) 0 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .25;
}

.project-hero__content,
.project-hero .hero-actions {
    position: relative;
    z-index: 1;
}

.button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, border-color .12s ease, background .12s ease;
    will-change: transform;
}

.topbar__build {
    align-items: flex-start;
    border: 1px solid rgba(122, 168, 116, .46);
    background: rgba(16, 64, 45, .34);
    border-radius: 8px;
    color: #dff4d8;
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.1;
    padding: 7px 10px;
    white-space: nowrap;
}

.topbar__build span {
    color: rgba(223, 244, 216, .72);
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar__build strong {
    font-size: .78rem;
}

.topbar__build code,
.footer__build {
    color: var(--accent-light);
    font-family: "Courier New", monospace;
    font-size: .72rem;
}

.button--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #20160a;
    box-shadow: 0 8px 18px rgba(216, 169, 77, .16);
}

.button--secondary,
.button-link {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    color: var(--text);
}

.button:hover,
.button-link:hover,
.button:focus-visible,
.button-link:focus-visible {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(240, 201, 119, .24), 0 10px 24px rgba(0, 0, 0, .28);
}

.button:focus-visible,
.button-link:focus-visible {
    outline: 2px solid rgba(240, 201, 119, .8);
    outline-offset: 3px;
}

.button:active,
.button-link:active {
    filter: brightness(.96);
    transform: translateY(1px) scale(.99);
    box-shadow: 0 0 0 1px rgba(240, 201, 119, .18), 0 5px 12px rgba(0, 0, 0, .24);
}

.button[disabled],
.button.is-disabled,
.button[aria-disabled="true"],
.button-link[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .58;
    pointer-events: none;
    transform: none;
    filter: saturate(.65);
    box-shadow: none;
}

.button[aria-busy="true"],
.button.is-busy {
    cursor: wait;
    filter: saturate(.84) brightness(.96);
    overflow: hidden;
}

.button[aria-busy="true"]::after,
.button.is-busy::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: odos-button-spin .7s linear infinite;
}

@keyframes odos-button-spin {
    to { transform: rotate(360deg); }
}

.odos-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;
}

.status-ribbon {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 22px;
}

.status-ribbon div {
    padding: 18px;
    border-right: 1px solid var(--line);
}

.status-ribbon div:last-child { border-right: 0; }

.ribbon-label {
    display: block;
    color: var(--accent);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 6px;
}

.status-ribbon strong,
.status-ribbon small {
    display: block;
}

.status-ribbon small {
    color: var(--muted);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    border-radius: 18px;
    padding: 18px;
}

.stat-card__label {
    display: block;
    color: var(--muted);
    font-size: .86rem;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--accent);
}

.panel {
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 22px;
}

.panel--parchment {
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.05)),
        linear-gradient(135deg, var(--parchment), var(--parchment-2));
    border-color: rgba(77,48,25,.22);
}

.panel--parchment h3,
.panel--parchment h4,
.panel--parchment .detail-list dt {
    color: #6e3f24;
}

.panel--parchment .detail-list div,
.panel--parchment .note-block {
    border-color: rgba(77,48,25,.18);
}

.panel--parchment .note-block {
    background: rgba(255,255,255,.28);
}

.panel--parchment .muted,
.panel--parchment p,
.panel--parchment dd {
    color: var(--ink);
}

.workflow-panel {
    background:
        linear-gradient(180deg, rgba(142,63,52,.16), transparent),
        rgba(24,27,37,.94);
}

.panel__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.notice {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.notice--error {
    background: rgba(207,79,79,.13);
    border-color: rgba(207,79,79,.45);
    color: #ffd2d2;
}

.notice--success {
    background: rgba(122,168,116,.13);
    border-color: rgba(122,168,116,.45);
    color: #d9ffd7;
}

.empty-state {
    border: 1px dashed var(--line);
    background: rgba(255,255,255,.035);
    border-radius: 18px;
    padding: 28px;
}

.empty-state--small { padding: 18px; }
.empty-state p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--accent);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.table-link {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid rgba(216,169,77,.35);
}

.table-link:hover { color: var(--accent); }

.command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.command-grid--workflow { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.command-form { margin: 0; }

.command-card {
    position: relative;
    min-height: 126px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: rgba(36,40,55,.85);
    color: var(--text);
    border-radius: 16px;
    padding: 16px;
    font-family: inherit;
}

.command-card--soon {
    cursor: pointer;
    opacity: .78;
}

.command-card--active {
    cursor: pointer;
    opacity: 1;
    border-color: rgba(216,169,77,.65);
    background:
        linear-gradient(135deg, rgba(216,169,77,.24), rgba(36,40,55,.95)),
        radial-gradient(circle at top left, rgba(240,201,119,.22), transparent 14rem);
}

.command-card--active:hover,
.command-card--soon:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0,0,0,.25);
}

.command-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    padding-right: 26px;
}

.command-card small {
    display: block;
    color: var(--muted);
    line-height: 1.4;
}

.command-card__order {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--accent);
    font-weight: 700;
    opacity: .7;
}

.odos-form label { display: block; }

.odos-form label span {
    display: block;
    color: var(--accent);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.odos-form input,
.odos-form textarea,
.odos-form select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(8,10,14,.65);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
}

.odos-form textarea { resize: vertical; }

.odos-form input:focus,
.odos-form textarea:focus,
.odos-form select:focus {
    outline: 2px solid rgba(216,169,77,.35);
    border-color: rgba(216,169,77,.6);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.field-error,
.error-text {
    margin-top: 7px;
    color: #ffb0b0;
    font-size: .9rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.detail-list { margin: 0; }

.detail-list div {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
}

.detail-list dt {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.detail-list dd { margin: 0; }

.note-block {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
}

.note-block p:last-child { margin-bottom: 0; }

.section-stack { display: grid; gap: 18px; }

.generated-section {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    border-radius: 18px;
    padding: 18px;
}

.generated-section header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.generated-markdown {
    line-height: 1.55;
    color: var(--text);
    overflow-x: auto;
}

.generated-section__footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-list li {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.item-list li:first-child { padding-top: 0; }
.item-list strong { display: block; margin-bottom: 4px; }

.item-list span {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.4;
}

.footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: .9rem;
    padding: 12px 4px;
}

@media (max-width: 1100px) {
    .command-grid--workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .hero,
    .project-hero,
    .topbar,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-ribbon,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .status-ribbon div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .status-ribbon div:last-child { border-bottom: 0; }

    .command-grid,
    .command-grid--workflow,
    .form-grid,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 { grid-column: span 1; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 24px, 1180px); }
    .stats-grid { grid-template-columns: 1fr; }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
.pdf-generator-panel .hero-actions,
.pdf-generator-panel .section-toolbar {
    position: relative;
    z-index: 5;
}

.pdf-generator-panel .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    cursor: pointer;
    pointer-events: auto;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.pdf-generator-panel .button:hover,
.pdf-generator-panel .button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 0 0 2px rgba(234, 184, 82, .22), 0 10px 22px rgba(0, 0, 0, .24);
}

.pdf-generator-panel form {
    display: inline-flex;
    margin: 0;
}

.odos-ai-final-head .hero-actions,
.odos-ai-final-controls .hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.odos-ai-final-head .hero-actions form {
    display: inline-flex;
    margin: 0;
}

.odos-ai-page-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.odos-ai-page-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.odos-ai-page-card.is-generated {
    border-color: rgba(234, 184, 82, 0.58);
    background: rgba(234, 184, 82, 0.055);
}

.odos-ai-page-card.is-busy {
    border-color: rgba(234, 184, 82, 0.72);
    box-shadow: 0 0 0 1px rgba(234, 184, 82, 0.16), 0 16px 40px rgba(0, 0, 0, 0.26);
}

.odos-ai-page-card.is-failed {
    border-color: rgba(207, 79, 79, 0.75);
    background: rgba(207, 79, 79, 0.08);
}

.odos-ai-page-card__preview {
    position: relative;
    width: 100%;
    aspect-ratio: 8.5 / 11;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(234, 184, 82, 0.28);
    border-radius: 6px;
    background:
        linear-gradient(145deg, rgba(234, 184, 82, 0.16), rgba(91, 67, 160, 0.14)),
        #171922;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 22px rgba(0, 0, 0, 0.24);
}

.odos-ai-page-card__preview a,
.odos-ai-page-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.odos-ai-page-card__preview a {
    color: var(--accent-light);
    text-decoration: none;
}

.odos-ai-page-card__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #11131a;
}

.odos-ai-page-card__preview a span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 6px 9px;
    border: 1px solid rgba(234, 184, 82, 0.42);
    border-radius: 999px;
    background: rgba(11, 13, 18, 0.86);
    color: var(--accent-light);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease;
}

.odos-ai-page-card__preview a:hover span,
.odos-ai-page-card__preview a:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.odos-ai-page-card__placeholder {
    padding: 18px;
    text-align: center;
}

.odos-ai-page-card__placeholder::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(234, 184, 82, 0.28);
    border-radius: 4px;
    pointer-events: none;
}

.odos-ai-page-card__placeholder strong {
    color: var(--accent);
    font-size: 1.05rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.odos-ai-page-card__placeholder span {
    color: var(--muted);
    font-size: 0.9rem;
}

.odos-ai-page-card__body {
    display: grid;
    gap: 3px;
}

.odos-ai-page-card h4 {
    margin: 0 0 4px;
}

.odos-ai-page-card small {
    color: var(--muted);
    display: block;
    line-height: 1.35;
}

.odos-ai-page-card__actions {
    align-self: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.odos-ai-page-card form {
    margin: 0;
}

.odos-ai-page-card__actions .button {
    min-height: 34px;
}

.odos-ai-page-card__status {
    color: var(--accent-light) !important;
}

.odos-ai-page-card__status--error {
    color: #ff9b9b !important;
}

.odos-ai-page-card .button[disabled] {
    cursor: wait;
    opacity: 0.68;
    filter: saturate(0.72);
}

.odos-ai-final-print {
    display: grid;
    gap: 24px;
    justify-items: center;
    margin: 24px 0 48px;
}

.odos-ai-final-sheet {
    width: min(100%, 8.5in);
    overflow: hidden;
    border-radius: 6px;
    background: #efe0b8;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.odos-ai-final-sheet--editable {
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
}

.odos-ai-final-sheet form {
    margin: 0;
}

.odos-ai-final-sheet__toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(234, 184, 82, .32);
    border-radius: 8px;
    background: rgba(24, 27, 37, .96);
    color: var(--text);
}

.odos-ai-final-sheet__toolbar strong,
.odos-ai-final-sheet__toolbar span {
    display: block;
}

.odos-ai-final-sheet__toolbar span {
    color: var(--muted);
    font-size: .82rem;
}

.odos-ai-final-sheet__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.odos-ai-editor-mode {
    display: inline-flex;
    gap: 4px;
}

.odos-ai-editor-mode .button {
    min-height: 2.15rem;
    padding: 8px 11px;
}

.odos-ai-editor-mode .button.is-active {
    background: rgba(240, 201, 119, .2);
    border-color: rgba(240, 201, 119, .72);
    color: #f4d36f;
}

.odos-ai-final-sheet__canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 8.5 / 11;
    overflow: hidden;
    border-radius: 6px;
    background: #efe0b8;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
    cursor: text;
}

.odos-ai-final-sheet__canvas > img,
.odos-ai-final-sheet > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.odos-ai-text-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
}

.odos-ai-ocr-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.odos-ai-graphic-region-layer,
.odos-ai-image-replacement-layer,
.odos-ai-logo-mask-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.odos-ai-graphic-region-layer {
    z-index: 4;
}

.odos-ai-image-replacement-layer {
    z-index: 5;
}

.odos-ai-logo-mask-layer {
    z-index: 6;
}

.odos-ai-graphic-region {
    align-items: center;
    background: rgba(11, 13, 18, 0);
    border: 1px solid transparent;
    border-radius: 5px;
    color: #fff8e9;
    cursor: pointer;
    display: flex;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .68rem;
    font-weight: 800;
    justify-content: center;
    padding: 0;
    pointer-events: none !important;
    position: absolute;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .78);
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

[data-odos-overlay-form][data-odos-editor-mode="graphics"] .odos-ai-graphic-region {
    pointer-events: auto !important;
}

[data-odos-overlay-form]:not([data-odos-editor-mode="graphics"]) .odos-ai-graphic-region,
[data-odos-overlay-form]:not([data-odos-editor-mode="graphics"]) .odos-ai-image-replacement,
[data-odos-overlay-form]:not([data-odos-editor-mode="graphics"]) .odos-ai-logo-mask {
    pointer-events: none !important;
}

.odos-ai-graphic-region span {
    background: rgba(11, 13, 18, .72);
    border: 1px solid rgba(240, 201, 119, .42);
    border-radius: 999px;
    opacity: 0;
    padding: 4px 8px;
    transform: translateY(2px);
    transition: opacity .12s ease, transform .12s ease;
}

.odos-ai-graphic-region:hover,
.odos-ai-graphic-region:focus-visible {
    background: rgba(58, 121, 143, .15);
    border-color: rgba(240, 201, 119, .82);
    box-shadow: 0 0 0 2px rgba(11, 13, 18, .34), inset 0 0 0 1px rgba(255, 248, 233, .12);
    outline: 0;
    transform: translateY(-1px);
}

.odos-ai-graphic-region:hover span,
.odos-ai-graphic-region:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.odos-ai-image-replacement,
.odos-ai-logo-mask {
    border: 1px solid rgba(240, 201, 119, .42);
    border-radius: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    overflow: hidden;
    pointer-events: auto;
    position: absolute;
    resize: both;
}

.odos-ai-image-replacement {
    pointer-events: none !important;
    resize: none;
}

[data-odos-overlay-form][data-odos-editor-mode="graphics"] .odos-ai-image-replacement {
    pointer-events: auto !important;
}

.odos-ai-image-replacement img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.odos-ai-logo-mask {
    min-height: 28px;
    min-width: 48px;
    pointer-events: none !important;
}

[data-odos-overlay-form][data-odos-editor-mode="graphics"] .odos-ai-logo-mask {
    pointer-events: auto !important;
}

.odos-ai-final-sheet__canvas.is-logo-mask-mode {
    cursor: crosshair;
}

.odos-ai-final-sheet__canvas.is-logo-mask-mode::after {
    content: "Click a logo mark to place a hide mask";
    position: absolute;
    left: 50%;
    top: 14px;
    z-index: 20;
    transform: translateX(-50%);
    padding: 6px 10px;
    border: 1px solid rgba(240, 201, 119, .62);
    border-radius: 999px;
    background: rgba(11, 13, 18, .86);
    color: #f4d36f;
    font-size: .72rem;
    font-weight: 800;
    pointer-events: none;
}

.odos-ai-edit-box__chrome {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    left: 4px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 4px;
    top: 4px;
    transition: opacity .12s ease;
    z-index: 3;
}

.odos-ai-image-replacement:hover .odos-ai-edit-box__chrome,
.odos-ai-image-replacement:focus-within .odos-ai-edit-box__chrome,
.odos-ai-logo-mask:hover .odos-ai-edit-box__chrome,
.odos-ai-logo-mask:focus-within .odos-ai-edit-box__chrome {
    opacity: 1;
    pointer-events: auto;
}

.odos-ai-edit-box__chrome button {
    border: 1px solid rgba(240, 201, 119, .34);
    border-radius: 999px;
    background: rgba(11, 13, 18, .82);
    color: #fff8e9;
    cursor: pointer;
    font-family: inherit;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
    padding: 4px 7px;
}

.odos-ai-edit-box__chrome button:hover,
.odos-ai-edit-box__chrome button:focus-visible {
    background: rgba(94, 52, 22, .95);
    outline: 0;
}

.odos-ai-ocr-region {
    position: absolute;
    display: block;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: transparent !important;
    caret-color: #24170c;
    cursor: text;
    font-family: Georgia, "Times New Roman", serif;
    overflow: clip;
    pointer-events: auto;
    resize: none !important;
    user-select: text;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;
    -webkit-user-select: text;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    scrollbar-width: none;
}

[data-odos-overlay-form][data-odos-editor-mode="graphics"] .odos-ai-ocr-region {
    pointer-events: none !important;
}

[data-odos-overlay-form]:not([data-odos-editor-mode="graphics"]) .odos-ai-ocr-region {
    background: rgba(240, 201, 119, .045);
    border-color: rgba(240, 201, 119, .18);
    pointer-events: auto !important;
}

[data-odos-overlay-form][data-odos-editor-mode="graphics"] .odos-ai-final-sheet__canvas {
    cursor: default;
}

.odos-ai-ocr-region::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.odos-ai-ocr-region:not(.is-active):not(.is-edited) {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
}

.odos-ai-ocr-region:hover,
.odos-ai-ocr-region:focus-visible {
    border-color: rgba(240, 201, 119, .78);
    background: rgba(240, 201, 119, .16);
    box-shadow: 0 0 0 2px rgba(11, 13, 18, .36);
    outline: 0;
}

.odos-ai-ocr-region.is-active,
.odos-ai-ocr-region.is-edited {
    border-color: var(--odos-ocr-border, rgba(216, 169, 77, .52));
    background: var(--odos-ocr-bg, rgba(244, 233, 207, .95));
    color: var(--odos-ocr-text, #24170c) !important;
    box-shadow: 0 0 0 2px rgba(11, 13, 18, .28), 0 7px 22px rgba(0, 0, 0, .24);
    -webkit-text-fill-color: var(--odos-ocr-text, #24170c) !important;
}

.odos-ai-ocr-region.is-edited {
    min-height: 24px;
    min-width: 64px;
    outline: 2px solid rgba(244, 211, 111, .62);
    outline-offset: 1px;
    z-index: 9;
}

.odos-graphic-dialog-open .odos-ai-ocr-region.is-active:not(.is-edited) {
    border-color: transparent;
    background: transparent;
    color: transparent !important;
    box-shadow: none;
    -webkit-text-fill-color: transparent !important;
}

.odos-ai-ocr-region.is-edited::after {
    content: "edited";
    position: absolute;
    right: 3px;
    bottom: 2px;
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(11, 13, 18, .78);
    color: #f4d36f;
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.2;
    text-transform: uppercase;
    pointer-events: none;
}

.odos-ocr-editor {
    position: fixed;
    z-index: 10000;
    width: min(380px, calc(100vw - 24px));
    border: 1px solid rgba(240, 201, 119, .58);
    border-radius: 8px;
    background: rgba(17, 14, 12, .96);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .46);
    color: #fff8e9;
    padding: 10px;
}

.odos-ocr-editor[hidden] {
    display: none;
}

.odos-ocr-editor__head,
.odos-ocr-editor__actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.odos-ocr-editor__head strong {
    color: #f4d36f;
    font-size: .82rem;
}

.odos-ocr-editor textarea {
    display: block;
    width: 100%;
    min-height: 128px;
    margin: 9px 0;
    border: 1px solid rgba(240, 201, 119, .34);
    border-radius: 6px;
    background: #f4e9cf;
    color: #24170c;
    font: 700 .86rem/1.35 Georgia, "Times New Roman", serif;
    padding: 9px;
    resize: vertical;
}

.odos-ocr-editor button {
    border: 1px solid rgba(240, 201, 119, .38);
    border-radius: 999px;
    background: rgba(94, 52, 22, .88);
    color: #fff8e9;
    cursor: pointer;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 800;
    padding: 6px 10px;
}

.odos-ocr-editor button:hover,
.odos-ocr-editor button:focus-visible {
    background: rgba(135, 76, 31, .98);
    outline: 0;
}

.odos-ai-text-overlay {
    position: absolute;
    min-width: 44px;
    min-height: 26px;
    padding: 16px 7px 5px;
    border: 1px solid rgba(216, 169, 77, .18);
    border-radius: 4px;
    background: rgba(244, 233, 207, .95);
    color: #24170c;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .12);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.18;
    overflow: auto;
    pointer-events: auto;
    resize: both;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.odos-ai-text-overlay:hover,
.odos-ai-text-overlay:focus-within {
    border-color: rgba(216, 169, 77, .72) !important;
    box-shadow: 0 0 0 2px rgba(240, 201, 119, .42), 0 8px 24px rgba(0, 0, 0, .32);
}

.odos-ai-text-overlay__chrome {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    position: absolute;
    top: 2px;
    left: 4px;
    right: 4px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.odos-ai-text-overlay:hover .odos-ai-text-overlay__chrome,
.odos-ai-text-overlay:focus-within .odos-ai-text-overlay__chrome {
    opacity: 1;
    pointer-events: auto;
}

.odos-ai-text-overlay__chrome button {
    border: 1px solid rgba(36, 23, 12, .22);
    border-radius: 999px;
    background: rgba(36, 23, 12, .82);
    color: #fff8e9;
    cursor: pointer;
    font-family: inherit;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
}

.odos-ai-text-overlay__chrome button:hover,
.odos-ai-text-overlay__chrome button:focus-visible {
    background: rgba(94, 52, 22, .95);
}

.odos-ai-text-overlay__text {
    min-height: 100%;
    outline: 0;
    white-space: pre-wrap;
}

.odos-ai-text-overlay__text:empty::before {
    content: "Type replacement text";
    color: rgba(36, 23, 12, .48);
}

.odos-packet-graphic-dialog[hidden] {
    display: none !important;
}

.odos-packet-graphic-dialog {
    align-items: center;
    background: rgba(5, 7, 11, .72);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 1000;
}

.odos-packet-graphic-dialog__panel {
    width: min(960px, 94vw);
    max-height: 88vh;
    overflow: auto;
    border: 1px solid rgba(240, 201, 119, .32);
    border-radius: 8px;
    background: #171a24;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .56);
    padding: 16px;
}

.odos-packet-graphic-dialog__head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.odos-packet-graphic-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.odos-packet-graphic-dialog__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.odos-packet-graphic-choice {
    display: grid;
    gap: 7px;
    min-height: 174px;
    padding: 8px;
    border: 1px solid rgba(240, 201, 119, .18);
    border-radius: 7px;
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.odos-packet-graphic-choice:hover,
.odos-packet-graphic-choice:focus-visible {
    border-color: rgba(240, 201, 119, .76);
    background: rgba(240, 201, 119, .08);
    box-shadow: 0 0 0 2px rgba(240, 201, 119, .16), 0 12px 24px rgba(0, 0, 0, .24);
    outline: 0;
    transform: translateY(-1px);
}

.odos-packet-graphic-choice img {
    width: 100%;
    aspect-ratio: 1.25 / 1;
    object-fit: cover;
    border-radius: 5px;
    background: rgba(0, 0, 0, .25);
}

.odos-packet-graphic-choice strong,
.odos-packet-graphic-choice small {
    display: block;
}

.odos-packet-graphic-choice small {
    color: var(--muted);
    font-size: .72rem;
    margin-top: 2px;
}

@media print {
    .odos-ai-final-head,
    .odos-ai-final-controls,
    .odos-ai-final-sheet__toolbar,
    .odos-ai-text-overlay__chrome,
    .odos-ai-edit-box__chrome,
    .odos-ai-ocr-layer,
    .odos-ai-graphic-region-layer,
    .odos-packet-graphic-dialog,
    .site-header,
    .notice,
    .gallery-modal,
    .modal-backdrop {
        display: none !important;
    }

    .shell {
        width: 100%;
        margin: 0;
    }

    .odos-ai-final-print {
        display: block;
        margin: 0;
    }

    .odos-ai-final-sheet {
        width: 8.5in;
        height: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        page-break-after: always;
    }

    .odos-ai-final-sheet__canvas {
        width: 8.5in;
        height: 11in;
        border-radius: 0;
        box-shadow: none;
    }

    .odos-ai-text-overlay {
        border: 0;
        box-shadow: none;
        resize: none;
    }

    .odos-ai-image-replacement,
    .odos-ai-logo-mask {
        box-shadow: none;
        resize: none;
    }
}
