/* Shared visual system: all public pages and management surfaces. */
:root{
 --ui-radius-control:10px;--ui-radius-card:14px;--ui-radius-panel:18px;
 --ui-text-title:18px;--ui-text-body:14px;--ui-text-meta:12px;
 --radius-sm:var(--ui-radius-control);--radius-md:var(--ui-radius-card);--radius-lg:var(--ui-radius-panel);
 --card-shadow:none;--card-hover-shadow:none;
}
html[data-theme="day"]{--line:rgba(110,78,43,.16);--line-strong:rgba(110,78,43,.30);--text:#3e2b1d;--muted:#765d45;--dim:#80674f;--gold:#936122;--gold-soft:rgba(147,97,34,.09);--surface-soft:rgba(147,97,34,.045)}
/* Keep theme/background/opacity choices; flatten component decoration. */
body :is(.song-card,.stats-panel,.stats-fold,.comments-feed-card,.comment-card,.source-calendar-disclosure,.source-calendar-results,.source-directory,.source-timeline,.social-feed-entry,.announcement-card,.event-card,.clue-card,.source-record-card){border-radius:var(--ui-radius-card);border-color:var(--line);box-shadow:none;background-image:none}
body :is(.song-card,.comments-feed-card,.event-card,.clue-card){background:var(--surface)}
body :is(.song-card,.comments-feed-card,.event-card,.clue-card):hover{transform:none;box-shadow:none;border-color:var(--line-strong)}
body .song-card::before{height:2px;opacity:.55}
body .song-card h3{font-size:var(--ui-text-title);line-height:1.5;letter-spacing:0}
body .song-card .song-artist{font-size:var(--ui-text-body);color:var(--muted)}
body :is(.song-summary,.announcement-summary){font-size:var(--ui-text-body);line-height:1.75;color:var(--muted)}
body :is(.card-topline,.song-number,.source-song-number,.comments-song-number){font-size:var(--ui-text-meta);font-weight:400;color:var(--muted)}
/* Navigation and action controls share shape, weight and icon size. */
body :is(.header-nav-link,.theme-toggle,.options-toggle,.docked-controls-toggle){min-height:44px;border-radius:var(--ui-radius-control);border:1px solid transparent;background:transparent;color:var(--text);box-shadow:none;font-weight:500;transform:none}
body .header-actions{gap:6px}
body .header-nav-link{padding-inline:10px}
body .header-nav-link svg{width:20px;height:20px}
body :is(.header-nav-link,.theme-toggle,.options-toggle,.docked-controls-toggle):hover{background:var(--gold-soft);border-color:var(--line);transform:none}
body :is(.source-timeline-actions,.source-row-actions,.source-main-tools,.social-card-editor,.comments-controls,.comment-form,.admin-main,.announcement-editor,.search-workspace,.sources-toolbar) button{min-height:44px;border-radius:var(--ui-radius-control);box-shadow:none;font-size:var(--ui-text-body);font-weight:500}
body :is(.source-row-actions,.source-main-tools,.social-card-editor,.comment-form,.admin-main) button{background:var(--surface-soft);color:var(--text);border:1px solid var(--line)}
body :is(.search-workspace,.sources-toolbar,.source-main-tools,.source-row-more,.social-card-editor,.comment-form,.admin-main,.options-panel) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){border-radius:var(--ui-radius-control);border-color:var(--line-strong);box-shadow:none}
body :is(.options-panel,.song-admin-dropdown,.source-main-tools,.source-row-more,.social-card-editor,dialog){border-radius:var(--ui-radius-panel);border-color:var(--line)}
body :is(.source-main-tools,.source-row-more,.social-card-editor){box-shadow:none;background-image:none}
/* Nested reading sections rely on spacing and dividers rather than double cards. */
body .stats-fold>.stats-panel{border-radius:0;border-inline:0;border-bottom:0;box-shadow:none;background:transparent}
body .source-calendar-disclosure .source-calendar{border:0;border-radius:0;box-shadow:none;background:transparent}
body :is(.stats-panel-heading,.source-part-heading,.comments-feed-song){border-color:var(--line)}
body :is(.stats-panel-heading h3,.source-part-heading h3){font-size:var(--ui-text-title);line-height:1.5;letter-spacing:0}
body :is(.stats-hero h1,.stats-hero h2,.sources-hero h2,.comments-hero h1,.comments-hero h2){font-size:clamp(24px,3vw,30px);line-height:1.45;letter-spacing:0}
body :is(.stats-panel,.comments-feed-card,.social-feed-entry){padding:18px}
body .source-directory-item{border-radius:var(--ui-radius-control);box-shadow:none}
body :is(.source-occurrence-title,.comments-feed-song){line-height:1.5}
body .source-title-artist{font-weight:400;color:var(--muted)}
body .source-compact-song-row>.source-row-toggle{border:0;border-radius:var(--ui-radius-control);background:transparent;font-size:0}
body :is(.tag,.song-tag,.performer-badge){box-shadow:none;font-weight:500}
/* Preserve semantic selected, playing, destructive and performer colors. */
body :is(button,a,summary,input,select,textarea):focus-visible{outline:2px solid var(--focus,var(--gold));outline-offset:3px}
body .site-footer{box-shadow:none;border-top:1px solid var(--line);background-image:none;padding-block:20px}
body .site-footer .site-footer-name{font-size:16px;letter-spacing:.04em}
body .site-footer .site-footer-about p{font-size:12px;line-height:1.7}
body .back-to-top{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:var(--ui-radius-control);border:1px solid var(--line-strong);background:var(--menu-bg);color:var(--text);box-shadow:none}
body .back-to-top svg{width:19px;height:19px}
@media(max-width:600px){
 body :is(.stats-panel,.comments-feed-card,.social-feed-entry){padding:14px}
 body .header-actions{gap:4px}
 body .header-nav-link{padding-inline:8px;min-width:44px;box-sizing:border-box}
 body .song-card h3{font-size:16px}
 body :is(.source-main-tools,.source-row-more,.social-card-editor,.comment-form,.admin-main) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px}
}
@media(prefers-reduced-motion:reduce){body :is(.song-card,.header-nav-link,.source-row-toggle):after,body :is(.song-card,.header-nav-link){transition:none}}

