/* ===================================================================== */
/* 1. VARIABEL & PENGATURAN DASAR
/* ===================================================================== */
:root {
    --primary-color: #0D47A1; /* Biru Tua */
    --secondary-color: #BBDEFB; /* Biru Muda */
    --background-color: #F8F9FA;
    --text-color: #212529;
    --border-color: #DEE2E6;
    --font-latin: 'Poppins', sans-serif;
    --font-bali: 'Noto Sans Balinese', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-latin); 
    background-color: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
/* ===================================================================== */
/* 2. STRUKTUR UTAMA & KARTU
/* ===================================================================== */
/* .container { max-width: 1200px; margin: 0 auto; padding: 15px; }  */
header { text-align: center;} 
header h1 { color: var(--primary-color); margin-bottom: 5px; font-weight: 600; font-size: 1.8em; } 
header p { color: #6C757D; font-size: 1em; max-width: 600px; margin: 0 auto; }
.main-layout-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
/* Memberikan jarak antara Grid Utama (Atas) dengan Section Full Width (Bawah) */
.main-layout-grid + .card {
    margin-top: 20px;
}

.main-content-column, .sidebar-column { display: grid; grid-template-columns: 1fr; gap: 20px; align-content: start; }
.card { background-color: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 4px 25px rgba(0,0,0,0.08); border: 1px solid var(--border-color); }
.card h2 { margin-top: 0; color: var(--primary-color); border-bottom: 1px solid var(--border-color); padding-bottom: 10px; font-size: 1.4em; }
/* Memastikan elemen card full-width di bawahnya tetap memiliki jarak yang konsisten */
#guide-section,
#glossary-section,
#history-section,
#faq-section {
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
}

