:root{color-scheme:dark;--bg:#111923;--panel:#1d2937;--text:#f7f8fa;--muted:#a7b5c5;--accent:#a5f2cd}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px system-ui,sans-serif}main{max-width:650px;margin:auto;padding:24px 16px 36px}header,.status,.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px}header small{font-size:10px;letter-spacing:2px;color:var(--muted)}h1{font-size:36px;margin:2px 0 18px;letter-spacing:-1.6px}h1 span{color:var(--accent)}button,input,a{font:inherit}button{border:0;border-radius:12px;background:var(--panel);color:var(--text);padding:12px;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent)}.icon{font-size:24px;line-height:1;padding:13px} .status{font-size:12px;color:var(--muted);margin:0 0 16px}.status button{font-size:12px;padding:9px;color:var(--accent)}input{width:100%;border:1px solid #364655;background:#1a2633;border-radius:14px;color:var(--text);padding:14px;margin-bottom:12px}nav{display:flex;gap:6px;overflow:auto;margin:4px 0 17px}nav button{font-size:13px;white-space:nowrap;flex:1;padding:11px 8px}nav .active,.primary{background:var(--accent);color:#10241c;font-weight:700}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tile{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;aspect-ratio:1.6;border:1px solid #ffffff24;overflow:hidden;text-align:center;padding:14px 8px;box-shadow:0 4px 12px #0002}.tile .brand{font-size:clamp(19px,5vw,31px);font-weight:900;letter-spacing:-.7px;overflow-wrap:anywhere}.tile .sub{font-size:11px;font-weight:600}.tile .owner{position:absolute;bottom:7px;left:9px;font-size:9px;padding:3px 6px;border-radius:8px;background:#0009;color:white}.tile .star{position:absolute;top:7px;right:9px;color:#ffcf62;text-shadow:0 1px 3px #333}.tile img{width:48px;height:48px;object-fit:contain;border-radius:50%;margin-bottom:4px;flex-shrink:0}.tile .brand{font-size:clamp(16px,4.4vw,24px)}.tile .sub{margin-top:2px}.tile:has(img){padding-top:5px;padding-bottom:22px}#detailBrand .tile img{width:48px;height:48px}footer{text-align:center;font-size:11px;color:var(--muted);padding:24px 0}dialog{background:var(--bg);color:var(--text);border:1px solid #344454;border-radius:20px;padding:18px;width:min(94vw,500px);max-height:94dvh;overflow:auto}dialog::backdrop{background:#000b}.dialog-head{margin-bottom:16px;color:var(--muted);font-size:13px}.dialog-head h2{color:var(--text);margin:0;font-size:21px}#detailBrand .tile{width:100%;max-height:155px;aspect-ratio:2.3;cursor:default}.code-panel{margin-top:15px;background:white;color:black;border-radius:16px;padding:16px 10px;text-align:center}#code svg{width:100%;display:block;margin:auto;max-height:225px}#code svg.qr{max-width:260px}#number{font-size:17px;font-weight:650;letter-spacing:1px;overflow-wrap:anywhere;margin:10px 0 0}.note{font-size:13px;color:var(--muted);line-height:1.5}.primary{width:100%;margin:8px 0}label{display:block;font-size:13px;color:var(--muted)}label input{display:block;margin-top:7px}a{display:block;color:var(--accent);padding:12px 0}.danger{width:100%;color:#ffb0a9}button:disabled{opacity:.5}#empty{text-align:center;color:var(--muted)}

.add-card{margin:0 0 12px}.secondary-action{width:100%;margin:0 0 6px;color:var(--accent)}#addForm select,#addForm textarea{display:block;width:100%;margin:7px 0 12px;padding:12px;border:1px solid #364655;border-radius:12px;background:#1a2633;color:var(--text);font:inherit}#addForm textarea{resize:vertical}.checkline{display:flex;align-items:center;gap:8px}.checkline input{width:auto;margin:0;accent-color:var(--accent)}#addPreview svg{width:100%;max-height:180px}#addPreview svg.qr{max-width:170px}#addMessage{white-space:pre-wrap}#addDialog [hidden]{display:none!important}
#cards .tile{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#cards .tile img{pointer-events:none}.gesture-note{text-align:center}.delete-actions{display:flex;gap:10px}.delete-actions button{flex:1}.delete-confirm{background:#992f32;color:#fff;font-weight:700}#deleteName{font-weight:700;overflow-wrap:anywhere}[hidden]{display:none!important}