/* v4.62.102: readable titles and matching floating controls. */
body .song-card h3{font-size:24px;font-weight:600;line-height:1.45}
html:not([data-view="compact"]) body .song-card h3>.song-card-title-text{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
html[data-view="compact"] body .song-card h3{font-size:18px;line-height:1.45}
html[data-theme] body :is(.back-to-top,.recent-notification-button,.history-today-button){box-sizing:border-box;min-height:44px;border-radius:var(--ui-radius-control);border:1px solid var(--line-strong);background:var(--menu-bg);color:var(--text);box-shadow:none;font-weight:500;transform:none}
html[data-theme] body :is(.recent-notification-button,.history-today-button){height:44px;padding:0 14px;gap:8px;font-size:14px}
html[data-theme] body :is(.back-to-top,.recent-notification-button,.history-today-button):hover{background:linear-gradient(var(--gold-soft),var(--gold-soft)),var(--menu-bg);border-color:var(--gold);box-shadow:none;transform:none}
html[data-theme] body :is(.back-to-top,.recent-notification-button,.history-today-button) svg{width:19px;height:19px}
@media(max-width:600px){body .song-card h3{font-size:22px}html[data-view="compact"] body .song-card h3{font-size:18px}}

/* Shared icon-only top control at every viewport width. */
html[data-theme] body .back-to-top{padding:0;gap:0;white-space:nowrap}
html[data-theme] body .back-to-top>span{display:none}
html[data-theme] body .back-to-top>svg{display:block;flex:0 0 19px;width:19px;height:19px}

/* Static rainbow titles: keep numbers, artists and badges in normal colors. */
.pride-song-title{--pride-gradient:linear-gradient(100deg,#b52b38 0%,#a6510b 20%,#856900 38%,#237743 55%,#275faf 76%,#8243ac 100%);color:#8243ac}
html[data-theme="night"] .pride-song-title{--pride-gradient:linear-gradient(100deg,#ff8793 0%,#ffb16c 20%,#f2d36b 38%,#80d6a2 55%,#8bbdff 76%,#d6a4ff 100%);color:#d6a4ff}
@supports ((background-clip:text) or (-webkit-background-clip:text)){
 body .pride-song-title{background-image:var(--pride-gradient);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
}
@media(forced-colors:active){body .pride-song-title{background:none;color:CanvasText;-webkit-text-fill-color:CanvasText}}

/* Search is one composite control: show focus on its shell only. */
body .search-workspace .search-shell input,
body .search-workspace .search-shell input:focus-visible{border:0;border-radius:0;outline:0;box-shadow:none;background:transparent}
body .search-workspace .search-shell:focus-within{border-color:var(--gold);outline:2px solid var(--focus,var(--gold));outline-offset:2px;box-shadow:none}
/* Comments overview shares the index card and control system. */
body .comments-feed-panel{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
body .comments-feed-heading{align-items:flex-start;gap:12px;padding:12px 0 18px}
body .comments-feed-heading h2{font-size:26px;line-height:1.4}
body .comments-feed-heading .eyebrow{display:none}
body .overview-comment-form{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--ui-radius-card);box-shadow:none}
body .overview-comment-form :is(input,textarea){box-sizing:border-box;max-width:100%;border:1px solid var(--line-strong);border-radius:var(--ui-radius-control);background:var(--input-bg,var(--search-bg));color:var(--input-text);box-shadow:none;font:inherit}
body .overview-comment-form input{min-height:44px}
body .overview-comment-form textarea{padding:12px;line-height:1.7}
body .comments-main :is(.song-comment-submit-row button,.comments-load-more,.contribution-entry){min-height:44px;padding:8px 16px;border:1px solid var(--line-strong);border-radius:var(--ui-radius-control);background:var(--menu-bg);color:var(--text);box-shadow:none;font-size:14px}
body .comments-main :is(.song-comment-submit-row button,.comments-load-more,.contribution-entry):hover{background:var(--gold-soft);border-color:var(--gold);transform:none}
body .comments-feed{gap:14px}
body .comments-feed-card{grid-template-columns:1fr;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--ui-radius-card);box-shadow:none}
body .comments-feed-card::before{display:none}
body .comments-feed-song{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;min-height:0;padding:0 0 14px;border-right:0;border-bottom:1px solid var(--line);background:transparent}
body .comments-feed-song>.comments-song-number{grid-column:1;grid-row:1;padding:0;border-radius:0;background:transparent;color:var(--muted);font-size:12px;font-weight:400}
body .comments-feed-song>strong{grid-column:1;grid-row:2;font-family:"Noto Serif TC","Songti TC","PMingLiU",serif;font-size:24px;font-weight:600;line-height:1.45;white-space:normal;overflow:visible;overflow-wrap:anywhere}
body .comments-feed-song>small{grid-column:1;grid-row:3;font-size:14px;white-space:normal;overflow-wrap:anywhere}
body .comments-feed-song>b{grid-column:2;grid-row:1 / span 3;font-size:20px;font-weight:400}
body .comments-feed-card article{padding:14px 0 0}
body .comments-feed-card article>header{display:flex;flex-wrap:wrap;gap:6px 12px}
body .comments-feed-card article>p{font-size:16px;line-height:1.75}
@media(max-width:600px){
 body .comments-feed-card,body .overview-comment-form{padding:14px}
 body .comments-feed-song>strong{font-size:22px}
 body .comments-feed-heading{flex-wrap:wrap}
 body .song-comment-submit-row{flex-wrap:wrap}
}

/* One shared container for the clue timestamp, description and disclosure. */
body .sources-main .clue-card.clue-song-row{display:grid;grid-template-columns:112px minmax(0,1fr) 32px;gap:10px;align-items:center;padding:10px 14px;border:1px solid var(--line);border-radius:var(--ui-radius-card);background:var(--surface);box-shadow:none}
body .sources-main .clue-song-row>.clue-row-time{min-height:48px;padding:4px 10px 4px 0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;color:var(--muted);font-size:13px;font-weight:400;gap:4px;white-space:nowrap}
body .sources-main .clue-song-row>.clue-row-summary{display:flex;min-height:48px;padding:4px 0;gap:3px;border:0;border-radius:0;background:transparent;box-shadow:none;transform:none}
body .sources-main .clue-row-title{font-size:17px;line-height:1.45}
body .sources-main .clue-song-row>.clue-row-toggle{display:flex;align-items:center;justify-content:center;min-width:32px;width:32px;min-height:44px;padding:0;border:0;border-radius:5px;background:transparent;color:var(--muted);font-size:0;box-shadow:none}
body .sources-main .clue-row-toggle::after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
body .sources-main .clue-row-toggle[aria-expanded="true"]::after{transform:rotate(225deg)}
body .sources-main .clue-song-row>.clue-time-field{padding-right:10px;border-right:1px solid var(--line);box-sizing:border-box}
body .sources-main .clue-time-field>.clue-time-input{background:transparent;border-color:transparent;font-size:14px}
body .sources-main .clue-time-field>.clue-time-input:focus{border-color:var(--gold);background:var(--input-bg,var(--search-bg))}
body .sources-main .clue-song-row>.clue-row-panel{padding:14px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
body .sources-main .clue-song-row:has(>.clue-row-time.is-active){box-shadow:inset 3px 0 0 var(--gold)}
@media(max-width:600px){body .sources-main .clue-card.clue-song-row{grid-template-columns:88px minmax(0,1fr) 32px;gap:8px;padding:9px 10px}body .sources-main .clue-row-title{font-size:16px}body .sources-main .clue-song-row>.clue-row-time{font-size:12px;padding-right:6px}}

/* Shared typography for identified and unidentified source rows. */
body .sources-main :is(.source-occurrence-title strong,.clue-row-title){font-family:inherit;font-size:17px;font-weight:700;line-height:1.45}
body .sources-main :is(.source-occurrence-time,.source-compact-song-row>.source-quick-field input,.clue-time-field>.clue-time-input){font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums;line-height:1.4}
body .sources-main :is(.source-occurrence-song small,.clue-row-summary small){font-family:inherit;font-size:12px;font-weight:400;line-height:1.5}
@media(max-width:600px){body .sources-main :is(.source-occurrence-title strong,.clue-row-title){font-size:16px}body .sources-main :is(.source-occurrence-time,.source-compact-song-row>.source-quick-field input,.clue-time-field>.clue-time-input){font-size:12px}}

/* Source-row seals fit fully inside their host even at maximum rotation. */
body .sources-main .source-occurrence-song.has-important-imprint{--imprint-size:40px;min-height:60px}
body .sources-main .source-occurrence-song.has-important-imprint>.important-song-impression{width:40px;height:40px;top:calc(50% - 20px);right:calc(26px + var(--stamp-slot,0)*42px);transform:rotate(var(--imprint-angle,-12deg))}
body .sources-main .source-occurrence-song>.important-song-impression.is-imprint-landing{animation:source-seal-appear 400ms ease-out both}
@keyframes source-seal-appear{from{opacity:0}to{opacity:var(--imprint-opacity,.26)}}

/* Keyboard entry and shared accessible hit areas. */
.skip-main-link{position:fixed;top:8px;left:8px;z-index:2147483647;padding:12px 18px;background:var(--menu-bg);color:var(--text);border:2px solid var(--gold);border-radius:8px;transform:translateY(-200%)}
.skip-main-link:focus{transform:none}
body .sources-main .clue-card.clue-song-row{grid-template-columns:112px minmax(0,1fr) 44px}
body .sources-main .clue-song-row>.clue-row-toggle,body .sources-main .source-compact-song-row>.source-row-toggle{width:44px;min-width:44px;min-height:44px}
body .sources-main .source-compact-song-row{grid-template-columns:112px minmax(0,1fr) 44px}
body :is(.favorite-button,.clear-search){min-width:44px;min-height:44px}
body :is(button,a,input,select,textarea,summary){scroll-margin-block:160px}
.pride-accessible-label{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
@media(max-width:600px){body .sources-main :is(.clue-card.clue-song-row,.source-compact-song-row){grid-template-columns:88px minmax(0,1fr) 44px}}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto!important}
 body .important-song-impression,body .important-song-impression.is-imprint-landing{animation:none!important;transition:none!important}
 body .important-song-impression.is-imprint-visible{opacity:var(--imprint-opacity,.26)}
 #ambientCanvas,.ambient-canvas,#polaroidWall{visibility:hidden!important}
}
@media(forced-colors:active){body :is(.source-row-toggle,.clue-row-toggle,.back-to-top){border:1px solid ButtonText}body :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid Highlight}}

/* Keep rating and favorite in a stable row independent of metadata widths. */
html:not([data-view="compact"]) body .song-card:not(.skeleton-card){grid-template-columns:minmax(0,1fr) auto}
html:not([data-view="compact"]) body .song-card>.card-topline>.performer-badge{grid-column:2}
html:not([data-view="compact"]) body .song-card>.song-preferences.is-card{grid-column:1 / -1;grid-row:2;justify-content:flex-start;justify-self:start;align-items:center;gap:8px;margin:2px 0 0;width:auto;max-width:100%}
html:not([data-view="compact"]) body .song-card .rating-stars{display:flex;gap:2px}
html:not([data-view="compact"]) body .song-card .rating-star{box-sizing:border-box;flex:0 0 28px;width:28px;min-width:28px;height:44px;min-height:44px;font-size:18px;line-height:1;padding:0}
html:not([data-view="compact"]) body .song-card .favorite-button{box-sizing:border-box;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0}
html:not([data-view="compact"]) body .song-card .favorite-icon{font-size:22px;line-height:1}

/* Unified source records: songs, quotes, events and clues. */
body .sources-main{--source-time-width:112px;--source-row-gap:12px;--source-row-padding:10px 12px}
body .sources-main :is(.source-occurrence-list,.source-pending-list)>.source-moment{display:grid;grid-template-columns:var(--source-time-width) minmax(0,1fr);align-items:center;gap:var(--source-row-gap);padding:var(--source-row-padding);border:1px solid var(--moment-border);border-radius:var(--ui-radius-card);background:var(--moment-bg);box-shadow:none;min-width:0}
body .sources-main :is(.source-occurrence-list,.source-pending-list)>li.source-compact-song-row{grid-template-columns:var(--source-time-width) minmax(0,1fr) 44px;gap:var(--source-row-gap);padding:var(--source-row-padding)}
body .sources-main .source-moment>.moment-copy{display:block;min-height:48px;min-width:0;height:auto;padding:4px 0;border:0;border-radius:0;background:transparent;box-shadow:none;transform:none}
body .sources-main .source-moment .moment-copy strong{font-family:inherit;font-size:17px;font-weight:700;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}
body .sources-main .source-moment .moment-copy small{font-family:inherit;font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 4px}
body .sources-main .source-moment>.source-occurrence-time{min-height:48px;padding:4px 10px 4px 0;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;transform:none;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:500;gap:4px;color:var(--muted)}
body .sources-main .source-moment>.source-occurrence-time>span{font-size:9px}
body .sources-main .source-moment:has(>.source-occurrence-time.is-active){box-shadow:inset 3px 0 0 var(--gold)}
body .sources-main .source-moment>.source-occurrence-time.is-active{color:var(--gold);font-weight:700}
body .sources-main .source-compact-song-row>.source-quick-field{width:100%;padding-right:10px}
body .sources-main .source-compact-song-row>.source-quick-field input{min-height:44px}
body .sources-main .source-compact-song-row>.source-row-more{padding:14px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
body .sources-main .source-moment .source-row-more>label:nth-child(2){grid-column:1 / -1}
body .sources-main .source-row-more select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font:inherit;color:var(--text);background:var(--menu-bg);border:1px solid var(--line-strong);border-radius:var(--ui-radius-control);padding:8px}
body .sources-main .clue-card.clue-song-row{grid-template-columns:var(--source-time-width) minmax(0,1fr) 44px;gap:var(--source-row-gap);padding:var(--source-row-padding);background:var(--surface-soft)}
body .sources-main :is(.source-row-toggle,.clue-row-toggle){border-radius:var(--ui-radius-control)}
body .sources-main :is(.source-row-toggle,.clue-row-toggle):focus-visible{outline:2px solid var(--focus);outline-offset:3px}
@media(max-width:600px){
 body .sources-main{--source-time-width:88px;--source-row-gap:8px;--source-row-padding:9px 10px}
 body .sources-main .source-moment .moment-copy strong{font-size:16px}
 body .sources-main .source-moment>.source-occurrence-time{font-size:12px;padding-right:6px}
 body .sources-main .source-compact-song-row>.source-quick-field{padding-right:6px}
 body .sources-main .source-row-more{grid-template-columns:minmax(0,1fr)}
 body .sources-main .source-row-more :is(input,textarea,select){font-size:16px}
}
@media(prefers-reduced-motion:reduce){body .sources-main :is(.source-row-toggle,.clue-row-toggle)::after{transition:none}}

/* The old negative bottom margin canceled the platform row's separation. */
body .song-dialog .important-song-summary{margin-bottom:12px}
body .song-dialog .song-header-platforms .platform-link{box-shadow:none;border-radius:var(--ui-radius-control)}
body .song-dialog .song-header-platforms .platform-link:hover{box-shadow:none}

/* Preserve the original seal artwork; give it usable space beside the copy. */
body .sources-main .source-occurrence-song.has-important-imprint{--source-seal-size:60px;--source-seal-count:1;--source-seal-edge:22px;--source-seal-step:64px;box-sizing:border-box;min-height:84px;padding-right:calc(var(--source-seal-edge) + var(--source-seal-count)*var(--source-seal-step) + 10px)}
body .sources-main .source-occurrence-song.has-multiple-imprints{--source-seal-count:2}
body .sources-main .source-occurrence-song:has(>.important-song-impression~.important-song-impression~.important-song-impression){--source-seal-count:3}
body .sources-main .source-occurrence-song.has-important-imprint>.important-song-impression{--imprint-size:var(--source-seal-size);width:var(--source-seal-size);height:var(--source-seal-size);top:calc(50% - var(--source-seal-size)/2);right:calc(var(--source-seal-edge) + var(--stamp-slot,0)*var(--source-seal-step));transform:rotate(var(--imprint-angle,-12deg))}
/* Keep the disclosure in the same slot with or without a song seal. */
body .sources-main .source-occurrence-song{position:relative}
body .sources-main .source-occurrence-song>b,
body .sources-main .source-occurrence-song.has-important-imprint>b{position:absolute;right:2px;top:50%;transform:translateY(-50%)}
body .sources-main .source-compact-song-row>.source-occurrence-song.has-important-imprint{--source-seal-edge:12px}
@media(max-width:600px){
 body .sources-main .source-occurrence-song.has-multiple-imprints{--source-seal-size:40px;--source-seal-step:44px}
 body .sources-main .source-occurrence-song:has(>.important-song-impression~.important-song-impression~.important-song-impression){--source-seal-size:32px;--source-seal-step:36px}
}

/* Central size floor overrides legacy per-row timestamp and number sizes. */
body .sources-main :is(.source-occurrence-time,.clue-row-time,.source-quick-field input,.clue-time-input){font-size:16px!important;font-weight:600!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums;line-height:1.4}
body .sources-main .source-song-number{font-size:14px!important;font-weight:500!important}
body .sources-main :is(.source-occurrence-time,.clue-row-time).is-active{font-weight:700!important}
@media(max-width:600px){
 body .sources-main{--source-time-width:104px}
 body .sources-main :is(.source-occurrence-list,.source-pending-list)>li[data-source-row-id]:not(.source-moment):not(.source-quick-row):has(>.source-occurrence-time){grid-template-columns:104px minmax(0,1fr)}
}

/* Keep native text selection in a stable scroll area, clear of sticky actions. */
body .song-editor-modal.is-paste-mode{scroll-behavior:auto;overflow-anchor:none}
body .song-editor-modal .song-paste-panel>textarea{height:clamp(220px,48dvh,520px);min-height:180px;max-height:65dvh;overflow:auto;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-gutter:stable;user-select:text;-webkit-user-select:text;cursor:text;line-height:1.65}
body .song-editor-modal.is-paste-mode .new-song-actions{position:static;margin:16px 0 0;padding:12px 0;bottom:auto}

body .report-contact-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px;border:1px solid var(--line-strong);border-radius:var(--ui-radius-panel);background:var(--menu-bg);color:var(--text)}
.report-contact-dialog::backdrop{background:rgba(0,0,0,.45)}
.report-contact-dialog h2{margin:0 0 12px;font-size:22px}
.report-contact-dialog p{line-height:1.7}
.report-contact-dialog label{display:grid;gap:6px;margin:14px 0;font-size:14px}
.report-contact-dialog :is(input,textarea){box-sizing:border-box;width:100%;min-width:0;padding:10px;min-height:44px;font:inherit;font-size:16px;color:var(--text);background:var(--search-bg);border:1px solid var(--line-strong);border-radius:var(--ui-radius-control)}
.report-contact-dialog textarea{resize:vertical;line-height:1.6}
.report-contact-actions{display:flex;flex-wrap:wrap;gap:8px}
.report-contact-actions :is(button,a){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;font:inherit;font-size:14px;border:1px solid var(--line-strong);border-radius:var(--ui-radius-control);background:var(--menu-bg);color:var(--text);text-decoration:none;cursor:pointer}

/* Moment colors also win when editor layout styles arrive after shared styles. */
body .sources-main :is(.source-occurrence-list,.source-pending-list)>li.source-moment.source-compact-song-row{background:var(--moment-bg);border-color:var(--moment-border)}

/* Source editing: visible labels and direct routes to commonly hidden actions. */
body .sources-main :is(.source-occurrence-list,.source-pending-list)>li.source-compact-song-row{grid-template-columns:var(--source-time-width,112px) minmax(0,1fr) 56px}
body .sources-main .source-compact-song-row>.source-row-toggle{width:56px;min-width:56px;min-height:44px;padding:6px;font-size:14px;border:1px solid var(--line);background:var(--menu-bg);color:var(--text)}
body .sources-main .source-compact-song-row>.source-row-toggle::after{display:none}
body .sources-main .source-main-tools>summary{min-height:44px;align-content:center;font-size:16px}
body .sources-main .source-editor-help{font-size:14px;line-height:1.7;color:var(--muted);margin:12px 0 18px}
body .sources-main .source-quick-save{gap:10px;background:var(--menu-bg)}
body .sources-main .source-editor-shortcuts{display:flex;flex-wrap:wrap;gap:6px;margin-right:auto}
body .sources-main .source-quick-save>[role=status]{flex:1 1 100%;font-size:13px;line-height:1.5;order:-1}
body .sources-main .source-quick-save :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media(max-width:600px){
 body .sources-main .source-quick-save{padding:8px;gap:6px}
 body .sources-main .source-editor-shortcuts{flex-basis:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 body .sources-main .source-editor-shortcuts button{padding-inline:4px;font-size:13px}
 body .sources-main .source-quick-save>.source-save-primary{flex:1}
}

/* Source titles remain static and readable in both viewing and editing modes. */
body .sources-main .source-occurrence-title{display:flex;flex-wrap:wrap;align-items:baseline;min-width:0}
body .sources-main .source-occurrence-song:not(.moment-copy):not(.clue-row-summary) strong{white-space:normal!important;overflow:visible!important;text-overflow:clip;overflow-wrap:anywhere;max-width:100%;min-width:0;transform:none}
body .sources-main .source-occurrence-title>strong{flex:0 1 auto}
body .sources-main .source-occurrence-song>span:not(.important-song-impression){min-width:0}
body .sources-main .source-occurrence-song>span>small{display:block;width:100%;max-width:none;white-space:normal;overflow:visible;line-height:1.6;word-break:normal}
body .sources-main .source-occurrence-title>.source-title-artist{flex-basis:100%}
body .sources-main .source-occurrence-title>.performance-stamps{max-width:100%;flex-wrap:wrap}
body .sources-main .source-occurrence-song strong.pride-song-title{display:inline-block;transform:none;animation:none}
@supports ((background-clip:text) or (-webkit-background-clip:text)){
body .sources-main .source-occurrence-song strong.pride-song-title{background-color:#8243ac}
html[data-theme="night"] body .sources-main .source-occurrence-song strong.pride-song-title{background-color:#d6a4ff}
}
@media(max-width:600px){
 body .sources-main .source-occurrence-song.has-important-imprint{padding-right:18px;padding-bottom:78px;--source-seal-edge:12px}
 body .sources-main .source-occurrence-song.has-important-imprint>.important-song-impression{top:auto;bottom:8px}
}
@media(forced-colors:active){body .sources-main .source-occurrence-song strong.pride-song-title{background:none;color:CanvasText;-webkit-text-fill-color:CanvasText}}

/* Search criteria and actionable empty results share existing control styling. */
.catalog-filter-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px;min-width:0}
.catalog-filter-actions[hidden]{display:none}
.catalog-filter-actions>p{flex-basis:100%;margin:0 0 4px}
body .catalog-filter-actions>button{min-height:44px;max-width:100%;padding:8px 12px;border:1px solid var(--line-strong);border-radius:var(--ui-radius-control);background:var(--menu-bg);color:var(--text);font:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
body .catalog-filter-actions>button:hover{border-color:var(--gold);background:linear-gradient(var(--gold-soft),var(--gold-soft)),var(--menu-bg)}

/* Optional floating tools must fit beside Back to top and yield to text entry. */
body .music-memory-actions{flex-wrap:wrap;max-width:calc(100vw - 88px);row-gap:6px}
body .music-memory-actions>button{max-width:100%;box-sizing:border-box}
html.has-soft-keyboard body :is(.music-memory-actions,.recent-notification-button,.back-to-top){visibility:hidden;pointer-events:none}
body .editor-leave-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid var(--line-strong);border-radius:16px;background:var(--menu-bg);color:var(--text)}
body .editor-leave-dialog::backdrop{background:#0008}
body .editor-leave-dialog button,body #recordTrashUndo button{min-height:44px;padding:8px 12px;margin:4px;border:1px solid var(--line-strong);border-radius:10px;background:var(--menu-bg);color:var(--text);font:inherit;cursor:pointer}
body .editor-leave-dialog h2{margin-top:0;font-size:20px}
body .editor-leave-dialog p{line-height:1.65}
body .editor-leave-failure{color:var(--danger,#b34848)}
body #recordTrashUndo{position:fixed;z-index:180;bottom:calc(max(var(--player-control-clearance,0px),env(safe-area-inset-bottom),16px) + 64px);left:12px;box-sizing:border-box;max-width:calc(100vw - 24px);padding:10px 14px;border:1px solid var(--line-strong);border-radius:12px;background:var(--menu-bg);color:var(--text);box-shadow:0 4px 18px #0002;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
@media(prefers-reduced-motion:reduce){.ui-target-highlight{animation:none;outline:2px solid var(--gold);outline-offset:3px}}

/* Editing preserves the public timeline's horizontal card structure. */
body .sources-main #sourceTimeline :is(.source-occurrence-list,.source-pending-list)>li.source-compact-song-row{grid-template-columns:var(--source-time-width) minmax(0,1fr) 32px;gap:var(--source-row-gap);padding:var(--source-row-padding);align-items:center}
body .sources-main #sourceTimeline .source-compact-song-row>.source-quick-field{grid-column:1;grid-row:1;width:100%;padding:4px 10px 4px 0;border-right:1px solid var(--line);box-sizing:border-box}
body .sources-main #sourceTimeline .source-compact-song-row>:is(.source-occurrence-song,.moment-copy){grid-column:2;grid-row:1;min-width:0}
body .sources-main #sourceTimeline .source-compact-song-row>.source-row-toggle{grid-column:3;grid-row:1;width:32px;min-width:32px;min-height:44px;padding:0;border:0;background:transparent;color:var(--muted);font-size:0;box-shadow:none}
body .sources-main #sourceTimeline .source-compact-song-row>.source-row-toggle::after{content:'';display:block;width:7px;height:7px;margin:0 auto 4px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
body .sources-main #sourceTimeline .source-compact-song-row>.source-row-toggle[aria-expanded=true]::after{transform:rotate(225deg)}
body .sources-main #sourceTimeline .source-compact-song-row>.source-row-more{grid-column:1/-1;grid-row:2}
body .sources-main #sourceTimeline :is(.source-quick-field,.clue-time-field)>input{width:100%;box-sizing:border-box;min-height:44px;padding:4px 0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);text-align:center;box-shadow:none}
body .sources-main #sourceTimeline :is(.source-quick-field,.clue-time-field)>input:focus{border-color:var(--gold);background:var(--search-bg);outline:2px solid var(--gold);outline-offset:2px}
body .sources-main #sourceTimeline .clue-song-row>.clue-time-field{padding:4px 10px 4px 0;border-right:1px solid var(--line)}
@media(max-width:600px){body .sources-main #sourceTimeline :is(.source-compact-song-row>.source-quick-field,.clue-song-row>.clue-time-field){padding-right:6px}}

/* One timestamp treatment for public playback and inline editing. */
body .sources-main #sourceTimeline :is(.source-occurrence-time,.clue-row-time,.source-occurrence-time time,.clue-row-time time,.source-quick-field input,.clue-time-input){font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important;font-size:16px!important;font-weight:500!important;font-variant-numeric:tabular-nums!important;letter-spacing:0!important;line-height:1.4!important}
body .sources-main #sourceTimeline :is(.source-occurrence-time,.clue-row-time){align-items:center;justify-content:center;gap:4px}
body .sources-main #sourceTimeline :is(.source-occurrence-time,.clue-row-time)>span{display:inline-block;flex:0 0 auto;width:0;height:0;box-sizing:content-box;padding:0;margin:0;border:0;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:6px solid currentColor;font-size:0!important;line-height:0;vertical-align:middle}
body .sources-main #sourceTimeline :is(.source-occurrence-time,.clue-row-time).is-active{color:var(--gold);font-weight:700!important}
