:root{
  --page:#fafafa;--text:#202020;--muted:#6f6f6f;--surface:#fff;--border:#e1e1e1;
  --search-border:#d6d6d6;--media:#f0f0f0;--badge:#ffffffed;--badge-text:#3e3e3e;
  --accent:#777;--button:#242424;--button-hover:#404040;--button-text:#fff;
  --error:#595959;--shadow:#00000004;
  color-scheme:light;font-family:Inter,system-ui,sans-serif;color:var(--text);background:var(--page);font-synthesis:none;
}
:root[data-theme=dark]{
  --page:#121212;--text:#ededed;--muted:#a4a4a4;--surface:#1d1d1d;--border:#353535;
  --search-border:#454545;--media:#272727;--badge:#1d1d1ded;--badge-text:#dedede;
  --accent:#aaa;--button:#e7e7e7;--button-hover:#fff;--button-text:#191919;
  --error:#bcbcbc;--shadow:#00000020;color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0}
header,main{max-width:1180px;margin:auto;padding:24px 32px}
header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.header-tools{display:flex;align-items:center;gap:16px}
.header-tools>span{font-size:13px;color:var(--muted)}
#theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:8px;border:1px solid var(--border);border-radius:50%;background:transparent;color:var(--text)}
#theme-toggle:hover{background:var(--media)}
#favorites-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:8px;border:1px solid var(--border);border-radius:50%;background:transparent;color:var(--text)}
#favorites-toggle:hover{background:var(--media)}
#favorites-toggle svg,.card-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#favorites-toggle[aria-pressed=true] svg,.favorite-button[aria-pressed=true] svg{fill:currentColor}
#favorite-count{position:absolute;top:-5px;right:-5px;min-width:16px;padding:1px 3px;border-radius:9px;background:var(--page);font-size:10px;line-height:14px;margin:0}
#theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#theme-toggle .theme-sun,:root[data-theme=dark] #theme-toggle .theme-moon{display:none}
:root[data-theme=dark] #theme-toggle .theme-sun{display:block}
.brand{display:inline-flex;align-items:center;gap:7px;font-size:30px;font-weight:800;letter-spacing:-2px;text-decoration:none;color:inherit}
.brand-bag{width:27px;height:30px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.brand-bag circle{fill:currentColor;stroke:none}
main{padding-top:32px}
.search-bar{display:flex;padding:7px;background:var(--surface);border:1px solid var(--search-border);border-radius:12px;box-shadow:0 4px 16px var(--shadow)}
.search-bar:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.search-bar :focus-visible{outline:none}
input[type=search]{min-width:0;flex:1;padding:16px;font-size:17px;border:0;background:transparent;color:inherit;border-radius:7px}
input[type=search]::placeholder{color:var(--muted);opacity:1}
button{background:var(--button);color:var(--button-text);border:0;border-radius:7px;padding:13px 24px;font:inherit;cursor:pointer}
button:hover{background:var(--button-hover)}
button span{margin-left:15px}
fieldset{border:0;padding:15px 0;margin:0}
legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#providers{display:flex;flex-wrap:wrap;gap:10px}
#providers label{display:flex;gap:6px;align-items:center;border:1px solid var(--border);border-radius:25px;padding:8px 12px;font-size:13px;background:var(--surface);cursor:pointer}
input[type=checkbox]{accent-color:var(--button)}
#result-toolbar{position:relative;margin:12px 0 18px}
#search-details{font-size:14px}
#search-details>summary{min-height:32px;padding:6px 120px 6px 0;line-height:20px;cursor:pointer;border-radius:5px}
#timing{font-size:13px;color:var(--muted)}
#summary{font-size:13px;margin:16px 0 12px}
#statuses{display:grid;gap:6px}
.portal-status{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.portal-status strong{min-width:95px;color:var(--text)}
.portal-status a{color:inherit}
.portal-status[data-state=error]{color:var(--error)}
#restore-hidden{margin-top:12px;padding:4px 0;background:transparent;color:var(--muted);font-size:12px;text-decoration:underline;text-underline-offset:3px}
#result-actions{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:flex-end;min-height:32px;max-width:112px}
#cancel{min-height:32px;padding:6px 0 6px 10px;font-size:12px;line-height:20px;background:transparent;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
#cancel:hover{color:var(--text)}
#sort-control{position:relative}
#sort{display:flex;align-items:center;gap:6px;max-width:112px;min-height:32px;padding:6px 4px;background:transparent;border:0;border-radius:6px;font:inherit;font-size:12px;line-height:20px;color:var(--muted);cursor:pointer}
#sort:hover,#sort[aria-expanded=true]{background:var(--media);color:var(--text)}
#sort-label{margin:0}
#sort svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#sort-menu{position:absolute;top:calc(100% + 5px);right:0;z-index:5;min-width:150px;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px #00000014}
#sort-menu button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:10px 12px;background:transparent;color:var(--text);border-radius:6px;font-size:13px;text-align:left}
#sort-menu button:hover,#sort-menu button:focus-visible{background:var(--media)}
#sort-menu button[aria-checked=true]::after{content:'✓';font-size:12px}
#browser-notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:2;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:max-content;max-width:calc(100% - 32px)}
#browser-notice button{font-size:13px;padding:9px 12px;background:var(--surface);color:var(--text);border:1px solid var(--border)}
#browser-dialog{width:min(440px,100% - 16px);height:min(940px,100dvh - 16px);max-height:calc(100dvh - 16px);padding:0;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);overflow:hidden}
#browser-dialog::backdrop{background:#0008}
#browser-frame{width:100%;height:calc(100% - 48px);border:0;display:block}
#browser-close{display:block;width:100%;height:48px;padding:10px;border-radius:0}
#results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
#results:empty{display:none}
.card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.card-actions{position:absolute;top:8px;right:8px;display:flex;gap:6px}
.card-actions button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border-radius:50%;background:var(--badge);color:var(--badge-text);border:1px solid var(--border)}
.card-actions button:hover{background:var(--surface)}
.media{height:220px;display:block;position:relative;background:var(--media)}
.media>img{height:100%;width:100%;object-fit:contain}
.badge{position:absolute;top:12px;left:12px;background:var(--badge);color:var(--badge-text);font-size:11px;padding:5px 9px;border-radius:5px}
.card-body{padding:18px}
.price{font-size:17px;font-weight:700;margin:0 0 8px}
.title{display:block;font-size:16px;font-weight:550;color:inherit;text-decoration:none;line-height:1.5}
.title:hover{text-decoration:underline}
.description{font-size:13px;line-height:1.6;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.location{font-size:12px;color:var(--muted)}
.gallery{display:flex;gap:5px;overflow:auto;margin-top:12px}
.gallery img{width:65px;height:55px;object-fit:cover}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}
@media(max-width:900px){#results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){
  header,main{padding:20px}
  main{padding-top:24px}
  #results{grid-template-columns:1fr}
  .search-bar button{padding:12px}
  .search-bar input{font-size:14px;padding:12px}
  .header-tools{gap:10px}
  .header-tools>span{font-size:11px}
  .media{height:250px}
}
@media(max-width:380px){.header-tools>span{display:none}}
