:root {
    color-scheme: light;
    --bg: #e9ece4;
    --bg-deep: #d9ddd2;
    --paper: #fbfcf8;
    --paper-strong: #ffffff;
    --ink: #243026;
    --muted: #69756b;
    --line: rgba(58, 75, 61, 0.16);
    --line-strong: rgba(58, 75, 61, 0.26);
    --accent: #5f7c58;
    --accent-deep: #3f5740;
    --accent-gold: #c8a24f;
    --success: #326f52;
    --danger: #b44f4f;
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow-lg: 0 24px 48px rgba(72, 89, 72, 0.12);
    --shadow-md: 0 14px 26px rgba(72, 89, 72, 0.08);
    --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.56), transparent 28%),
        linear-gradient(180deg, #f3f5ef 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(95, 124, 88, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 124, 88, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 88%);
}

body.app-ready .proof-board,
body.app-ready .proof-layout {
    animation: fadeUp 460ms var(--ease-soft) both;
}

body.app-ready .proof-layout {
    animation-delay: 70ms;
}

body.is-busy {
    cursor: progress;
}

body.is-modal-open {
    overflow: hidden;
}

.shell {
    width: min(1440px, calc(100% - 40px));
    margin: 28px auto 42px;
    position: relative;
    z-index: 1;
}

.eyebrow,
.card-kicker,
.band-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6f7a70;
}

h1,
h2,
h3,
strong {
    margin: 0;
    letter-spacing: -0.05em;
}

h1 {
    font-size: 30px;
    line-height: 1.04;
}

h2 {
    font-size: 1.58rem;
    line-height: 1.08;
}

h3 {
    font-size: 1.12rem;
    line-height: 1.12;
}

.lead,
.sheet-head p,
.reference-sheet p,
.status-sheet p,
.form-note,
.mode-note,
.notice,
.result-copy,
.ad-head p {
    color: var(--muted);
}

.proof-board,
.reference-sheet,
.clipboard-sheet,
.status-sheet,
.panel,
.notice,
.modal-panel,
.result-card {
    border: 1px solid var(--line);
    background: rgba(251, 252, 248, 0.92);
    box-shadow: var(--shadow-lg);
}

.proof-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding: 32px 34px;
    border-radius: 24px;
    margin-bottom: 24px;
    position: relative;
}

.proof-board::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    width: 118px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(200, 162, 79, 0.28);
}

.board-copy {
    display: grid;
    gap: 14px;
}

.lead {
    margin: 0;
    max-width: 66ch;
    line-height: 1.74;
}

.proof-stack {
    position: relative;
    min-height: 180px;
}

.stack-card {
    position: absolute;
    width: 200px;
    min-height: 92px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(58, 75, 61, 0.14);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-md);
    font-weight: 800;
}

.stack-card span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(95, 124, 88, 0.1);
    color: var(--accent-deep);
}

.stack-card-search {
    top: 0;
    left: 0;
    transform: rotate(-4deg);
}

.stack-card-social {
    top: 42px;
    left: 52px;
    transform: rotate(3deg);
}

.stack-card-diagnostic {
    top: 92px;
    left: 16px;
    transform: rotate(-2deg);
}

.proof-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.reference-column,
.inspector-column,
.sidebar-column {
    display: grid;
    gap: 20px;
}

.reference-sheet,
.clipboard-sheet,
.status-sheet,
.panel {
    padding: 24px;
    border-radius: 26px;
}

.reference-sheet {
    background: linear-gradient(180deg, rgba(251, 252, 248, 0.96), rgba(241, 245, 239, 0.94));
}

.reference-sheet-soft {
    background: linear-gradient(180deg, rgba(200, 162, 79, 0.12), rgba(251, 252, 248, 0.96));
}

.reference-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.reference-list li {
    display: grid;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(58, 75, 61, 0.1);
}

.reference-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.reference-list span {
    line-height: 1.6;
}

.clipboard-sheet {
    position: relative;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(245, 248, 243, 0.94)),
        rgba(251, 252, 248, 0.92);
}

.clipboard-sheet::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    width: 148px;
    height: 34px;
    transform: translateX(-50%);
    border-radius: 16px 16px 8px 8px;
    background: linear-gradient(180deg, #c8a24f, #b58c39);
    box-shadow: 0 8px 18px rgba(181, 140, 57, 0.18);
}

.sheet-head {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.sheet-head p {
    margin: 0;
    line-height: 1.72;
}

.preview-form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 10px;
}

.field > span {
    font-size: 0.94rem;
    font-weight: 800;
}

.field-lg input[type="url"] {
    min-height: 58px;
}

