:root{--bg:#090b10;--panel:#11151e;--panel2:#181d29;--text:#f6f4ee;--muted:#929aaa;--line:#292f3d;--accent:#f4bd61;--accent2:#e76f51;--good:#58d6a6;--danger:#ff6b7c;--radius:22px;color-scheme:dark;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{min-height:100dvh;background:radial-gradient(circle at 90% -10%,#282036 0,transparent 36%),var(--bg)}button,input{font:inherit}button{color:inherit}.shell{width:min(1180px,100%);min-height:100dvh;margin:auto;padding:max(18px,env(safe-area-inset-top)) 18px max(92px,env(safe-area-inset-bottom))}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.brand{display:flex;align-items:center;gap:11px;border:0;background:none;padding:0;text-align:left;cursor:pointer}.brand img{width:42px;height:42px}.brand strong{display:block;font-size:1.04rem;letter-spacing:.02em}.brand small{display:block;color:var(--muted);font-size:.72rem;margin-top:2px}.iconbtn,.pill,.back{border:1px solid var(--line);background:#151a24;border-radius:999px;min-height:42px;padding:0 15px;cursor:pointer}.iconbtn{width:42px;padding:0;font-size:1.1rem}.hero{margin:28px 0 24px}.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:.16em;font-size:.72rem;font-weight:800}.hero h1{font-size:clamp(2rem,8vw,4.8rem);line-height:.97;letter-spacing:-.055em;margin:10px 0 12px;max-width:770px}.hero p{color:var(--muted);font-size:1rem;max-width:560px;line-height:1.6}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.stat{background:linear-gradient(145deg,#161b25,#0e1118);border:1px solid var(--line);border-radius:18px;padding:16px}.stat b{font-size:1.3rem;display:block}.stat span{font-size:.74rem;color:var(--muted)}.sectionhead{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:30px 0 14px}.sectionhead h2{margin:0;font-size:1.22rem}.sectionhead span{color:var(--muted);font-size:.8rem}.gamegrid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.game{position:relative;overflow:hidden;border:1px solid var(--line);background:var(--panel);border-radius:var(--radius);min-height:166px;padding:17px;text-align:left;cursor:pointer;transition:.2s transform,.2s border}.game:hover{transform:translateY(-3px);border-color:#596174}.game::after{content:"";position:absolute;width:120px;height:120px;border-radius:50%;right:-45px;bottom:-45px;background:var(--game);filter:blur(2px);opacity:.45}.game .sigil{font-size:2rem}.game h3{margin:27px 0 5px;font-size:1rem}.game p{margin:0;color:var(--muted);font-size:.75rem}.progress{height:7px;background:#252a35;border-radius:9px;overflow:hidden}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--accent2),var(--accent));border-radius:inherit}.game .progress{margin-top:13px;width:75%}.search{position:relative;margin:8px 0 14px}.search input{width:100%;border:1px solid var(--line);background:#11151d;color:var(--text);border-radius:17px;padding:15px 45px 15px 17px;outline:none}.search input:focus{border-color:#777f92}.filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.pill.active{background:var(--text);color:var(--bg);border-color:var(--text)}.setgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.setcard{border:1px solid var(--line);background:linear-gradient(145deg,#171c27,#10131a);border-radius:20px;padding:18px;text-align:left;cursor:pointer}.setcard:hover{border-color:#596174}.setcard .code{font-size:.7rem;color:var(--accent);font-weight:800;letter-spacing:.12em}.setcard h3{margin:8px 0 16px}.setmeta{display:flex;justify-content:space-between;color:var(--muted);font-size:.75rem;margin-top:9px}.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-top:16px}.card{border:1px solid var(--line);background:var(--panel);border-radius:18px;overflow:hidden;min-width:0}.art{aspect-ratio:5/7;background:linear-gradient(145deg,var(--cardcolor),#111722 70%);display:flex;flex-direction:column;justify-content:space-between;padding:13px;position:relative}.art::after{content:"";position:absolute;inset:12%;border:1px solid #ffffff25;border-radius:50%;transform:rotate(-16deg)}.number,.rarity{position:relative;z-index:1;font-size:.68rem;font-weight:800}.rarity{align-self:flex-end;background:#090b10aa;border-radius:99px;padding:5px 8px}.cardbody{padding:12px}.cardbody h3{font-size:.84rem;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cardbody small{color:var(--muted)}.actions{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.qty{display:flex;align-items:center;gap:10px}.qty button,.fav{width:31px;height:31px;border-radius:10px;border:1px solid var(--line);background:var(--panel2);cursor:pointer}.qty b{min-width:14px;text-align:center}.fav.on{color:#ffca55;background:#382f18}.empty{text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:20px;padding:44px 20px;grid-column:1/-1}.bottomnav{position:fixed;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:5px;background:#151923e8;border:1px solid #303746;backdrop-filter:blur(18px);padding:6px;border-radius:18px;z-index:10}.bottomnav button{border:0;background:transparent;border-radius:13px;padding:10px 16px;color:var(--muted);cursor:pointer}.bottomnav button.active{background:var(--text);color:var(--bg)}.breadcrumb{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.8rem;margin:6px 0 22px}.breadcrumb button{border:0;background:none;color:var(--text);padding:0;cursor:pointer}.titleline{display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:18px}.titleline h1{font-size:clamp(1.8rem,6vw,3.2rem);margin:0}.titleline p{color:var(--muted);margin:6px 0 0}.sync{font-size:.72rem;color:var(--good)}
@media(max-width:850px){.gamegrid{grid-template-columns:repeat(2,1fr)}.game:last-child{grid-column:1/-1}.cards{grid-template-columns:repeat(3,1fr)}.setgrid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.shell{padding-left:14px;padding-right:14px}.hero{margin-top:18px}.hero h1{max-width:360px}.stats{grid-template-columns:repeat(3,1fr)}.stat{padding:13px 10px}.stat b{font-size:1.05rem}.game{min-height:145px}.game h3{margin-top:18px}.setgrid{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,1fr);gap:9px}.titleline{align-items:start;flex-direction:column}.bottomnav{width:calc(100% - 28px);justify-content:space-around}.bottomnav button{padding:10px 12px}.brand small{display:none}}

