:root{font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172332;background:#f4f5f7;--muted:#73808e;--line:#e4e8ed;--blue:#315fbc}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:12px;background:#fff;color:#24354b;padding:11px 15px;box-shadow:0 2px 2px #14213906;transition:transform .08s,background .12s}button:active{transform:translateY(2px);background:#e9eef5;box-shadow:none}button:disabled{opacity:.5;cursor:wait}button.primary{background:#243c59;color:white;border-color:#243c59}button.danger{color:#b5323e;background:#fff6f6}input,select,textarea{width:100%;border:1px solid #d8dee6;background:white;color:inherit;border-radius:11px;padding:12px;outline:none}input:focus,textarea:focus,select:focus{border-color:#7894bb;box-shadow:0 0 0 3px #7894bb15}textarea{resize:none;min-height:46px;max-height:165px}h1,h2,h3,p{margin:0}h1{font-size:27px;letter-spacing:-.8px}h2{font-size:19px}h3{font-size:16px}.shell{max-width:820px;margin:auto;min-height:100dvh;padding-bottom:100px}.top{position:sticky;top:0;background:#f4f5f7ed;backdrop-filter:blur(16px);z-index:5;padding:calc(15px + env(safe-area-inset-top)) 20px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.brand{font-weight:750;letter-spacing:1.2px;display:flex;gap:10px;align-items:center}.brand img{width:34px;height:34px}.top small{display:block;color:var(--muted);font-size:11px;letter-spacing:0}.avatar{font-size:22px;background:white;border:1px solid var(--line);width:42px;height:42px;border-radius:50%;display:grid;place-items:center}.content{padding:24px 20px}.subtitle,.muted,small{color:var(--muted)}.subtitle{margin:4px 0 22px}.card{background:white;border:1px solid var(--line);border-radius:18px;padding:18px;margin:12px 0}.row{display:flex;gap:10px;align-items:center;justify-content:space-between}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.stat{border:1px solid var(--line);background:white;border-radius:15px;padding:14px 12px}.stat strong{display:block;font-size:28px;font-weight:650}.stat span{font-size:12px;color:var(--muted)}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3b9b70;margin-right:7px}.dot.bad{background:#cf6c6c}.module{padding:11px 0;border-bottom:1px solid #f0f2f5}.module:last-child{border:0}.tag{font-size:11px;background:#f0f3f7;border-radius:7px;padding:3px 7px;white-space:nowrap;color:#617087}.tag.bad{color:#ae3b47;background:#fcf0f1}.nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,820px);display:flex;gap:3px;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(16px);border-top:1px solid var(--line);z-index:10}.nav button{flex:1;box-shadow:none;border:0;background:transparent;font-size:11px;padding:7px 2px;border-radius:11px;color:#84909c}.nav button b{display:block;font-size:20px;line-height:1.3;font-weight:450;margin-bottom:3px}.nav button.active{background:#edf1f7;color:#29466d}.stack{display:grid;gap:12px}.stack label{font-size:12px;color:var(--muted)}.stack label input,.stack label select{margin-top:5px}.wide{width:100%}.notice{background:#eef2f7;padding:12px 14px;border-radius:12px;font-size:13px;color:#52647c;margin:12px 0;white-space:pre-wrap}.notice.error{background:#fff0f1;color:#a23e48}.login{max-width:390px;padding:32px 24px;margin:10vh auto}.login .brand{margin-bottom:40px}.login h1{font-size:30px}.login form{margin-top:25px}.toolbar{display:flex;gap:8px;margin:14px 0}.toolbar select{padding:8px;font-size:13px}.task{display:block;width:100%;text-align:left;margin:10px 0;padding:15px;border-radius:15px}.task strong{display:block;font-weight:600;margin:7px 0}.task small{display:block;font-size:12px}.chat{display:flex;flex-direction:column;gap:14px;margin-bottom:15px}.bubble{align-self:flex-start;max-width:94%;background:white;border:1px solid var(--line);padding:13px 15px;border-radius:16px 16px 16px 4px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{align-self:flex-end;background:#e9eff7;border-color:#e9eff7;border-radius:16px 16px 4px 16px}.compose{position:sticky;bottom:83px;display:flex;align-items:flex-end;gap:8px;padding:10px;background:#f4f5f7ef;backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:17px}.compose button{height:46px;flex-shrink:0}.empty{padding:35px 12px;text-align:center;color:var(--muted)}.section-title{margin-top:22px}.memory-text,.detail{white-space:pre-wrap;overflow-wrap:anywhere}.detail{font-size:13px}.tabs{display:flex;gap:8px;margin:12px 0}.tabs button{font-size:12px;padding:8px 10px}.footer-note{font-size:11px;color:var(--muted);margin:20px 0}dialog{border:0;border-radius:20px;padding:24px;width:calc(100% - 36px);max-width:500px;box-shadow:0 12px 80px #14213944}dialog::backdrop{background:#17233266}dialog button{margin-top:15px}.loading{padding:40px;color:var(--muted)}.toast{position:fixed;left:20px;right:20px;bottom:100px;max-width:750px;margin:auto;padding:14px 18px;background:#23374b;color:white;border-radius:13px;z-index:30;box-shadow:0 8px 30px #14213925}.inline-buttons{display:flex;flex-wrap:wrap;gap:8px}.review-time{font-size:12px;color:#718197;margin-bottom:10px}@media(min-width:650px){.content{padding:30px}.grid{gap:15px}.stat{padding:18px}.bubble{max-width:82%}}

.brand img.logo{width:116px;height:auto;max-height:40px;object-fit:contain}.brand small{font-size:9px;max-width:95px;line-height:1.4;letter-spacing:.6px}
.compose textarea{font-size:16px}.nav{transition:opacity .12s,transform .12s}
body.chat-writing .nav{visibility:hidden;opacity:0;pointer-events:none;transform:translate(-50%,110%)}
body.chat-writing .compose{position:fixed;left:50%;transform:translateX(-50%);width:min(calc(100% - 24px),760px);bottom:calc(var(--keyboard-gap,0px) + 8px);z-index:20;box-shadow:0 4px 24px #17233214}
body.chat-writing .shell{padding-bottom:calc(var(--compose-height,80px) + var(--keyboard-gap,0px) + 30px)}
body.chat-writing #view>.footer-note{display:none}
body.chat-writing .bubble{scroll-margin-bottom:calc(var(--compose-height,80px) + 22px)}
body.chat-writing .toast{bottom:calc(var(--keyboard-gap,0px) + var(--compose-height,80px) + 20px)}

.day-tile summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-size:18px;font-weight:650;min-height:44px}.day-tile summary::after{content:"⌄";color:#718096}.day-tile[open] summary::after{content:"⌃"}.day-tile-body{padding-top:12px}.day-point{padding:14px 0;border-top:1px solid #e4e9ef}.day-point p{margin:8px 0}.day-mark{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:50%;font-weight:700;background:#eef1f5;color:#718096;flex-shrink:0}.day-mark.matched{color:#16834b;background:#e4f5eb}.day-mark.difference{color:#c53939;background:#fce8e8}.day-point .day-mark{width:19px;height:19px;font-size:13px}.day-tile{margin-bottom:14px}

.dot.checking{background:#94a3b8}

/* Supplier choices must fit narrow mobile cards. */
.stack{min-width:0;grid-template-columns:minmax(0,1fr)}
.supplier-choice{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-width:0;width:100%;min-height:44px;cursor:pointer}
.stack .supplier-choice{font-size:14px;color:inherit}
.stack .supplier-choice input[type="checkbox"]{width:20px;height:20px;flex:0 0 20px;margin:0;padding:0;accent-color:var(--blue)}
.supplier-choice span{min-width:0;flex:1;white-space:normal;overflow-wrap:anywhere}
.inline-buttons>*{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}

button.stat{text-align:left;min-width:0;min-height:90px}button.stat:focus-visible{outline:3px solid #7894bb;outline-offset:2px}.toolbar>*{min-width:0;flex:1}.toolbar{flex-wrap:wrap}.task small{white-space:normal;overflow-wrap:anywhere}