.selector-strip {
    padding: 18px;
    border-radius: 22px;
    background: rgba(240, 244, 237, 0.9);
    border: 1px solid rgba(58, 75, 61, 0.1);
}

.selector-group {
    display: grid;
    gap: 14px;
}

.field-grid {
    display: grid;
    gap: 16px;
}

.field-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

input[type="url"],
select {
    width: 100%;
    min-height: 56px;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font: inherit;
    transition: border-color 180ms var(--ease-soft), box-shadow 180ms var(--ease-soft), transform 180ms var(--ease-soft);
}

input[type="url"]::placeholder {
    color: #8e9890;
}

input[type="url"]:focus,
select:focus {
    outline: none;
    border-color: rgba(95, 124, 88, 0.42);
    box-shadow: 0 0 0 4px rgba(95, 124, 88, 0.12);
    transform: translateY(-1px);
}

.sheet-actions {
    display: grid;
    gap: 14px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms var(--ease-soft), box-shadow 180ms var(--ease-soft), opacity 180ms var(--ease-soft);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#preview-button,
.copy-button {
    color: #fff;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
    box-shadow: 0 12px 22px rgba(63, 87, 64, 0.18);
}

.ghost-button {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
}

.form-note {
    margin: 0;
    line-height: 1.66;
}

.notice {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
}

.notice.error {
    color: var(--danger);
    background: #faecec;
}

.notice.success {
    color: var(--success);
    background: #eef7ef;
}

.hidden {
    display: none !important;
}

.status-sheet {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 241, 0.92));
}

.status-sheet strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 1.5rem;
    line-height: 1.05;
}

.status-sheet-soft {
    background: linear-gradient(180deg, rgba(200, 162, 79, 0.12), rgba(255, 255, 255, 0.94));
}

.ad-shell {
    display: grid;
    gap: 18px;
}

.ad-head {
    display: grid;
    gap: 8px;
}

.ad-head p {
    margin: 0;
    line-height: 1.66;
}

.ad-slot,
.ad-placeholder {
    border-radius: 18px;
    border: 1px solid rgba(58, 75, 61, 0.12);
    background: rgba(246, 249, 243, 0.92);
}

.ad-placeholder {
    padding: 16px;
}

.ad-mockup {
    min-height: 360px;
    border-radius: 16px;
    border: 1px dashed rgba(58, 75, 61, 0.18);
    background: repeating-linear-gradient(180deg, transparent 0, transparent 22px, rgba(58, 75, 61, 0.04) 22px, rgba(58, 75, 61, 0.04) 23px);
    display: grid;
    place-content: center;
    gap: 12px;
    justify-items: center;
}

.ad-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(95, 124, 88, 0.12);
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.ad-copy {
    color: var(--accent-deep);
    font-weight: 900;
    letter-spacing: 0.08em;
    font-size: 1.35rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 30;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(67, 73, 66, 0.34);
    backdrop-filter: blur(10px);
}

.modal-panel {
    position: relative;
    width: min(1080px, 100%);
    max-height: min(88vh, 980px);
    overflow: auto;
    padding: 28px;
    border-radius: 28px;
}

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

.modal-head p {
    margin: 10px 0 0;
    line-height: 1.7;
    color: var(--muted);
}

.result-stack {
    display: grid;
    gap: 16px;
}

.result-card {
    padding: 22px;
    border-radius: 22px;
    background: var(--paper-strong);
    box-shadow: var(--shadow-md);
}

.result-card-primary {
    background: linear-gradient(180deg, rgba(95, 124, 88, 0.08), rgba(255, 255, 255, 0.96));
}

.result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.result-copy {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.94rem;
    line-height: 1.74;
}

.image-gallery {
    display: grid;
}

.image-tile {
    margin: 0;
    display: grid;
    gap: 10px;
}

.image-tile img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(58, 75, 61, 0.12);
}

.image-tile figcaption {
    color: var(--muted);
    font-size: 0.92rem;
}

.copy-button.is-copied {
    background: linear-gradient(180deg, #3d7a5b 0%, #2e6046 100%);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1320px) {
    .proof-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .shell {
        width: min(100% - 24px, 100%);
    }

    .proof-board,
    .field-grid-two {
        grid-template-columns: 1fr;
    }

    .proof-stack {
        min-height: 220px;
    }

    .modal-head,
    .result-head,
    .action-row {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    .ghost-button,
    .copy-button {
        width: 100%;
    }
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 54px;
    background-image:
        linear-gradient(45deg, transparent 50%, #6f7784 50%),
        linear-gradient(135deg, #6f7784 50%, transparent 50%);
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 18px) calc(50% - 3px);
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    cursor: pointer;
}
