.by-chants-app {
    --by-text: #202124;
    --by-muted: #667085;
    --by-line: #d8dee7;
    --by-accent: #a51d2d;
    --by-surface: #ffffff;
    --by-soft: #f5f7fa;
    color: var(--by-text);
    font-family: inherit;
}

.by-weekly-list,
.by-song-accordion,
.by-archives {
    max-width: 1120px;
    margin: 0 auto 28px;
}

.by-weekly-list {
    padding: 18px 0;
    border-bottom: 1px solid var(--by-line);
}

.by-weekly-list h2,
.by-archives h2 {
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.by-team {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 18px;
    margin: 12px 0;
}

.by-team p {
    margin: 0;
    color: var(--by-muted);
}

.by-weekly-list li {
    margin: 8px 0;
}

.by-weekly-list small {
    display: block;
    color: var(--by-muted);
}

.by-song {
    border-top: 1px solid var(--by-line);
}

.by-song-toggle {
    width: 100%;
    padding: 16px 2px;
    color: var(--by-text);
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
}

.by-song-toggle::after {
    content: "+";
    float: right;
    font-weight: 700;
}

.by-song.is-open .by-song-toggle::after {
    content: "-";
}

.by-song-panel {
    display: none;
    padding: 0 0 22px;
}

.by-song.is-open .by-song-panel {
    display: block;
}

.by-song-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 18px;
}

.by-song-tools button,
.by-projection-close {
    min-height: 36px;
    padding: 7px 12px;
    color: var(--by-text);
    background: var(--by-soft);
    border: 1px solid var(--by-line);
    border-radius: 4px;
    cursor: pointer;
}

.by-song-tools button.is-active {
    color: #fff;
    background: var(--by-accent);
    border-color: var(--by-accent);
}

.by-section {
    margin: 22px 0;
}

.by-section h3 {
    margin: 0 0 10px;
    color: var(--by-muted);
    font-size: .9rem;
    letter-spacing: 0;
}

.by-lyrics {
    white-space: pre-wrap;
    margin: 0;
    color: var(--by-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    line-height: 1.85;
}

.by-lyrics-chords {
    line-height: 1.25;
}

.by-chord-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    min-height: 2.65em;
    margin: 0 0 .18em;
}

.by-chord-token {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 2.5em;
    white-space: pre;
}

.by-chord-space {
    min-width: .65em;
}

.by-chord-cell {
    display: block;
    min-height: 1.05em;
    line-height: 1;
}

.by-chord {
    color: var(--by-accent);
    font-weight: 800;
    font-size: .82em;
    line-height: 1;
}

.by-word-text {
    color: var(--by-text);
    line-height: 1.25;
    white-space: pre;
}

.by-diagrams {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 18px;
}

.by-diagram {
    width: 82px;
    padding: 9px;
    border: 1px solid var(--by-line);
    background: var(--by-surface);
}

.by-diagram strong {
    display: block;
    margin-bottom: 6px;
    color: var(--by-accent);
    text-align: center;
}

.by-diagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.by-diagram-grid span {
    height: 12px;
    border-top: 1px solid #98a2b3;
    border-left: 1px solid #98a2b3;
}

.by-archives ul {
    padding-left: 20px;
}

.by-empty-state {
    max-width: 760px;
    margin: 28px auto;
    padding: 22px;
    border: 1px solid var(--by-line);
    background: var(--by-soft);
}

.by-empty-state h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.by-empty-state p {
    margin: 8px 0 0;
    color: var(--by-muted);
}

body.by-projection-active {
    overflow: hidden;
}

.by-projection-view {
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow: auto;
    padding: 48px min(7vw, 84px);
    color: #fff;
    background: #111317;
}

.by-projection-view .by-lyrics,
.by-projection-view .by-word-text {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 4.2rem);
}

.by-projection-view .by-section h3 {
    color: #b8c0cc;
    font-size: clamp(1rem, 2vw, 1.6rem);
}

.by-projection-view .by-chord {
    color: #ff5f6d;
}

.by-projection-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000000;
}

@media (max-width: 760px) {
    .by-team {
        grid-template-columns: 1fr;
    }

    .by-song-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .by-song-tools button {
        width: 100%;
    }

    .by-lyrics {
        font-size: .95rem;
    }
}
