/* Ask Shelfy borrows the Shelf's Archivo / Hanken / Space Mono system.
   Paper utility: a quiet drawer with orange action edges, not a new theme. */
.shelfy-layer{--sh-paper:var(--surface,var(--book-paper,#fffaf3));--sh-ink:var(--ink,var(--book-ink,#292820));--sh-muted:var(--muted,var(--book-muted,#726c61));--sh-line:var(--border,var(--book-line,#ded8cb));--sh-bg:var(--bg,var(--book-bg,#f5f1e9));position:fixed;inset:0;z-index:var(--z-modal,90);color:var(--sh-ink);font-family:var(--font-ui);isolation:isolate}
.shelfy-layer[hidden]{display:none}
.shelfy-menu{position:absolute;right:18px;top:76px;z-index:2;display:grid;gap:6px;padding:8px;background:var(--sh-paper);border:1px solid var(--sh-line);border-radius:10px;box-shadow:0 8px 24px #29282016}
.shelfy-menu[hidden],.shelfy-support[hidden]{display:none}
.shelfy-menu .shelfy-button{text-align:left}
.shelfy-votes{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
.shelfy-vote{display:grid;place-items:center;width:44px;padding:10px}
.shelfy-vote svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.shelfy-vote[aria-pressed="true"]{color:var(--accent-ink,#a44926);border-color:currentColor;background:var(--sh-bg)}
.shelfy-escalate{font-size:13px;text-align:left}
.shelfy-support{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;min-height:0;background:var(--sh-paper)}
.shelfy-support-body{padding:22px;overflow:auto;min-height:0;flex:1}
.shelfy-support-form{display:grid;gap:18px}
.shelfy-support-form label{display:grid;gap:8px;font-size:14px;font-weight:600}
.shelfy-support-form input:not([type="checkbox"]){width:100%;box-sizing:border-box;border:1px solid var(--sh-line);border-radius:8px;padding:12px;background:var(--sh-bg);color:var(--sh-ink);font:16px var(--font-ui, sans-serif)}
.shelfy-support-form .shelfy-check{display:flex;align-items:center;gap:10px;font-weight:400}
.shelfy-check input{width:20px;height:20px;accent-color:var(--accent-ink,#a44926)}
.shelfy-support-form input:focus-visible,.shelfy-support a:focus-visible{outline:2px solid var(--accent-ink,#a44926);outline-offset:3px}
.shelfy-support-form .shelfy-send{justify-self:start}
.shelfy-public-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.shelfy-public-actions a{text-decoration:none;display:inline-flex;align-items:center}
.shelfy-layer.shelfy-public{--font-ui:"Hanken Grotesk",sans-serif;--font-display:"Archivo",sans-serif;--font-mono:"Space Mono",monospace;--accent-ink:#a44926;--accent-strong:#b34e29;--on-accent:#fffaf3}
[data-shelfy-entry][hidden]{display:none!important}
.shelfy-backdrop{position:absolute;inset:0;background:color-mix(in srgb,var(--sh-ink) 30%,transparent)}
.shelfy-panel{position:absolute;inset:0 0 0 auto;width:min(420px,100%);display:flex;flex-direction:column;background:var(--sh-paper);border-left:1px solid var(--sh-line);box-shadow:-8px 0 32px #29282016;animation:shelfy-enter .18s ease-out}
.shelfy-head{display:flex;align-items:center;gap:12px;padding:20px 22px 16px;border-bottom:1px solid var(--sh-line)}
.shelfy-head-copy{flex:1;min-width:0}
.shelfy-header-avatar{flex:none;min-width:50px}
.shelfy-answer-label{display:flex;align-items:center;gap:9px}
.shelfy-greeting-art{margin-bottom:12px}
.shelfy-suggestion-art{display:inline-flex;vertical-align:middle;margin-right:8px}
.shelfy-head h2{font-family:var(--font-display);font-size:20px;letter-spacing:-.02em;margin:0 0 3px}
.shelfy-head p{margin:0;font-size:12px;color:var(--sh-muted)}
.shelfy-button{border:1px solid var(--sh-line);background:var(--sh-paper);color:var(--sh-ink);border-radius:var(--r-sm,8px);min-height:44px;padding:9px 13px;font:600 14px var(--font-ui);cursor:pointer}
.shelfy-button:hover{background:var(--sh-bg)}
.shelfy-button:disabled{opacity:.5;cursor:default}
.shelfy-button:focus-visible,.shelfy-input:focus-visible{outline:2px solid var(--accent-ink);outline-offset:3px}
.shelfy-close{font-size:24px;padding:0;width:44px;flex:none}
.shelfy-messages{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px 22px 18px;scroll-padding:20px}
.shelfy-welcome .shelfy-eyebrow{font:var(--fs-xs) var(--font-ui);text-transform:uppercase;letter-spacing:.09em;color:var(--accent-ink);margin:0 0 12px;font-weight:var(--fw-semi)}
.shelfy-welcome h3{font:700 29px/1.15 var(--font-display);letter-spacing:-.025em;margin:0 0 14px;max-width:260px}
.shelfy-welcome p{font-size:15px;line-height:1.5;color:var(--sh-muted);margin:0 0 24px}
.shelfy-chips{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-bottom:26px}
.shelfy-chip{text-align:left;font-weight:500;padding:12px 14px;min-height:46px}
.shelfy-chip::after{content:"→";float:right;color:var(--accent-ink);padding-left:8px}
.shelfy-turn{margin-bottom:23px}
.shelfy-question{margin:0 0 14px 36px;padding:12px 15px;background:var(--sh-bg);border:1px solid var(--sh-line);border-radius:var(--r-sm,8px);font-size:15px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.shelfy-answer{font-size:15px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px}
.shelfy-answer-label{font:var(--fs-xs) var(--font-ui);text-transform:uppercase;letter-spacing:.09em;color:var(--accent-ink);margin-bottom:9px;font-weight:var(--fw-semi)}
.shelfy-scope{font-size:12px;line-height:1.45;color:var(--sh-muted);margin:12px 0 0}
.shelfy-result{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;border:0;border-top:1px solid var(--sh-line);background:transparent;color:var(--sh-ink);padding:13px 2px;min-height:52px;font-family:var(--font-ui);cursor:pointer}
.shelfy-result strong{font-size:14px;font-weight:600;overflow-wrap:anywhere}
.shelfy-result span{font-size:12px;color:var(--sh-muted);overflow-wrap:anywhere}
.shelfy-result:hover{background:var(--sh-bg)}
.shelfy-result:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
.shelfy-result:disabled{cursor:default;opacity:.65}
.shelfy-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.shelfy-actions .shelfy-button{color:var(--accent-ink)}
.shelfy-compose{border-top:1px solid var(--sh-line);padding:14px 22px max(16px,env(safe-area-inset-bottom));background:var(--sh-paper)}
.shelfy-compose form{display:flex;gap:8px;align-items:flex-end}
.shelfy-input{min-width:0;flex:1;resize:none;max-height:150px;border:1px solid var(--sh-line);border-radius:var(--r-sm,8px);background:var(--sh-bg);color:var(--sh-ink);padding:12px;font:15px/1.4 var(--font-ui);height:66px}
.shelfy-send{background:var(--accent-strong);border-color:var(--accent-strong);color:var(--on-accent);min-width:62px}
.shelfy-send:hover{background:var(--accent-ink)}
.shelfy-compose-foot{display:flex;justify-content:space-between;align-items:center;gap:8px 14px;flex-wrap:wrap;margin-top:10px}
.shelfy-compose-foot small{font-size:11px;line-height:1.4;color:var(--sh-muted)}
.shelfy-clear{flex:none;border:0;background:transparent;color:var(--sh-muted);font:12px var(--font-ui);padding:6px 0;min-height:36px;cursor:pointer}
.shelfy-loading{display:grid;gap:8px;padding:7px 0}
.shelfy-loading span{height:12px;background:var(--sh-line);border-radius:3px;animation:shelfy-pulse 1.2s ease-in-out infinite}
.shelfy-loading span:nth-child(2){width:87%}
.shelfy-loading span:nth-child(3){width:61%}
.shelfy-error{color:var(--danger-ink,#a5372e);font-size:14px;line-height:1.5}
.shelfy-highlight{outline:3px solid var(--accent-ink)!important;outline-offset:4px!important;scroll-margin:90px}
.shelfy-guide-ring{position:fixed;pointer-events:none;z-index:2147483645;border:2px solid var(--accent-ink,#a44926);border-radius:10px;box-sizing:border-box}
.shelfy-guide-ring::after{content:"";position:absolute;inset:-5px;border:2px solid var(--accent-ink,#a44926);border-radius:inherit;animation:shelfy-guide-pulse 1.8s ease-out infinite}
.shelfy-guide-tip,.shelfy-back-pill{position:fixed;z-index:2147483646;background:var(--surface,#fffaf3);color:var(--ink,#292820);border:1px solid var(--accent-ink,#a44926);font:500 14px/1.45 var(--font-ui,var(--font-ui,"Hanken Grotesk",system-ui,sans-serif));box-shadow:0 5px 22px #29282026;cursor:pointer}
.shelfy-guide-tip{left:20px;bottom:max(24px,env(safe-area-inset-bottom));width:min(340px,calc(100vw - 40px));padding:14px 18px;text-align:left;border-radius:12px;display:grid;gap:5px}
.shelfy-guide-tip small{color:var(--muted,#726c61);font-size:12px}
.shelfy-back-pill{right:16px;bottom:max(18px,env(safe-area-inset-bottom));padding:12px 18px;border-radius:999px;font-weight:700}
.shelfy-layer.shelfy-guiding{pointer-events:none;z-index:calc(var(--z-modal,90) + 5)}
.shelfy-guiding .shelfy-backdrop{display:none}
.shelfy-guiding .shelfy-panel{pointer-events:auto}
.shelfy-picker{padding:16px 14px;margin-top:14px;border:1px solid var(--sh-line);border-left:3px solid var(--accent-ink,#a44926);border-radius:10px;background:var(--sh-bg)}
.shelfy-picker h4{font:700 19px/1.2 var(--font-display);margin:0 0 5px}
.shelfy-picker p{font-size:13px;line-height:1.5;color:var(--sh-muted);margin:0 0 12px}
.shelfy-picker input{box-sizing:border-box;width:100%;min-height:46px;border:1px solid var(--sh-line);border-radius:8px;padding:10px 12px;background:var(--sh-paper);color:var(--sh-ink);font:16px var(--font-ui)}
.shelfy-picker input:focus-visible{outline:2px solid var(--accent-ink,#a44926);outline-offset:2px}
.shelfy-picker-caption{font:var(--fs-xs) var(--font-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--sh-muted);margin:15px 0 5px;font-weight:var(--fw-semi)}
.shelfy-picker .gear-result-row{background:transparent}
#readPhotoSlot button.ph-cam-hint{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
#readPhotoSlot button.ph-corner-cam{border:0;padding:0;cursor:pointer}
.shelfy-guidance-note{padding:10px 12px;border-left:2px solid var(--sh-line);font-size:13px;line-height:1.5;color:var(--sh-muted);margin-top:10px}
.shelfy-action-card{margin:16px 0;padding:18px 16px;border:1px solid var(--accent-ink,#a44926);border-radius:12px;background:var(--sh-bg)}
.shelfy-action-card h4{font:700 20px/1.3 var(--font-display);margin:0 0 10px}
.shelfy-action-card dl{display:grid;grid-template-columns:auto 1fr;gap:7px 16px;font-size:13px;line-height:1.5;margin:0 0 14px}
.shelfy-action-card dt{color:var(--sh-muted)}
.shelfy-action-card dd{margin:0;font-weight:600;overflow-wrap:anywhere}
.shelfy-action-card p{font-size:13px;line-height:1.5;margin:10px 0 0;color:var(--sh-muted)}
.shelfy-action-card .shelfy-actions{margin:0}
.shelfy-action-card[data-state="done"]{border-color:var(--sh-line)}
@keyframes shelfy-guide-pulse{from{opacity:.7;transform:scale(1)}to{opacity:0;transform:scale(1.08)}}
@media(min-width:701px){
 body.shelfy-guidance-wide #scroller{margin-right:420px}
 body.shelfy-guidance-wide #panel{right:420px;width:min(440px,calc(100vw - 420px))}
 body.shelfy-guidance-wide #modal{right:420px}
 body.shelfy-guidance-wide #kitAddSheet{right:420px}
 body.shelfy-guidance-wide .field-item-overlay,body.shelfy-guidance-wide .field-kit-overlay{right:420px;width:auto}
 body.shelfy-guidance-wide .shelfy-guide-tip{max-width:calc(100vw - 460px)}
 .shelfy-layer.shelfy-guiding .shelfy-panel{inset:0 0 0 auto;width:420px;height:100%;border-radius:0;border-left:1px solid var(--sh-line)}
}
@media(max-width:700px){body:has(.shelfy-back-pill) .shelfy-guide-tip{bottom:max(78px,calc(env(safe-area-inset-bottom) + 64px));left:16px;width:calc(100vw - 32px)}}
@media(prefers-reduced-motion:reduce){.shelfy-guide-ring::after{animation:none}}
.shelfy-book-entry{white-space:nowrap}
.shelfy-book-more{display:none}
@media(max-width:700px),(pointer:coarse){.shelfy-book-entry{display:none}.shelfy-book-more{display:inline-flex}}
.shelfy-settings-entry{margin-left:auto;min-width:44px}
.field-quick-heading{display:contents}
.field-quick-heading .field-head{flex:1;min-width:0}
.field-crew>header{position:relative}
.field-crew>header>.shelfy-quick-entry{position:absolute;right:0;top:0}
.shelfy-head-icon{display:block;width:32px;height:32px;object-fit:contain;flex:none}
.shelfy-button[data-shelfy-entry]{display:inline-flex;align-items:center;justify-content:center;gap:8px}
[data-shelfy-entry][hidden]{display:none!important}
.shelfy-book-entry>.shelfy-head-icon{display:inline-block;vertical-align:middle;margin-right:6px;width:24px;height:24px}
.shelfy-quick-entry{display:grid;place-items:center;flex:none;width:44px;height:44px;box-sizing:border-box;padding:6px;border:0;background:transparent;cursor:pointer;border-radius:8px}
.shelfy-search-entry{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;box-sizing:border-box;padding:10px 12px;margin:0 0 12px;border:1px solid var(--line,var(--book-line));border-radius:10px;background:var(--surface,var(--book-paper));color:var(--ink,var(--book-ink));font:inherit;text-align:left;cursor:pointer}
.shelfy-search-entry span{overflow-wrap:anywhere;min-width:0}
.shelfy-search-entry>.shelfy-head-icon{position:static;transform:none;display:block;width:24px;height:24px;min-width:24px;flex:0 0 24px;object-fit:contain;margin:0}
.shelfy-search-copy{flex:1;min-width:0}
.shelfy-search-label{color:var(--accent-ink);font-weight:600}
.shelfy-quick-entry:focus-visible,.shelfy-search-entry:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.shelfy-status{font-size:13px;line-height:1.45;color:var(--sh-muted);margin:12px 0}
.shelfy-feedback-layer{position:fixed;inset:0;z-index:var(--z-modal,90);background:#29282055;display:grid;place-items:center;padding:18px;font-family:var(--font-ui)}
.shelfy-feedback-layer[hidden]{display:none}
.shelfy-feedback-card{background:var(--surface,var(--book-paper,#fffaf3));color:var(--ink,var(--book-ink,#292820));border:1px solid var(--border,var(--book-line,#ded8cb));border-radius:var(--r-lg,16px);padding:24px;width:min(440px,100%);max-height:90dvh;overflow:auto}
.shelfy-feedback-card h2{font:700 23px var(--font-display);margin:0 0 18px}
.shelfy-feedback-types{display:flex;gap:8px;margin-bottom:16px}
.shelfy-feedback-types [aria-pressed="true"]{border-color:var(--accent-ink);color:var(--accent-ink)}
.shelfy-feedback-card textarea{width:100%;min-height:140px;resize:vertical;padding:12px;background:var(--bg,var(--book-bg,#f5f1e9));border:1px solid var(--border,var(--book-line,#ded8cb));border-radius:var(--r-sm,8px);color:inherit;font:15px var(--font-ui);box-sizing:border-box}
.shelfy-feedback-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}
@keyframes shelfy-enter{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
@keyframes shelfy-sheet{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@keyframes shelfy-pulse{0%,100%{opacity:.45}50%{opacity:.9}}
.shelfy-layer.shelfy-touch{bottom:auto;right:auto;overflow:hidden}
.shelfy-layer.shelfy-touch .shelfy-panel{inset:auto 0 0;width:100%;height:min(88%,800px);max-height:100%;min-height:0;box-sizing:border-box;overflow:hidden;border-left:0;border-top:1px solid var(--sh-line);border-radius:var(--r-lg,16px) var(--r-lg,16px) 0 0;animation:shelfy-sheet .18s ease-out}
.shelfy-layer.shelfy-side .shelfy-panel{inset:0 0 0 auto;width:min(420px,100%);height:100%;border-radius:0;border-left:1px solid var(--sh-line)}
body.shelfy-touch-open #dock{display:none!important;pointer-events:none!important}
.shelfy-head,.shelfy-compose{flex:0 0 auto}
.shelfy-touch .shelfy-head{touch-action:none}
.shelfy-compose .shelfy-chips{display:flex;flex-direction:row;overflow-x:auto;gap:8px;margin:0 0 10px;padding:2px;overscroll-behavior:contain}
.shelfy-compose .shelfy-chip{flex:none;white-space:nowrap;min-height:44px;padding:8px 10px;font-size:12px}
.shelfy-touch .shelfy-input{font-size:16px;height:54px;box-sizing:border-box}
.shelfy-touch .shelfy-compose{padding:8px 14px max(8px,env(safe-area-inset-bottom))}
.shelfy-touch .shelfy-compose-foot{margin-top:2px}
.shelfy-touch .shelfy-head p{display:none}
.shelfy-touch .shelfy-messages{padding-top:12px;padding-bottom:12px}
.shelfy-layer.shelfy-touch .shelfy-head{padding-top:25px}
.shelfy-layer.shelfy-touch .shelfy-panel::before{content:"";position:absolute;width:36px;height:4px;top:8px;left:calc(50% - 18px);border-radius:4px;background:var(--sh-line)}
@media(max-width:700px){.shelfy-head,.shelfy-messages{padding-left:18px;padding-right:18px}.shelfy-compose{padding-left:18px;padding-right:18px}.shelfy-input{font-size:16px}.shelfy-welcome h3{font-size:26px}}
@media(prefers-reduced-motion:reduce){.shelfy-panel,.shelfy-loading span{animation:none}}
.shelfy-search-host{position:relative;min-width:0;min-height:48px}
.shelfy-search-host input{padding-right:calc(var(--sync-search-padding,100px) + var(--search-clear-space,0px))!important;min-width:0}
.shelfy-search-chip{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;gap:5px;height:44px;min-width:78px;padding:4px 8px;box-sizing:border-box;border:0;border-radius:999px;background:color-mix(in srgb,var(--accent,#cf5a26) 10%,transparent);color:var(--accent-ink);font:600 13px var(--font-ui,var(--font-ui,"Hanken Grotesk",system-ui,sans-serif));cursor:pointer}
.shelfy-search-chip::before{content:"";position:absolute;left:-9px;top:17%;height:66%;width:1px;background:var(--line,var(--book-line,#ded8cb));pointer-events:none}
.shelfy-search-chip:hover,.shelfy-search-chip:active{background:color-mix(in srgb,var(--accent,#cf5a26) 18%,transparent)}
.shelfy-search-chip .shelfy-head-icon{width:24px;height:24px}
.shelfy-search-chip:focus-visible{outline:2px solid var(--accent-ink,#a44926);outline-offset:2px}
.shelfy-search-host .field-clear{position:absolute;right:92px;top:50%;transform:translateY(-50%);z-index:1}
/* One clear button: hide the browser's own search cancel glyph (blue × on iOS/Chrome). */
.shelfy-search-host input[type=search]::-webkit-search-cancel-button,.field-search input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
.shelfy-search-host:has(.field-clear:not([hidden])) input{padding-right:140px!important}
.shelfy-coach{position:absolute;z-index:81;top:calc(100% + 12px);width:min(290px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--line,#ded8cb);border-radius:12px;padding:16px 18px 8px;background:var(--surface-3,#eee7d9);color:var(--ink,#292820);box-shadow:0 6px 24px rgb(0 0 0 / .18);text-align:left;font:15px/1.5 var(--font-ui,var(--font-ui,"Hanken Grotesk",system-ui,sans-serif));cursor:pointer}
.shelfy-coach:before{content:"";position:absolute;top:-7px;left:var(--coach-arrow-left,230px);width:12px;height:12px;background:inherit;border-left:1px solid var(--line,#ded8cb);border-top:1px solid var(--line,#ded8cb);transform:rotate(45deg)}
.shelfy-coach-copy{margin:0}
.shelfy-coach-dismiss{display:block;min-height:44px;margin:4px 0 0 auto;padding:8px 0 8px 12px;border:0;background:transparent;color:var(--accent-ink);font:600 13px var(--font-ui,var(--font-ui,"Hanken Grotesk",system-ui,sans-serif));cursor:pointer}
.shelfy-coach-dismiss:hover{text-decoration:underline}
.shelfy-coach-dismiss:focus-visible{outline:2px solid var(--accent,#cf5a26);outline-offset:2px;border-radius:4px}
.shelfy-coach-above{top:auto;bottom:calc(100% + 12px)}
.shelfy-coach-above:before{top:auto;bottom:-7px;transform:rotate(225deg)}
.shelfy-landing-search{display:block;max-width:620px;margin:32px auto;padding:0 20px}
.shelfy-landing-search input{width:100%;box-sizing:border-box;min-height:56px;padding:14px 104px 14px 18px;border:1px solid #ded8cb;border-radius:12px;background:#fffaf3;color:#292820;font:16px var(--font-ui,"Hanken Grotesk",system-ui,sans-serif)}
.shelfy-landing-search .shelfy-search-chip{right:24px}
.shelfy-powered{font:12px var(--font-ui,var(--font-ui,"Hanken Grotesk",system-ui,sans-serif));color:var(--sh-muted);display:inline-block;margin:8px 0}
.shelfy-public-results a{text-decoration:none}
body:has(#public-gear-data) .shelfy-search-entry{background:#fffaf3;color:#292820;border-color:#ded8cb}
body:has(#public-gear-data) .shelfy-layer{--sh-paper:#fffaf3;--sh-ink:#292820;--sh-muted:#726c61;--sh-line:#ded8cb;--sh-bg:#f5f1e9}