/* TCG Collection v2 */
.game{background:linear-gradient(145deg,#151922,#0d1016);border-radius:18px}.game.pending{opacity:.66}.wordmark{display:inline-flex;min-height:39px;align-items:center;color:#fff;font-size:1rem;font-weight:950;letter-spacing:.06em;text-shadow:0 2px 14px var(--game)}.status{display:inline-block;margin-top:13px;border:1px solid var(--line);border-radius:999px;padding:4px 8px;font-size:.65rem;color:var(--muted)}.status.on{color:var(--good);border-color:#58d6a644}.realart{aspect-ratio:5/7;background:#090b10;display:flex;align-items:center;justify-content:center;overflow:hidden}.realart img{width:100%;height:100%;object-fit:contain}.fallback{color:var(--muted);font-size:.7rem;text-align:center;padding:10px}.spinner{display:inline-block;width:28px;height:28px;border:3px solid #ffffff22;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin-bottom:10px}@keyframes spin{to{transform:rotate(360deg)}}.scanpanel{max-width:650px;margin:22px auto}.scanpanel h1{font-size:clamp(2rem,8vw,3.8rem);margin:8px 0}.scanpanel>p{color:var(--muted);line-height:1.6}.scanicon{width:70px;height:70px;border:1px solid var(--line);border-radius:22px;display:grid;place-items:center;font-size:2.4rem;margin-bottom:20px;background:var(--panel)}.camera{display:block;border:1px dashed #5c6474;border-radius:20px;padding:28px;text-align:center;cursor:pointer;background:#11151d;margin:22px 0}.camera input{display:none}.field{display:block;color:var(--muted);font-size:.8rem;margin:14px 0}.field input,.field select{display:block;width:100%;margin-top:7px;border:1px solid var(--line);background:#11151d;color:var(--text);border-radius:14px;padding:14px}.primary{width:100%;border:0;border-radius:14px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#18120b;font-weight:800;padding:14px;cursor:pointer}.primary.small{margin-top:12px;padding:9px}.previewimg{display:block;max-width:220px;max-height:310px;object-fit:contain;margin:0 auto 18px;border-radius:14px}.scanresults{grid-template-columns:repeat(4,1fr)}
@media(max-width:700px){.scanresults{grid-template-columns:repeat(2,1fr)}.gamegrid{grid-template-columns:repeat(2,1fr)}}
