<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* --- Base Variables and Resets --- */
:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --primary-color: #4a90e2;
    --secondary-color: #333;
    --border-color: #555;
    --hover-bg-color: #2a2a2a;
    --active-bg-color: #0a4a8e;
    --mobile-prompt-bg: rgba(0, 0, 0, 0.9);
}

/* Basic Reset and Box Sizing */
html {
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    background-color: var(--bg-color);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

/* --- DEFAULT STYLES (Desktop First) --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto; /* Allow body scroll on desktop if needed */
    display: flex; /* Center container on desktop */
    justify-content: center;
    align-items: center;
    padding: 20px 0; /* Add some vertical padding on desktop */
}

.container {
    width: 95%;
    max-width: 1200px;
    height: auto;
    max-height: calc(100vh - 40px); /* Consider body padding */
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    overflow-y: auto; /* Allow container scroll */
    overflow-x: hidden;
    display: flex; /* Use flex inside container */
    flex-direction: column;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-size: 1.8em;
    word-break: break-word;
    flex-shrink: 0;
}

.controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 15px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 6px;
    max-width: 100%;
    flex-shrink: 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.control-group label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #bbb;
    font-size: 1em; /* Default label size */
    word-break: break-word;
    overflow-wrap: break-word;
}

.control-group select {
    padding: 10px 12px;
    font-size: 1rem; /* Default font size */
    /* Other default styles... */
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23CCCCCC%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: .65em auto;
    touch-action: manipulation;
    max-width: 100%;
}
.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.toggle-group label { margin-bottom: 8px; }

.toggle-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.toggle-btn {
    flex-grow: 1;
    flex-basis: 60px;
    padding: 10px 12px; /* Default padding */
    font-size: 0.9rem; /* Default font size */
    /* Other default styles... */
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    word-break: break-word;
    line-height: 1.3;
}

.toggle-btn:hover {
    background-color: var(--hover-bg-color);
    border-color: #777;
}

.toggle-btn.active {
    background-color: var(--active-bg-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}

.chord-display {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 6px;
    align-items: start;
    flex-grow: 1; /* Allow to grow */
    overflow-y: auto; /* Allow scroll within display */
    overflow-x: hidden;
    max-width: 100%;
    min-height: 200px; /* Give it some default min height */
}

.chord-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    min-height: 180px; /* Default min height */
    min-width: 0;
    overflow: hidden;
}

.progression-chord,
.degree-display,
.chord-name-display {
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2; /* Default line height */
}

.progression-chord {
    font-size: 0.95em; /* Default font size */
    color: #aaa;
    margin-bottom: 6px;
    min-height: 1.3em; /* Default min height */
    font-style: italic;
}

.degree-display {
    font-weight: bold;
    font-size: 1.5em; /* Default font size */
    color: var(--primary-color);
    margin-bottom: 10px;
    min-height: 1.6em; /* Default min height */
}

.chord-name-display {
    font-size: 1.25em; /* Default font size */
    font-weight: 500;
    color: var(--text-color);
    min-height: 1.4em; /* Default min height */
}

/* --- Mobile Prompt --- */
/* Default state: HIDDEN */
.mobile-prompt {
    display: none;
    /* Styles when shown are defined in media query */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--mobile-prompt-bg); color: var(--text-color); z-index: 1000;
    flex-direction: column; justify-content: center; align-items: center; text-align: center;
    padding: 20px; font-size: 1.2em;
}
.mobile-prompt p { margin-bottom: 1em; }


/* --- Media Queries --- */

/* Medium Screens / Tablet Portrait */
@media (max-width: 900px) {
    .controls {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    h1 { font-size: 1.6em; }
}


/* --- Mobile Screens (Overrides for small screens) --- */
@media (max-width: 768px) {
    body {
        /* Override desktop centering and padding */
        display: block;
        padding: 0;
        /* Ensure no body scroll on mobile */
        overflow: hidden !important;
        height: 100vh;
    }
    .container {
        width: 100%;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        padding: 10px 5px; /* Adjusted padding */
        position: static; /* Override potential fixed */
        overflow-y: auto; /* Allow container scroll on mobile */
        overflow-x: hidden; /* Prevent horizontal scroll */
        display: flex; /* Keep flex for vertical sizing */
        flex-direction: column;
    }

    h1 {
        font-size: 1.3em;
        margin-bottom: 10px; /* Reduced margin */
        padding-bottom: 8px;
    }

    .controls {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); /* Adjusted min */
        gap: 8px;
        padding: 10px 5px;
        margin-bottom: 10px; /* Reduced margin */
    }
     .control-group label { font-size: 0.9em; margin-bottom: 5px; }
     .control-group select, .toggle-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
     .toggle-buttons { gap: 4px; }

    .chord-display {
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)); /* Adjusted min */
        gap: 5px;
        padding: 8px 3px; /* Adjusted padding */
        margin-top: 8px; /* Reduced margin */
        /* flex-grow: 1 and min-height: 0 inherited is fine */
        /* Ensure it CAN scroll if content overflows */
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 150px; /* Restore a reasonable min-height */
    }
    .chord-column {
        padding: 6px 2px; /* Adjusted padding */
        min-height: 150px; /* Restore a reasonable min-height */
    }

    /* Mobile font sizes */
    .progression-chord { font-size: 0.75em; margin-bottom: 3px; min-height: 1.1em;}
    .degree-display { font-size: 1.1em; margin-bottom: 5px; min-height: 1.3em;}
    .chord-name-display { font-size: 0.9em; min-height: 1.1em;}


    /* --- Mobile Orientation Specific --- */
    @media (orientation: portrait) {
        /* Show prompt only in portrait mode on small screens */
        .mobile-prompt {
            display: flex; /* Show the prompt */
        }
        .container {
            display: none; /* Hide the main content */
        }
        body { overflow: hidden !important; } /* Prevent scroll under prompt */
    }
    /* Landscape is handled by the main (max-width: 768px) rules now */
    /* No specific landscape override needed unless prompt needs hiding explicitly */
     @media (orientation: landscape) {
         .mobile-prompt {
             display: none; /* Explicitly hide in landscape */
         }
         .container {
             display: flex; /* Ensure container is shown as flex */
         }
     }
}</pre></body></html>