.schema-tool-page {
    --schema-ink: #132019;
    --schema-text: #34483a;
    --schema-muted: #647366;
    --schema-line: #dbe8d7;
    --schema-soft: #f7fbf5;
    --schema-green: var(--primary-color, #7ed957);
    --schema-green-dark: var(--secondary-color, #4a9c2d);
    min-height: 100vh;
    padding: 10rem 0 4.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--schema-soft) 52%, #ffffff 100%);
    color: var(--schema-text);
}

.schema-tool-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.25rem;
    align-items: end;
    margin-bottom: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--schema-line);
}

.schema-back-link,
.schema-kicker,
.schema-seo-kicker {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--schema-green-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
}

.schema-tool-header h1 {
    margin: 0;
    color: var(--schema-ink);
    font-size: clamp(2.45rem, 4vw, 3.45rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
}

.schema-tool-header p {
    max-width: 760px;
    margin: 0.8rem 0 0;
    color: var(--schema-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.schema-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.95rem;
}

.schema-trust-row span,
.schema-label {
    min-height: 28px;
    padding: 0.34rem 0.68rem;
    border: 1px solid rgba(74, 156, 45, 0.18);
    border-radius: 999px;
    background: rgba(126, 217, 87, 0.1);
    color: var(--schema-green-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.schema-score-card,
.schema-panel,
.schema-quality-panel {
    border: 1px solid var(--schema-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(19, 32, 25, 0.055);
}

.schema-score-card {
    padding: 1rem;
}

.schema-score-card span,
.schema-score-card small {
    display: block;
    color: var(--schema-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.schema-score-card strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--schema-ink);
    font-size: 1.6rem;
}

.schema-score-card small {
    margin-top: 0.35rem;
    line-height: 1.45;
}

.schema-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 1rem;
    align-items: start;
}

.schema-panel,
.schema-quality-panel {
    padding: 1.15rem;
}

.schema-output-panel {
    position: sticky;
    top: 6.5rem;
}

.schema-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.schema-panel-header.compact {
    margin-bottom: 0.85rem;
}

.schema-panel-header h2 {
    margin: 0;
    color: var(--schema-ink);
    font-size: 1.1rem;
    font-weight: 850;
}

.schema-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 230px;
    gap: 0.35rem;
    padding: 0.3rem;
    border: 1px solid var(--schema-line);
    border-radius: 12px;
    background: var(--schema-soft);
}

.schema-mode-tabs button,
.schema-type-grid button,
.schema-action {
    min-height: 40px;
    border: 1px solid var(--schema-line);
    border-radius: 9px;
    background: #ffffff;
    color: var(--schema-green-dark);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.schema-mode-tabs button {
    border: 0;
    background: transparent;
    color: var(--schema-muted);
}

.schema-mode-tabs button.active,
.schema-type-grid button.active,
.schema-action.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--schema-green), var(--schema-green-dark));
    color: #ffffff;
    box-shadow: 0 5px 18px rgba(74, 156, 45, 0.24);
}

.schema-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.schema-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.schema-form-grid label {
    display: grid;
    gap: 0.45rem;
}

.schema-form-grid label[hidden] {
    display: none;
}

.schema-form-grid span {
    color: var(--schema-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.schema-form-grid input,
.schema-form-grid select,
.schema-form-grid textarea {
    width: 100%;
    min-height: 42px;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--schema-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--schema-ink);
    font: inherit;
}

.schema-form-grid textarea {
    min-height: 98px;
    resize: vertical;
}

.schema-output {
    min-height: 460px;
    max-height: 620px;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    border: 1px solid var(--schema-line);
    border-radius: 12px;
    background: #fbfdfb;
    color: #17231a;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.schema-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.schema-message {
    margin-top: 0.85rem;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--schema-soft);
    color: var(--schema-muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.schema-quality-panel {
    margin-top: 1rem;
}

.schema-checks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.schema-check {
    padding: 0.85rem;
    border: 1px solid var(--schema-line);
    border-radius: 12px;
    background: var(--schema-soft);
}

.schema-check strong {
    display: block;
    color: var(--schema-ink);
    font-size: 0.9rem;
}

.schema-check p {
    margin: 0.25rem 0 0;
    color: var(--schema-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.schema-check.pass {
    border-color: rgba(74, 156, 45, 0.26);
    background: #effbea;
}

.schema-check.warn {
    border-color: #f4d29b;
    background: #fff8eb;
}

.schema-seo-section {
    padding: 4.5rem 0;
    background: #f7fbf5;
    color: #132019;
}

.schema-seo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    align-items: start;
}

.schema-seo-section h2,
.schema-seo-section h3 {
    margin: 0 0 0.8rem;
    color: #132019;
}

.schema-seo-section p,
.schema-seo-section li {
    color: #5f6f65;
    line-height: 1.75;
}

.schema-faq {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #dbe8d7;
}

.schema-faq details {
    padding: 1rem 0;
    border-top: 1px solid #dbe8d7;
}

.schema-faq summary {
    cursor: pointer;
    color: #132019;
    font-weight: 800;
}

@media (max-width: 1080px) {
    .schema-workspace,
    .schema-tool-header {
        grid-template-columns: 1fr;
    }

    .schema-output-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .schema-tool-page {
        padding: 8.25rem 0 3.5rem;
    }

    .schema-form-grid,
    .schema-type-grid,
    .schema-actions,
    .schema-checks,
    .schema-seo-grid {
        grid-template-columns: 1fr;
    }

    .schema-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .schema-mode-tabs {
        min-width: 0;
        width: 100%;
    }

    .schema-output {
        min-height: 320px;
    }
}
