/* HOME POLISH 1: home-only layout, plus the requested shared mobile tab bar. */
.home-page .home-search{padding:16px 0 10px}
.home-page .home-search h1{font-size:22px;line-height:1.2;letter-spacing:-.4px;margin-bottom:8px}
.home-page .home-search .search{align-items:stretch;padding:4px;gap:4px}
.home-page .home-search .search input{font-size:16px;line-height:1.35;min-width:0;flex:1 1 0;width:0;padding:8px}
.home-page .home-search .search .btn{min-width:44px;min-height:44px;flex:0 0 44px;padding:10px}
.home-page .home-text-search{display:flex;align-items:center;gap:8px;min-height:44px;width:fit-content;max-width:100%;font-size:14px;line-height:1.25;color:var(--muted);cursor:pointer}
.home-page .home-text-search input{appearance:auto;-webkit-appearance:checkbox;width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:var(--theme-brand-green, var(--green))}
.home-page .category-discovery .categories{gap:8px;padding:0}
.home-page .category-discovery .category{height:86px;min-height:86px;padding:11px 6px;gap:6px;border:1px solid var(--theme-border-default, #dce6e0);border-radius:10px;box-shadow:0 1px 2px var(--theme-shadow, #101f3205);justify-content:flex-start}
.home-page .category-discovery .category svg{width:24px;height:24px}
.home-page .category-discovery .category b{font-size:13px;font-weight:600;line-height:1.25;width:100%;overflow-wrap:normal;word-break:normal;hyphens:none}
.home-page .category-discovery .category:hover{border-color:var(--green);background:var(--theme-bg-subtle, #f4f9f6);transform:none}
.home-page .category-discovery .category:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.home-page .more-categories>summary{min-height:44px;padding:10px 0;line-height:24px}
.home-page .home-listings{padding-top:6px}
.home-page .home-listings .section-head{margin-bottom:10px}
@media(max-width:768px){
 .mobile-nav{padding:3px 4px calc(3px + env(safe-area-inset-bottom,0px))}
 .mobile-nav a,.mobile-nav button{min-height:48px;gap:3px;padding:3px 1px;font-size:12px;line-height:1.2}
 .mobile-nav svg{width:20px;height:20px}
 .mobile-nav .mobile-post{margin:0 3px;border-radius:9px}
 .mobile-nav .mobile-post svg{width:23px;height:23px}
 /* Existing body safe-area clearance is retained, exceeding the smaller bar. */
}
@media(max-width:650px){
 .home-page .home-search{padding-top:10px;padding-bottom:8px}
 .home-page .home-search h1{font-size:20px;margin-bottom:6px}
 .home-page .category-discovery .categories{gap:6px}
 .home-page .category-discovery .category{height:72px;min-height:72px;padding:6px 3px;gap:5px}
 .home-page .category-discovery .category svg{width:22px;height:22px}
 .home-page .home-listings .section-head h2{font-size:20px}
}

/* Scoped compact delta: preserve v14 grid columns, gaps, order and bottom navigation. */
.home-page .category-discovery .category:is([data-cat="parts"],[data-cat="sports"],[data-cat="fashion"],[data-cat="building"]) b{font-size:10px;line-height:1}
:lang(de) .home-page .category-discovery .category:is([data-cat="collectibles"],[data-cat="music"],[data-cat="services"],[data-cat="agriculture"],[data-cat="parts"]) b{font-size:9px;line-height:1.1}
@media(max-width:650px){
 .home-page .category-discovery .category b{font-size:12px;line-height:1.2}
 .home-page .category-discovery .category[data-cat="agriculture"] b{font-size:11px}
 .home-page .category-discovery .category:is([data-cat="parts"],[data-cat="sports"],[data-cat="fashion"],[data-cat="building"]) b{font-size:10px;line-height:1}
 :lang(de) .home-page .category-discovery .category:is([data-cat="collectibles"],[data-cat="music"],[data-cat="services"],[data-cat="agriculture"],[data-cat="parts"]) b{font-size:9px;line-height:1.1}
}
.compact-market{padding-top:16px}
.compact-market>.page-title{font:700 22px/1.2 Manrope,Arial;letter-spacing:-.4px;margin:0 0 8px}
.compact-market .market-search{align-items:stretch;padding:4px;gap:4px}
.compact-market .market-search input.field{font-size:16px;line-height:1.35;min-width:0;flex:1 1 0;width:0;padding:8px}
.compact-market .market-search .btn{min-width:44px;min-height:44px;flex:0 0 44px;padding:10px}
.compact-market .market-search .location-pill{border-radius:9px;max-width:44px}
.compact-market .compact-search-actions{display:flex;align-items:center;gap:10px;margin:4px 0}
.compact-market .quick-filter-scroll{flex:1;min-width:0;gap:5px;padding:0}
.compact-market .quick-filters{gap:5px}
.compact-market .quick-chip button,.compact-market #open-filters{min-height:38px;padding:4px 8px;font-size:12px}
.compact-market .quick-chip .quick-remove{padding:4px 6px;min-width:30px;color:var(--theme-danger, #855b5b)}
.compact-market .compact-search-actions>.reset-context{flex:none;min-height:44px;padding:6px 8px;font-size:12px;color:var(--theme-danger, #855b5b);background:var(--theme-bg-subtle, #f5eeee);border-radius:8px}
.compact-market .results-meta{flex-wrap:nowrap;margin:4px 0 8px;min-height:44px}
.compact-market .results-meta .sort-pill{margin-left:auto;width:86px;max-width:86px;min-height:44px}
.compact-market .results-meta .sort-pill select{min-height:44px;padding:6px;font-size:13px}
@media(max-width:650px){.compact-market{padding-top:10px}.compact-market>.page-title{font-size:20px;margin-bottom:6px}}

/* Search Visual Polish 2: use the existing Home search appearance. */
.compact-market .market-search input.field{background:transparent;border-radius:0}
.compact-market .market-search .location-pill{gap:9px;font-size:14px}

/* Saved toolbar and shared header access only. */
.saved-page .filter-chips{flex-wrap:nowrap;gap:8px;align-items:center}
.saved-page .filter-chips .check-option{flex:none;gap:5px;font-size:12px;white-space:nowrap}
.saved-page .filter-chips .check-option input{width:18px;height:18px;margin:0}
.saved-page .filter-chips .compact-sort{flex:0 1 140px;min-width:0;margin-left:auto}
.saved-page .filter-chips .compact-sort select{width:100%;min-width:0;max-width:140px;min-height:38px;margin:0;padding:6px 4px;font-size:12px}
header .nav .lang{width:52px;min-width:52px;max-width:52px;flex:0 0 52px;padding:6px 2px 6px 5px;min-height:44px;font-size:14px}
header .nav .header-messages,header .nav .account-entry{display:grid;place-items:center;flex:0 0 40px;width:40px;height:44px;padding:8px;background:transparent;border:0;border-radius:9px}
header .nav .header-messages{color:var(--navy)}
header .nav .account-entry{color:var(--theme-link, #2468ad)}
header .nav .header-messages svg,header .nav .account-entry svg{width:24px;height:24px}

/* Unified Inbox: existing message state, no notification backend. */
header .nav .header-messages{position:relative}
header .nav .header-messages .envelope-flap{stroke:var(--green)}
header .nav .header-messages .inbox-badge{position:absolute;top:0;right:-2px;min-width:17px;height:17px;padding:0 3px;border-radius:9px;border:1px solid var(--theme-border-default, white);background:var(--theme-brand-green, var(--green));color:var(--theme-text-on-brand, white);font-size:10px;font-weight:700;line-height:15px;text-align:center}
header .nav .header-messages .inbox-badge[hidden]{display:none}
.inbox-tabs [aria-current="page"]{border-color:var(--green);background:var(--theme-bg-subtle, #ecf6f0);color:var(--green)}
.community-page .message-search #message-sort{flex:0 0 100px;width:100px;min-width:0;max-width:100px;min-height:38px;padding:6px 4px;font-size:13px}

.location-map-panel .map-tap-hint{display:block;font-size:12px;line-height:1.3;color:var(--muted);margin:0 0 4px}
.location-map-panel .map-tap-hint[hidden]{display:none}

/* Search Category / Filter Flow v1; all selectors restricted to this flow. */
.compact-market .compact-search-actions{display:block}
.compact-market .quick-filter-scroll{flex-wrap:wrap;overflow:visible;gap:4px 6px}
.compact-market .quick-filters{display:contents}
.compact-market .quick-chip{max-width:110px;min-width:0}
.compact-market .quick-chip button:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 7px}
.compact-market .quick-chip .quick-remove{flex:none;padding:4px;min-width:24px}
.compact-market .search-direct-toggle{display:flex;align-items:center;gap:4px;min-height:38px;font-size:12px;white-space:nowrap}
.compact-market .search-direct-toggle input{width:16px;height:16px;margin:0;accent-color:var(--theme-brand-green, var(--green))}
.compact-market .quick-filter-scroll>.reset-context{min-height:38px;padding:4px 7px;font-size:12px;color:var(--theme-danger, #855b5b);background:var(--theme-bg-subtle, #f5eeee);border-radius:8px;margin-left:auto}
.search-category-flow{gap:10px}
.search-category-flow #category-back{justify-self:start;padding:0 6px}
.search-category-flow .category-path{font-size:14px;color:var(--green);overflow-wrap:break-word}
.search-category-flow .category-choices{display:grid}
.search-category-flow .category-choices button,.search-category-flow .category-place{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:46px;padding:10px 4px;background:var(--theme-bg-surface, white);border-bottom:1px solid var(--line);color:var(--ink);text-align:left;font-size:15px}
.search-category-flow .category-choices button span:first-child{min-width:0;overflow-wrap:break-word}
.search-category-flow .category-place{border-top:1px solid var(--line);font-weight:600}
.search-category-flow .category-place span{font-weight:400;color:var(--muted);font-size:13px;text-align:right;overflow-wrap:break-word}
.search-active-flow .active-filter-tags{display:flex;flex-wrap:wrap;gap:8px}
.search-active-flow .active-filter-tag{display:flex;align-items:center;max-width:100%;border:1px solid var(--line);border-radius:10px;padding-left:10px;background:var(--theme-bg-subtle, #ecf6f0);font-size:14px}
.search-active-flow .active-filter-tag>span{min-width:0;overflow-wrap:anywhere}
.search-active-flow .active-filter-tag button,.search-active-flow .flow-reset{color:var(--theme-danger, #855b5b);background:var(--theme-bg-subtle, #f5eeee);min-height:44px;border-radius:8px;padding:8px 12px}
.search-active-flow .active-filter-tag button{flex:none;margin-left:8px}
.search-active-flow .flow-reset{justify-self:start;font-size:14px}

@media(max-width:650px){
 .compact-market .quick-filter-scroll{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr);gap:4px 6px}
 .compact-market .quick-chip{max-width:100%;width:100%}
 .compact-market .quick-chip button:first-child{flex:1}
 .compact-market .search-direct-toggle{min-width:0;white-space:normal;line-height:1.2}
 .compact-market .search-direct-toggle input{flex:none}
 .compact-market #open-filters{width:100%;padding:4px;white-space:normal}
 .compact-market .quick-filter-scroll>.reset-context{margin-left:0;text-align:center;padding:4px;white-space:normal}
}

/* Search flow 1.1: three primary chips; reset remains separate. */
.compact-market .quick-filter-scroll>.reset-context{grid-column:1/-1;justify-self:start;width:auto}
.search-category-flow #category-all-filters{justify-self:start;min-height:44px;font-size:14px;color:var(--green)}
.search-category-flow #category-basic:empty{display:none}
.search-category-flow #category-basic,.search-category-details #category-detail-fields{min-width:0}
.search-category-flow #category-basic>*{min-width:0}
.search-category-flow #category-basic .control,.search-category-flow #category-basic .field{max-width:100%;min-width:0}

/* Search tab layout polish: one compact row, separate reset, scoped price spacing. */
.compact-market .quick-filter-scroll{display:flex;flex-wrap:nowrap;align-items:center;gap:5px;min-height:44px}
.compact-market .quick-chip{flex:0 1 auto;width:auto;max-width:112px;min-width:0}
.compact-market .quick-chip button,.compact-market #open-filters{min-height:34px;padding:3px 7px;font-size:12px;line-height:1.25}
.compact-market .quick-chip button:first-child{padding:3px 7px}
.compact-market .quick-chip .quick-remove{padding:3px 4px;min-width:24px}
.compact-market #open-filters{flex:none;width:auto;white-space:nowrap}
.compact-market .quick-filter-scroll>.reset-context{flex:none;grid-column:auto;min-height:36px;margin-left:auto;padding:4px 7px;white-space:nowrap;position:relative}
.compact-market #open-filters{margin-right:9px;position:relative}
.compact-market .quick-filter-scroll>.reset-context::before,.compact-market #open-filters::before{content:"";position:absolute;inset:-5px 0}
/* Expand chip hit areas vertically while preserving compact visible surfaces. */
.compact-market .quick-chip{overflow:visible}
.compact-market .quick-chip button{position:relative}
.compact-market .quick-chip button:first-child{overflow:visible}
.compact-market .quick-chip-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compact-market .quick-chip button::before{content:"";position:absolute;inset:-5px 0}
.consumer-sheet.quick-sheet:has(#quick-onlyPhotos){gap:8px;padding-top:2px}
.consumer-sheet.quick-sheet:has(#quick-onlyPhotos) .field,.consumer-sheet.quick-sheet:has(#quick-onlyPhotos) select{margin-top:4px;min-height:44px;padding:9px 10px}
.consumer-sheet.quick-sheet:has(#quick-onlyPhotos) .price-filter-row{gap:10px}
.consumer-sheet.quick-sheet:has(#quick-onlyPhotos) .check-option{min-height:44px;gap:8px}
dialog:has(#quick-onlyPhotos) .modal-head{margin-bottom:10px}

/* Add/Edit photo gestures and rotation controls only. */
#photo-preview .photo-edit-tools{display:flex;gap:4px;margin-top:3px}
#photo-preview .photo-edit-tools button{position:static;min-height:44px;height:auto;min-width:44px;border-radius:6px;background:var(--theme-bg-subtle, #e7f3ed);color:var(--green);padding:4px;font-size:12px}
#photo-preview .photo-edit-tools [data-rotate-photo]{flex:1}
#photo-preview .photo-edit-tools [data-photo-handle]{font-size:23px;cursor:grab}
#photo-preview img{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
#photo-preview .photo-dragging{opacity:.35}
.photo-drag-ghost{position:fixed;width:100px;height:80px;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none;z-index:1000;border-radius:8px;box-shadow:0 5px 18px var(--theme-shadow, #101f3240)}

/* Localized native file picker facade, Add/Edit only. */
#product-form .photo-upload-control{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-width:0}
#product-form .photo-upload-control>span:first-child{flex-basis:100%;font-size:14px}
#product-form .photo-upload-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:8px;background:var(--theme-bg-subtle, #e7f3ed);color:var(--green);font-size:14px;overflow:hidden;cursor:pointer}
#product-form .photo-upload-button input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
#product-form .photo-upload-button:focus-within{outline:2px solid var(--green);outline-offset:2px}
#product-form .photo-upload-button:has(input:disabled){opacity:.6;cursor:default}
#product-form #photo-upload-status{font-size:13px;color:var(--muted);overflow-wrap:break-word}
