:root, html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Lucida Grande", "Trebuchet MS", "Verdana", "Helvetica", "Arial", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: #fff;
    color: #182026;
}

[hidden] {
    display: none !important;
}

.lyrics-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #fff;
}

.message {
    min-height: 1.5rem;
    padding: 0.75rem 1rem 0;
    color: #394b59;
    font-size: 0.95rem;
}

.message:empty {
    padding-top: 0;
    min-height: 0;
}

.tab-bar {
    display: flex;
    border-bottom: 1px solid #cbd5e0;
}

.tab-button {
    flex: 1 1 0;
    padding: 0.75rem 1rem;
    border: 0;
    background: #f7fafc;
    color: #2d3748;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.tab-button:hover,
.tab-button:focus-visible {
    background: #edf2f7;
    outline: none;
}

.tab-button.active {
    background: #fff;
    color: #1a202c;
    font-weight: 600;
    border-bottom: 2px solid #3182ce;
}

.tab-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.panel {
    position: relative;
    flex: 1 1 auto;
    display: none;
    min-height: 0;
}

.panel.active {
    display: flex;
    flex-direction: column;
}

.panel iframe {
    flex: 1 1 auto;
    border: 0;
    width: calc(100% - 2rem);
    height: calc(100% - 1rem);
    margin: 1rem 1rem 0;
}

.panel iframe[hidden] {
    display: none;
}

.translation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0;
    color: #2d3748;
}

.translation-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.translation-switch {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cbd5e0;
    border-radius: 999px;
    overflow: hidden;
    background: #f7fafc;
}

.translation-switch-btn {
    border: 0;
    background: transparent;
    color: #2d3748;
    padding: 0.35rem 1rem;
    min-width: 4.375rem;
    flex: 1 1 0;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
    text-align: center;
}

.translation-switch-btn + .translation-switch-btn {
    border-left: 1px solid #cbd5e0;
}

.translation-switch-btn:hover,
.translation-switch-btn:focus-visible {
    background: #e3edf8;
    outline: none;
}

.translation-switch-btn.active {
    background: #2b6cb0;
    color: #fff;
    font-weight: 600;
}

.placeholder {
    margin: auto;
    padding: 1.5rem;
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
}

.lyrics-wrapper[data-state="loading"] {
    cursor: progress;
}

.lyrics-wrapper[data-state="loading"] * {
    cursor: inherit;
}

.metadata-container {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metadata-empty {
    padding: 1rem;
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
}

.metadata-entry {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    background: #fefefe;
}

.metadata-entry header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2d3748;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: #2d3748;
}

.metadata-item span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
}

.metadata-item-value {
    font-weight: 500;
}

.metadata-item-value--emphasis {
    font-weight: 600;
}

.metadata-text {
    white-space: pre-wrap;
    background: #f7fafc;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    color: #2d3748;
}

.metadata-text--prose {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.metadata-entry details {
    margin-top: 0.5rem;
}

.metadata-entry summary {
    cursor: pointer;
    font-weight: 600;
    color: #2b6cb0;
    outline: none;
}

.metadata-entry summary:focus-visible {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

.metadata-text-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.metadata-text-block:first-of-type {
    margin-top: 0;
}

.metadata-feedback-note {
    padding: 0.75rem;
    text-align: center;
    color: #4a5568;
    font-size: 0.9rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.metadata-feedback-note a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.metadata-feedback-note a:hover,
.metadata-feedback-note a:focus {
    text-decoration: underline;
}

.metadata-label {
    font-weight: 600;
    color: #2d3748;
}
