/* Profile shares the application's surfaces. One overview; details open on request. */
#screen-profile,#profileEditorContent{--pf-bg:#0c1b20;--pf-card:#10262c;--pf-text:#e2edef;--pf-muted:#92afb5;--pf-line:#29474e;--pf-accent:#98e5cf;--pf-soft:#193a36;--pf-violet:#7ad9d1}
body.light-theme #screen-profile,body.light-theme #profileEditorContent{--pf-bg:#fff;--pf-card:#f4f7fc;--pf-text:#192b48;--pf-muted:#52647f;--pf-line:#d8e1ee;--pf-accent:#285bd3;--pf-soft:#e9effb;--pf-violet:#6650ca}
#screen-profile>.scroll-area{display:flex;flex-direction:column;gap:22px;max-width:1060px;margin-inline:auto;width:100%;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:30px 32px calc(var(--nav-h) + 36px);box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--pf-line) transparent}
#screen-profile>.scroll-area::-webkit-scrollbar{display:block;width:5px}#screen-profile>.scroll-area::-webkit-scrollbar-thumb{background:var(--pf-line);border-radius:5px}
#screen-profile .profile-hero{display:grid;grid-template-columns:100px minmax(0,1fr) auto;gap:8px 24px;text-align:left;align-items:center;padding:14px 0 10px;margin:0;background:none;overflow:visible;isolation:isolate}
#screen-profile .profile-bg-glow,#screen-profile .avatar-edit-caption{display:none}
#screen-profile .profile-avatar-big{grid-column:1;grid-row:1/4;width:82px;height:82px;margin:0 0 0 7px}
#screen-profile .profile-name{grid-column:2;grid-row:1;font-size:28px;margin:0;color:var(--pf-text);overflow-wrap:anywhere}
#screen-profile .profile-handle{grid-column:2;grid-row:2;margin:0;color:var(--pf-muted);font-size:13px;overflow-wrap:anywhere}
#screen-profile .profile-settings-button{grid-column:2;grid-row:3;justify-self:start;border:0;background:none;color:var(--pf-accent);min-height:44px;padding:6px 0;font:inherit;font-size:13px;cursor:pointer;text-align:left}
#screen-profile .profile-preferences{grid-column:3;grid-row:1/3;align-self:start;width:44px;height:44px;border:1px solid var(--pf-line);border-radius:14px;background:var(--pf-bg);color:var(--pf-text);font-size:22px;cursor:pointer}
#screen-profile .profile-stats-row{grid-column:1/-1;grid-row:4;justify-content:flex-start;gap:28px;padding:20px 0 0;margin:6px 0 0;border:0;border-top:1px solid var(--pf-line);background:none}
#screen-profile .pstat{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}#screen-profile .pstat-val{font-size:18px;color:var(--pf-text)}#screen-profile .pstat-lbl{font-size:11px;letter-spacing:.4px;color:var(--pf-muted)}#screen-profile .pstat-div{display:none}
#screen-profile .profile-management{margin:0;display:block}
.profile-status{padding:26px;border:1px solid var(--pf-line);border-radius:24px;background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--pf-accent) 9%,transparent),transparent 70%),var(--pf-bg);color:var(--pf-text)}
.profile-status-top{display:flex;align-items:center;justify-content:space-between;gap:16px}.profile-eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:var(--pf-accent);margin:0 0 8px}.profile-status h2{display:flex;align-items:baseline;gap:9px;margin:0}.profile-status h2 strong{font-size:56px;line-height:1.1;font-weight:600;letter-spacing:-2px}.profile-status h2>span{font-size:16px;color:var(--pf-muted)}
.profile-status-rank{display:flex;align-items:center;gap:12px}.profile-status-rank>.rank-art{width:68px;height:68px}.profile-status-rank small,.profile-status-rank b{display:block}.profile-status-rank small{font-size:11px;color:var(--pf-muted);margin-bottom:5px}.profile-status-rank b{font-size:17px}.profile-seed{font-size:34px;color:var(--pf-accent);padding:12px}
.profile-xp-meta{display:flex;justify-content:space-between;gap:12px;margin:24px 0 12px;font-size:12px;color:var(--pf-muted)}.profile-xp-meta>span:first-child{font-weight:650;color:var(--pf-text)}
.profile-xp-track{position:relative;height:12px;border:1px solid var(--pf-line);border-radius:20px;background:var(--pf-card);overflow:clip;isolation:isolate}.profile-xp-track>i{position:absolute;inset:0 auto 0 0;width:var(--xp-fill);background:linear-gradient(90deg,var(--pf-accent),var(--pf-violet));border-radius:20px;box-shadow:0 0 15px color-mix(in srgb,var(--pf-accent) 40%,transparent)}.profile-xp-track>i:after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,#ffffff70 48%,transparent 72%);transform:translateX(-110%)}.profile-xp-ticks{position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),var(--pf-bg) calc(10% - 1px) 10%);opacity:.45}.profile-status-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 16px}.profile-status-bottom p{font-size:12px;line-height:1.6;color:var(--pf-muted);margin:0}.profile-status-bottom b{color:var(--pf-text)}.profile-help{width:44px;height:44px;flex-shrink:0;border:0;background:none;font-size:17px;color:var(--pf-accent);cursor:pointer}
.profile-rewards-entry{display:flex;align-items:center;gap:16px;width:100%;padding:12px 16px;text-align:left;border:1px solid var(--pf-line);border-radius:17px;background:var(--pf-card);color:var(--pf-text);font:inherit;cursor:pointer}.profile-reward-art{width:64px;height:64px;flex:0 0 64px}.profile-rewards-entry>span:nth-child(2){flex:1;min-width:0}.profile-rewards-entry b,.profile-rewards-entry small{display:block}.profile-rewards-entry b{font-size:16px;margin-bottom:6px}.profile-rewards-entry small{font-size:12px;color:var(--pf-muted);line-height:1.5}
#screen-profile .journey-card{margin:0;padding:26px;border-radius:24px;border:1px solid var(--pf-line);background:radial-gradient(ellipse at 0 0,color-mix(in srgb,var(--pf-accent) 7%,transparent),transparent 70%),var(--pf-bg)}#screen-profile .memory-summary-layout{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px 24px;align-items:center}#screen-profile .memory-cover,#screen-profile .memory-pair{grid-column:1;grid-row:1/3;width:100px;height:120px;border-radius:16px;border:1px solid var(--pf-line);background:var(--pf-card);transform:rotate(-4deg);box-shadow:6px 6px 0 var(--pf-soft)}#screen-profile .memory-cover span{font-size:36px;color:var(--pf-accent)}#screen-profile .memory-summary h2{font-size:20px;margin:6px 0 8px;color:var(--pf-text)}#screen-profile .memory-summary p{font-size:13px;color:var(--pf-muted);line-height:1.65;margin:0;overflow-wrap:anywhere}#screen-profile .memory-summary .journey-kicker{font-size:10px;color:var(--pf-accent);letter-spacing:1.5px}#screen-profile .memory-summary-actions{grid-column:2;display:flex;justify-content:flex-start;gap:12px;flex-wrap:wrap}#screen-profile .memory-summary-actions button{min-height:44px;font-size:12px}
.profile-learning-compact{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px 20px;padding:24px;border:1px solid var(--pf-line);background:var(--pf-bg);border-radius:22px;color:var(--pf-text)}.profile-learning-compact h3{font-size:20px;margin:0 0 5px}.profile-learning-compact p:not(.profile-eyebrow){font-size:12px;color:var(--pf-muted);margin:0}.profile-learning-compact>.section-link{grid-column:1/-1;justify-self:start;font-size:12px;color:var(--pf-accent);min-height:44px}.profile-learning-compact>.btn-primary{font-size:13px;min-height:44px}
#screen-profile button:focus-visible,#screen-profile label:focus-within,#profileEditorContent button:focus-visible{outline:2px solid var(--pf-accent);outline-offset:4px}
#profileEditorContent:has(.profile-collection){width:min(100%,1000px);background:var(--pf-bg);color:var(--pf-text)}#profileEditorContent:has(.profile-identity-editor),#profileEditorContent:has(.profile-progress-list){background:var(--pf-bg);color:var(--pf-text)}
.profile-collection>p,.profile-progress-list>p{font-size:14px;color:var(--pf-muted);line-height:1.7;margin:18px 0 24px}.profile-collection-tabs{display:flex;gap:8px;border-bottom:1px solid var(--pf-line);padding:14px 0}.profile-collection-tabs button{flex:1;min-height:44px;min-width:0;padding:10px 6px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--pf-muted);font:inherit;font-size:13px;cursor:pointer}.profile-collection-tabs button[aria-pressed=true]{background:var(--pf-soft);color:var(--pf-accent);border-color:var(--pf-line)}.profile-auto-frame{padding:12px 16px;min-height:48px;border:1px solid var(--pf-line);background:var(--pf-card);color:var(--pf-text);font:inherit;font-size:13px;border-radius:12px;margin-bottom:24px;cursor:pointer}.profile-auto-frame[aria-pressed=true]{border-color:var(--pf-accent)}
.profile-achievement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.profile-achievement-grid button{display:grid;gap:12px;text-align:left;padding:20px;border:1px solid var(--pf-line);border-radius:16px;background:var(--pf-card);color:var(--pf-text);font:inherit;cursor:pointer}.profile-achievement-grid span{font-size:26px;color:var(--pf-accent)}.profile-achievement-grid b{font-size:14px}.profile-achievement-grid small{font-size:12px;color:var(--pf-muted)}
.profile-progress-list>button{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:18px 0;border:0;border-bottom:1px solid var(--pf-line);background:none;color:var(--pf-text);font:inherit;cursor:pointer}.profile-course-icon{width:32px;height:32px;flex-shrink:0;color:var(--pf-accent)}.profile-course-icon svg{width:100%;height:100%}.profile-progress-list>button>span:nth-child(2){flex:1}.profile-progress-list b,.profile-progress-list small{display:block}.profile-progress-list b{font-size:14px}.profile-progress-list small{font-size:12px;color:var(--pf-muted);margin:6px 0 10px}.profile-progress-list progress{width:100%;height:4px;accent-color:var(--pf-accent)}
.profile-identity-editor{display:grid;gap:20px;margin-top:24px}.profile-identity-editor>label{display:grid;gap:8px;font-size:13px;color:var(--pf-muted)}.profile-identity-editor input:not([type=file]){width:100%;min-height:48px;padding:12px;border:1px solid var(--pf-line);border-radius:12px;background:var(--pf-card);color:var(--pf-text);font:inherit;font-size:16px;box-sizing:border-box}.profile-photo-editor{display:grid;justify-items:center;gap:12px;padding:8px 0 12px}.profile-photo-editor>span{display:grid;place-items:center;width:96px;height:96px;border-radius:24px;background:var(--pf-soft);color:var(--pf-accent);font-size:30px;overflow:clip}.profile-photo-editor img{width:100%;height:100%;object-fit:cover}.profile-photo-pick{position:relative;min-height:44px;display:grid;place-items:center;padding:10px 18px;border:1px solid var(--pf-line);border-radius:12px;cursor:pointer;color:var(--pf-accent);font-size:14px}.profile-photo-pick input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.profile-photo-editor small{font-size:11px;color:var(--pf-muted)}
@media(max-width:700px){#screen-profile>.scroll-area{padding:20px 16px calc(var(--nav-h) + 28px);gap:18px}#screen-profile .profile-hero{grid-template-columns:72px minmax(0,1fr) 44px;gap:5px 12px;padding:12px 0 4px}#screen-profile .profile-avatar-big{width:62px;height:62px;grid-row:1/4;margin-left:5px}#screen-profile .profile-name{font-size:21px}#screen-profile .profile-handle{font-size:11px;line-height:1.6}#screen-profile .profile-settings-button{font-size:12px}#screen-profile .profile-stats-row{gap:12px;justify-content:space-between;padding-top:16px}#screen-profile .pstat{flex-direction:column;gap:5px}#screen-profile .pstat-val{font-size:18px}#screen-profile .pstat-lbl{font-size:9px}#screen-profile .pav-inner{font-size:24px;width:100%;height:100%;box-sizing:border-box}.profile-status{padding:20px}.profile-status h2 strong{font-size:48px}.profile-status-rank{gap:6px}.profile-status-rank>.rank-art{width:50px;height:50px}.profile-status-rank b{font-size:13px}.profile-status-rank small{font-size:10px}.profile-xp-meta{font-size:11px;margin-top:22px}.profile-rewards-entry{gap:10px;padding:10px}.profile-reward-art{width:48px;height:48px;flex-basis:48px}.profile-rewards-entry b{font-size:14px}.profile-rewards-entry small{font-size:10px}.profile-status-bottom p{font-size:11px}#screen-profile .journey-card{padding:20px}#screen-profile .memory-summary-layout{grid-template-columns:64px minmax(0,1fr);gap:14px 16px}#screen-profile .memory-cover,#screen-profile .memory-pair{width:64px;height:82px;grid-row:1}#screen-profile .memory-summary h2{font-size:17px}#screen-profile .memory-summary p{font-size:12px}#screen-profile .memory-summary-actions{grid-column:1/-1;margin-top:4px}.profile-learning-compact{padding:20px;grid-template-columns:1fr}.profile-learning-compact>.btn-primary{justify-self:stretch}.profile-learning-compact h3{font-size:18px}.profile-achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-collection-tabs button{font-size:11px}.profile-collection-tabs{gap:4px}}
@media(prefers-reduced-motion:no-preference){.profile-xp-track>i{animation:profile-xp-arrive .9s cubic-bezier(.2,.8,.2,1) both}.profile-xp-track>i:after{animation:profile-xp-sweep 5s ease-in-out 2}.profile-rewards-entry{transition:border-color .2s,background .2s}.profile-rewards-entry:hover{border-color:var(--pf-accent);background:var(--pf-soft)}}
@keyframes profile-xp-arrive{from{transform:scaleX(0);transform-origin:left}to{transform:scaleX(1);transform-origin:left}}@keyframes profile-xp-sweep{0%,35%{transform:translateX(-110%)}75%,100%{transform:translateX(110%)}}

/* Native avatar button and readable compact copy. */
#screen-profile button.profile-avatar-big{border:0;padding:0;background:transparent;cursor:pointer;color:var(--pf-text);font:inherit}
#screen-profile .memory-summary p:not(.journey-kicker){display:block;-webkit-line-clamp:unset;max-height:none;font-size:14px;line-height:1.6}
#screen-profile .memory-summary-actions button{font-size:14px}
.profile-xp-track>i{filter:hue-rotate(calc(var(--xp-hue) - 160deg))}
.profile-identity-editor .field-error:empty{display:none}
@media(max-width:700px){#screen-profile .profile-handle{font-size:12px}#screen-profile .profile-settings-button{font-size:13px}.profile-rewards-entry small{font-size:11px}.profile-collection-tabs button{font-size:12px}}

/* Journey sheets use the same surfaces and touch targets as the player profile. */
.journey-inline-message:empty{display:none}
.journey-inline-message{padding:12px 14px;border:1px solid currentColor;border-radius:12px;font-size:14px;line-height:1.5;color:var(--text);margin:12px 0;overflow-wrap:anywhere}
.memory-sheet .photo-drop,.memory-sheet .batch-photo-drop{position:relative}
.memory-sheet .photo-drop input,.memory-sheet .batch-photo-drop input{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:1}
.memory-sheet :is(.photo-drop,.batch-photo-drop):focus-within{outline:2px solid var(--cyan);outline-offset:4px}
:is(.journey-archive-sheet,.memory-sheet,.comparison-sheet,.comparison-history-sheet) .player-close{min-width:44px;min-height:44px}
.archive-toolbar button,.comparison-playback button,.comparison-history-link{min-height:44px}
body:not(.light-theme) :is(.journey-archive-sheet,.comparison-sheet,.comparison-history-sheet){background:#0c1b20;border-color:#29474e;color:#e2edef}
body:not(.light-theme) .lens-current-card{background:#10262c;border-color:#42666a}
body:not(.light-theme) .lens-current-photo{background:radial-gradient(ellipse at 70% 20%,#22473e,transparent),linear-gradient(135deg,#10272d,#12212c)}
body:not(.light-theme) .lens-current-copy small{color:#98c9c2}
body:not(.light-theme) :is(.archive-toolbar button,.archive-add-btn,.comparison-playback button){background:#10262c;color:#98e5cf;border-color:#42666a}
@media(prefers-reduced-motion:reduce){.lens-opening .journey-archive-sheet,.lens-opening .path-lens,.lens-current-card,.memory-playing .comparison-pair-image{animation:none!important;transition:none!important}}
/* A single, staged editor for identity and appearance. */
#profileIdentityForm{display:block}.profile-editor-section{margin:22px 0;padding:22px;border:1px solid var(--pf-line);border-radius:20px;background:var(--pf-card)}.profile-editor-section h3{margin:0 0 20px;font-size:20px;color:var(--pf-text)}.profile-identity-fields{display:grid;grid-template-columns:180px minmax(0,1fr);gap:28px;align-items:start}.profile-identity-inputs{display:grid;gap:18px}.profile-appearance-controls{display:grid;grid-template-columns:1fr 1fr;gap:20px}.profile-appearance-controls label{min-width:0}.profile-appearance-controls select{width:100%;min-width:0;min-height:48px;color:var(--pf-text);background:var(--pf-bg);border:1px solid var(--pf-line);border-radius:12px;padding:10px;font:inherit}.profile-appearance-preview{height:260px;position:relative;isolation:isolate;overflow:hidden;background:var(--pf-bg);border:1px solid var(--pf-line);border-radius:18px;margin:0 0 24px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px;box-sizing:border-box;color:var(--pf-text)}#profileAppearanceBackdrop{position:absolute;inset:0;z-index:-1;opacity:.35}#profileAppearanceBackdrop canvas,#profileAppearanceBackdrop img{width:100%;height:100%;object-fit:cover;display:block}#profileAppearanceAvatar{width:90px;height:90px;position:relative;isolation:isolate;flex-shrink:0}#profileAppearanceAvatar>span{position:absolute;inset:13%;border-radius:16%;display:grid;place-items:center;background:var(--pf-soft);color:var(--pf-text);font-size:28px;overflow:hidden}#profileAppearanceAvatar>span img{height:100%;width:100%;object-fit:cover}#profileAppearanceAvatar .earned-frame-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.profile-appearance-preview>b{padding:4px 8px;border-radius:8px;background:var(--pf-bg);max-width:100%;overflow-wrap:anywhere}.profile-appearance-preview>small{padding:4px 8px;background:var(--pf-bg);border-radius:8px}.profile-appearance-note,#profileCardUpload small{display:block;color:var(--pf-muted);line-height:1.65;font-size:12px}#profileIdentityForm [hidden]{display:none!important}.profile-editor-save{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:16px 0}.profile-editor-save .btn-primary{flex:1;min-height:48px}.profile-editor-questionnaire{padding:20px 0;border-top:1px solid var(--pf-line);color:var(--pf-text)}#screen-profile #profileEditEntry{grid-column:1/-1;grid-row:auto;width:100%;order:10}
@media(max-width:760px){.profile-editor-section{padding:16px;margin:16px 0}.profile-identity-fields,.profile-appearance-controls{grid-template-columns:1fr;gap:20px}.profile-identity-fields .profile-photo-editor{justify-self:center}.profile-identity-inputs{width:100%}.profile-appearance-preview{height:280px;padding:18px}.profile-editor-save{flex-direction:column;align-items:stretch}.profile-editor-save .btn-primary{width:100%;min-width:0}.profile-editor-questionnaire .section-link{white-space:normal;line-height:1.6}}
#profileIdentityForm .profile-identity-inputs>label,#profileIdentityForm .profile-appearance-controls>label{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;text-align:left;width:100%;gap:8px;box-sizing:border-box}#profileIdentityForm .profile-identity-inputs input{width:100%;min-width:0}#profileIdentityForm .profile-identity-inputs{min-width:0}#profileEditorContent:has(#profileIdentityForm){width:min(100%,900px)}

:is(.rank-framed,#profileAppearanceAvatar)[data-legacy-frame=violet]>.earned-frame-art{filter:hue-rotate(65deg)}:is(.rank-framed,#profileAppearanceAvatar)[data-legacy-frame=gold]>.earned-frame-art{filter:hue-rotate(220deg)}:is(.rank-framed,#profileAppearanceAvatar)[data-legacy-frame=steel]>.earned-frame-art{filter:grayscale(.85)}

/* A quiet, card-like workspace for a private moment. */
#memoryOverlay{align-items:center;justify-content:center;padding:12px;box-sizing:border-box;animation:none}
#memoryOverlay .memory-sheet{box-sizing:border-box;width:min(720px,100%);max-height:calc(100dvh - 24px);padding:24px;border:1px solid #29474e;border-radius:24px;background:#0c1b20;color:#e2edef;overflow-x:hidden;overscroll-behavior:contain;isolation:isolate}
#memoryOverlay .memory-sheet>.player-handle{display:none}
#memoryOverlay .memory-sheet>.player-close{top:34px;right:34px;z-index:3;width:44px;height:44px;background:#0c2329;border-color:#41646a;color:#c6e5e2}
#memoryOverlay .memory-compose-head{position:relative;isolation:isolate;overflow:hidden;min-height:0;padding:22px 72px 20px 22px;border:1px solid #31565a;border-radius:18px;background:linear-gradient(120deg,#112b2e,#10252c 62%,#123641);color:#e4f2f1}
#memoryOverlay .memory-compose-head:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#112b2ef0 0%,#112b2ed0 55%,#112b2e30 100%)}
#memoryOverlay .memory-compose-head .journey-kicker{position:relative;margin:0 0 9px;color:#94e4d4;font:700 10px/1.4 Inter,sans-serif;letter-spacing:.1em}
#memoryOverlay .memory-compose-head h2{position:relative;padding:0;margin:0 0 8px;color:inherit;font:700 clamp(24px,3vw,30px)/1.2 Inter,sans-serif;letter-spacing:-.025em;overflow-wrap:anywhere}
#memoryOverlay .memory-dialog-sub{position:relative;max-width:480px;margin:0;color:#b1c9cb;font:400 13px/1.55 Inter,sans-serif;overflow-wrap:anywhere}
#memoryOverlay .memory-compose-orbit{position:absolute;z-index:-2;pointer-events:none;right:-22px;top:-60px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,#5de1cf1b 0 14%,#45c1c31a 24%,transparent 68%)}
#memoryOverlay .memory-compose-orbit i{position:absolute;inset:20%;border:1px solid #79d9cd66;border-radius:50%;transform:rotate(-24deg) scaleX(.52);box-shadow:0 0 18px #6bddcb20}
#memoryOverlay .memory-compose-orbit i:nth-child(2){inset:14%;transform:rotate(38deg) scaleX(.58);border-color:#76b9d955}
#memoryOverlay .memory-compose-orbit i:nth-child(3){inset:7%;transform:rotate(-52deg) scaleX(.7);border-color:#b1e5dc3b}
#memoryOverlay .memory-mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:18px 0 16px;padding:5px;border:1px solid #29474e;border-radius:14px;background:#0a1d23}
#memoryOverlay .memory-mode-tabs button{min-width:0;min-height:44px;padding:9px 10px;border-radius:10px;font:600 13px/1.35 Inter,sans-serif;white-space:normal}
#memoryOverlay .memory-mode-tabs button.active{background:#193c39;color:#a8eee0;border-color:#73c9b9}
#memoryOverlay .memory-direction-label{display:block;margin:0 0 16px;color:var(--text2);font:600 12px/1.4 Inter,sans-serif}
#memoryOverlay .memory-direction-label select{box-sizing:border-box;min-height:46px;margin-top:7px;padding:10px 12px;border-radius:11px;font:400 16px/1.4 Inter,sans-serif}
#memoryOverlay #memorySingleFields:not(.hidden){display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:stretch;gap:12px}
#memoryOverlay :is(.photo-drop,.batch-photo-drop){box-sizing:border-box;position:relative;min-width:0;min-height:150px;height:100%;border-radius:15px;border:1px dashed #65958d;background:linear-gradient(145deg,#132e33,#10272d);overflow:hidden}
#memoryOverlay .photo-drop-preview{padding:12px;box-sizing:border-box;text-align:center}
#memoryOverlay .photo-drop-preview span,#memoryOverlay .batch-photo-drop>span{display:grid;place-items:center;width:40px;height:40px;border:1px solid #71bcaf;border-radius:13px;background:#1b4842;color:#a5e9d9;font-size:24px;line-height:1}
#memoryOverlay .photo-drop-preview b,#memoryOverlay .batch-photo-drop b{color:var(--text);font-size:13px;line-height:1.4;margin:8px 0 3px}
#memoryOverlay .photo-drop-preview small,#memoryOverlay .batch-photo-drop small{font-size:11px;line-height:1.5;color:var(--text2)}
#memoryOverlay .photo-drop-preview:has(img){padding:0}
#memoryOverlay .memory-field{display:flex;flex-direction:column;min-width:0;margin:0;color:var(--text2);font:700 10px/1.4 Inter,sans-serif;letter-spacing:.08em}
#memoryOverlay .memory-field textarea{box-sizing:border-box;flex:1;min-height:120px;height:auto;margin:7px 0 0;padding:13px;border-radius:13px;font:400 16px/1.5 Inter,sans-serif;resize:vertical}
#memoryOverlay .memory-field>span{position:static;align-self:flex-end;margin:5px 2px 0;font-size:11px}
#memoryOverlay .batch-photo-drop{height:auto;min-height:120px;padding:15px;text-align:center}
#memoryOverlay .batch-memory-list{gap:10px}
#memoryOverlay .batch-memory-empty{margin:0;padding:12px;font-size:12px;line-height:1.45}
#memoryOverlay .batch-memory-row{box-sizing:border-box;grid-template-columns:64px minmax(0,1fr) 44px;gap:10px;padding:10px;border-radius:14px}
#memoryOverlay .batch-memory-row img{width:64px;height:70px;object-fit:cover}
#memoryOverlay .batch-memory-row span{font-size:10px;line-height:1.4}
#memoryOverlay .batch-memory-row textarea{box-sizing:border-box;min-height:66px;height:66px;font-size:16px;line-height:1.45}
#memoryOverlay .batch-memory-row button{width:44px;height:44px;min-width:44px;border:1px solid var(--border);font-size:20px}
#memoryOverlay .memory-compose-feeling{margin-top:18px;padding:16px;border:1px solid #29474e;border-radius:15px;background:#10272b}
#memoryOverlay .memory-feeling-question{margin:0 0 10px;color:var(--text);font:600 14px/1.4 Inter,sans-serif}
#memoryOverlay .memory-feelings{gap:8px}
#memoryOverlay .memory-feelings>button{box-sizing:border-box;min-height:44px;padding:9px 13px;font:500 12px/1.35 Inter,sans-serif;white-space:normal}
#memoryOverlay .memory-save{min-height:50px;margin-top:16px;gap:8px;border-radius:12px;font-size:14px;white-space:normal}
#memoryOverlay :is(button,select,textarea):focus-visible{outline:2px solid #78dfcf;outline-offset:3px}
body.light-theme #memoryOverlay .memory-sheet{border-color:#cbd9ec;background:#fff;color:#203550;--text:#203550;--text2:#526b83;--text3:#6d8294;--border:#cbd9e4;--cyan:#237b83}
body.light-theme #memoryOverlay .memory-sheet>.player-close{background:#f2f8fa;border-color:#cbdce2;color:#3c6070}
body.light-theme #memoryOverlay .memory-compose-head{background:linear-gradient(120deg,#e8f7f4,#edf7fb 65%,#dceef7);border-color:#c2ddd9;color:#183d49}
body.light-theme #memoryOverlay .memory-compose-head:after{background:linear-gradient(90deg,#eaf7f5f5 0%,#eaf7f5df 55%,#eaf7f530 100%)}
body.light-theme #memoryOverlay .memory-compose-head .journey-kicker{color:#237e76}
body.light-theme #memoryOverlay .memory-dialog-sub{color:#4b6874}
body.light-theme #memoryOverlay .memory-compose-orbit{background:radial-gradient(circle,#54bfb52a,transparent 68%)}
body.light-theme #memoryOverlay .memory-compose-orbit i{border-color:#31998f75;box-shadow:none}
body.light-theme #memoryOverlay .memory-mode-tabs{background:#f0f6f7;border-color:#d0e2e2}
body.light-theme #memoryOverlay .memory-mode-tabs button.active{background:#d9f1eb;border-color:#79bdb2;color:#166f67}
body.light-theme #memoryOverlay :is(.photo-drop,.batch-photo-drop){background:linear-gradient(145deg,#f2fbf9,#eaf5f9);border-color:#8abeb6}
body.light-theme #memoryOverlay :is(.photo-drop-preview span,.batch-photo-drop>span){background:#d8f1e9;border-color:#87bdb3;color:#237c73}
body.light-theme #memoryOverlay .memory-compose-feeling{background:#f5f9fa;border-color:#d6e4e5}
body.light-theme #memoryOverlay .memory-feelings button{background:#fff;color:#4e6575;border-color:#cbdde1}
body.light-theme #memoryOverlay .memory-feelings button.active{background:#ddf3ec;color:#186f65;border-color:#80c2b5}
@media(max-width:600px){#memoryOverlay{align-items:flex-end;padding:6px 6px 0}#memoryOverlay .memory-sheet{width:100%;max-height:calc(100dvh - 6px);padding:14px 14px calc(16px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0}#memoryOverlay .memory-sheet>.player-handle{display:block;margin:0 auto 12px}#memoryOverlay .memory-sheet>.player-close{top:25px;right:24px}#memoryOverlay .memory-compose-head{padding:17px 58px 17px 16px;border-radius:16px}#memoryOverlay .memory-compose-head h2{font-size:23px}#memoryOverlay .memory-dialog-sub{font-size:12px}#memoryOverlay .memory-compose-orbit{right:-38px;top:-48px;width:180px;height:180px}#memoryOverlay .memory-mode-tabs{margin:14px 0}#memoryOverlay .memory-direction-label{margin-bottom:14px}#memoryOverlay #memorySingleFields:not(.hidden){grid-template-columns:minmax(0,1fr);gap:12px}#memoryOverlay .photo-drop{height:118px;min-height:118px}#memoryOverlay .memory-field textarea{min-height:94px}#memoryOverlay .memory-compose-feeling{margin-top:14px;padding:14px}#memoryOverlay .memory-feelings>button{flex:1 1 calc(50% - 8px)}#memoryOverlay .memory-save{margin-top:14px}}
@media(max-width:359px){#memoryOverlay .memory-sheet{padding-inline:12px}#memoryOverlay .memory-compose-head{padding-left:14px}#memoryOverlay .memory-compose-head h2{font-size:21px}#memoryOverlay .memory-mode-tabs button{font-size:12px}#memoryOverlay .batch-memory-row{grid-template-columns:52px minmax(0,1fr) 44px;gap:8px}#memoryOverlay .batch-memory-row img{width:52px;height:66px}}
@media(max-width:600px){body:has(#memoryOverlay:not(.hidden)):has(#testerSaveNotice:not([hidden])) #memoryOverlay{padding-top:68px}body:has(#memoryOverlay:not(.hidden)):has(#testerSaveNotice:not([hidden])) #memoryOverlay .memory-sheet{max-height:calc(100dvh - 68px)}body:has(#memoryOverlay:not(.hidden)):has(#testerSaveNotice.has-error:not([hidden])) #memoryOverlay{padding-top:min(216px,48dvh)}body:has(#memoryOverlay:not(.hidden)):has(#testerSaveNotice.has-error:not([hidden])) #memoryOverlay .memory-sheet{max-height:calc(100dvh - min(216px,48dvh))}}
@media(prefers-reduced-motion:no-preference){#memoryOverlay .memory-compose-orbit{animation:memory-orbit-drift 14s ease-in-out infinite alternate}}
@keyframes memory-orbit-drift{from{transform:rotate(-5deg)}to{transform:rotate(7deg)}}
