/* One player, four screens. Native controls stay sharp at every display density. */
body:has(.memory-player:not([hidden])){background:radial-gradient(ellipse at 50% 15%,#ffedf8,transparent 65%),repeating-linear-gradient(0deg,#e9dfee 0 1px,#f3eaf5 1px 5px);color:#713956}
body.approved-ui:has(.memory-player:not([hidden]))>.topbar{height:52px;border:0;border-radius:0;background:#fff5fbd9;box-shadow:none;padding:5px 22px;grid-template-columns:1fr auto 1fr}
body:has(.memory-player:not([hidden])) .topbar .logo img{max-height:32px;width:auto}
body.approved-ui:has(.memory-player:not([hidden])) .page-title{color:#b34d7c;text-shadow:none;font-size:14px;letter-spacing:2px}
body:has(.memory-player:not([hidden])) .topbar .back{font-size:12px;color:#9a5b7b}
.approved-ui #trial.memory-player{position:relative;transform:none;margin:18px auto 30px;padding:18px;width: min(880px,calc(100% - 24px));max-width:880px;border:2px solid #ed83b5;border-radius:36px;background:radial-gradient(circle at 15% 10%,#fff9 0 1px,transparent 1.4px) 0 0/5px 5px,linear-gradient(135deg,#ffd3e9 0%,#f89bc8 24%,#e7c5e5 68%,#f8b4d7);box-shadow:inset 3px 4px 4px #fff9,inset -3px -4px 4px #ad5d8b55,0 14px 40px #874b7e25}
.memory-player .player-top{display:flex;align-items:center;justify-content:space-between;padding:0 5px 14px;color:#a64576;font-size:11px;letter-spacing:2.5px;text-shadow:0 1px #fff}
.player-top a{color:#a84778;text-decoration:none;border:1px solid #fff9;border-radius:50%;display:grid;place-items:center;width:30px;height:30px;font-size:22px;background:linear-gradient(#fff7,#f5b3d4);box-shadow:0 1px 2px #8f497766}
.player-top b{font-size:15px}.player-light{color:#e63b8c;font-size:12px;text-shadow:0 0 8px #fff}
.memory-player .trial-heading{margin:0 0 12px;display:block}.approved-ui .memory-player .trial-steps{gap:5px;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr)}
.approved-ui .memory-player .trial-steps li{padding:7px 2px;font-size:11px;border:1px solid #fff7;border-radius:20px;background:#fff4;color:#9c6486;box-shadow:none}.approved-ui .memory-player .trial-steps li.current{background:linear-gradient(#ffdfed,#ef4d9e);color:#893158;border-color:#fff9;box-shadow:inset 0 1px white}.memory-player .trial-steps b{display:inline;margin:0 4px 0 0;width:auto;height:auto;font-size:10px;background:none;color:inherit;border:0}
.memory-player .select-screen,.memory-player .mp3-display{position:relative;background:#211923;border:5px solid #4f3a50;outline:1px solid #fff8;border-radius:16px;box-shadow:0 0 0 2px #e68aba,inset 0 0 0 2px #110d15;overflow:hidden}
.select-screen{display:grid;place-items:center;min-height:340px}.select-screen canvas{display:block;width:auto;max-width:100%;height:380px;aspect-ratio:3/4;object-fit:contain}.screen-label{position:absolute;bottom:8px;left:0;right:0;font-size:8px;letter-spacing:2px;text-align:center;color:#fff9;pointer-events:none}
.approved-ui .memory-player #selectStep>.trial-layout{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.approved-ui .memory-player #trial .window,.approved-ui .memory-player .window{border:0!important;border-radius:14px!important;background:transparent!important;box-shadow:none!important;overflow:visible}
.memory-player #selectStep .window-bar{display:none}.approved-ui .memory-player .sheet-area{padding:0}.memory-player .sheet-area>.trial-hint{display:none}
.approved-ui .memory-player .selection-sheet{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:1fr;aspect-ratio:auto;gap:8px;padding:8px 12px;background:#2a202d;border:2px solid #b280aa;border-radius:14px;max-width:none;width:100%}
.approved-ui .memory-player .selection-cell{aspect-ratio:3/4;max-height:70px;min-height:0;justify-self:center;width:53px;border-radius:6px;overflow:hidden}.memory-player .selection-cell>span{display:none}.memory-player .selection-cell .slot-number{width:16px;height:16px;font-size:9px;border-width:1px}.memory-player .selection-cell.selected{border-color:#fc6bb0;box-shadow:0 0 0 2px #ff93c7}
.approved-ui .memory-player .frame-panel{padding:0}.approved-ui .memory-player .frame-tabs{display:flex;gap:5px;padding:0 0 7px;margin:0;justify-content:center}.approved-ui .memory-player .frame-tabs button{min-height:30px;padding:4px 14px;font-size:11px;border-width:1px;border-radius:20px}
.approved-ui .memory-player #frameGrid{display:flex;gap:9px;overflow-x:auto;max-height:none;padding:9px;background:linear-gradient(#332738,#17131c);border:2px solid #b684aa;border-radius:15px;scrollbar-width:thin;scrollbar-color:#db85b2 #322536}
.approved-ui .memory-player #frameGrid .frame-choice{flex:0 0 56px;padding:2px;min-width:0;border-radius:7px}.approved-ui .memory-player #frameGrid canvas{width:100%;max-height:74px;display:block}.memory-player #frameGrid .frame-choice span{display:none}.memory-player .frame-choice.chosen:after{font-size:10px;padding:0 3px;border-width:1px}
.approved-ui .memory-player .trial-actions{margin-top:12px;display:flex;gap:9px}.memory-player .trial-actions #clearSelection{font-size:11px;padding:8px 12px}.memory-player .trial-actions #toCapture{flex:1;font-size:13px;padding:12px}
.player-hint{text-align:center;font-size:10px;color:#96527b;margin:10px 0 0}
.approved-ui .memory-player .mp3-body{display:block;padding:0;border:0;border-radius:0;background:none;box-shadow:none}.approved-ui .memory-player .mp3-display{min-height:0;display:block;width:100%;max-width:none;margin:0}.approved-ui .memory-player .mp3-display .camera-preview{width:100%;height:380px;max-width:100%;aspect-ratio:3/4;border-radius:0;background:#211923}
.memory-player #cameraVideo,.memory-player #cameraComposite,.memory-player #cameraFrame,.memory-player #captureReview{object-fit:contain}
.memory-player #mp3Status{display:flex!important;justify-content:space-between;align-items:center;left:10px;right:10px;top:8px;color:#fff;font-size:10px;pointer-events:none;text-shadow:0 1px 3px black}.memory-player #mp3Status h2{font-size:11px}.memory-player .empty-camera{font-size:45px;color:#ffcee7}.memory-player #cameraEmpty p{font-size:16px;color:#ffe4f2}.memory-player #cameraEmpty small{font-size:11px;color:#d1afc9}
.player-tray{background:linear-gradient(#342836,#1c1720);border:2px solid #ba87b0;border-radius:15px;padding:8px 12px;margin:12px 0}.approved-ui .memory-player .capture-sheet{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:1fr;aspect-ratio:auto;gap:8px;background:none;box-shadow:none;max-width:none;width:100%}.memory-player .capture-cell{aspect-ratio:3/4;max-height:65px;width:49px;justify-self:center}.memory-player .capture-cell .slot-number{width:17px;height:17px;font-size:10px;border-width:1px}
.player-dock{display:flex;align-items:center;justify-content:center;gap:24px;padding:4px 0 8px}.approved-ui .memory-player .player-dock button{min-height:42px;border-radius:50%;border:1px solid #fff9;background:linear-gradient(#ffedf7,#f49bc8);color:#a94b7a;box-shadow:inset 0 2px 3px #fff9,0 2px 2px #b8699544;padding:8px;font-size:12px}.approved-ui .memory-player .player-dock #capturePhoto{border-radius:38px;width:110px;height:58px;font-size:24px;color:white;background:linear-gradient(#ffb9dc,#ed298c);border:3px solid #fdd6e9;box-shadow:0 0 0 2px #d367a2,inset 0 0 0 1px #fff8}.player-dock small{display:block;font-size:10px}.player-dock #mirrorCamera{max-width:70px}.player-dock #wheelRetake{width:48px;height:48px;font-size:18px}
.approved-ui .memory-player .mp3-bottom{display:flex;flex-direction:column;gap:8px;margin:5px 0;padding:0;border:0;background:none;box-shadow:none}.memory-player .mp3-backgrounds{width:100%;position:relative}.memory-player #wheelBackground{font-size:10px;padding:5px 9px;border:1px solid #d18bb4;border-radius:12px;color:#85466c;background:#ffe5f2;margin-bottom:6px}.memory-player .camera-background-panel{padding:0;margin:0;border:0}.memory-player .camera-background-panel h3,.memory-player #liveBackgroundStatus{display:none}
.approved-ui .memory-player #cameraBackgrounds{display:flex;gap:8px;overflow-x:auto;padding:6px;background:#2d2331;border-radius:12px}.memory-player #cameraBackgrounds button{flex:0 0 45px;min-height:0;padding:2px;font-size:9px;border-radius:8px}.memory-player #cameraBackgrounds canvas{height:35px;width:100%;display:block}.memory-player #cameraBackgrounds span{margin:0;font-size:9px}.memory-player .mp3-next{width:100%}.memory-player #toDecorate{font-size:13px!important;padding:11px!important;width:100%}.memory-player .mp3-extras{gap:6px;margin:8px 0 0}.approved-ui .memory-player .mp3-extras button{padding:6px 10px;min-height:30px;font-size:10px}.memory-player #cameraStatus{font-size:9px;line-height:1.4;margin:4px 0 0}.memory-player #captureReviewActions{position:static;padding:8px;gap:6px;margin:7px 0;background:#fff4f9;border-width:1px}.memory-player #captureReviewActions strong{font-size:12px;width:100%;text-align:center}.memory-player #captureReviewActions button{font-size:12px;min-height:36px;padding:8px}
.approved-ui .memory-player .edit-layout{grid-template-columns:1fr 1fr!important;gap:14px}.memory-player .window-bar{border:0;background:none;padding:6px;min-height:0}.memory-player .window-bar h2{font-size:12px}.memory-player .tiny-button{font-size:10px;padding:5px}.approved-ui .memory-player .editor-area{padding:0}.approved-ui .memory-player #editorCanvas{max-width:100%;border:5px solid #4f3a50;border-radius:12px}.memory-player #editorHint{font-size:10px;line-height:1.4}.memory-player .edit-photo-strip{position:static;margin:0 0 10px;padding:6px;background:#2b2230;border:1px solid #b885ad}.memory-player .cell-buttons{gap:8px;padding:0;justify-content:center}.memory-player .cell-buttons button{max-width:40px}.memory-player .cell-buttons span{font-size:8px;padding:2px 4px;left:-6px}.approved-ui .memory-player .tools-panel{padding:0}.approved-ui .memory-player .tool-tabs{display:flex;overflow:auto;gap:5px;padding-bottom:8px}.approved-ui .memory-player .tool-tabs button{flex:0 0 44px;font-size:11px;padding:6px 4px;min-height:32px;border-radius:9px;border-width:1px}.memory-player .tools-panel>div>p{font-size:11px;margin:7px 0}.memory-player .sticker-palette{gap:7px}.memory-player .sticker-adjust label{font-size:11px;gap:10px}.memory-player .edit-history button,.memory-player #toSave{font-size:12px;padding:9px}.memory-player .save-layout{padding:8px;gap:20px}.memory-player .save-controls{padding:14px;background:#fff5fa;border:1px solid #edafd2}.memory-player .save-controls h2{font-size:24px}.memory-player .save-controls p{font-size:11px}.memory-player #downloadPhoto{font-size:17px;padding:14px}.memory-player #sharePhoto{font-size:15px}.memory-player .laminate-options label{font-size:11px;padding:6px}.memory-player .save-shop{font-size:13px}.memory-player .save-shop p{font-size:11px}
@media(min-width:701px){.memory-player #selectStep{display:grid;grid-template-columns:1fr 1fr;gap:14px}.memory-player #selectStep[hidden]{display:none}.memory-player .select-screen{grid-row:1/4}.memory-player #selectStep>.trial-layout{margin:0!important;justify-content:center}.memory-player #selectStep .trial-actions{align-self:end}.memory-player .mp3-layout{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px}.memory-player .mp3-body{grid-row:1/6}.memory-player .player-tray{margin:0;align-self:end}.memory-player .player-dock{grid-column:2}.memory-player .mp3-bottom,.memory-player .mp3-extras,.memory-player #captureReviewActions{grid-column:2}.memory-player .mp3-extras{align-self:start}.memory-player .mp3-display .camera-preview{height:440px!important}.memory-player .select-screen canvas{height:440px}}
@media(max-width:700px){body:has(.memory-player:not([hidden]))>.topbar{display:none!important}.approved-ui #trial.memory-player{width:calc(100% - 16px);max-width:430px;margin:8px auto 16px;padding:14px;border-radius:28px}.memory-player .player-top{padding-bottom:10px}.approved-ui .memory-player .select-screen{min-height:0}.memory-player .select-screen canvas{height:min(42svh,380px);width:auto;max-width:100%}.approved-ui .memory-player .mp3-display .camera-preview{height:min(44svh,400px)}.approved-ui .memory-player .edit-layout{grid-template-columns:1fr!important;gap:6px}.approved-ui .memory-player #editorCanvas{width:auto;height:min(43svh,400px);max-width:100%;margin:auto}.approved-ui .memory-player .tools-panel{padding:8px 0 0}.memory-player .sticker-palette{display:flex!important;overflow-x:auto}.memory-player .sticker-palette button{flex:0 0 54px}.memory-player .sticker-adjust{margin-top:8px;padding-top:8px;gap:8px}.memory-player .edit-history{margin:9px 0}.memory-player .save-layout{grid-template-columns:1fr!important;padding:0}.memory-player .print-preview{max-width:230px;margin:auto}.memory-player .save-controls h2{font-size:23px}.memory-player .filter-palette{display:flex;overflow:auto}.memory-player .filter-palette button{flex:0 0 60px;height:45px;font-size:11px}.memory-player #textTools input{padding:8px}.memory-player #frameTools .frame-grid{display:flex;overflow:auto}.memory-player #frameTools button{flex:0 0 60px}.memory-player #frameTools canvas{height:80px}.memory-player #cameraEmpty svg{display:none}}
body.approved-ui:has(#trial.memory-player:not([hidden]))>.topbar{border:0;border-radius:0;background:#fff5fbd9;box-shadow:none;height:52px}
body.approved-ui:has(#trial.memory-player:not([hidden])) .page-title{color:#b34d7c;text-shadow:none;font-size:14px}
.memory-player .trial-layout,.memory-player .frame-panel,.memory-player .window{min-width:0}
@media(min-width:701px){.memory-player #selectStep{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.memory-player .mp3-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:700px){.approved-ui .memory-player .mp3-display .camera-preview{height:min(38svh,350px)}.memory-player .player-tray{margin:9px 0;padding:6px 10px}.memory-player .capture-cell{max-height:52px;width:39px}.memory-player .player-dock{padding:2px 0 5px}.memory-player .mp3-backgrounds #cameraBackgrounds{padding:4px}.memory-player #cameraBackgrounds canvas{height:28px}}
.memory-player #cameraEmpty{background:#30182e42;padding:14px;text-shadow:0 1px 3px #452137;backdrop-filter:blur(1px)}
.memory-player #cameraEmpty small,.memory-player #cameraEmpty p{color:white}
@media(max-width:700px){.memory-player #decorateStep .window-bar{display:none}.approved-ui .memory-player #editorCanvas{height:min(37svh,340px)}.memory-player #editorHint{margin:5px 0}.memory-player .edit-photo-strip{padding:4px;margin-bottom:8px}.memory-player .cell-buttons button{max-width:30px}.memory-player .tools-panel>.trial-hint{display:none}.memory-player .sticker-adjust{display:grid;grid-template-columns:1fr 1fr;gap:6px}.memory-player .sticker-adjust label{display:flex;gap:5px;font-size:10px}.memory-player .sticker-adjust input{width:55px;min-width:0}.memory-player #deleteSticker{grid-column:1/-1;font-size:10px;padding:5px}.memory-player .tools-panel>div>p{font-size:10px;margin:5px 0}.memory-player .edit-history{margin:7px 0}.memory-player #toSave{padding:10px}}
/* Lock every live and rendered layer to the same physical 3:4 viewport. */
.approved-ui #trial.memory-player .mp3-display{display:flex;justify-content:center;align-items:center}
.approved-ui #trial.memory-player .mp3-display .camera-preview{flex:none;width:min(100%,300px);max-width:300px;height:auto!important;min-height:0;aspect-ratio:3/4;margin:0 auto;overflow:hidden}
.approved-ui #trial.memory-player .camera-preview #cameraVideo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.approved-ui #trial.memory-player .camera-preview #cameraFrame,.approved-ui #trial.memory-player .camera-preview #cameraComposite,.approved-ui #trial.memory-player .camera-preview #captureReview{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
@media(min-width:701px){.approved-ui #trial.memory-player .mp3-display .camera-preview{width:min(100%,330px);max-width:330px}}
