:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#292333;background:#f7f5f0;--purple:#503885;--green:#246747;--muted:#756d7b;--line:#e1dce7;line-height:1.5;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:11px 17px;border:1px solid transparent;border-radius:11px;background:var(--purple);color:#fff;cursor:pointer;text-decoration:none;font-weight:650;font-size:14px}button:disabled{opacity:.5;cursor:wait}.secondary{background:white;border-color:var(--line);color:var(--purple)}.quiet{background:transparent;color:var(--purple);border-color:var(--line)}.danger{background:#a5363b}.icon-button{padding:10px;min-width:46px}.icon{width:21px;height:21px;flex-shrink:0}a{color:var(--purple)}h1,h2,h3,p{overflow-wrap:anywhere}h1{font-size:clamp(26px,4vw,36px);line-height:1.16;letter-spacing:-.025em;margin:0 0 14px}h2{font-size:22px;line-height:1.25;margin:0 0 16px}h3{font-size:17px;line-height:1.3;margin:0 0 8px}p{margin:8px 0 14px}small,.muted{color:var(--muted);font-size:13px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:.13em;text-transform:uppercase;color:var(--green);margin:0 0 12px}.app-header{max-width:1000px;padding:18px 24px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:12px;min-width:0}.brand img{width:48px;height:48px;object-fit:contain}.brand strong{display:block;color:var(--purple);font-size:21px;line-height:1.2}.brand span{display:block;color:var(--muted);font-size:11px;margin-top:4px}.app-header select{width:auto;padding:8px;font-size:13px;margin:0;background:transparent}.app-header label{margin:0}main{max-width:1000px;padding:12px 24px 120px;margin:auto}.hero-card{display:grid;grid-template-columns:1fr 125px;gap:20px;align-items:center;border:1px solid var(--line);border-radius:20px;background:linear-gradient(125deg,#fff,#f0edf7);padding:28px;margin-bottom:22px}.hero-card img{width:125px;height:125px;object-fit:contain}.hero-card .muted{max-width:540px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:24px}.stat{padding:18px;background:#fff;border:1px solid var(--line);border-radius:13px}.stat strong{font-size:28px;color:var(--purple);display:block;line-height:1.2}.stat span{display:block;color:var(--muted);font-size:12px;margin-top:5px}.stat.alert strong{color:#a5363b}.toolbar{display:grid;grid-template-columns:1fr 210px;gap:14px;margin-bottom:14px}.toolbar input,.toolbar select{margin:0}.chips{display:flex;gap:8px;overflow:auto;scrollbar-width:thin;padding:2px 1px 12px;margin:0 0 10px}.chip{white-space:nowrap;min-height:38px;font-size:12px;padding:7px 12px;border-color:var(--line);background:white;color:var(--purple);border-radius:99px}.chip.active{background:var(--purple);color:white}.loan-list{display:grid;grid-template-columns:1fr 1fr;gap:16px}.loan-card{min-width:0;background:#fff;border:1px solid var(--line);border-left:4px solid var(--green);border-radius:13px;padding:19px}.loan-card.borrowed{border-left-color:#bc702e}.loan-card.returned,.loan-card.archived{border-left-color:#a69db4}.loan-head{display:flex;justify-content:space-between;align-items:start;gap:14px}.loan-photo{width:70px;height:70px;object-fit:cover;border-radius:10px;flex-shrink:0;background:#f4f1f8}.loan-card h3{margin:7px 0}.category{font-size:11px;font-weight:700;color:var(--green)}.borrowed .category{color:#a45f22}.pill{display:inline-block;background:#efeaf8;color:var(--purple);font-size:11px;font-weight:650;border-radius:99px;padding:5px 9px}.pill.alert{background:#fae7e4;color:#9d353b}.loan-card .date{font-size:12px;margin-top:16px}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.loan-card .actions{margin-top:17px}.loan-card .actions button{font-size:12px;padding:9px 12px;min-height:39px}.amount{font-weight:700;color:var(--purple)}.empty{text-align:center;padding:35px 20px;grid-column:1/-1;color:var(--muted);border:1px dashed #d4ccdf;border-radius:14px;background:#fffb}.due-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#f9ebe4;border:1px solid #eac6b3;border-radius:13px;padding:18px;margin-bottom:22px}.due-notice p{margin:0;font-size:14px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 20px}.section-head h2{margin:0}.panel{background:white;border:1px solid var(--line);border-radius:15px;padding:24px;margin-bottom:18px}.panel p:last-child{margin-bottom:0}.person-card{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:20px;background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}.person-card h3{margin-bottom:8px}.person-card p{white-space:pre-wrap;font-size:13px;color:var(--muted);margin:4px 0}.person-card .actions{flex-shrink:0}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-grid .panel{margin:0}.settings-grid .wide{grid-column:1/-1}details summary{cursor:pointer;font-weight:650;color:var(--purple)}details>div{padding-top:16px}.network-banner,.update-banner{padding:10px 24px;text-align:center;font-size:13px;background:#fff0da;color:#775119}.update-banner{background:#eee9f8;color:var(--purple)}.update-banner button{margin-left:10px;min-height:32px;padding:5px 10px;font-size:12px}#bottomNav{position:fixed;bottom:0;left:0;right:0;z-index:10;display:flex;align-items:stretch;justify-content:center;gap:5px;border-top:1px solid var(--line);background:#fffffff5;backdrop-filter:blur(12px);padding:8px 12px calc(8px + env(safe-area-inset-bottom))}#bottomNav button,#bottomNav a{display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent;color:#81758f;border-radius:11px;min-width:95px;padding:8px 15px;font-size:11px;font-weight:600;min-height:60px;text-decoration:none;border:0}#bottomNav .active{background:#efeaf8;color:var(--purple)}#bottomNav .icon{width:23px;height:23px}label{display:block;font-size:13px;font-weight:650;margin-bottom:15px}input,select,textarea{display:block;width:100%;padding:12px;border:1px solid #c8bfd3;border-radius:9px;background:white;color:inherit;margin-top:6px;font-size:16px;min-width:0}textarea{resize:vertical;min-height:90px}input[type=checkbox]{width:19px;height:19px;accent-color:var(--purple);margin:3px 0 0;flex-shrink:0}.check{display:flex;gap:10px;font-weight:500;align-items:start}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field-grid label{margin-bottom:0}.field-grid{margin-bottom:15px}fieldset{border:1px solid var(--line);border-radius:12px;margin:20px 0;padding:18px}legend{padding:0 8px;font-size:13px;font-weight:750;color:var(--purple)}.form-heading{margin:25px 0 14px;color:var(--purple);font-size:16px}.form-actions{position:sticky;bottom:0;padding:15px 0 3px;background:white;border-top:1px solid var(--line);margin-top:22px;justify-content:end}.photo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}.photo-tile{position:relative;min-width:0}.photo-tile img{width:100%;height:120px;object-fit:cover;border-radius:10px;display:block}.photo-tile button{width:100%;min-height:30px;padding:5px;font-size:11px;margin-top:4px}.detail-photo{padding:0;border:0;background:transparent;width:100%}.detail-photo img{width:100%;height:140px;object-fit:cover;border-radius:10px}.detail-dl{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.detail-dl>div{min-width:0}.detail-dl dt{font-size:11px;font-weight:650;color:var(--muted)}.detail-dl dd{margin:3px 0 0;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.detail-note{white-space:pre-wrap;font-size:14px;overflow-wrap:anywhere}.dialog-top{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:22px}.dialog-top h2{margin:0}.dialog-top button{min-width:40px;min-height:40px;padding:7px}.loading{padding:40px 0;text-align:center;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:18px;max-width:550px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);padding:25px;overflow:auto}dialog::backdrop{background:#251b3d77;backdrop-filter:blur(3px)}.large-dialog{max-width:740px}.photo-dialog{background:#18131e;max-width:1100px;padding:10px}.photo-dialog img{width:100%;max-height:85dvh;object-fit:contain;display:block}.photo-dialog>button{position:absolute;right:12px;top:12px;background:#fff;color:#333;font-size:22px;border-radius:50%;padding:4px;min-width:40px;min-height:40px}#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:100px;z-index:50;max-width:calc(100% - 36px);padding:14px 20px;border-radius:11px;color:white;background:#342546;box-shadow:0 6px 24px #24162f33;font-size:14px;text-align:center}#toast.error{background:#963b43}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}:focus-visible{outline:3px solid #bd8c32;outline-offset:3px}@media(min-width:1000px){#bottomNav{left:50%;transform:translateX(-50%);width:600px;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0}}@media(max-width:640px){.app-header{padding:14px 18px}.brand strong{font-size:19px}.brand span{font-size:10px}.brand img{width:43px;height:43px}main{padding:10px 18px 115px}.hero-card{padding:22px;grid-template-columns:1fr 80px;gap:12px}.hero-card img{width:80px;height:80px}.hero-card h1{font-size:27px}.stats{gap:8px}.stat{padding:14px 11px}.stat strong{font-size:25px}.stat span{font-size:11px}.toolbar{grid-template-columns:1fr;gap:10px}.loan-list,.settings-grid{grid-template-columns:1fr}.settings-grid .wide{grid-column:auto}.field-grid{grid-template-columns:1fr}.photo-grid{grid-template-columns:repeat(3,1fr)}.photo-tile img{height:95px}.detail-photo img{height:100px}.detail-dl{grid-template-columns:1fr}.due-notice{align-items:start}.due-notice button{font-size:12px}.panel{padding:20px}.person-card{flex-direction:column}.person-card .actions{align-self:end}#bottomNav button,#bottomNav a{min-width:0;flex:1;padding:7px 5px}dialog{width:100%;max-width:none;max-height:100dvh;height:100dvh;border:0;border-radius:0;margin:0;padding:22px 18px calc(24px + env(safe-area-inset-bottom))}.photo-dialog{padding:0;background:#18131e}.photo-dialog img{height:100dvh;max-height:100dvh}.form-actions{padding-bottom:10px}.dialog-top{margin-bottom:22px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
