:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#191d45;background:#f6f6fd;font-synthesis:none;--accent:#4643d6;--muted:#646b8c;--line:#e1e3f2;--red:#b32f48;--green:#157349;--surface:#fff;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:var(--accent);text-underline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:1.65rem;letter-spacing:-.035em}h2{font-size:1.3rem;letter-spacing:-.02em}h3{font-size:1.05rem}p{line-height:1.5}img{max-width:100%}[hidden]{display:none!important}:focus-visible{outline:3px solid #8c85f8;outline-offset:3px}
.topbar{background:linear-gradient(115deg,#15294f,#292369);color:white;padding:calc(env(safe-area-inset-top,0px) + 12px) max(18px,calc((100vw - 1080px)/2)) 13px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:84px;position:sticky;top:0;z-index:10;box-shadow:0 4px 20px #151b4320}.brand-home{border:0;background:none;padding:0;display:flex;align-items:center;min-height:42px}.brand-home img{width:145px;height:45px;object-fit:contain}.account-area{display:flex;align-items:center;gap:8px;max-width:60%;font-size:.875rem}.account-name{max-width:140px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sync-label{font-size:.75rem;opacity:.78}.icon-button{border:1px solid #ffffff35;border-radius:10px;background:#ffffff0d;color:inherit;width:38px;height:38px;display:grid;place-items:center}.icon-button svg,.bottom-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-main{max-width:1080px;margin:0 auto;padding:24px 18px calc(102px + var(--safe-bottom))}.page-title,.page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.page-title p{color:var(--muted);font-size:.875rem;margin-top:5px}.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fffffff5;backdrop-filter:blur(18px);border-top:1px solid var(--line);display:flex;justify-content:center;padding:8px 10px calc(8px + var(--safe-bottom));z-index:20}.nav-item{position:relative;width:min(25%,140px);min-height:52px;border:0;background:none;border-radius:12px;color:#747b99;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:.75rem;font-weight:600}.nav-item.active{color:var(--accent);background:#ededff}.unread-dot{position:absolute;top:5px;left:calc(50% + 6px);width:8px;height:8px;border:2px solid white;background:#df3e5c;border-radius:50%}.status-strip{min-height:28px;font-size:.8rem;color:var(--muted);padding:8px 0 14px}.status-strip.error{color:var(--red)}
.stack{display:flex;flex-direction:column;gap:14px}.row{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.row.spread,.spread{justify-content:space-between}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:17px;box-shadow:0 4px 18px #202c6610;overflow-wrap:anywhere}.card+.card{margin-top:12px}.stack>.card+.card{margin-top:0}.card h3{line-height:1.35}.card .row{gap:7px}.card .button{font-size:.875rem;min-height:38px;padding:8px 12px}.card img.tool-photo,.tool-photo{display:block;max-height:210px;width:100%;object-fit:contain;border-radius:11px;background:#f8f9fd}.tool-card-photo{width:100%;max-height:220px;object-fit:contain;border-radius:10px}.photo-preview{display:block;max-width:100%;max-height:240px;object-fit:contain;border-radius:10px;background:#f5f6fb}.muted,.meta{color:var(--muted)}.meta{font-size:.875rem;line-height:1.5}.small{font-size:.875rem}.overdue{color:var(--red)}.empty{padding:30px 0;text-align:center;color:var(--muted)}.empty:empty{display:none}.tag,.pill,.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:7px;background:#f0efff;color:#4742b8;font-size:.8rem;font-weight:600;line-height:1.35}.badge.danger,.badge.lost,.pill.lost{background:#fff0f3;color:var(--red)}.badge.success,.badge.won,.pill.won{background:#e9f7ef;color:var(--green)}.badge.neutral{background:#f0f2f7;color:#616987}.badge.warning{background:#fff3dc;color:#8d640b}.button{border:1px solid var(--line);border-radius:10px;background:white;color:var(--accent);padding:10px 15px;min-height:44px;font-size:.9375rem;font-weight:600;line-height:1.2;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:normal}.button.primary{color:white;background:var(--accent);border-color:var(--accent)}.button.success{color:var(--green);border-color:#b9dcc9;background:#f2fbf6}.button.danger{color:var(--red);border-color:#eac3ce;background:#fff7f9}.button.small{min-height:34px;font-size:.8rem;padding:7px 10px}.button:active{filter:brightness(.96)}.segmented,.stage-tabs,.tabs{display:flex;gap:5px;padding:5px;border:1px solid var(--line);border-radius:13px;background:#eeeff8;margin-bottom:18px;overflow-x:auto}.segmented .button,.stage-tabs .button,.tabs .button{border:0;flex:1;background:transparent;white-space:nowrap;font-size:.875rem;min-height:42px;padding:9px 12px}.segmented .primary,.stage-tabs .primary,.tabs .primary{background:white;color:var(--accent);box-shadow:0 2px 7px #22234a12}.section-title{margin-top:18px;margin-bottom:12px}.scope-list{margin:0;padding-left:22px;line-height:1.6}.gc-row{border-top:1px solid var(--line);padding-top:11px}.suggestion-list{gap:5px}.suggestion-list .button{font-size:.8rem;min-height:32px;padding:5px 8px}.result-stats,.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:10px}.stat{padding:14px;border:1px solid var(--line);border-radius:12px;background:white}.stat strong{display:block;font-size:1.5rem;margin-bottom:4px}.search-controls{display:flex;flex-wrap:wrap;gap:9px}.search-controls>*{flex:1;min-width:130px}.note-text{white-space:pre-wrap}.scan-video,video{width:100%;max-height:55vh;background:#15192d;border-radius:12px;object-fit:cover}
.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field-label{font-size:.875rem;font-weight:600;color:#34395f}.field:has(input[type=checkbox]){flex-direction:row;align-items:center}.field input:not([type=checkbox]):not([type=file]),.field select,.field textarea,input[type=search]{width:100%;border:1px solid #d4d8eb;border-radius:9px;padding:11px 12px;min-height:44px;color:#191d45;background:white;font-size:1rem}.field textarea{resize:vertical;min-height:90px;line-height:1.5}.field select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%23646b8c' stroke-width='1.8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;padding-right:36px}.field input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent)}input[type=file]{font-size:.875rem;max-width:100%}.field input:focus,.field textarea:focus,.field select:focus{outline:2px solid #bcb6ff;border-color:#847bea}.form-error{color:var(--red);font-size:.875rem;padding:0 20px 14px}
.modal{padding:0;border:1px solid var(--line);border-radius:19px;width:min(94vw,540px);max-height:88dvh;background:white;color:#191d45;box-shadow:0 20px 80px #131a4c50}.modal.wide{width:min(94vw,760px)}.modal::backdrop{background:#151b456b;backdrop-filter:blur(3px)}.modal-form{display:flex;flex-direction:column;max-height:88dvh}.modal-heading{padding:21px 20px 17px;border-bottom:1px solid var(--line);flex-shrink:0}.modal-body{padding:20px;overflow:auto;overscroll-behavior:contain}.modal-actions{padding:15px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:9px;flex-shrink:0;background:#fcfcff}.modal-actions .primary{min-width:112px}.modal .card{box-shadow:none}.modal pre{white-space:pre-wrap;overflow-wrap:anywhere}#toast-region{position:fixed;left:16px;right:16px;bottom:calc(88px + var(--safe-bottom));display:flex;align-items:center;flex-direction:column;gap:8px;z-index:100;pointer-events:none}.toast{background:#1e284d;color:white;border:1px solid #ffffff20;border-radius:11px;padding:13px 17px;max-width:520px;box-shadow:0 8px 28px #151c4b30;font-size:.9375rem}
.loading-screen{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;background:#192556;color:#cbd1ed}.loading-screen img{width:230px;max-height:160px;object-fit:contain}.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top left,#3e3b9944,transparent 55%),#f4f5fc}.login-panel{width:min(100%,420px);padding:30px;background:white;border:1px solid var(--line);border-radius:23px;box-shadow:0 20px 70px #2d37731a}.login-brand{border-radius:14px;background:#192556;padding:24px;margin-bottom:27px;text-align:center}.login-brand img{width:230px;max-height:130px;object-fit:contain}.login-panel h1{font-size:1.7rem;margin-bottom:11px}.login-panel .button{width:100%;margin-top:24px}.login-panel .meta{margin-top:18px}.install-help{margin-top:18px;padding:14px;border-radius:11px;background:#f1f0fc;font-size:.875rem;color:#565481}.install-help summary{cursor:pointer;font-weight:600}.install-help p{margin-top:9px}.sync-spinning svg{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:800px){.app-main{padding-top:30px}.modal-body{padding:24px}.account-name{max-width:220px}.login-panel{padding:35px}}
@media(max-width:420px){.app-main{padding-left:13px;padding-right:13px}.topbar{padding-left:15px;padding-right:15px}.brand-home img{width:125px}.account-name{max-width:95px}.sync-label{display:none}.card{padding:15px}.modal{width:96vw}.row>.button{flex-grow:1}.modal-actions .button{flex-grow:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}