/* ===================================================================== */
/* 4. ALAT TRANSLITERASI
/* ===================================================================== */
.io-container { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 15px; } 
textarea, .output-box { width: 100%; height: 250px; padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; resize: vertical; transition: all 0.2s ease; }
textarea:focus, .output-box:focus, textarea:hover, .output-box:hover { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px var(--secondary-color); }
textarea::placeholder { color: #ADB5BD; opacity: 1; font-size: 15px; }
.output-box { background-color: #F8F9FA; overflow-y: auto; font-size: 22px; line-height: 1.8; }
.font-bali { 
    font-family: var(--font-bali); 
    /* Properti untuk mendorong rendering fitur font OpenType */
    font-variant-ligatures: common-ligatures;
    -webkit-font-feature-settings: "liga" on;
    font-feature-settings: "liga" on;
}
.output-box .word { cursor: pointer; position: relative; transition: background-color 0.2s ease; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.output-box .word:hover { background-color: var(--secondary-color); }
.word-tooltip { 
    position: absolute; 
    background: #FFFFFF;
    color: var(--text-color);
    padding: 12px 16px; 
    border-radius: 12px;
    font-size: 14px; 
    font-family: var(--font-latin); 
    z-index: 1000; 
    pointer-events: none; 
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 30px -5px rgba(0, 0, 0, 0.15);
    max-width: 320px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.word-tooltip.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}
.tooltip-title {
    font-weight: 500;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.word-tooltip .tooltip-analysis {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.word-tooltip .tooltip-item {
    display: inline-flex;
    flex-direction: column;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--background-color);
    text-align: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.word-tooltip .tooltip-item .bali {
    font-size: 1.2em;
    font-family: var(--font-bali);
    color: var(--text-color);
}
.word-tooltip .tooltip-item .latin {
    font-size: 0.75em;
    color: #6C757D;
}
.controls { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 20px; }
.controls .radio-group-wrapper { display: flex; flex-wrap: wrap; gap: 15px; }
.controls label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.pemisah { font-family: var(--font-latin); color: #6C757D; font-weight: 500; margin: 0 4px; }

/* KODE CSS UNTUK FRASE POPULER */
.frase-wrapper {
	margin-top: 15px;
	background: #fff;
	padding: 15px;
	border-radius: 8px;
	border: 1px dashed var(--border-color)
}
.frase-populer-container i {
	color: #f39c12;
}

.frase-populer-container {
    margin-top: -10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.frase-label {
    font-size: 0.85em;
    color: #6C757D;
    font-weight: 500;
}
.frase-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.frase-pill {
	background-color: #F8F9FA;
	color: #0D47A1;
	border: 1px solid var(--border-color);
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--font-latin);
}
.frase-pill:hover {
    background-color: #0D47A1;
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 71, 161, 0.2);
}

/* ===================================================================== */
/* 5. KEYBOARD VIRTUAL
/* ===================================================================== */
.keyboard-caption { text-align: center; margin-top: 35px; margin-bottom: 15px; color: #6C757D; font-weight: 500; font-size: 1em; }
.tabs {
    display: flex;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
    display: none;
}
.tab-button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    color: #6C757D;
    font-weight: 500;
    font-size: 0.9em;
    white-space: nowrap;
    transition: color 0.2s ease-in-out;
}
.tab-button:hover {
    color: var(--primary-color);
}
.tab-button.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}
.tab-content { display: none; } 
.tab-content.active { display: block; padding-top: 15px; }
.keyboard-row { display: flex; justify-content: center; gap: 5px; margin-bottom: 5px; flex-wrap: wrap; }
.key { background-color: #fff; border: 1px solid #ccc; border-radius: 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; gap: 2px; transition: all 0.2s ease; flex-grow: 1; flex-shrink: 1; flex-basis: 0; padding: 5px; min-width: 28px; }
.key:hover { background-color: var(--secondary-color); }
.key .bali { font-family: var(--font-bali); font-size: 22px; line-height: 1; }
.key .latin { font-family: var(--font-latin); font-size: 10px; color: #6C757D; line-height: 1; }
/* ===================================================================== */
/* 6. KONTEN INFORMASI & EDUKATIF
/* ===================================================================== */
#aksara-hari-ini .aksara { font-family: var(--font-bali); font-size: clamp(4em, 15vw, 6em); text-align: center; color: var(--primary-color); line-height: 1.5; }
#aksara-hari-ini h3 { margin-top: 0; margin-bottom: 8px; font-size: 1.5em; color: var(--primary-color); }
.contoh-fokus { background-color: #F8F9FA; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; }
.analysis-container { margin-top: 0; padding: 15px; background-color: #F8F9FA; border-radius: 8px; min-height: 50px; display: flex; flex-wrap: wrap; gap: 5px; }
.analysis-item { display: inline-flex; flex-direction: column; padding: 5px 10px; border: 1px solid #ccc; border-radius: 5px; background: white; text-align: center; }
.analysis-item .bali { font-size: 1.2em; } 
.analysis-item .latin { font-size: 0.8em; color: #555; }
.analysis-item .type { font-size: 0.7em; color: var(--primary-color); font-style: italic; }
.info-list { list-style: none; padding-left: 0; } 
.info-list li { padding-left: 1.5em; position: relative; margin-bottom: 10px; } 
.info-list li::before { content: '✓'; color: var(--primary-color); font-weight: bold; position: absolute; left: 0; }
.faq-item { border-bottom: 1px solid var(--border-color); } 
.faq-question { padding: 15px 0; font-weight: 600; cursor: pointer; position: relative; } 
.faq-question::after { content: '+'; position: absolute; right: 5px; font-size: 1.2em; transition: transform 0.2s ease; } 
.faq-question.active::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out; } 
.faq-answer p { padding-bottom: 15px; margin: 0; }
.example-list { display: flex; flex-direction: column; gap: 16px; }
.example-item { background-color: #f8f9fa; border-left: 4px solid var(--primary-color); padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease; }
.example-item:hover { background-color: #E3F2FD; transform: translateY(-2px); }

/* =========================================
   SLIDER CONTOH TULISAN (FORMAT LAMA + ANIMASI)
========================================= */
#example-content-wrapper {
    position: relative;
    min-height: 140px;
    overflow: hidden;
}

.example-slide {
    display: none;
    cursor: pointer;
    animation: fadeInSlide 0.3s ease-in-out;
}

.example-slide.active {
    display: block;
}

/* Desain Kotak Detail Contoh */
.example-detail-card {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
    transition: all 0.2s ease;
}

/* Efek Hover pada Kotak */
.example-slide:hover .example-detail-card {
    background-color: #eef2f5;
    border-left: 4px solid var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Struktur Baris (Label & Konten) - PAKSA MENYAMPING DI SEMUA LAYAR */
.ex-row {
    display: flex !important;
    flex-direction: row !important; /* Paksa selalu kiri-kanan */
    flex-wrap: nowrap !important; /* Larang elemen turun ke baris baru */
    align-items: flex-start;
    margin-bottom: 10px;
    border-bottom: 1px dashed #e9ecef;
    padding-bottom: 10px;
    gap: 15px; /* Jarak aman antara label dan isi */
}

.ex-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Desain Label (Kiri) */
/* .ex-label { */
    /* width: 95px !important; /* Kunci lebarnya pasti segini */ */
    /* flex-shrink: 0 !important; /* HARAM mengecil tergencet teks */ */
    /* font-size: 0.85em; */
    /* font-weight: 600; */
    /* color: #0D47A1; /* Samakan warnanya dengan tema biru Anda */ */
    /* margin-top: 4px; /* Penyesuaian agar rata dengan teks di kanan */ */
/* } */

/* Desain Konten (Kanan) */
.ex-content {
    flex: 1 1 auto !important; /* Ambil semua sisa ruang di sebelah kanan */
    min-width: 0 !important; /* TRIK RAHASIA: Memaksa teks panjang menuruti batas kotak */
    word-break: break-word; /* Jika ada kata super panjang, potong ke bawah */
    text-align: left;
}

/* Tipografi Konten (Tidak Perlu Diubah, Tetap Seperti Ini) */
.ex-bali-text {
    font-size: 24px;
    color: var(--primary-color);
    line-height: 1.2;
    display: block;
}

.ex-latin-text {
    font-weight: 600;
    color: #333;
    display: block;
    font-size: 15px;
}

.ex-arti-text {
    font-size: 0.9em;
    color: #6C757D;
    font-style: italic;
    display: block;
}

/* CTA & Animasi Denyut (Pulse) */
.ex-cta-text {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85em;
    color: #ffffff;
    background-color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.pulse-animation {
    animation: pulseBtn 2s infinite;
}

.example-slider-footer {
    margin-top: 15px;
}

/* Keyframes Animasi */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseBtn {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 71, 161, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(13, 71, 161, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 71, 161, 0); }
}

.ex-row { display: flex; align-items: center; gap: 10px; }
.ex-label { font-weight: 500; font-size: 0.8em; color: var(--primary-color); width: 90px; flex-shrink: 0; position: relative; }
.ex-label::after { content: ":"; position: absolute; right: 0; }
.ex-content.ex-bali { font-size: 1.4em; overflow-wrap: break-word; word-break: break-all; }

.tip-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.tip-example { background-color: var(--background-color); border: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04); padding: 15px; border-radius: 8px; text-align: center; border-left-width: 4px; border-left-style: solid; }
.tip-label { font-weight: 600; font-size: 0.8em; display: block; margin-bottom: 10px; }
.tip-benar { border-left-color: #28a745; }
.tip-benar .tip-label { color: #28a745; }
.tip-salah { border-left-color: #dc3545; }
.tip-salah .tip-label { color: #dc3545; }
.tip-text-container { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; min-height: 60px; }
.tip-bali-text, .tip-latin-text { margin: 0; }
.tip-bali-text { font-size: 1.6em; overflow-wrap: break-word; word-break: break-all; }
.tip-latin-text { font-size: 0.85em; color: #6C757D; font-style: italic; }
.tip-carousel-header { text-align: center; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tip-carousel-header h2 { border-bottom: none; padding-bottom: 0; }
#tip-content-wrapper { min-height: 250px; display: flex; flex-direction: column; justify-content: center; transition: opacity 0.2s ease-in-out; }
.tip-content-fade-out { opacity: 0; }
.tip-carousel-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 20px; }
.tip-nav-btn-new { background-color: transparent; border: 1px solid var(--border-color); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; transition: all 0.2s ease; }
.tip-nav-btn-new:hover { background-color: var(--secondary-color); border-color: var(--primary-color); }
.tip-nav-btn-new svg { width: 24px; height: 24px; fill: var(--primary-color); }
#tip-counter, #example-counter { font-size: 0.9em; font-weight: 500; color: #6C757D; flex-shrink: 0; }
.tip-progress-container { flex-grow: 1; width: 100%; height: 6px; background-color: #e9ecef; border-radius: 3px; overflow: hidden; }
#tip-progress-bar { width: 0%; height: 100%; background-color: var(--primary-color); border-radius: 3px; transition: width 0.3s ease; }
/* ===================================================================== */
/* STYLE UNTUK CATATAN KAIDAH DINAMIS
/* ===================================================================== */
.kaidah-note {
    margin-top: 15px;
    padding: 12px 16px;
    background-color: #E3F2FD; /* Biru sangat muda */
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-size: 0.9em;
    color: #0D47A1;
    transition: all 0.3s ease-in-out;
}
.kaidah-note strong {
    font-weight: 600;
}
/* ===================================================================== */
/* 7. FITUR & KONTROL TAMBAHAN
/* ===================================================================== */
.control-deck { background-color: #FFFFFF; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin-top: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.deck-title { margin-top: 0; margin-bottom: 15px; font-size: 1em; font-weight: 500; color: #6c757d; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.features-cohesive { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: stretch; }
.btn-cohesive { display: flex; align-items: center; justify-content: center; width: 100%; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 10px 16px; cursor: pointer; gap: 10px; color: #495057; font-size: 14px; font-family: var(--font-latin); font-weight: 500; text-decoration: none; white-space: nowrap; transition: all 0.2s ease-in-out; }
.btn-cohesive:hover { border-color: #ced4da; background-color: #e9ecef; color: #212529; }
.btn-cohesive svg { width: 18px; height: 18px; color: #6c757d; transition: color 0.2s ease-in-out; flex-shrink: 0; }
.btn-cohesive:hover svg { color: #212529; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 15px; }
.modal-content { background-color: white; padding: 25px; border-radius: 12px; max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2em; cursor: pointer; color: #888; }
.quiz-container { display: flex; flex-direction: column; gap: 15px; }
#quiz-question-text { font-size: 1.2em; }
#quiz-input { flex-grow: 1; font-size: 1.2em; padding: 8px; border: 1px solid var(--border-color); border-radius: 6px; }
#quiz-input::placeholder {
    font-size: 15px; 
    opacity: 1; 
    color: #ADB5BD;
}
#quiz-input:-ms-input-placeholder { 
    font-size: 15px;
    color: #ADB5BD;
}
#quiz-input::-ms-input-placeholder { 
    font-size: 15px;
    color: #ADB5BD;
}
.quiz-feedback { padding: 10px; border-radius: 6px; display: none; }
.quiz-feedback.correct { background-color: #d4edda; color: #155724; }
.quiz-feedback.incorrect { background-color: #f8d7da; color: #721c24; }
#footer-aksara { text-align: center; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 0.9em; color: #6C757D; }
.collection-list { margin-top: 20px; display: grid; grid-template-columns: 1fr; gap: 15px; }
.collection-item { border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; position: relative; cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease; }
.collection-item:hover { background-color: #F8F9FA; transform: translateY(-2px); }
.collection-item .c-bali { font-size: 1.5em; font-family: var(--font-bali); margin-bottom: 8px; display: block; color: var(--primary-color); }
.collection-item .c-latin { font-size: 0.9em; font-weight: 500; color: var(--text-color); }
.collection-item-delete { position: absolute; top: 8px; right: 8px; background: #F8D7DA; color: #721C24; border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2em; opacity: 0; transition: opacity 0.2s ease; }
.collection-item:hover .collection-item-delete { opacity: 1; }
.share-options { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 10px; 
    margin-top: 20px; 
}
.share-option-btn { 
    display: block; 
    padding: 12px 15px; 
    border-radius: 8px; 
    text-align: center; 
    font-weight: 500; 
    text-decoration: none; 
    color: #fff; 
    transition: transform 0.2s ease, opacity 0.2s ease; 
}
.share-option-btn:hover { 
    transform: scale(1.03); 
    opacity: 0.9; 
}
.share-option-btn.whatsapp { background-color: #25D366; }
.share-option-btn.telegram { background-color: #0088cc; }
.share-option-btn.twitter  { background-color: #1DA1F2; }
.share-option-btn.facebook { background-color: #1877F2; }
.share-option-btn.copy-link { 
    background-color: #6c757d; 
    border: none; 
    width: 100%; 
    font-family: var(--font-latin); 
    font-size: 14px; 
    cursor: pointer; 
}

.glossary-section { 
    margin-bottom: 25px; 
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.glossary-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.glossary-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 
    gap: 10px; 
}
.glossary-item { 
    background-color: #f8f9fa; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 10px; 
    text-align: center; 
}
.glossary-item .g-bali { 
    font-family: var(--font-bali); 
    font-size: 2em; 
    display: block;
    color: var(--primary-color);
}
.glossary-item .g-latin { 
    font-size: 0.9em; 
    color: #555; 
}

/* ===================================================================== */
/* 8. MEDIA QUERIES (BREAKPOINTS RESPONSIVE)
/* ===================================================================== */
@media (max-width: 360px) {
    .features-cohesive {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .container { padding: 0 10px; }
    header { padding-top: 10px; }
    header h1 { font-size: 1.6em; }
    .card { padding: 10px; }
    .keyboard-row { gap: 4px; }
    .key { padding: 8px 4px; min-height: 54px; }
    .key .jawa { font-size: 20px; }
    .key .latin { font-size: 9px; }
    /* .ex-row { flex-direction: column; align-items: flex-start; gap: 2px; } */
    /* .ex-label { width: 100%; } */
    /* .ex-content { width: 100%; } */
    /* .ex-label::after { position: static; margin-left: 4px; } */
    .control-deck { padding: 10px; margin-top: 20px; }
    .features-cohesive { grid-template-columns: 1fr 1fr; }
    .btn-cohesive { white-space: normal; }
    .radio-group-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
}
@media (max-width: 600px) {
    .tip-carousel-card {
        padding-left: 20px;
        padding-right: 20px;
    }
    .tip-nav-btn {
        position: static;
        transform: none;
        display: inline-block;
        margin: 5px;
    }
    .tip-carousel-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #tip-content-wrapper { order: 1; }
    .tip-navigation-mobile { order: 2; }
    .tip-nav-prev, .tip-nav-next {
        order: 2;
        margin-top: 15px;
    }
    .tip-carousel-header {
        order: 0;
    }
}
@media (min-width: 768px) {
    .container { padding: 0 20px; }
    header { padding-top: 20px; }
    header h1 { font-size: 2.2em; }
    textarea, .output-box { font-size: 18px; }
    .key { flex-basis: 40px; }
    .controls { flex-direction: row; align-items: center; gap: 10px; }
    .collection-list {
        grid-template-columns: 1fr 1fr;
    }    
}
@media (min-width: 1024px) {
    .container { padding: 0 15px; }
    header h1 { font-size: 2.5em; }
    .io-container { grid-template-columns: 1fr 1fr; }
    .card { padding: 25px 30px; }
    textarea, .output-box { height: 280px; }
    .main-layout-grid {
        grid-template-columns: 2fr 1fr;
        gap: 20px;
    }
}