/* Utilix — Schema Generator (schg-) */
:root {
    --schg-accent: #14b8a6;
    --schg-accent-light: #ccfbf1;
    --schg-accent-dark: #0d9488;
    --schg-accent-border: #5eead4;
}

.schg-hero { padding-bottom: 40px; }
.schg-hero__grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; }
.schg-hero__main { display: flex; gap: 20px; align-items: flex-start; }
.schg-hero__visual { display: flex; align-items: center; justify-content: center; min-height: 260px; }

.schg-main { padding: 0 0 48px; }
.schg-section-head { margin-bottom: 24px; }
.schg-section-head h2 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; color: var(--heading); }
.schg-section-head p { margin: 0; font-size: .875rem; color: #64748b; }
.schg-section-head--center { text-align: center; }
.schg-section-head--center p { margin: 0 auto; max-width: 560px; }
.schg-section-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .75rem; font-weight: 700; color: var(--schg-accent); background: var(--schg-accent-light); border-radius: 999px; margin-bottom: 12px; }
.schg-section-eyebrow i { width: 14px; height: 14px; }

.schg-mode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 32px; }
.schg-mode-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; background: #fff; border: 2px solid #e8ecf1; border-radius: 16px; cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s, transform .15s; font-family: inherit; }
.schg-mode-btn:hover { border-color: var(--schg-accent-border); box-shadow: 0 6px 20px rgba(20,184,166,.12); transform: translateY(-2px); }
.schg-mode-btn.is-active { border-color: var(--schg-accent); background: linear-gradient(180deg, #ccfbf1 0%, #fff 100%); box-shadow: 0 4px 20px rgba(20,184,166,.15); }
.schg-mode-btn.is-active::after { content: '✓'; position: absolute; top: 8px; right: 10px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: .625rem; font-weight: 800; color: #fff; background: var(--schg-accent); border-radius: 50%; line-height: 1; }
.schg-mode-btn__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; margin-top: 4px; }
.schg-mode-btn__icon i { width: 22px; height: 22px; }
.schg-mode-btn strong { font-size: .6875rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.schg-mode-btn span:last-child { font-size: .5625rem; color: #94a3b8; line-height: 1.35; }
.schg-mode-btn--pink .schg-mode-btn__icon { background: #fce7f3; color: #db2777; }
.schg-mode-btn--blue .schg-mode-btn__icon { background: #dbeafe; color: #2563eb; }
.schg-mode-btn--green .schg-mode-btn__icon { background: #d1fae5; color: #059669; }
.schg-mode-btn--orange .schg-mode-btn__icon { background: #ffedd5; color: #ea580c; }
.schg-mode-btn--purple .schg-mode-btn__icon { background: #ede9fe; color: #7c3aed; }
.schg-mode-btn--teal .schg-mode-btn__icon { background: #ccfbf1; color: #0d9488; }
.schg-mode-btn--yellow .schg-mode-btn__icon { background: #fef9c3; color: #ca8a04; }
.schg-mode-btn--cyan .schg-mode-btn__icon { background: #cffafe; color: #0891b2; }
.schg-mode-btn--pink .schg-mode-btn__icon { background: #fce7f3; color: #db2777; }
.schg-mode-btn--gray .schg-mode-btn__icon { background: #f1f5f9; color: #334155; }
.schg-mode-btn--red .schg-mode-btn__icon { background: #fee2e2; color: #dc2626; }

.schg-subsection { margin: 18px 0 10px; font-size: .875rem; font-weight: 700; color: var(--heading); }

.schg-output-hint { margin: 12px 0 0; font-size: .75rem; color: #64748b; }
.schg-output-hint em { font-style: normal; }

.schg-json-key { color: #f87171; }
.schg-json-str { color: #4ade80; }
.schg-json-num { color: #fbbf24; }
.schg-json-bool { color: #60a5fa; }
.schg-json-tag { color: #f472b6; }

.schg-field input[type="datetime-local"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    font-size: .875rem; font-family: inherit; background: #fff; color: var(--text); box-sizing: border-box;
}

.schg-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.schg-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.schg-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.schg-mode-badge { display: inline-block; margin-top: 8px; padding: 4px 10px; font-size: .6875rem; font-weight: 700; color: var(--schg-accent-dark); background: var(--schg-accent-light); border: 1px solid var(--schg-accent-border); border-radius: 999px; }
.schg-mode-desc { margin: 12px 0 16px; padding: 12px 14px; font-size: .8125rem; color: #0f766e; background: var(--schg-accent-light); border: 1px solid var(--schg-accent-border); border-radius: 12px; }

.schg-field { margin-bottom: 14px; }
.schg-field label { display: block; margin-bottom: 4px; font-size: .8125rem; font-weight: 700; color: var(--heading); }
.schg-field small { display: block; margin-bottom: 6px; font-size: .6875rem; color: #94a3b8; font-weight: 500; }
.schg-field input[type="text"], .schg-field input[type="url"], .schg-field input[type="color"], .schg-field select, .schg-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    font-size: .875rem; font-family: inherit; background: #fff; color: var(--text); box-sizing: border-box;
}
.schg-field textarea { resize: vertical; min-height: 80px; font-family: ui-monospace, monospace; font-size: .8125rem; }
.schg-field input:focus, .schg-field select:focus, .schg-field textarea:focus, .schg-field input[type="datetime-local"]:focus { outline: none; border-color: var(--schg-accent); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
.schg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.schg-field--counter { position: relative; }
.schg-char-counter { display: block; text-align: right; margin-top: 4px; font-size: .6875rem; font-weight: 600; color: #94a3b8; }
.schg-char-counter.is-good { color: #059669; }
.schg-char-counter.is-warn { color: #ca8a04; }
.schg-char-counter.is-bad { color: #dc2626; }

.schg-check-row { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 14px; }
.schg-check { display: flex; align-items: center; gap: 8px; font-size: .8125rem; cursor: pointer; }
.schg-check input { accent-color: var(--schg-accent); width: 16px; height: 16px; }

.schg-color-field { display: flex; gap: 10px; align-items: center; }
.schg-color-field input[type="color"] { width: 44px; height: 44px; padding: 2px; flex-shrink: 0; cursor: pointer; }
.schg-color-field input[type="text"] { flex: 1; font-family: ui-monospace, monospace; }

.schg-btn-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; }
.schg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: none; border-radius: 12px; font-size: .875rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.schg-btn i { width: 16px; height: 16px; }
.schg-btn--primary { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); color: #fff; box-shadow: 0 4px 16px rgba(20,184,166,.35); }
.schg-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(20,184,166,.45); }
.schg-btn--outline { background: #fff; border: 1px solid var(--schg-accent-border); color: var(--schg-accent-dark); }
.schg-btn--outline:hover { background: var(--schg-accent-light); }
.schg-btn--sm { padding: 8px 12px; font-size: .75rem; border-radius: 10px; }
.schg-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.schg-output-card { position: sticky; top: 90px; }
.schg-output-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.schg-output-head h2 { margin: 0 0 4px; font-size: 1.0625rem; font-weight: 700; }
.schg-output-head p { margin: 0; font-size: .8125rem; color: #64748b; }
.schg-output-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }

.schg-result-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 280px; padding: 24px; color: #94a3b8; text-align: center; border: 1px dashed var(--border); border-radius: 12px; background: #f8fafc; }
.schg-result-empty[hidden], #schg-result-content[hidden] { display: none !important; }
.schg-result-empty i { width: 48px; height: 48px; opacity: .4; }

.schg-code-block { margin: 0; padding: 16px 16px 16px 48px; background: #0f172a; color: #e2e8f0; border-radius: 12px; font-size: .75rem; font-family: ui-monospace, monospace; line-height: 1.7; overflow-x: auto; min-height: 280px; position: relative; counter-reset: line; white-space: pre-wrap; word-break: break-all; }
.schg-code-block .schg-line { display: block; position: relative; padding-left: 8px; }
.schg-code-block .schg-line::before { counter-increment: line; content: counter(line); position: absolute; left: -36px; width: 24px; text-align: right; color: #475569; font-size: .6875rem; }
.schg-code-block .schg-tag { color: #f87171; }
.schg-code-block .schg-attr { color: #60a5fa; }
.schg-code-block .schg-val { color: #4ade80; }

.schg-values-section { padding: 48px 0; background: #f8fafc; }
.schg-values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.schg-value-card { padding: 20px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.schg-value-card__icon { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin: 0 auto 12px; border-radius: 12px; }
.schg-value-card__icon i { width: 22px; height: 22px; }
.schg-value-card__icon--green { background: #d1fae5; color: #059669; }
.schg-value-card__icon--blue { background: #dbeafe; color: #2563eb; }
.schg-value-card__icon--orange { background: #ffedd5; color: #ea580c; }
.schg-value-card__icon--purple { background: #ede9fe; color: #7c3aed; }
.schg-value-card__icon--red { background: #fee2e2; color: #dc2626; }
.schg-value-card strong { display: block; margin-bottom: 6px; font-size: .875rem; }
.schg-value-card p { margin: 0; font-size: .75rem; color: #64748b; line-height: 1.45; }

.schg-about { padding: 48px 0; }
.schg-info__grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 48px 0; }
.schg-about-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.schg-about-feature { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.schg-about-feature__icon { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; }
.schg-about-feature__icon i { width: 18px; height: 18px; }
.schg-about-feature__icon--pink { background: #fce7f3; color: #db2777; }
.schg-about-feature__icon--blue { background: #dbeafe; color: #2563eb; }
.schg-about-feature__icon--green { background: #d1fae5; color: #059669; }
.schg-about-feature__icon--orange { background: #ffedd5; color: #ea580c; }
.schg-about-feature__icon--purple { background: #ede9fe; color: #7c3aed; }
.schg-about-feature__icon--cyan { background: #cffafe; color: #0891b2; }
.schg-about-feature__icon--teal { background: #ccfbf1; color: #0d9488; }
.schg-about-feature strong { display: block; font-size: .8125rem; margin-bottom: 4px; }
.schg-about-feature p { margin: 0; font-size: .75rem; color: #64748b; line-height: 1.45; }

.schg-side-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; margin-bottom: 16px; }
.schg-side-card--tips { background: linear-gradient(180deg, #ccfbf1 0%, #fff 100%); }
.schg-side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 1rem; font-weight: 700; }
.schg-side-card__title i { width: 18px; height: 18px; color: var(--schg-accent); }
.schg-tips-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.schg-tips-head__icon { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: var(--schg-accent-light); color: var(--schg-accent); border-radius: 10px; }
.schg-tips-head h3 { margin: 0; font-size: .9375rem; }
.schg-tips-list { list-style: none; padding: 0; margin: 0; }
.schg-tips-list li { display: flex; gap: 10px; padding: 8px 0; font-size: .8125rem; color: #64748b; line-height: 1.5; border-bottom: 1px solid var(--border); }
.schg-tips-list li:last-child { border-bottom: none; }
.schg-tips-list__check { display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; background: #d1fae5; color: #059669; border-radius: 50%; flex-shrink: 0; }
.schg-tips-list__check i { width: 12px; height: 12px; }
.schg-tools-list { list-style: none; padding: 0; margin: 0; }
.schg-tools-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: .8125rem; font-weight: 600; transition: background .15s; }
.schg-tools-link:hover { background: #f1f5f9; }
.schg-tools-link.is-current { background: var(--schg-accent-light); color: var(--schg-accent-dark); }
.schg-tools-link__icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 8px; }
.schg-tools-link__icon i { width: 16px; height: 16px; }
.schg-tools-link span:nth-child(2) { flex: 1; }
.schg-tools-link > i:last-child { width: 14px; height: 14px; color: #94a3b8; }
.schg-view-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .8125rem; font-weight: 700; color: var(--schg-accent); text-decoration: none; }

.schg-steps-section { padding: 48px 0; background: #f8fafc; }
.schg-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.schg-how-step { padding: 20px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; text-align: center; position: relative; }
.schg-how-step__num { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; margin: 0 auto 12px; background: var(--schg-accent); color: #fff; border-radius: 50%; font-weight: 800; font-size: .875rem; }
.schg-how-step strong { display: block; margin-bottom: 6px; font-size: .8125rem; }
.schg-how-step p { margin: 0; font-size: .75rem; color: #94a3b8; line-height: 1.45; }

.schg-toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; background: #1e293b; color: #fff; border-radius: 10px; font-size: .8125rem; font-weight: 600; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 9999; }
.schg-toast.is-visible { opacity: 1; transform: translateY(0); }
.schg-animate-in { animation: schg-fade-up .5s ease both; }
.schg-animate-in--delay { animation-delay: .08s; }
@keyframes schg-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes schg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Hero */
.schg-hero__demo { position: relative; width: 100%; max-width: 380px; height: 260px; margin: 0 auto; }
.schg-hero__rich-result { position: absolute; top: 8px; right: 0; width: 220px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 28px rgba(15,23,42,.1); z-index: 2; }
.schg-hero__stars { color: #fbbf24; font-size: .75rem; letter-spacing: 1px; margin-bottom: 6px; }
.schg-hero__rich-result strong { display: block; font-size: .875rem; color: #1a0dab; margin-bottom: 4px; }
.schg-hero__rich-result > span { display: block; font-size: .625rem; color: #006621; margin-bottom: 6px; }
.schg-hero__rich-result p { margin: 0; font-size: .6875rem; color: #545454; line-height: 1.45; }
.schg-hero__json-arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--schg-accent); color: #fff; border-radius: 50%; z-index: 3; box-shadow: 0 4px 12px rgba(20,184,166,.35); }
.schg-hero__json-arrow i { width: 16px; height: 16px; }
.schg-hero__json-box { position: absolute; bottom: 10px; left: 0; width: 200px; padding: 14px; background: #0f172a; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,.2); z-index: 2; }
.schg-hero__json-box code { font-family: ui-monospace, monospace; font-size: .5625rem; color: #94a3b8; line-height: 1.7; word-break: break-all; }
.schg-hero__window { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 280px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,23,42,.12); overflow: hidden; z-index: 2; }
.schg-hero__window-bar { display: flex; gap: 5px; padding: 8px 10px; background: #f1f5f9; }
.schg-hero__window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.schg-hero__window-body { padding: 14px; font-family: ui-monospace, monospace; font-size: .5625rem; line-height: 1.8; color: #64748b; }
.schg-hero__window-body em { color: #f87171; font-style: normal; }
.schg-hero__window-body b { color: #60a5fa; font-weight: 600; }
.schg-hero__window-body s { color: #4ade80; text-decoration: none; }
.schg-hero__float-icon { position: absolute; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; box-shadow: 0 4px 12px rgba(15,23,42,.1); animation: schg-float 4s ease-in-out infinite; }
.schg-hero__float-icon i { width: 18px; height: 18px; }
.schg-hero__float-icon--1 { top: 30px; left: 0; background: #d1fae5; color: #059669; animation-delay: 0s; }
.schg-hero__float-icon--2 { top: 60px; right: 0; background: #dbeafe; color: #2563eb; animation-delay: .5s; }
.schg-hero__float-icon--3 { bottom: 50px; left: 10px; background: #ffedd5; color: #ea580c; animation-delay: 1s; }
.schg-hero__float-icon--4 { bottom: 30px; right: 20px; background: #ede9fe; color: #7c3aed; animation-delay: 1.5s; }
.schg-hero__gear { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #14b8a6, #0d9488); border-radius: 14px; color: #fff; box-shadow: 0 8px 24px rgba(20,184,166,.35); z-index: 3; }
.schg-hero__gear i { width: 24px; height: 24px; }

.schg-mode-panel[hidden] { display: none !important; }

@media (max-width: 1100px) {
    .schg-hero__grid, .schg-workspace, .schg-info__grid { grid-template-columns: 1fr; }
    .schg-hero__visual { display: none; }
    .schg-mode-grid { grid-template-columns: repeat(3, 1fr); }
    .schg-output-card { position: static; }
    .schg-values { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .schg-mode-grid { grid-template-columns: repeat(2, 1fr); }
    .schg-field-row, .schg-about-features, .schg-values, .schg-how-steps, .schg-btn-row { grid-template-columns: 1fr; }
}

[data-theme="dark"] .schg-card, [data-theme="dark"] .schg-mode-btn, [data-theme="dark"] .schg-side-card, [data-theme="dark"] .schg-about-feature, [data-theme="dark"] .schg-value-card, [data-theme="dark"] .schg-how-step { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .schg-mode-btn.is-active { background: linear-gradient(180deg, rgba(20,184,166,.12) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .schg-mode-desc { background: rgba(20,184,166,.1); border-color: rgba(94,234,212,.3); color: #5eead4; }
[data-theme="dark"] .schg-field input, [data-theme="dark"] .schg-field select, [data-theme="dark"] .schg-field textarea { background: #0f172a; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .schg-btn--outline { background: #1a2332; border-color: rgba(94,234,212,.3); color: #5eead4; }
[data-theme="dark"] .schg-result-empty { background: #0f172a; border-color: var(--border); }
[data-theme="dark"] .schg-code-block { background: #0f172a; border: 1px solid var(--border); }
[data-theme="dark"] .schg-side-card--tips { background: linear-gradient(180deg, rgba(20,184,166,.08) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .schg-tools-link.is-current { background: rgba(20,184,166,.12); color: #5eead4; }
[data-theme="dark"] .schg-steps-section { background: rgba(20,184,166,.04); }
[data-theme="dark"] .schg-values-section { background: rgba(20,184,166,.04); }
[data-theme="dark"] .schg-section-head p { color: #94a3b8; }
[data-theme="dark"] .schg-mode-btn { background: var(--bg-section); }
[data-theme="dark"] .schg-hero__window { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .schg-hero__window-bar { background: #0f172a; }
[data-theme="dark"] .schg-hero__rich-result { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .schg-hero__rich-result strong { color: #93c5fd; }
[data-theme="dark"] .schg-hero__rich-result > span { color: #4ade80; }
[data-theme="dark"] .schg-hero__rich-result p { color: #94a3b8; }
[data-theme="dark"] .schg-hero__json-box { background: #0f172a; border: 1px solid var(--border); }
[data-theme="dark"] .schg-field input[type="datetime-local"] { background: #0f172a; border-color: var(--border); color: var(--text); }
