.memory-hud-intro{position:absolute;z-index:3;inset:0;pointer-events:none;font-family:"Courier New",Courier,monospace;color:#f4fbfa}
.memory-hud-intro-protection{position:absolute;left:0;right:0;bottom:0;height:min(32%,272px);background:linear-gradient(to bottom,transparent 0%,rgb(16 25 28/.24) 42%,rgb(16 25 28/.76) 100%)}
.memory-hud-intro-copy{position:absolute;left:max(20px,env(safe-area-inset-left));right:82px;bottom:max(82px,calc(env(safe-area-inset-bottom) + 64px));max-width:30rem;text-shadow:0 1px 2px rgb(0 0 0/.72)}
.memory-hud-intro-copy p,.memory-hud-intro-copy h1{margin:.18em 0}.memory-hud-intro-copy>p{font-size:12px;line-height:1.35;letter-spacing:.065em}.memory-hud-intro-copy h1{font:700 26px/.98 "Courier New",Courier,monospace;letter-spacing:-.04em;text-wrap:pretty}.memory-hud-intro-copy .location{display:flex;align-items:center;gap:7px;color:#fff8ec}
.memory-info{position:absolute;z-index:4;left:max(18px,env(safe-area-inset-left));bottom:max(22px,env(safe-area-inset-bottom));width:48px;height:48px;padding:0;border:1px solid #b7c7c788;border-radius:999px;background:#06101299;color:#f4fbfa;font:400 18px/1 "Courier New",Courier,monospace}
.memory-detail{position:absolute;z-index:6;inset:0;display:flex;align-items:flex-end;background:transparent;font-family:"Courier New",Courier,monospace;color:#f4fbfa}
.memory-detail[hidden]{display:none!important}.memory-sheet{display:flex;flex-direction:column;width:100%;max-height:min(72%,620px);overflow:hidden;border-radius:22px 22px 0 0;background:rgb(7 16 18/.86);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 -1px 0 #61717488}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.memory-sheet{background:rgb(7 16 18/.94)}}
.memory-sheet header{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:1fr 48px;align-items:center;min-height:68px;padding:14px max(20px,env(safe-area-inset-right)) 6px max(20px,env(safe-area-inset-left));background:rgb(7 16 18/.9)}.memory-sheet header p{margin:0;color:#a5b4b6;font-size:11px;letter-spacing:.1em}.memory-sheet-handle{position:absolute;top:7px;left:calc(50% - 18px);width:36px;height:4px;border-radius:999px;background:#718083}.memory-sheet header button{width:48px;height:48px;padding:0;border:1px solid #526165;border-radius:999px;background:transparent;color:#f4fbfa;font:22px/1 "Courier New",Courier,monospace}
.memory-sheet-content{overflow:auto;padding:4px max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));overscroll-behavior:contain}.memory-sheet-content h1{margin:8px 0 10px;font:700 29px/.98 "Courier New",Courier,monospace;letter-spacing:-.04em}.memory-sheet-content>p{margin:0 0 18px;color:#e6eff0;font-size:13px;line-height:1.45}.memory-sheet dl{display:grid;gap:12px;margin:0}.memory-sheet dl div{display:grid;grid-template-columns:minmax(7rem,.7fr) minmax(0,1.3fr);gap:12px;border-top:1px solid #52616566;padding-top:10px}.memory-sheet dt{color:#a5b4b6;font-size:11px;line-height:1.4}.memory-sheet dd{margin:0;overflow-wrap:anywhere;font-size:12px;line-height:1.4}
[data-text="200"] .memory-hud-intro-copy{right:72px}[data-text="200"] .memory-hud-intro-copy h1{font-size:32px}[data-text="200"] .memory-hud-intro-copy>p{font-size:15px}[data-text="200"] .memory-sheet-content h1{font-size:38px}[data-text="200"] .memory-sheet-content>p,[data-text="200"] .memory-sheet dt,[data-text="200"] .memory-sheet dd,[data-text="200"] .memory-sheet header p{font-size:20px}[data-text="200"] .memory-sheet dl div{grid-template-columns:1fr}
@media (min-width:430px) and (orientation:portrait){.memory-hud-intro-copy h1{font-size:29px}}
@media (orientation:landscape) and (max-height:430px){.memory-hud-intro-protection{height:min(54%,184px)}.memory-hud-intro-copy{right:auto;width:56%;bottom:max(70px,calc(env(safe-area-inset-bottom) + 58px))}.memory-hud-intro-copy h1{font-size:26px}.memory-sheet{max-height:calc(100% - env(safe-area-inset-top) - 12px)}}
@media (prefers-reduced-motion:reduce){.memory-hud-intro,.memory-info,.memory-sheet{transition-duration:0ms!important}}
#exit-player{width:44px;min-width:44px;max-width:44px;height:44px;padding:0}
.memory-hud-intro{animation:memory-hud-intro 2500ms cubic-bezier(.2,0,0,1) both}.memory-info,.memory-sheet{transition:opacity 160ms cubic-bezier(.2,0,0,1),transform 160ms cubic-bezier(.2,0,0,1)}
@keyframes memory-hud-intro{0%{opacity:0}5.333%,94.666%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){.memory-hud-intro{animation:none!important}}

.unified-memory-player{color:#f4fbfa;font-family:'Courier New',Courier,monospace;overflow:hidden;background:#030708}
.unified-memory-player .memory-segments{position:absolute;z-index:5;top:max(8px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:calc(max(18px,env(safe-area-inset-right)) + 56px);display:flex;gap:4px}
.unified-memory-player .memory-segment{appearance:none;flex:1;min-width:0;border:0;padding:0;min-height:44px;background:none;color:#61f3ff}
.unified-memory-player .segment-track{display:block;height:2.5px;border-radius:1px;background:#24525a;overflow:hidden}
.unified-memory-player .segment-fill{display:block;height:100%;background:#61f3ff;transform:scaleX(var(--progress,0));transform-origin:left}
.unified-memory-player .memory-close{position:absolute;z-index:8;top:max(8px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));width:44px;height:44px;min-width:44px;padding:0;border:1px solid #79bdc5;border-radius:50%;background:#061012d9;color:#f4fbfa;font-size:22px}
.unified-memory-player .memory-info{border-color:#79bdc5;color:#cbf7f8;background:rgb(7 25 29/.9)}
.unified-memory-player .memory-share-open{left:calc(max(18px,env(safe-area-inset-left)) + 58px);display:grid;place-items:center}
.unified-memory-player .memory-share-open[hidden],.unified-memory-player .memory-info[hidden],.unified-memory-player .memory-hud-intro[hidden]{display:none!important}
.unified-memory-player .memory-detail{padding-top:calc(max(8px,env(safe-area-inset-top)) + 56px)}
.unified-memory-player .memory-hud-intro-copy{background:none;padding:0;border-radius:0}
#app.you-player.unified-memory-player{padding:0;height:100dvh;display:block;position:relative;overflow:hidden}
.you-player-background,.unified-memory-player .you-memory-frame,.you-image-layer{position:absolute;inset:0;overflow:hidden;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.you-image-layer{background:#030708;will-change:transform}
.unified-memory-player .you-image-layer img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.unified-memory-player .you-player-status{position:absolute;z-index:7;left:20px;right:20px;bottom:88px;text-align:center;font:12px/1.5 'Courier New',monospace;background:#071014ed;border-radius:8px;padding:8px}
.unified-memory-player .you-player-status:empty{display:none}
.device:has(.you-player){max-width:none}
@media(prefers-reduced-motion:reduce){.unified-memory-player .memory-hud-intro{animation:none!important}}

#player.unified-memory-player .memory-hud-intro-copy{background:none;border-radius:0;padding:0}

.unified-memory-player>.warning{position:absolute;z-index:7;left:20px;right:20px;bottom:88px;max-height:84px;overflow:auto;background:#071014ed;border-radius:8px;padding:8px;font-size:12px}.unified-memory-player>.warning:empty{display:none}

.memory-material-backdrop{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;filter:blur(8px);transform:scale(1.04)}
.saved-art-layer>.absence-root,.saved-art-layer>.oglinda-visual{z-index:1}
.unified-memory-player .you-image-layer .you-photo-backdrop{object-fit:cover;filter:blur(32px) brightness(.48);transform:scale(1.12);opacity:1}
.unified-memory-player .memory-segments{filter:drop-shadow(0 1px 2px #0009)}

/* Oglinda only: continuous clean paper, without the historical rectangular page shadow. */
/* Current Book MP4 only; this identity also survives the frozen transition. */
.saved-art-layer[data-book-progress-identity="absence"]{background:#e7e6db}
.saved-art-layer[data-memory="oglinda"]{background:#eeeae1}
.saved-art-layer[data-memory="oglinda"]>.memory-material-backdrop{filter:none;transform:none}
.saved-art-layer[data-memory="oglinda"] .oglinda-paper{box-shadow:none!important}
.saved-art-layer[data-memory="oglinda"]::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:radial-gradient(ellipse at 50% 45%,transparent 50%,rgb(20 18 10/.025) 100%)}

/* Sixth Step uses the same clean paper as its authored replay stage, without sampling ink. */
.saved-art-layer[data-memory="sixth"]{background:#ece8df}
.saved-art-layer[data-memory="sixth"]>.memory-material-backdrop{filter:none;transform:none}

/* More Than a Sign: extend its exact authored cool paper gradient, never animated ink. */
.saved-art-layer[data-memory="sign"]{background:#f0f2f2}
.saved-art-layer[data-memory="sign"]>.memory-material-backdrop{filter:none;transform:none}

.saved-art-layer[data-memory="sign"]>[data-saved-provider="sign"]{background:transparent}

/* Metamorphosis follows its own verified human/robot paper pair and authored blend. */
.saved-art-layer[data-memory="metamorphosis"]{background:#ece8df}
.saved-art-layer[data-memory="metamorphosis"]>.memory-material-backdrop{filter:none;transform:none}
.saved-art-layer[data-memory="metamorphosis"]>[data-saved-provider="metamorphosis"]{background:transparent}

/* The Room Within: extend source paper estimated from the scene's neutral blank margin. */
.saved-art-layer[data-memory="jonah"]{background:#f0f2f2}
.saved-art-layer[data-memory="jonah"]>.memory-material-backdrop{filter:none;transform:none}
.saved-art-layer[data-memory="jonah"]>[data-saved-provider="jonah"]{background:transparent}

/* Before the First Page: quiet neutral surround; keep the complete painting. */
.saved-art-layer[data-memory="firstpage"]{background:#e5e4e0}
.saved-art-layer[data-memory="firstpage"]>.memory-material-backdrop{filter:none;transform:none}
.saved-art-layer[data-memory="firstpage"]>[data-saved-provider="firstpage"]{background:transparent}

.memory-delete{display:block;width:100%;margin-top:24px;min-height:48px;border:1px solid #c78078;border-radius:8px;background:transparent;color:#ffd0c8;font:14px Courier New,monospace}
.unified-memory-player .you-image-layer.fullscreen-photo img{object-fit:cover}

/* Keep transient controls entirely within the center tap zone. */
#player.unified-memory-player .memory-info,.unified-memory-player .memory-info{left:calc(50% - 53px)}
#player.unified-memory-player .memory-share-open,.unified-memory-player .memory-share-open{left:calc(50% + 5px)}

[data-location-tone="ink"] .memory-hud-intro-copy .location{color:#10191c;text-shadow:none}
[data-location-tone="ink"] .memory-hud-intro-copy .location i{border-color:currentColor}

.unified-memory-player .memory-segments[hidden]{display:none!important}
#player.unified-memory-player .memory-share-open:disabled{opacity:1;filter:none}
.you-permission-toggle{display:flex;align-items:center;gap:10px;min-height:44px;font:12px Courier New,monospace;color:#c9e8e9}.you-permission-toggle input{width:22px;height:22px;accent-color:#61f3ff}

.unified-memory-player .memory-close[hidden]{display:none!important}
/* The full-width intro scrim pulsed on every title restart. Keep contrast local to text. */
.unified-memory-player .memory-hud-intro-protection{display:none}
.unified-memory-player .memory-hud-intro-copy{text-shadow:0 1px 3px #000,0 1px 10px #000b}
.unified-memory-player[data-location-tone="ink"] .location{text-shadow:none}
.you-saved-badge{position:absolute;z-index:4;right:max(18px,env(safe-area-inset-right));bottom:max(26px,env(safe-area-inset-bottom));padding:6px 8px;border:1px solid #79bdc5;background:#07191de6;color:#d4ffff;font:10px/1.3 Courier New,monospace;pointer-events:none}.you-saved-badge[hidden]{display:none!important}
/* Character and location metadata share the same adaptive contrast. */
.unified-memory-player .memory-hud-intro-copy>p:first-child{color:#fff8ec}
.unified-memory-player[data-location-tone="ink"] .memory-hud-intro-copy>p:first-child{color:#10191c;text-shadow:none}

/* Shared Memory sheet: same material and rhythm as Settings. */
.memory-detail[data-memory-sheet]{background:#0004}
.memory-detail[data-memory-sheet] .memory-sheet{max-height:min(86%,680px);background:#0a171b;border-radius:24px 24px 0 0;box-shadow:0 -1px 0 #7bb0b24d;backdrop-filter:none;-webkit-backdrop-filter:none}
.memory-detail[data-memory-sheet] .memory-sheet header{background:#0a171b;padding:20px 24px 4px;min-height:70px;grid-template-columns:1fr 44px}
.memory-detail[data-memory-sheet] .memory-sheet header p{text-transform:uppercase;color:#96b3b6;font:11px/1.4 'Courier New',monospace;letter-spacing:1.6px}
.memory-detail[data-memory-sheet] .memory-sheet header button{width:44px;height:44px;border:0;color:#a3d5d4;display:grid;place-items:center}
.memory-detail[data-memory-sheet] .memory-sheet-handle{width:30px;height:3px;top:11px;background:#7897987d}
.memory-detail[data-memory-sheet] .memory-sheet-content{padding:12px 24px max(24px,env(safe-area-inset-bottom))}
.memory-title-row{display:flex;align-items:center;gap:8px;margin:6px 0 22px}
.memory-detail[data-memory-sheet] .memory-title-row h1{flex:1;min-width:0;font:400 25px/1.18 'Courier New',monospace;letter-spacing:-.8px;margin:0;overflow-wrap:anywhere}
.memory-sheet .you-edit-title{flex:none;width:44px;min-width:44px;height:44px;margin:0;padding:0;border:0;border-radius:50%;color:#96b3b6;background:transparent;display:grid;place-items:center}
.memory-detail[data-memory-sheet] dl{gap:0}
.memory-detail[data-memory-sheet] dl>div{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);padding:15px 0;border-top:0;border-bottom:1px solid #6d999b26;gap:16px;align-items:baseline}
.memory-detail[data-memory-sheet] dt{color:#96b3b6;font:11px/1.5 'Courier New',monospace;text-transform:none}
.memory-detail[data-memory-sheet] dd{color:#e3efec;text-align:right;font:13px/1.5 'Courier New',monospace}
.memory-sheet-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:22px}
.memory-sheet .memory-sheet-actions>button{display:grid;place-items:center;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;padding:0;margin:0;border:1px solid #355056;border-radius:50%;background:transparent;color:#a3d5d4}
.memory-sheet .memory-sheet-actions>.memory-delete{border-color:#74544f;color:#d8a199}
.memory-sheet-actions>button:disabled{opacity:.4}
.memory-title-edit{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;margin:6px 0 22px}
.memory-title-edit label{flex:1 1 100%;min-width:0;font:11px/1.5 'Courier New',monospace;color:#96b3b6}
.memory-title-edit input{display:block;width:100%;box-sizing:border-box;padding:12px;margin-top:8px;border:1px solid #355056;border-radius:8px;background:#071113;color:#e3efec;font:16px/1.5 'Courier New',monospace}
.memory-title-edit button{display:grid;place-items:center;width:44px;height:44px;min-width:44px;border:1px solid #355056;border-radius:50%;background:transparent;color:#a3d5d4}
.memory-title-row[hidden]{display:none!important}
[data-text="200"] .memory-detail[data-memory-sheet] .memory-title-row h1{font-size:38px}
[data-text="200"] .memory-detail[data-memory-sheet] dt,[data-text="200"] .memory-detail[data-memory-sheet] dd{font-size:20px;text-align:left}
[data-text="200"] .memory-detail[data-memory-sheet] dl>div{grid-template-columns:1fr}
.unified-memory-player .memory-info{width:44px;height:44px}
#player.unified-memory-player .memory-info,.unified-memory-player .memory-info{left:calc(50% - 46px)}
#player.unified-memory-player .memory-share-open,.unified-memory-player .memory-share-open{left:calc(50% + 2px)}

/* Integrated084 Info-only controls. */
#player.unified-memory-player .memory-info,.unified-memory-player .memory-info{left:calc(50% - 22px);right:auto;display:grid;place-items:center}
#player #memory-share-open{display:none!important}

/* Before We Had Names: neutral replay surround; original square art retained. */
.saved-art-layer[data-memory="dream"]{background:#ece8df}
.saved-art-layer[data-memory="dream"]::before{content:"";position:absolute;inset:0;pointer-events:none;background:url('./presentation/saved-paper.png') center/cover;opacity:.22}
.saved-art-layer[data-memory="dream"]>.memory-material-backdrop{display:none}

/* Sound shares the information HUD lifecycle and leaves the artwork unobstructed. */
#player.unified-memory-player #memory-info{left:calc(50% - 50px)}
#player.unified-memory-player #memory-sound{left:calc(50% + 6px);display:grid;place-items:center;font-size:23px}
#player #memory-sound[hidden]{display:none!important}
#memory-sound:disabled{opacity:.45}
#memory-sound .sound-slash{display:none;position:absolute;width:29px;height:2px;background:currentColor;transform:rotate(-45deg)}
#memory-sound[data-muted="true"] .sound-slash{display:block}

#experience #scan-memory-sound{left:calc(50% - 22px);display:grid;place-items:center;font-size:23px}
#experience #scan-memory-sound[hidden]{display:none!important}
.memory-sound .sound-slash{display:none;position:absolute;width:29px;height:2px;background:currentColor;transform:rotate(-45deg)}
.memory-sound[data-muted="true"] .sound-slash{display:block}

/* Glass only for saved-memory information, sound, share and close controls.
   Keep the existing HUD layout, visibility lifecycle and progress navigation. */
:is(#player,#app.you-player) :is(#memory-info,#memory-sound,#memory-share-open,#exit-player,.you-info,.memory-close,.memory-sheet-share,#close-memory-detail,.you-close-detail){
 border:1px solid #b8eee78c;border-radius:50%;
 background:linear-gradient(140deg,#36595f,#10292e);color:#effffc;
 box-shadow:inset 0 1px 0 #f0ffff66,inset 0 -1px 0 #88ccc81c,0 4px 14px #00101438;
 text-shadow:0 1px 2px #001418;
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
:is(#player,#app.you-player) :is(#memory-info,#memory-sound,#memory-share-open,#exit-player,.you-info,.memory-close,.memory-sheet-share,#close-memory-detail,.you-close-detail){
 background:linear-gradient(140deg,#52797d9c,#0d242bc9);
 -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);
}}
:is(#player,#app.you-player) :is(#memory-info,#memory-sound,#memory-share-open,#exit-player,.you-info,.memory-close,.memory-sheet-share,#close-memory-detail,.you-close-detail):active{background:#2b535bdd;box-shadow:inset 0 1px 3px #00141866}
:is(#player,#app.you-player) :is(#memory-info,#memory-sound,#memory-share-open,#exit-player,.you-info,.memory-close,.memory-sheet-share,#close-memory-detail,.you-close-detail):focus-visible{outline:2px solid #b9fff4;outline-offset:3px}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
:is(#player,#app.you-player) :is(#memory-info,#memory-sound,#memory-share-open,#exit-player,.you-info,.memory-close,.memory-sheet-share,#close-memory-detail,.you-close-detail){background:#17383f;border-color:#d3fff5;backdrop-filter:none;-webkit-backdrop-filter:none;text-shadow:none}
}

/* Passive Saved to You badge. Keep original placement and hidden state. */
.you-saved-badge{display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border-radius:999px;border:1px solid #b8eee766;background:#17383f;color:#effffc;box-shadow:inset 0 1px 0 #f0ffff4d,inset 0 -1px 0 #88ccc81c,0 3px 12px #00101430;text-shadow:0 1px 2px #001418;pointer-events:none}
.you-saved-badge svg{width:12px;height:12px;flex:none;color:#a8ece7}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.you-saved-badge{background:linear-gradient(140deg,#52797d9c,#0d242bc9);backdrop-filter:blur(14px) saturate(1.25);-webkit-backdrop-filter:blur(14px) saturate(1.25)}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){.you-saved-badge{background:#17383f;border-color:#b8eee7;backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Approved error/recovery glass controls; action semantics unchanged. */
.unified-memory-player .you-player-status button{min-height:48px;border-radius:999px;padding:12px 20px;border:1px solid #b9e8ec52;color:#dceff0;background:linear-gradient(160deg,#d8ffff21,#78b9c60c 52%,#ffffff06),#17313970;box-shadow:inset 0 1px 0 #ffffff38,inset 0 -1px 0 #ffffff09,0 6px 20px #0003;-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);font:inherit;text-align:center;color:#bdf7fa;border-color:#9beaf26b;background:linear-gradient(155deg,#c6fcff2a,#76dce912 55%,#ffffff08),#163b4375;display:block;margin:10px auto 0;min-width:116px}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.unified-memory-player .you-player-status button{background:#173139;border-color:#9ccbd1}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){.unified-memory-player .you-player-status button{background:#173139;backdrop-filter:none;-webkit-backdrop-filter:none;border-color:#9ccbd1}}

/* Re-reveal metadata with the same HUD state as its controls. */
.memory-hud-intro-copy .location[hidden],.you-location-row[hidden]{display:none!important}

/* Current saved MP4 palette only; legacy/AR/You keep their existing controls. */
[data-book-mp4-palette] .segment-track{background:var(--st,#24525a)}
[data-book-mp4-palette] .segment-fill{background:var(--sf,#61f3ff)}

/* Caption on a measured MP4 exterior; artwork/title and other players are unchanged. */
.unified-memory-player[data-book-mp4-location-tone="ink"] .memory-hud-intro-copy .location{color:#10191c;text-shadow:none}
.unified-memory-player[data-book-mp4-location-tone="light"] .memory-hud-intro-copy .location{color:#fff8ec;text-shadow:0 1px 3px #000,0 1px 10px #000b}

/* Only You/My creations: the count does not consume segment width. */
#app.you-player .you-memory-position{position:absolute;right:0;top:38px;color:#c9e8e9;font:10px/1.2 "Courier New",monospace;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px #000;pointer-events:none}

/* You carousel: edge peeks are real memories included in the twelve-button limit. */
#app.you-player .you-segment-rail{display:flex;gap:4px;flex:1;min-width:0;overflow:hidden}
#app.you-player .continuation-left .segment-track{width:50%;margin-right:auto}
#app.you-player .continuation-right .segment-track{width:50%;margin-left:auto}
#app.you-player .memory-segment[aria-current="true"] .segment-track{height:4px;border-radius:2px}
#app.you-player .memory-segment[aria-current="true"] .segment-fill{background:#c9fff6}

/* Shared sidebar for the home, scan and memory surfaces. */
.gallery-rail[hidden] {display: none !important}
.gallery-rail {
  --gallery-rail-width: 216px;
  position: absolute;
  z-index: 6;
  inset: 0 auto 0 0;
  width: var(--gallery-rail-width);
  overflow-y: auto;
  overflow-x: hidden;
  isolation: isolate;
  overscroll-behavior: contain;
  padding: 18px 12px;
  border-right: 1px solid #61f3ff30;
  background: #071215ed;
  color: #f4fbfa;
  font: 14px/1.35 'Courier New', monospace;
}
.gallery-rail nav {position: static;display: grid;grid-template-columns: minmax(0,1fr);width: 100%;min-width: 0;gap: 4px}
.gallery-rail nav + nav {margin-top: 10px;padding-top: 10px;border-top: 1px solid #61f3ff26}
.gallery-personal {display: grid;grid-template-columns: minmax(0,1fr) 44px;min-width: 0}
.gallery-rail button, .gallery-details button, .gallery-play {
  min-height: 44px;
  border: 1px solid #a7e8dd29;
  border-radius: 12px;
  padding: 6px 11px;
  background: #173138;
  color: #edf7f4;
  font: inherit;
}
.gallery-rail button {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: #f4fbfa;
  text-align: start;
  cursor: pointer;
  width: 100%;
  min-width: 0;
}
.gallery-rail .gallery-label {min-width: 0;overflow-wrap: anywhere}
.gallery-rail button[aria-current="true"] {border-color: #61f3ff88;background: #61f3ff21}
.gallery-rail button:hover:not(:disabled), .gallery-details button:hover:not(:disabled), .gallery-play:hover:not(:disabled) {background: #25464d}
.gallery-rail button:disabled, .gallery-details button:disabled, .gallery-play:disabled {opacity: .49;cursor: default}
.gallery-rail button:focus-visible {outline: 2px solid #61f3ff;outline-offset: -2px}
.gallery-rail button > :is(img,svg) {width: 31px;height: 31px;flex: none;object-fit: contain;color: #61f3ff}
.gallery-rail [data-gallery-destination="theLoop"] img {filter: invert(.9)}
.gallery-rail [data-gallery-destination="scan"] {padding-inline: 0}
.gallery-rail [data-gallery-destination="scan"] img {
  width: 64px;
  height: 64px;
  filter: brightness(0) saturate(100%) invert(88%) sepia(45%) saturate(1185%) hue-rotate(145deg) brightness(104%) contrast(103%) drop-shadow(0 0 8px #61f3ff55);
}
.gallery-rail [data-gallery-destination="settings"] svg {
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid #42676f;
  border-radius: 50%;
  color: #b9e4e2;
}
.gallery-rail [data-gallery-destination="add"] {
  width: 44px;
  justify-content: center;
  color: #61f3ff;
  font: 23px/1 system-ui, sans-serif;
}
.gallery-medallion {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  overflow: hidden;
  border: 1px solid #81f7ffb8;
  border-radius: 50%;
  background: radial-gradient(circle,#1b2a2e 0 45%,#061012 46%);
}
.gallery-medallion img {width: 100%;height: 100%;object-fit: contain}
.gallery-rail [aria-current="true"] .gallery-medallion {box-shadow: 0 0 9px #61f3ff88}
.gallery-details {
  position: absolute;
  z-index: 3;
  inset: var(--viewer-frame-top) var(--viewer-gutter) var(--viewer-card-bottom) auto;
  width: var(--viewer-details);
  overflow: auto;
  align-content: center;
  padding: var(--gallery-padding);
  border-left: 1px solid var(--gallery-divider);
  border-radius: 0 var(--gallery-radius) var(--gallery-radius) 0;
  background: var(--gallery-panel);
  color: var(--gallery-text);
  font: var(--gallery-body);
}
.gallery-details header, .gallery-details dl > div, .gallery-browse > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.gallery-details header, .gallery-browse > span {
  color: #a8eee5;
  font: 11px/1.4 ui-monospace, monospace;
  letter-spacing: .08em;
}
.gallery-count {white-space: nowrap}
.gallery-details h2 {margin: 10px 0; font: var(--gallery-title)}
.gallery-details h2, .gallery-details dd {overflow-wrap: anywhere}
.gallery-description, .gallery-details dt {color: var(--gallery-muted)}
.gallery-details dl {margin: 12px 0}
.gallery-details dl > div {padding: 8px 0; border-top: 1px solid #a7e8dd29}
.gallery-details dd {margin: 0; text-align: end}
.gallery-browse > div {margin-top: 8px; flex-wrap: wrap}
.gallery-details button {font-size: 12px}
@media (max-width: 1200px) {
  .gallery-rail {--gallery-rail-width: 180px; padding-inline: 12px}
}
@media (forced-colors: active) {
  .gallery-rail, .gallery-details {border-color: CanvasText}
  .gallery-rail button[aria-current] {border-color: Highlight}
}

/* Book, You and Settings share the desktop Galerie frame. */
html[data-desktop-memory], :host([data-desktop-memory]) {
  --viewer-rail: 216px;
  --viewer-gutter: max(clamp(24px, 3vw, 56px), calc((100% - var(--viewer-rail) - 1350px) / 2));
  --viewer-start: calc(var(--viewer-rail) + var(--viewer-gutter));
  --viewer-top: max(78px, calc((100% - 560px) / 2 - 24px));
  --viewer-frame-top: calc(var(--viewer-top) - 54px);
  --viewer-bottom: max(114px, calc((100% - 560px) / 2 + 24px));
  --viewer-card-bottom: calc(var(--viewer-bottom) - 96px);
  --gallery-background: linear-gradient(#02060744,#020607c7),repeating-linear-gradient(103deg,transparent 0 39px,#61f3ff0d 40px 41px),#030708;
  --gallery-surface: #0a171b;
  --gallery-panel: #102329;
  --gallery-outline: #61f3ff38;
  --gallery-divider: #a7e8dd29;
  --gallery-radius: 18px;
  --gallery-padding: clamp(16px, 2.2vw, 34px);
  --gallery-text: #edf7f4;
  --gallery-muted: #bfd2d2;
  --gallery-body: 14px/1.45 'Courier New', monospace;
  --gallery-title: 500 clamp(21px, 2.2vw, 30px)/1.18 'Courier New', monospace;
}
.unified-memory-player[data-desktop-memory] {
  --viewer-details: clamp(236px, 25vw, 360px);
  --viewer-end: calc(var(--viewer-gutter) + var(--viewer-details));
  --viewer-toolbar: calc(100% - var(--viewer-bottom) + 12px);
  background: var(--gallery-background);
}
.gallery-edges {
  position: absolute;
  z-index: 4;
  inset: var(--viewer-top) var(--viewer-end) var(--viewer-bottom) var(--viewer-start);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.gallery-edges button {
  display: grid;
  align-items: center;
  justify-items: start;
  width: 28%;
  padding: 10px;
  border: 0;
  background: transparent;
  pointer-events: auto;
}
.gallery-edges button + button {justify-items: end}
.gallery-edges button:disabled {visibility: hidden;pointer-events: none}
.gallery-edges span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 40px;
  border: 1px solid #b9fff44d;
  border-radius: 20px;
  background: #071215a0;
  color: #e8fffc;
  font: 26px/1 system-ui,sans-serif;
  opacity: .58;
}
.gallery-edges button:is(:hover,:focus-visible) span {opacity: 1;background: #173138;border-color: #b9fff4}
.gallery-edges button:focus-visible {outline-offset: -3px}
.gallery-end {
  border-top: 1px solid #a7e8dd29;
  padding-top: 10px;
}
.gallery-end strong {color: #a8eee5;font: 11px/1.4 ui-monospace,monospace;text-transform: uppercase}
.gallery-end p {margin: 6px 0;color: #bfd2d2}
.gallery-card-backdrop {
  position: absolute;
  pointer-events: none;
  inset: var(--viewer-frame-top) var(--viewer-gutter) var(--viewer-card-bottom) var(--viewer-start);
  border-radius: var(--gallery-radius);
  outline: 1px solid var(--gallery-outline);
  background: var(--gallery-surface);
}
:is(#player, #app.you-player)[data-desktop-memory] :is(#saved-art, .you-memory-frame) {
  inset: var(--viewer-top) var(--viewer-end) var(--viewer-bottom) var(--viewer-start);
  background: #080f12;
  border-radius: 18px 0 0 0;
}
#player[data-desktop-memory] :is(#memory-poster-ground, #memory-poster, #absence-replay, #oglinda-replay) {
  inset: var(--viewer-top) var(--viewer-end) var(--viewer-bottom) var(--viewer-start);
  width: calc(100% - var(--viewer-start) - var(--viewer-end));
  height: calc(100% - var(--viewer-top) - var(--viewer-bottom));
}
#app.you-player[data-desktop-memory] .you-image-layer img {
  /* Keep even a matching aspect ratio clear of the stage's rounded corners. */
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
}
#app.you-player[data-desktop-memory] .empty-collection {
  position: absolute;
  z-index: 5;
  inset: var(--viewer-top) var(--viewer-end) var(--viewer-bottom) var(--viewer-start);
  display: grid;
  place-items: center;
}
#app.you-player[data-desktop-memory] .empty-collection button {
  padding-inline: 20px;
  border-radius: 22px;
  background: #173138;
}
#app.you-player[data-desktop-memory] .you-request-card {
  display: block;
  padding: clamp(18px, 4vw, 42px);
}
#app.you-player[data-desktop-memory] .you-photo-backdrop {
  display: none;
}
:is(#player, #app.you-player)[data-desktop-memory] .memory-segments {
  inset: calc(var(--viewer-top) - 49px) calc(var(--viewer-end) + 12px) auto calc(var(--viewer-start) + 12px);
  gap: 6px;
  --st: #24525a;
  --sf: #61f3ff;
}
#player[data-desktop-memory] #exit-player,
#app.you-player[data-desktop-memory] .memory-close {
  inset: calc(var(--viewer-top) - 49px) calc(var(--viewer-gutter) + 12px) auto auto;
}
:is(#player, #app.you-player)[data-desktop-memory] .memory-hud-intro {
  animation: none !important;
}
:is(#player, #app.you-player)[data-desktop-memory] .memory-hud-intro-copy {
  display: none;
}
#player[data-desktop-memory] .gallery-play {
  position: absolute;
  z-index: 5;
  inset: var(--viewer-toolbar) auto auto var(--viewer-start);
}
#player[data-desktop-memory] :is(#memory-info, #memory-sound),
#app.you-player[data-desktop-memory] :is(.you-info, .you-music-choice, .you-audio-controls) {
  inset: var(--viewer-toolbar) var(--viewer-end) auto auto;
  transform: none;
}
#player[data-desktop-memory] #memory-info,
#app.you-player[data-desktop-memory] .you-music-choice {
  right: calc(var(--viewer-end) + 56px);
}
#player[data-desktop-memory] .book-play-retry {
  inset: var(--viewer-toolbar) calc(var(--viewer-end) + 112px) auto auto !important;
  transform: none !important;
  padding: 8px 16px !important;
}
#app.you-player[data-desktop-memory] .gallery-details :is(.you-save-creation, .you-saved-badge) {
  position: static;
  margin-bottom: 12px;
  transform: none;
}
#app.you-player[data-desktop-memory] .gallery-details .you-save-creation {
  width: 100%;
  justify-content: center;
}
#player[data-desktop-memory] #memory-load-status,
#player[data-desktop-memory] .memory-share-status,
#app.you-player[data-desktop-memory] :is(.you-player-status, .warning) {
  inset: calc(100% - var(--viewer-bottom) + 92px) var(--viewer-end) 6px auto;
  max-width: min(560px, 65%);
  margin: 0;
  overflow: auto;
  transform: none;
}
:is(#player, #app.you-player)[data-desktop-memory] .memory-detail {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
:is(#player, #app.you-player)[data-desktop-memory] .memory-detail .memory-sheet {
  max-width: 560px;
  max-height: 100%;
  border-radius: 20px;
}
.unified-memory-player[data-desktop-memory] button:focus-visible {
  outline: 2px solid #b9fff4;
  outline-offset: 3px;
}

.unified-memory-player[data-desktop-memory] .memory-fullscreen {
  position: absolute;
  z-index: 7;
  top: var(--viewer-toolbar);
  left: calc(var(--viewer-start) + 78px);
  min-height: 44px;
  width: 134px;
  border: 1px solid #9bc9c366;
  border-radius: 24px;
  background: #173138;
  color: #effffc;
  padding: 6px 12px;
  font: 13px/1.3 system-ui, sans-serif;
}
.unified-memory-player[data-desktop-memory] .memory-fullscreen:hover {
  background: #24454d;
}
#app.you-player.choosing-you-music .memory-fullscreen {
  visibility: hidden;
}
.unified-memory-player[data-desktop-memory]:fullscreen {
  width: 100%;
  height: 100%;
  --viewer-edge: 24px;
  --viewer-top: 122px;
  --viewer-bottom: 112px;
}

.unified-memory-player[data-desktop-memory]:fullscreen :is(.gallery-rail, .gallery-details, .gallery-card-backdrop) {display: none}
@media (max-width: 1200px) {
  html[data-desktop-memory], :host([data-desktop-memory]) {--viewer-rail: 180px}
}

#app.you-player[data-desktop-memory] .memory-fullscreen {left: var(--viewer-start)}

#player[data-desktop-memory] #memory-info {display: none}
.gallery-book-actions {display: flex;gap: 8px;margin-top: 12px}
#player[data-desktop-memory] .gallery-book-actions :is(.memory-delete, #memory-share-open) {
  position: static;
  width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  transform: none;
}
#player[data-desktop-memory] .gallery-book-actions #memory-share-open:not([hidden]) {display: grid !important}
.gallery-book-actions :is(.memory-delete, #memory-share-open) svg {width: 20px;height: 20px;margin: auto}

.gallery-empty-copy > :is(h2,p) {display: none}
#app.you-player[data-gallery-empty] :is(.gallery-details,.gallery-edges,.memory-segments,.you-memory-frame,.you-info) {display: none}
#app.you-player[data-gallery-empty] .empty-collection {
  inset: var(--viewer-frame-top) var(--viewer-gutter) var(--viewer-card-bottom) var(--viewer-start);
  padding: var(--gallery-padding);
  text-align: center;
}
#app.you-player[data-gallery-empty] .gallery-empty-copy > :is(h2,p) {display: block}
#app.you-player[data-gallery-empty] .gallery-empty-copy h2 {font: var(--gallery-title)}
#app.you-player[data-gallery-empty] .gallery-empty-copy p {color: var(--gallery-muted);font: var(--gallery-body)}
.gallery-rail [data-gallery-destination="creations"] {margin-left: 36px;width: calc(100% - 36px)}
