.worksheet-header {
    background: #15364c;
    color: white;
    padding: 30px 0 25px;
    border-bottom: 5px solid var(--mint);
}

    .worksheet-header h1 {
        font-size: clamp(2.4rem, 4.5vw, 4rem);
        margin-bottom: 14px;
    }

    .worksheet-header .kicker {
        color: var(--mint);
    }

    .worksheet-header p {
        max-width: 720px;
        margin-bottom: 0;
        color: #d4e6ee;
    }

    .worksheet-header .free-note {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 24px;
        margin-top: 18px;
        font-size: .78rem;
        font-weight: 800;
    }

.free-note span::before {
    content: "✓ ";
    color: var(--mint);
}

.maker-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 24px;
    align-items: start;
    padding: 32px 0 42px;
}

.maker-panel,
.preview-panel {
    background: white;
    border: 1px solid #bad2d7;
    border-radius: 24px;
    padding: 28px;
}

    .maker-panel h2,
    .preview-panel h2 {
        font-size: 1.65rem;
        letter-spacing: -.035em;
        margin-bottom: 18px;
    }

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

    .mode-switch button {
        min-height: 58px;
        padding: 12px;
        border: 1px solid #a9c8cb;
        border-radius: 12px;
        background: #edf5f7;
        color: var(--navy);
        font-weight: 800;
        font-size: .9rem;
    }

        .mode-switch button[aria-pressed="true"] {
            background: var(--teal);
            border-color: var(--teal);
            color: white;
            box-shadow: inset 0 -4px 0 #004f4b;
        }

.field {
    margin-bottom: 19px;
    min-width: 0;
}

    .field label,
    .field-label {
        display: block;
        font-size: .88rem;
        font-weight: 800;
        margin-bottom: 6px;
    }

    .field input,
    .field select,
    .field textarea {
        display: block;
        width: 100%;
        border: 1px solid #9db9c3;
        border-radius: 10px;
        background: white;
        color: var(--navy);
        padding: 11px 12px;
        font: inherit;
    }

    .field textarea {
        min-height: 215px;
        resize: vertical;
        line-height: 1.75;
    }

    .field select:disabled {
        background: #edf1f3;
        color: #697b87;
    }

    .field small {
        display: block;
        color: var(--muted);
        font-size: .76rem;
        margin-top: 5px;
    }

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

    .field-grid.three {
        grid-template-columns: repeat(3, 1fr);
    }

.field-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.word-count {
    font-size: .78rem;
    color: var(--muted);
    font-weight: 800;
}

    .word-count.invalid {
        color: #a12b22;
    }

.more-settings {
    border: 1px solid #c8dce0;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 5px 0 22px;
    background: #f5fafb;
}

    .more-settings summary {
        font-size: .86rem;
        font-weight: 800;
        cursor: pointer;
    }

    .more-settings .field-grid {
        margin-top: 18px;
    }

    .more-settings .small {
        margin-bottom: 0;
    }

.status {
    font-size: .88rem;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 0 0 18px;
    background: #eef6f8;
    border: 1px solid #c9dce2;
    overflow-wrap: anywhere;
}

    .status.error {
        background: #fff0eb;
        border-color: #e2b7a7;
        color: #8c2d1e;
    }

    .status.success {
        background: #e4f8ed;
        border-color: #99c9af;
        color: #175239;
    }

.help-note {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 18px;
}

.service-note {
    font-size: .79rem;
    color: var(--muted);
    margin: 16px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.create-button {
    width: 100%;
}

    .create-button:disabled {
        opacity: .65;
        cursor: wait;
        transform: none;
    }

.preview-panel {
    position: sticky;
    top: 105px;
    background: #d8f2e9;
    border-color: #a7cdbf;
}

.preview-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.preview-meta {
    font-size: .75rem;
    color: var(--muted);
    margin-bottom: 18px;
}

.preview-words {
    margin: 0;
    padding: 18px 18px 18px 45px;
    border: 1px solid #b9d4ca;
    border-radius: 12px;
    background: white;
    min-height: 150px;
}

    .preview-words li {
        padding: 4px 0;
        overflow-wrap: anywhere;
        font-size: .94rem;
    }

.preview-empty {
    padding: 22px;
    border: 1px dashed #89b7aa;
    border-radius: 12px;
    font-size: .9rem;
    color: #456b60;
    background: #ffffff66;
}

.card-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 22px 0 12px;
}

    .card-layout span {
        display: block;
        border: 1px solid #9bc5b7;
        padding: 13px 10px;
        border-radius: 8px;
        background: #ffffffa8;
        font-size: .76rem;
        font-weight: 800;
    }

.pdf-result {
    margin-top: 22px;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #80b49d;
    background: white;
}

    .pdf-result h3 {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .pdf-result .actions {
        margin: 14px 0 0;
        gap: 10px;
    }

    .pdf-result .button {
        font-size: .83rem;
        min-height: 44px;
        padding: 10px 15px;
    }

.worksheet-help {
    padding: 0 0 40px;
}

    .worksheet-help details {
        background: white;
        border: 1px solid #cadde3;
        border-radius: 12px;
        padding: 16px 20px;
        margin-bottom: 10px;
    }

    .worksheet-help summary {
        font-weight: 800;
        font-size: .9rem;
        cursor: pointer;
    }

    .worksheet-help details p {
        font-size: .86rem;
        color: var(--muted);
        margin: 14px 0 0;
        max-width: 850px;
    }

.small-app-link {
    background: #15364c;
    color: white;
    padding: 22px 0;
}

    .small-app-link .wrap {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }

    .small-app-link p {
        margin: 0;
        font-size: .9rem;
    }

    .small-app-link a {
        color: var(--mint);
        font-weight: 800;
        white-space: nowrap;
    }

@media (max-width: 1000px) {
    .maker-layout {
        gap: 18px;
    }

    .maker-panel,
    .preview-panel {
        padding: 23px;
    }

    .preview-panel {
        top: 150px;
    }
}

@media (max-width: 800px) {
    .maker-layout {
        grid-template-columns: 1fr;
        padding-top: 22px;
    }

    .preview-panel {
        position: static;
    }

    .worksheet-header {
        padding: 26px 0;
    }

    .field-grid.three {
        grid-template-columns: 1fr 1fr;
    }

        .field-grid.three .field:last-child {
            grid-column: 1 / -1;
        }

    .small-app-link .wrap {
        display: block;
    }

    .small-app-link a {
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 450px) {
    .maker-panel,
    .preview-panel {
        padding: 20px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

        .field-grid.three {
            grid-template-columns: 1fr 1fr;
        }

    .mode-switch button {
        font-size: .82rem;
    }

    .preview-panel .actions .button {
        flex: 1;
    }
}

@media print {
    .maker-layout {
        display: block;
    }

    .maker-panel,
    .preview-panel {
        position: static;
        break-inside: avoid;
        margin-bottom: 20px;
    }

    .small-app-link,
    .pdf-result {
        display: none;
    }

    .worksheet-header h1 {
        font-size: 34px;
    }
}
