:root{--ink:#3d3044;--muted:#897a91;--rose:#ef8cab;--rose-dark:#a44068;--lilac:#a898dc;--mint:#91d9c4;--cream:#fff9f3;--line:#ede2e9;font-family:ui-rounded,'SF Pro Rounded',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:#fcf3f3;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 0% 5%,#fbe7d5,transparent 55%),radial-gradient(ellipse at 100% 80%,#ebe4fa,transparent 55%),#fcf3f3;min-height:100dvh}
button,a,input{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default;opacity:.4}
button:focus-visible,a:focus-visible{outline:3px solid #8d68d6;outline-offset:3px}
button,input{accent-color:var(--rose-dark)}
[hidden]{display:none!important}
.app-shell{max-width:480px;margin:auto;padding:calc(14px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom))}
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}
.brand{display:flex;align-items:center;gap:9px;color:var(--ink);text-decoration:none;font-weight:850;font-size:22px;letter-spacing:-.8px}
.brand em{font-style:normal;color:var(--rose-dark)}
.brand small{display:block;color:var(--muted);font-size:9px;letter-spacing:.05px;font-weight:500;margin-top:2px}
.brand-mark{width:38px;height:38px;border:1px solid #fff;background:linear-gradient(135deg,#f8bbcd,#dacbf1);display:grid;place-items:center;font-size:27px;color:white;border-radius:13px;box-shadow:0 6px 15px #cda7c144}
.icon-btn{border:1px solid white;border-radius:50%;width:34px;height:34px;background:#fffa;color:#8b7296;font-size:17px;font-weight:700}
.camera-card{width:100%;aspect-ratio:4/5;max-height:54dvh;background:#2c2635;border:4px solid white;border-radius:29px;box-shadow:0 13px 36px #6a49751b;position:relative;overflow:hidden;isolation:isolate}
.camera-card>video,.camera-card>canvas{position:absolute;width:100%;height:100%;object-fit:contain;inset:0}
.camera-card>video{visibility:hidden}
.camera-card.front>canvas{transform:scaleX(-1)}
#paperOverlay{position:absolute;pointer-events:none;visibility:hidden}
#paperPolygon{fill:#8ce8cc1a;stroke:#a9f5d8;stroke-width:6;stroke-linejoin:round}
.camera-card.front #paperOverlay{transform:scaleX(-1)}
.camera-top{position:absolute;z-index:2;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none}
.live-pill,.quality-pill{border-radius:99px;background:#ffffff18;color:#f4e9f1;font-size:8px;letter-spacing:1.2px;padding:7px 9px;display:flex;align-items:center;gap:5px;backdrop-filter:blur(10px)}
.live-pill i{width:5px;height:5px;background:#b2a3b6;border-radius:50%}
.live-pill i.live{background:#a3f6ce;box-shadow:0 0 10px #98f6ca}
.quality-pill{background:#f5dba4;color:#604421;font-weight:900;letter-spacing:.4px}
.empty-state{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:35px 15px 20px;background:radial-gradient(circle at 50% 5%,#534257,transparent 65%),linear-gradient(145deg,#332b3c,#242130)}
.camera-mascot{width:88px;height:66px;background:linear-gradient(140deg,#f3bfd1,#c4a6d4);border-radius:20px;position:relative;box-shadow:0 9px 20px #0d081f4d;transform:rotate(-9deg);margin-bottom:24px}
.camera-mascot:before{content:'';position:absolute;width:30px;height:9px;background:#ecc4d7;top:-7px;left:16px;border-radius:6px 6px 0 0}
.camera-mascot i{position:absolute;width:40px;height:40px;left:26px;top:12px;border-radius:50%;border:7px solid #fff7;background:radial-gradient(circle at 40% 40%,#927aa4,#483d60);box-shadow:inset 0 0 0 3px #6f5a87}
.camera-mascot b{position:absolute;left:40px;top:21px;font-size:21px;color:#ffefef}
.camera-mascot>span{position:absolute;right:-25px;top:-19px;color:#f5d699;font-size:25px;animation:twinkle 2.5s ease-in-out infinite}
.mini-label{font-size:8px;letter-spacing:2px;font-weight:800;color:var(--rose-dark);margin:0}
.empty-state .mini-label{color:#dac3da}
.empty-state h1{color:#fff2f5;font-size:25px;line-height:1.2;letter-spacing:-.9px;margin:8px 0 9px}
.empty-state>p:not(.mini-label){color:#d5c6da;font-size:11px;line-height:1.6;margin:0 0 16px}
.primary{border:0;border-radius:15px;padding:13px 19px;background:linear-gradient(110deg,#f29ab5,#eaa4bf);color:#4b2e40;font-weight:850;font-size:12px;box-shadow:0 7px 16px #d0749d21;display:inline-flex;align-items:center;justify-content:center;gap:20px;min-height:43px}
.primary>span{font-size:11px}
.primary.wide{width:100%;justify-content:space-between}
.empty-state .primary{background:#f4c4d2;color:#5e3b50;box-shadow:0 5px 25px #f2a2c21a;min-width:155px}
.desktop-note{max-width:230px;background:#ffffff0b;border:1px solid #ffffff1c;padding:9px 12px;border-radius:12px;font-size:10px!important;margin:10px 0 0!important}
.live-tools{position:absolute;right:11px;top:55px;display:flex;flex-direction:column;gap:8px;z-index:2}
.glass-btn{width:44px;height:44px;display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px solid #fff3;background:#1c142770;color:white;backdrop-filter:blur(10px);border-radius:15px;font-size:22px}
.glass-btn small{font-size:6px;letter-spacing:.7px}
.glass-btn.on{background:#f7dfa2;color:#5b4927}
.live-bottom{position:absolute;bottom:13px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:5px}
.live-bottom>span{color:white;font-size:9px;background:#1c14277a;border-radius:20px;padding:7px 9px;backdrop-filter:blur(10px);max-width:65%}
.compare-btn{border:1px solid #fff4;background:#fff2;backdrop-filter:blur(10px);border-radius:99px;padding:8px 10px;color:white;font-size:9px;font-weight:700;touch-action:none;user-select:none;-webkit-user-select:none}
.compare-btn:active,.compare-btn.pressed{background:#f5dbac;color:#4d3b30}
.record-clock{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#e34d6d;color:white;font-size:10px;padding:6px 10px;border-radius:99px;font-variant-numeric:tabular-nums}
.busy{position:absolute;inset:0;background:#241b30ba;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#fff;font-size:12px;backdrop-filter:blur(4px)}
.busy i{width:28px;height:28px;border:3px solid #fff3;border-top-color:#facadb;border-radius:50%;animation:spin .7s linear infinite}
.mode-panel{margin-top:17px}
.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.section-title h2{font-size:13px;letter-spacing:-.2px;margin:0;font-weight:850}
.section-title h2 span{color:#d5aa7d;margin-left:3px}
.section-title>small{font-size:8px;color:var(--muted);letter-spacing:.4px}
.modes{display:grid;gap:7px}
.mode{display:flex;align-items:center;gap:11px;border:1px solid #fff;background:#ffffffb3;border-radius:18px;width:100%;padding:10px 12px;text-align:left;position:relative;color:var(--ink);box-shadow:0 4px 15px #70507904;transition:background .2s,border-color .2s}
.mode[aria-pressed=true]{border-color:#e49ab7;background:#fff7fa;box-shadow:0 5px 15px #de8fa418}
.mode-icon{height:38px;width:38px;display:grid;place-items:center;border-radius:13px;flex-shrink:0;font-size:24px}
.scan-icon{background:#e0f1ea;color:#4e9587}
.night-icon{background:#ebe2f5;color:#8972ac}
.enhance-icon{background:#fbe6d9;color:#c78760}
.mode-text{flex:1;min-width:0}
.mode-text b{display:block;font-size:14px;letter-spacing:-.1px}
.mode-text b em{font-style:normal;font-size:7px;margin-left:4px;vertical-align:middle;color:var(--rose-dark);background:#f7dce8;border-radius:5px;padding:2px 4px;letter-spacing:.5px}
.mode-text small{display:block;font-size:10px;color:var(--muted);margin-top:4px;line-height:1.4}
.switch{height:21px;width:35px;border-radius:99px;background:#e6dce6;position:relative;flex-shrink:0}
.switch:after{content:'';position:absolute;left:3px;top:3px;width:15px;height:15px;background:white;border-radius:50%;box-shadow:0 1px 4px #6146641a;transition:.2s}
.mode[aria-pressed=true] .switch{background:#df91ad}
.mode[aria-pressed=true] .switch:after{left:17px}
.mode-caption{font-size:10px;color:var(--muted);text-align:center;margin:9px 0 0;min-height:14px;line-height:1.4}
.control-dock{display:grid;grid-template-columns:1fr 1fr 1fr;justify-items:center;align-items:center;padding:12px 20px 3px}
.gallery-btn,.record-btn{border:0;background:none;color:var(--ink);position:relative;display:flex;align-items:center;flex-direction:column;gap:4px}
.gallery-btn>span{height:42px;width:42px;border:3px solid white;border-radius:14px;background:#eee1ed;display:grid;place-items:center;font-size:25px;color:#aa8daf;box-shadow:0 4px 13px #80658c11;overflow:hidden}
.gallery-btn img{width:100%;height:100%;object-fit:cover}
.gallery-btn>b{position:absolute;top:-2px;right:0;min-width:16px;height:16px;display:grid;place-items:center;border-radius:9px;background:#ad91b8;color:#fff;font-size:8px;border:2px solid #fbf3f5}
.gallery-btn small,.record-btn small,.shutter-wrap>small{font-size:8px;color:var(--muted);font-weight:650}
.record-btn>span{height:42px;width:42px;border:1px solid #fff;border-radius:50%;background:#fffb;display:grid;place-items:center;font-size:21px;color:#dd889f}
.record-btn.recording>span{background:#dd607f;color:white;animation:twinkle 1s infinite}
.shutter-wrap{text-align:center;display:flex;align-items:center;flex-direction:column;gap:7px}
.shutter{height:65px;width:65px;background:linear-gradient(135deg,#f0a9bc,#c8b2dc);border:4px solid white;border-radius:50%;padding:5px;box-shadow:0 5px 20px #cb8dac36}
.shutter i{display:block;width:100%;height:100%;border:1.5px solid #fffc;border-radius:50%}
.shutter-wrap>small{letter-spacing:1.3px;font-size:7px}
footer{text-align:center;margin-top:10px;color:#9a8b9f;font-size:8px}
footer>span{font-size:8px}
footer p{margin:7px 0 0;font-size:10px}
footer b{font-weight:800;color:#9d6188}
footer i{font-style:normal;color:#dd9db4;margin-left:3px}
.sheet{padding:20px;border:1px solid #fff;border-radius:28px;background:#fffaf8;color:var(--ink);width:min(94vw,460px);max-height:90dvh;overflow:auto;box-shadow:0 20px 80px #291d3b55}
.sheet::backdrop{background:#2b203a9c;backdrop-filter:blur(7px)}
.sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:13px}
.sheet-heading h2{font-size:21px;letter-spacing:-.6px;margin:4px 0 0}
.close-btn{border:0;background:#f0e6ed;color:#90758c;width:32px;height:32px;border-radius:12px;font-size:24px;flex-shrink:0}
.sheet p{font-size:12px;line-height:1.6;color:#86748a}
.info-sheet h2{font-size:23px;letter-spacing:-.7px}
.info-row{background:white;border:1px solid #f2e7ee;border-radius:15px;padding:12px;margin:8px 0}
.info-row>b{font-size:12px}
.info-row p{margin:6px 0 0;font-size:11px}
.fineprint{font-size:10px!important;color:#948399!important}
.credit{text-align:center}
.credit b{color:#9d6188}
.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0 17px}
.gallery-tile{padding:0;position:relative;border:0;border-radius:13px;background:#e5d8e6;aspect-ratio:3/4;overflow:hidden}
.gallery-tile img{width:100%;height:100%;object-fit:cover}
.gallery-tile small{position:absolute;bottom:4px;left:4px;background:#302039aa;color:white;border-radius:5px;font-size:8px;padding:3px 5px}
.gallery-empty{padding:45px 0;text-align:center}
.edit-tabs{display:flex;gap:6px;margin-bottom:10px}
.edit-tabs button,.scan-styles button{border:1px solid var(--line);background:white;border-radius:10px;padding:9px 12px;font-size:11px;color:var(--muted)}
.edit-tabs button[aria-pressed=true],.scan-styles button[aria-pressed=true]{background:#f4deeb;color:#825373;border-color:#e9bcd4}
.scan-workspace{position:relative;width:100%;background:#32283a;border-radius:14px;overflow:hidden;max-height:45dvh;aspect-ratio:3/4}
.scan-workspace>canvas{width:100%;height:100%;object-fit:contain;display:block}
.scan-workspace>svg{position:absolute;touch-action:none;overflow:visible}
.scan-workspace path{stroke:#a6f2d8;stroke-width:5;fill:#9cefd819}
.scan-workspace circle{fill:#fff;stroke:#7bcbb3;stroke-width:8;cursor:grab;touch-action:none}
.edit-hint{font-size:10px!important;margin:10px 0}
.book-toggle{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:750;margin:12px 0}
.book-toggle input{width:18px;height:18px}
.book-controls{padding:10px;background:#f4ecef;border-radius:12px;margin-bottom:12px}
.book-controls label{font-size:10px;display:flex;justify-content:space-between;align-items:center;gap:10px;margin:6px 0}
.book-controls input{flex:1;min-width:0;max-width:65%}
.scan-styles{display:flex;gap:5px;margin:12px 0}
.scan-styles button{flex:1;padding:9px 4px;font-size:10px}
.asset-sheet img,.asset-sheet video{width:100%;max-height:60dvh;object-fit:contain;border-radius:14px;background:#2e2335}
.asset-actions{display:flex;gap:7px;justify-content:space-between;margin-top:13px;flex-wrap:wrap}
.ghost,.danger{border:0;padding:12px 15px;border-radius:13px;font-size:12px;font-weight:750;background:#f1e8f0;color:#886881}
.danger{background:#fbe8ec;color:#b25268}
.delete-confirm{margin-top:13px;background:#fbeaf0;padding:12px;border-radius:13px}
.delete-confirm p{margin-top:0}
.toast{position:fixed;z-index:100;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:#41314b;color:white;border:1px solid #ffffff1a;border-radius:15px;padding:12px 15px;font-size:11px;max-width:min(88vw,410px);width:max-content;text-align:center;box-shadow:0 5px 20px #39214433;opacity:0;pointer-events:none;transition:.2s}
.toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes spin{to{transform:rotate(360deg)}
}
@keyframes twinkle{50%{opacity:.65;transform:scale(.94)}
}
@media(min-width:700px){.app-shell{padding-top:25px;padding-bottom:25px}
.camera-card{max-height:none;height:440px}
.empty-state h1{font-size:29px}
.mode-text small{font-size:10px}
.mode-text b{font-size:13px}
.section-title h2{font-size:14px}
.mode-caption{font-size:9px}
}
@media(max-height:760px) and (max-width:600px){.camera-card{max-height:47dvh}
.camera-mascot{transform:scale(.75) rotate(-9deg);margin-bottom:8px}
.empty-state h1{font-size:21px}
.empty-state>p:not(.mini-label){font-size:10px;margin-bottom:10px}
.mode{padding:8px 11px}
.mode-panel{margin-top:12px}
.mode-caption{margin-top:6px}
.control-dock{padding-top:9px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}
}

