/* Pet cards, fixed navigation and photo crop editor. */
.app-workspace{--shell-width:1180px;padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))}
.app-workspace[data-view="add"]{--shell-width:900px}
.app-workspace[data-view="account"]{--shell-width:760px}
.app-workspace>nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(var(--shell-width),calc(100% - 32px));box-sizing:border-box;z-index:30;background:#fff;border-top:1px solid #dbe5ef;box-shadow:0 -4px 18px #0c315d0b;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));border-radius:16px 16px 0 0}
.pet-tile{background:linear-gradient(130deg,#f6fbff,#e1f1ff);border:1px solid #c7deef;box-shadow:0 4px 14px #0b345e0b;overflow:hidden}
.pet-tile .open-pet{display:block;padding:12px;width:100%;text-align:left;color:#123353;background:transparent;box-sizing:border-box}
.summary-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.summary-heading img{width:112px;height:auto}
.summary-heading>span{font-size:9px;font-weight:700;letter-spacing:.2px;text-align:right}
.summary-main{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:start}
.pet-tile .open-pet .pet-photo,.desktop-pets .pet-tile .open-pet .pet-photo{width:72px;height:96px;aspect-ratio:3/4;object-fit:cover;border-radius:10px}
.summary-fields{display:grid;gap:3px;min-width:0;font-size:12px;line-height:1.4}
.summary-fields strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere;margin-bottom:3px}
.summary-fields>span{display:grid;grid-template-columns:46px minmax(0,1fr);gap:4px;overflow-wrap:anywhere}
.summary-fields small,.summary-owner small{font-size:10px;color:#57748b}
.summary-id{display:block;margin-top:9px;font-family:ui-monospace,Consolas,monospace;font-size:10px;line-height:1.5;overflow-wrap:anywhere;color:#153d67}
.summary-owner{display:flex;gap:6px;align-items:center;border-top:1px solid #c9dfef;padding-top:6px;margin-top:6px;font-size:11px;overflow-wrap:anywhere}
.summary-owner svg{margin-left:auto;flex-shrink:0}
.pet-tile .pet-bottom{padding:7px 12px;border-top:1px solid #d5e6f3;gap:4px}
.pet-tile .pet-bottom button{font-size:11px;gap:4px}
.pet-tile .role{font-size:10px;padding:4px 7px}
.pet-detail .card-main .pet-photo{height:auto;aspect-ratio:3/4;align-self:start}
.photo-picker{margin:20px 0;min-width:0}
.photo-label{display:block;font-weight:600;margin-bottom:10px}
.photo-picker>input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;border:0}
.photo-choice{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.chosen-photo{width:72px;height:96px;object-fit:contain;border-radius:9px}
.photo-select{background:#fff;border:1px solid #87b5dd;color:#0b4f8d;border-radius:10px;padding:12px 16px}
.photo-picker>small{display:block;margin-top:8px;color:#657c90}
.app-workspace[data-view=add] form>.photo-picker{grid-column:1/-1;margin-top:0}
.app-workspace[data-view=add] form>label:first-of-type{grid-column:auto}
.crop-dialog{width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:20px;border:1px solid #d6e4f0;border-radius:18px;color:#123353;box-shadow:0 12px 50px #001b4566}
.crop-dialog::backdrop{background:#071d38aa}
.crop-dialog h2{margin:0;font-size:21px}
.crop-dialog .muted{font-size:14px;margin:10px 0 16px}
.crop-stage{position:relative;overflow:hidden;width:min(240px,100%);aspect-ratio:3/4;margin:0 auto 14px;touch-action:none;background:#e7edf3;cursor:grab;outline:2px solid #80b1de;border-radius:6px}
.crop-stage:active{cursor:grabbing}
.crop-stage:focus-visible{outline:3px solid #138af2}
.crop-stage img{position:absolute;max-width:none;user-select:none;pointer-events:none}
.crop-guide{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent 33%,#ffffff70 33%,#ffffff70 33.5%,transparent 33.5%,transparent 66%,#ffffff70 66%,#ffffff70 66.5%,transparent 66.5%),linear-gradient(to bottom,transparent 33%,#ffffff70 33%,#ffffff70 33.5%,transparent 33.5%,transparent 66%,#ffffff70 66%,#ffffff70 66.5%,transparent 66.5%)}
.crop-dialog input[type=range]{width:100%;padding:0;min-height:36px;accent-color:#0b68bb}
.crop-actions{display:flex;gap:12px;align-items:center;margin-top:14px}
.crop-actions .primary{flex:1}
@media(max-width:639px){.app-workspace>nav{width:100%;border-radius:0}.summary-heading img{width:112px}.summary-heading>span{font-size:9px}.crop-dialog{padding:16px}}
@media(max-height:550px){.crop-stage{width:150px}.crop-dialog{padding:12px}.crop-dialog .muted{margin:8px 0}}

