/* Apple Design: restrained materials, immediate feedback, consistent controls. */
.apple-room{--glass:rgba(255,253,247,.88);--sheet-ink:#283022;--sheet-muted:#666b5c;--sheet-card:#fffdf7;--sheet-line:#ded7c7;transition:background-color .35s,color .35s}
.apple-room.is-night{--glass:rgba(32,41,34,.94);--sheet-ink:#f2eee4;--sheet-muted:#c1c6b9;--sheet-card:#303a30;--sheet-line:#52604c}
.apple-room .apple-toolbar{position:relative;top:auto;z-index:1;display:flex;align-items:center;gap:5px;flex-wrap:wrap;width:100%;max-width:100%;box-sizing:border-box;padding:7px!important;margin:18px 0 0;border:1px solid rgba(160,148,119,.28);border-radius:22px;background:var(--glass);box-shadow:0 8px 30px #26301d12,inset 0 1px #ffffff75;backdrop-filter:blur(22px) saturate(130%);-webkit-backdrop-filter:blur(22px) saturate(130%);overflow:visible}
body.apple-room .apple-toolbar{margin-left:clamp(20px,4vw,64px);max-width:calc(100% - clamp(40px,8vw,128px))}
.apple-room .apple-toolbar a,.apple-room .apple-toolbar button{flex-shrink:0;white-space:nowrap;border:0!important;background:transparent!important;color:var(--sheet-ink);border-radius:15px!important;padding:11px 14px!important;min-height:44px;font:500 13px/1.2 system-ui,sans-serif!important;transition:background-color .15s}
.apple-room .apple-toolbar .selected{background:#35472f!important;color:#fff!important;box-shadow:0 3px 9px #14200f18}
.apple-room .apple-toolbar a:hover,.apple-room .apple-toolbar button:hover{background:#87957520!important}
.apple-room .apple-toolbar button:active{background:#87957535!important}
.apple-invite button:active,.apple-sheet button:active{transform:scale(.97)}
.apple-room :is(button,a):focus-visible{outline:3px solid #a98348;outline-offset:3px}
.apple-invite{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:23px 26px;margin:24px 0;background:var(--glass);border:1px solid var(--sheet-line);border-radius:24px;color:var(--sheet-ink)}
body.apple-room .apple-invite{margin:24px clamp(20px,4vw,64px)}
.apple-invite .eyebrow{font:600 10px system-ui,sans-serif;letter-spacing:.15em;text-transform:uppercase;color:var(--sheet-muted)}
.apple-invite p{margin:7px 0 0;font:400 clamp(21px,2.5vw,28px)/1.2 Georgia,serif}
.apple-invite button{border:0;border-radius:16px;background:#35472f;color:white;padding:15px 20px;min-height:48px;font:600 14px system-ui,sans-serif;cursor:pointer;white-space:nowrap}.apple-invite button span{margin-left:12px}
.apple-sheet{position:fixed;inset:auto 0 0;width:min(940px,100%);max-width:100%;max-height:85dvh;margin:0 auto;padding:0;border:1px solid var(--sheet-line);border-bottom:0;border-radius:30px 30px 0 0;background:var(--glass);color:var(--sheet-ink);box-shadow:0 -18px 80px #111a1133;backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);overflow-y:auto;overscroll-behavior:contain;font-family:system-ui,sans-serif}
.apple-sheet::backdrop{background:#14201650;backdrop-filter:blur(3px)}
.apple-sheet-handle{position:sticky;top:0;z-index:5;padding:12px 24px 18px;background:var(--glass);backdrop-filter:blur(24px);border-bottom:1px solid var(--sheet-line);touch-action:none;user-select:none;cursor:grab}
.apple-grabber{display:block;width:36px;height:5px;border-radius:8px;background:var(--sheet-muted);opacity:.35;margin:0 auto 17px}
.apple-sheet-handle>div{display:flex;justify-content:space-between;align-items:center;gap:14px}.apple-sheet-handle small{font:500 11px system-ui,sans-serif;color:var(--sheet-muted)}.apple-sheet-handle h2{font:600 clamp(20px,3vw,27px)/1.2 system-ui,sans-serif;letter-spacing:-.025em;margin:6px 0 0}
.apple-sheet-handle button{display:grid;place-items:center;min-width:44px;height:44px;border:0;border-radius:50%;background:#82907522;color:var(--sheet-ink);font:28px system-ui,sans-serif;cursor:pointer}
.apple-room .apple-sheet .action-panel,.apple-room .apple-sheet .gifts{padding:20px 24px 30px;margin:0;background:transparent;border:0}
.apple-sheet .section-head{margin:0 0 18px}.apple-sheet .section-head>div{display:none}.apple-sheet .section-head>p{max-width:none!important;font:13px/1.6 system-ui,sans-serif!important;color:var(--sheet-muted);margin:0}
.apple-sheet .room-gift-grid,.apple-sheet .gift-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.apple-room .apple-sheet .room-gift-grid button,.apple-room .apple-sheet .gift-card{min-height:160px;margin:0;padding:12px 9px;gap:7px;border:1px solid var(--sheet-line);border-radius:20px;background:var(--sheet-card);color:var(--sheet-ink);box-shadow:0 2px 8px #15231006;transition:transform .1s,background-color .15s}
.apple-sheet .room-gift-grid img,.apple-sheet .room-gift-grid b,.apple-sheet .thumb{height:86px!important;min-height:0;display:grid;place-items:center}.apple-sheet .thumb img{height:86px;max-width:100%;object-fit:contain}.apple-sheet .room-gift-grid span,.apple-sheet .gift-title{font:600 13px/1.3 system-ui,sans-serif}.apple-sheet .gift-action,.apple-sheet .room-gift-grid small{font:11px/1.3 system-ui,sans-serif;color:var(--sheet-muted)}
.apple-sheet .gift-card.is-active{border-color:#7f9667!important;background:#81986918!important}.apple-sheet .actions{margin-top:20px}.apple-sheet .actions p{font:12px/1.5 system-ui,sans-serif;color:var(--sheet-muted)}
.apple-room .room-music{scroll-margin-top:100px;border-radius:24px}.apple-room .scene-note,.apple-room .scene-foot{color:var(--sheet-muted)}
@media(max-width:650px){.apple-room .apple-toolbar{top:7px;border-radius:19px;margin-top:10px}.apple-room .apple-toolbar a,.apple-room .apple-toolbar button{padding:10px 12px!important;font-size:12px!important}body.apple-room .apple-toolbar{margin-left:16px;max-width:calc(100% - 32px)}.apple-invite{padding:18px;gap:15px;align-items:flex-start;flex-direction:column;border-radius:20px}.apple-invite button{width:100%;text-align:left;display:flex;justify-content:space-between}body.apple-room .apple-invite{margin:20px 16px}.apple-sheet{max-height:82dvh;border-radius:25px 25px 0 0}.apple-sheet-handle{padding:10px 18px 14px}.apple-room .apple-sheet .action-panel,.apple-room .apple-sheet .gifts{padding:16px 16px calc(24px + env(safe-area-inset-bottom))}.apple-sheet .room-gift-grid,.apple-sheet .gift-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.apple-room,.apple-room *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){.apple-room{--glass:#fffdf7}.apple-room.is-night{--glass:#202922}.apple-toolbar,.apple-sheet,.apple-sheet-handle{backdrop-filter:none!important}}
/* Isolated sheet layout: the header cannot shrink or overlap the scroll body. */
.apple-room dialog.apple-sheet{box-sizing:border-box;overflow:hidden;width:min(940px,100vw);max-width:100vw;max-height:85dvh;color:var(--sheet-ink);background:var(--sheet-card)}
.apple-room dialog.apple-sheet[open]{display:flex;flex-direction:column}
.apple-room .apple-sheet>.apple-sheet-handle{position:relative;inset:auto;display:block;flex:0 0 auto;width:100%;min-width:0;height:auto;min-height:0;max-height:none;overflow:visible;float:none;transform:none;background:var(--sheet-card);opacity:1;padding:12px 24px 18px;margin:0;color:var(--sheet-ink);z-index:2}
.apple-room .apple-sheet .apple-sheet-title-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:16px;width:100%;min-width:0}
.apple-room .apple-sheet .apple-sheet-title-copy{display:block;width:auto;min-width:0;max-width:none}
.apple-room .apple-sheet .apple-sheet-title-copy small{display:block;font:500 11px/1.4 system-ui,sans-serif;letter-spacing:0;white-space:normal;color:var(--sheet-muted)}
.apple-room .apple-sheet .apple-sheet-title-copy h2{display:block;position:static;width:auto;min-width:0;margin:5px 0 0;padding:0;font:600 clamp(20px,3vw,27px)/1.2 system-ui,sans-serif;letter-spacing:-.025em;overflow-wrap:normal;word-break:normal;color:var(--sheet-ink)}
.apple-room .apple-sheet [data-close-room-gifts]{position:static;display:grid;place-items:center;width:44px;min-width:44px;height:44px;padding:0;margin:0;flex:none;color:var(--sheet-ink)}
.apple-room .apple-sheet>.action-panel,.apple-room .apple-sheet>.gifts{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;width:100%;box-sizing:border-box;padding:20px 24px calc(28px + env(safe-area-inset-bottom));margin:0}
.apple-room .apple-sheet .section-head{display:block;min-width:0}.apple-room .apple-sheet .section-head>p{white-space:normal;overflow-wrap:anywhere;max-width:100%!important;margin:0!important}
.apple-room .apple-sheet .gift-card{min-width:0}.apple-room .apple-sheet .gift-title{min-height:0}.apple-room .apple-sheet .gift-action{letter-spacing:0;overflow-wrap:anywhere}.apple-room .apple-sheet .actions{display:block}.apple-room .apple-sheet .actions p{margin-top:14px}
/* Secondary sections follow the same calm, rounded visual language. */
.apple-room :is(.room-music,.family-songs,.family-recordings,.queue-card,.comment,.keeper-upload,.media-card){background:var(--sheet-card);border:1px solid var(--sheet-line);border-radius:24px;box-shadow:0 6px 24px #25301a06;color:var(--sheet-ink)}
.apple-room :is(.queue-section,.words-section){padding:28px 0!important}
.apple-room :is(.queue-title h3,.family-recordings h2,.room-music h2,.keeper-upload h2){font:600 22px/1.3 system-ui,sans-serif;letter-spacing:-.025em}
.apple-room :is(.section-head h2){font:500 clamp(25px,3vw,36px)/1.2 system-ui,sans-serif!important;letter-spacing:-.03em}
.apple-room :is(.slot,.waiting,.comment,.song-list,.room-music label,.room-music p,.family-recordings,.keeper-upload,.media-info,.keeper-footer){font-family:system-ui,sans-serif}
.apple-room .song-list button{border:1px solid var(--sheet-line);border-radius:17px;padding:17px;background:var(--sheet-card);color:var(--sheet-ink);min-width:0;transition:transform .1s,background-color .15s}.apple-room .song-list button.selected{background:#80916d18;border-color:#80916d}.apple-room .song-list button:active{transform:scale(.98)}.apple-room .song-list button>span:nth-child(2){min-width:0}.apple-room .song-list em{color:var(--sheet-muted)}
.apple-room .room-music audio,.apple-room .family-recordings audio{width:min(100%,320px);min-width:0}.apple-room .family-recordings>div{padding:14px 0;border-top:1px solid var(--sheet-line)}
.apple-room .comment-form input,.apple-room .comment-form textarea{border-radius:16px;min-height:48px;font:15px/1.5 system-ui,sans-serif}.apple-room .comment-meta{flex-wrap:wrap}.apple-room .comment p{overflow-wrap:anywhere}.apple-room .comment-reply{margin-left:12px}
.apple-room :is(.primary,.soft,.cabinet-button){border-radius:15px;min-height:46px;font:600 13px/1.4 system-ui,sans-serif;padding:12px 17px}.apple-room .primary{background:#35472f;border-color:#35472f;color:white}.apple-room .soft{background:#82907516;color:var(--sheet-ink);border-color:var(--sheet-line)}
.apple-keeper{max-width:1400px!important;min-height:100vh;margin:0 auto;padding:28px clamp(16px,4vw,50px) 50px!important;background:#f6f2e9;color:var(--sheet-ink);--ink:#283022;--muted:#666b5c;--line:#ded7c7}
body:has(.apple-keeper){background:#f6f2e9}.apple-keeper h1{font:500 clamp(34px,5vw,56px)/1.1 system-ui,sans-serif;letter-spacing:-.045em}.apple-keeper .keeper-top{position:sticky;top:12px;z-index:5;gap:12px;padding:8px;background:var(--glass);border:1px solid var(--sheet-line);backdrop-filter:blur(20px);border-radius:20px}.apple-keeper .keeper-top a{display:flex;align-items:center;min-height:44px;padding:8px 14px;text-decoration:none;color:var(--sheet-ink);font:500 13px system-ui,sans-serif}
.apple-keeper .keeper-lead,.apple-keeper .keeper-count{font:15px/1.6 system-ui,sans-serif;color:var(--sheet-muted)}.apple-keeper .media-filters button{background:var(--sheet-card);color:var(--sheet-ink);border:1px solid var(--sheet-line);font:500 13px system-ui,sans-serif;min-height:44px;cursor:pointer}.apple-keeper .media-filters .selected{background:#35472f;color:#fff;border-color:#35472f}.apple-keeper .media-info h3{font:600 16px/1.4 system-ui,sans-serif}.apple-keeper .media-info a,.apple-keeper .song-player a{color:#66502c}.apple-keeper .media-preview{background:#e9e8df}.apple-keeper .keeper-notice{background:#e9efdf;color:#283022;border-color:#a7b79a;border-radius:16px}
@media(max-width:650px){.apple-room dialog.apple-sheet{width:100%;max-height:85dvh}.apple-room .apple-sheet>.apple-sheet-handle{padding:10px 16px 16px}.apple-room .apple-sheet .apple-sheet-title-row{gap:12px}.apple-room .apple-sheet .apple-sheet-title-copy h2{font-size:21px}.apple-room .apple-sheet>.action-panel,.apple-room .apple-sheet>.gifts{padding:16px 14px calc(24px + env(safe-area-inset-bottom))}.apple-room .queue-grid{grid-template-columns:1fr}.apple-room .section-head{display:block}.apple-room .section-head>p{margin-top:12px;max-width:none}.apple-room .song-list button{flex-wrap:wrap;gap:10px}.apple-room .song-list em{margin-left:26px;width:100%}.apple-room .room-music,.apple-room .family-songs,.apple-room .family-recordings{padding:18px;border-radius:20px}.apple-room .family-recordings audio{width:100%}.apple-room .family-recordings>div{display:grid;gap:10px}.apple-room .comment-form{grid-template-columns:1fr}.apple-room .comment-form button{min-height:46px}.apple-keeper .keeper-upload{gap:18px;min-width:0}.apple-keeper .keeper-upload>div{min-width:0}.apple-keeper .keeper-top a{padding:8px;font-size:12px}.apple-keeper .media-grid{grid-template-columns:1fr}.apple-keeper .keeper-size-controls{min-width:0;width:100%}}

/* Stable navigation: all destinations stay visible and remain in document flow. */
html{scrollbar-gutter:stable}
.apple-room .apple-toolbar{position:relative;top:auto;transform:none;animation:none;flex-wrap:wrap;overflow:visible;align-items:stretch}
.apple-room .apple-toolbar a,.apple-room .apple-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-width:0;flex:1 1 auto;transform:none!important;text-align:center;white-space:normal;overflow-wrap:anywhere}
.apple-room .apple-toolbar a:focus-visible,.apple-room .apple-toolbar button:focus-visible{outline:2px solid #687e52;outline-offset:2px}
.room-share{box-sizing:border-box;width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #ded7c7;border-radius:28px;padding:26px;background:var(--sheet-card,#fffdf7);color:var(--sheet-ink,#283022);box-shadow:0 24px 80px #101a1640;font:15px/1.5 system-ui,sans-serif}
.room-share::backdrop{background:#17201a70;backdrop-filter:blur(5px)}
.room-share-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.room-share h2{font:600 24px/1.2 system-ui,sans-serif;letter-spacing:-.025em;margin:0}.room-share p{margin:14px 0;color:inherit}.room-share .share-close{width:44px;height:44px;flex:0 0 44px;border:0;border-radius:50%;background:#85957820;color:inherit;font-size:26px;cursor:pointer}
.room-share .share-qr{display:block;width:220px;max-width:100%;height:auto;margin:20px auto;border-radius:12px;background:white}
.room-share .share-url{display:block;width:100%;box-sizing:border-box;padding:12px;border:1px solid #b8bcae;border-radius:12px;font:13px/1.5 system-ui,sans-serif;background:#fff;color:#283022}
.room-share-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.room-share-actions button,.room-share-download{display:block;padding:12px;border:1px solid #c4cbbb;border-radius:13px;background:#eef1e8;color:#283022;font:500 14px/1.4 system-ui,sans-serif;text-align:center;text-decoration:none;cursor:pointer}.room-share-actions button:first-child{background:#35472f;color:white;border-color:#35472f}.room-share-download{margin-top:8px;background:transparent;color:inherit}.room-share-status{font-size:13px;min-height:20px}
@media(max-width:650px){.apple-room .apple-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.apple-room .apple-toolbar>a,.apple-room .apple-toolbar>button{width:100%;box-sizing:border-box;min-height:44px}.apple-room .apple-toolbar> :last-child{grid-column:1/-1}.room-share{padding:20px;border-radius:22px}.room-share h2{font-size:21px}}
