.shelf-app,.shelf-entry{--s-ink:#17372d;--s-muted:#61766c;--s-border:#d9e4d7;--s-bg:#f5f8f1;--s-green:#346b50;color:var(--s-ink);font:16px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif}
.shelf-app *, .shelf-entry *{box-sizing:border-box}
.shelf-app a,.shelf-entry a{color:#245f45;text-underline-offset:3px}
.shelf-app button,.shelf-app input{font:inherit}
.shelf-app button:focus-visible,.shelf-app input:focus-visible,.shelf-entry a:focus-visible{outline:3px solid #9cc87f;outline-offset:3px}
.shelf-app{margin:8px 0 40px;max-width:100%}
.shelf-app .shelf-kicker{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#537f5a;font-weight:800}
.shelf-app .shelf-lead{font-size:18px;color:var(--s-muted);max-width:750px;margin:0 0 22px}
.shelf-app .shelf-stats{display:flex;gap:25px;flex-wrap:wrap;margin:22px 0 35px}
.shelf-app .shelf-stat{display:flex;flex-direction:column;gap:2px;font-size:12px;color:#667c6e}
.shelf-app .shelf-stat strong{font-size:17px;color:var(--s-ink)}
.shelf-app .shelf-panel{border:1px solid var(--s-border);border-radius:19px;padding:27px;background:#fff;box-shadow:0 12px 36px #17372d0a}
.shelf-app .shelf-panel h2{font-size:clamp(22px,3.5vw,31px);margin:4px 0 16px;letter-spacing:-.03em;line-height:1.2}
.shelf-app .shelf-search{display:flex;align-items:center;gap:10px;border:1px solid #bfcfbd;border-radius:11px;background:#fafcf9;padding:0 14px;min-height:54px}
.shelf-app .shelf-search input{flex:1;min-width:0;border:0;background:transparent;outline:none;padding:12px 0}
.shelf-app #match-count{font-size:12px;color:#597766;white-space:nowrap}
.shelf-app .shelf-chips{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0}
.shelf-app .shelf-chip{border:1px solid var(--s-border);background:#fff;color:#375949;border-radius:40px;padding:8px 13px;cursor:pointer;font-size:13px}
.shelf-app .shelf-chip.active{background:var(--s-ink);color:#fff}
.shelf-app .shelf-workspace{display:grid;grid-template-columns:minmax(0,0.88fr) minmax(0,1.22fr);border:1px solid var(--s-border);border-radius:12px;overflow:hidden;min-height:400px}
.shelf-app .shelf-list{background:#fbfcfa;max-height:640px;overflow-y:auto;border-right:1px solid var(--s-border)}
.shelf-app .shelf-food{display:block;text-align:left;width:100%;border:0;border-bottom:1px solid #e9eee6;padding:15px 17px;background:transparent;cursor:pointer;color:var(--s-ink)}
.shelf-app .shelf-food:hover{background:#edf5ec}
.shelf-app .shelf-food.active{background:#e1efdf;box-shadow:inset 3px 0 var(--s-green)}
.shelf-app .shelf-food strong{display:block;font-size:14px;line-height:1.35}
.shelf-app .shelf-food small{display:block;font-size:12px;color:var(--s-muted);margin-top:3px}
.shelf-app .shelf-detail{padding:24px;background:#fff;min-width:0}
.shelf-app .shelf-detail h3{font-size:25px;line-height:1.17;margin:7px 0}
.shelf-app .shelf-condition{font-size:13px;color:var(--s-muted);margin:0 0 16px}
.shelf-app .shelf-tabs{display:flex;gap:5px;padding:4px;background:#eef3ec;border-radius:10px;margin-bottom:16px}
.shelf-app .shelf-tabs button{flex:1;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:#506f5c;cursor:pointer;font-weight:650}
.shelf-app .shelf-tabs button.active{background:#fff;color:var(--s-ink);box-shadow:0 2px 5px #0001}
.shelf-app .shelf-window{background:#eaf2e7;border-radius:11px;padding:18px}
.shelf-app .shelf-window small{color:#406a4d;font-weight:800;letter-spacing:.06em;display:block}
.shelf-app .shelf-window strong{display:block;font-size:clamp(22px,3vw,32px);margin:4px 0}
.shelf-app .shelf-window p{font-size:13px;color:#456a50;margin:0}
.shelf-app .shelf-inputrow{display:flex;gap:14px;justify-content:space-between;align-items:center;margin:20px 0 14px}
.shelf-app .shelf-inputrow label{font-size:14px;font-weight:650}
.shelf-app .shelf-inputrow input{border:1px solid #b4cbbb;border-radius:8px;padding:9px;min-width:0;width:172px;max-width:100%}
.shelf-app .shelf-confirm{display:flex;gap:9px;font-size:13px;color:#496a56}
.shelf-app .shelf-confirm input{flex-shrink:0;margin-top:5px;accent-color:var(--s-green)}
.shelf-app .shelf-date-result{border-left:3px solid #99bf89;background:#f2f7ef;padding:13px 15px;margin:14px 0;border-radius:5px;font-size:13px}
.shelf-app .shelf-date-result strong{display:block;font-size:19px;margin-top:3px}
.shelf-warning{background:#fff6df!important;border:1px solid #e9d397!important;color:#6b5225!important;border-radius:9px!important;padding:14px 17px!important;font-size:13px!important;line-height:1.55!important;margin:16px 0!important}
.shelf-app .shelf-source{margin-top:17px;font-size:13px}
.shelf-app .shelf-explain{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin:36px 0}
.shelf-app .shelf-explain article{border-top:2px solid #c0d6bb;padding:15px 0}
.shelf-app .shelf-explain h3{font-size:17px;margin:6px 0}
.shelf-app .shelf-explain p{font-size:14px;color:var(--s-muted)}
.shelf-app .shelf-info{background:var(--s-bg);border:1px solid var(--s-border);border-radius:12px;padding:21px}
.shelf-entry{margin:12px 0 30px}
.shelf-entry .shelf-metrics{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}
.shelf-entry .shelf-metric{padding:22px;border:1px solid var(--s-border);border-radius:12px;background:#fff}
.shelf-entry .shelf-metric small{font-size:12px;color:var(--s-muted)}
.shelf-entry .shelf-metric strong{display:block;font-size:27px;margin:6px 0}
.shelf-entry .shelf-metric p{font-size:13px;color:var(--s-muted)}
.shelf-entry .shelf-condition{font-size:14px;color:var(--s-muted)}
.shelf-entry .shelf-actions{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}
.shelf-entry .shelf-actions a{border:1px solid #87a792;border-radius:8px;padding:10px 15px;text-decoration:none;font-weight:650}
.shelf-app .shelf-empty{padding:17px;font-size:13px;color:var(--s-muted)}
@media(max-width:820px){.shelf-app .shelf-explain{grid-template-columns:1fr}.shelf-app .shelf-panel{padding:17px}.shelf-app .shelf-workspace{grid-template-columns:1fr}.shelf-app .shelf-list{border-right:0;border-bottom:1px solid var(--s-border);max-height:225px}}
@media(max-width:520px){.shelf-app .shelf-detail{padding:16px}.shelf-app .shelf-food{padding:11px 14px}.shelf-entry .shelf-metrics{grid-template-columns:1fr}.shelf-app .shelf-inputrow{align-items:flex-start;flex-direction:column}.shelf-app .shelf-inputrow input{width:100%}.shelf-app .shelf-search{gap:5px}.shelf-app .shelf-stats{gap:12px}.shelf-app .shelf-stat{flex:1 1 130px}}

/* P0.3 — condition and region usability */
.shelf-state-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:-3px 0 20px;padding:13px 15px;background:#f4f8f1;border:1px solid #dce8d9;border-radius:11px}
.shelf-state-bar label{font-size:14px;font-weight:700;white-space:nowrap}
.shelf-state-bar select{font:inherit;border:1px solid #acc7af;background:#fff;border-radius:8px;min-height:42px;padding:9px 12px;max-width:100%;color:#17372d}
.shelf-state-bar span{flex:1 1 100%;font-size:12px;color:#61766c}
.shelf-state-label{font-size:13px;color:#60776b;margin:-7px 0 16px}
.shelf-state-label strong{color:#244d3b}
.shelf-related{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 16px;font-size:12px;color:#577365}
.shelf-related button{border:1px solid #c7d8c6;background:#f5f9f2;border-radius:8px;padding:6px 10px;color:#2b694c;cursor:pointer;line-height:1.3;text-align:left}
.shelf-related button:hover{background:#e6f0e0}
.uk-reference{max-width:900px}
.uk-reference h2{font-size:clamp(21px,3vw,28px);line-height:1.3;margin:25px 0 10px}
.uk-reference p{font-size:16px;line-height:1.7;margin:0 0 14px}
.uk-link-list{padding-left:22px;display:grid;gap:12px}
.uk-link-list li{line-height:1.65}
.page-hero:not(:has(.page-hero__media)){grid-template-columns:minmax(0,1fr)}
@media(max-width:520px){.shelf-state-bar{align-items:stretch;flex-direction:column;gap:7px}.shelf-state-bar label{white-space:normal}.shelf-state-bar select{width:100%}}

/* P0.5 — local-only kitchen */
.shelf-save-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:15px}
.shelf-save-button{background:#245d43;color:#fff;border:0;border-radius:9px;padding:12px 16px;font:600 14px/1.3 inherit;cursor:pointer}
.shelf-save-button:disabled{opacity:.46;cursor:not-allowed}
.shelf-save-row span{flex:1 1 175px;color:#5e7267;font-size:12px}
.shelf-kitchen{margin:28px 0;padding:25px;background:#f6f9f3;border:1px solid #dbe7d7;border-radius:16px}
.shelf-kitchen-head{display:flex;justify-content:space-between;align-items:start;gap:14px}
.shelf-kitchen h2{font-size:clamp(22px,3.3vw,30px);margin:4px 0 7px;line-height:1.2}
.shelf-kitchen h2 span{font-size:14px;font-weight:600;background:#e4eee0;padding:5px 10px;border-radius:100px;vertical-align:middle}
.shelf-kitchen-head p:not(.shelf-kicker){max-width:750px;font-size:14px;color:#607568}
.shelf-kitchen-head>button{border:1px solid #a9bdb0;background:#fff;border-radius:9px;padding:9px 13px;white-space:nowrap;cursor:pointer}
.shelf-kitchen-item{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 0;border-top:1px solid #dce8d9}
.shelf-kitchen-item>div{display:grid;gap:2px;min-width:0}
.shelf-kitchen-item .shelf-kicker{font-size:11px}
.shelf-kitchen-name{font-size:16px}
.shelf-kitchen-item small{font-size:12px;color:#637969}
.shelf-kitchen-item div>strong:last-child{font-size:14px;color:#245d43}
.shelf-kitchen-item button{border:1px solid #b9cfc0;color:#32654a;background:#fff;border-radius:8px;padding:9px 12px;cursor:pointer}
@media(max-width:540px){.shelf-kitchen{padding:17px}.shelf-kitchen-head{flex-direction:column;gap:9px}.shelf-kitchen-item{align-items:flex-start}.shelf-kitchen-item button{padding:7px 10px}.shelf-save-row{align-items:stretch}}

/* P0.5 — full FoodKeeper preview */
.fk-entry{max-width:1050px}.fk-entry p{font-size:15px;line-height:1.65}
.fk-source-note{background:#f1f7ec;border:1px solid #d9e7d5;border-radius:12px;padding:17px 20px;margin:10px 0 24px}
.fk-source-note p{margin:6px 0 0}
.fk-variant{margin:25px 0 32px;border-top:1px solid #d6e6d2;padding:20px 0 0}
.fk-variant h2{font-size:clamp(20px,3vw,28px);margin:0 0 11px}
.fk-variant-description{color:#566e61}
.fk-record-id{color:#6a7e71;display:block;margin-top:7px}
.fk-table-scroll{max-width:100%;overflow-x:auto}
.fk-periods{width:100%;border-collapse:collapse;font-size:15px}
.fk-periods td,.fk-periods th{padding:13px 11px;text-align:left;border-bottom:1px solid #e1e9df;vertical-align:top}
.fk-periods thead th{font-size:12px;text-transform:uppercase;color:#526d5b;background:#f3f7f0}
.fk-periods tbody th{font-weight:600;color:#315541;width:44%}
.fk-periods td small{display:block;margin-top:6px;color:#5e7764}
.fk-index{max-width:1020px}
.fk-index>label{display:inline-block;margin:14px 10px 4px 0}
.fk-index input,.fk-index select{padding:12px;border:1px solid #bdcebe;background:white;border-radius:8px;font:inherit;max-width:100%}
.fk-index input{width:min(100%,460px)}
.fk-index select{max-width:360px}
.fk-results ul{list-style:none;padding:0;margin:20px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.fk-results li{border:1px solid #dfebdf;border-radius:10px;padding:13px 15px;display:grid;gap:3px}
.fk-results li small{color:#617669;font-size:12px}
.fk-results li strong{font-size:15px}
#fk-count{font-size:13px;color:#58735f;margin-top:17px}
#fk-more{border:1px solid #87b39a;background:#edf5ea;color:#285a40;font:inherit;border-radius:9px;padding:11px 18px;cursor:pointer}
@media(max-width:660px){.fk-results ul{grid-template-columns:1fr}.fk-index>label{display:block;margin-top:13px}.fk-index input,.fk-index select{width:100%}.fk-periods{min-width:440px}}

/* P0.5 mobile navigation, native details widget, no JS dependency */
.shelf-nav-mobile{display:none}
@media(max-width:720px){
.site-header .wrap{min-height:0;flex-direction:row;align-items:center;gap:16px;position:relative;padding:13px 0}
.site-header .brand{font-size:18px}
.site-header nav.shelf-nav-desktop{display:none}
.shelf-nav-mobile{display:block;margin-left:auto;position:relative}
.shelf-nav-mobile summary{list-style:none;cursor:pointer;border:1px solid #ccdbd0;border-radius:9px;padding:9px 12px;color:#255e43;font-size:14px;font-weight:700;white-space:nowrap}
.shelf-nav-mobile summary::-webkit-details-marker{display:none}
.shelf-nav-mobile[open] summary{background:#edf5ed}
.site-header .shelf-nav-mobile nav{position:absolute;z-index:15;right:0;top:calc(100% + 7px);display:grid;gap:0;min-width:205px;padding:7px;background:#fff;border:1px solid #d4e1d2;box-shadow:0 12px 30px #1e402c25;border-radius:11px}
.site-header .shelf-nav-mobile nav a{display:block;padding:10px 12px;color:#24543f;border-radius:7px;font-size:14px}
.site-header .shelf-nav-mobile nav a:hover,.site-header .shelf-nav-mobile nav a:focus-visible{background:#edf5e9}
}
