/* Find by photo. Shared tokens and components come from ../shared/site.css; this file is the page's own layout. */
.gl-head{padding:clamp(1rem,4vw,2.6rem) 0 .2rem}
section.gl-find{padding:.5rem 0 0}
section.gl-wall-wrap{padding-top:.4rem}
.gl-head h1{font-size:clamp(1.75rem,6.4vw,3rem);line-height:1.06;max-width:20ch}
.gl-head .lead{margin-top:.45rem;font-size:clamp(.98rem,2.4vw,1.12rem)}

/* ---- search ------------------------------------------------------------------------------------ */
.gl-find{position:relative;padding:.6rem 0 0}
.gl-search{display:flex;align-items:center;gap:.4rem;background:var(--card);border:1px solid var(--field-line);border-radius:999px;padding:.3rem .3rem .3rem 1rem;box-shadow:var(--shadow);max-width:760px}
.gl-search:focus-within{border-color:var(--focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 25%,transparent)}
.gl-search svg{flex:none;color:var(--ink-3)}
.gl-search input[type=search]{flex:1;min-width:0;border:0;background:transparent;padding:.55rem .25rem;min-height:44px;box-shadow:none;border-radius:0}
.gl-search input[type=search]:focus{outline:none}
.gl-search input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}
.gl-search .btn{flex:none;padding-inline:1.15rem}
/* The rows of controls under the search wrap onto more lines on a narrow phone: the earlier sideways-scrolling row ran
   off the right edge of the screen ("Anywhere (2,063 p", 13 Nov 2026). Selects take their own width and shrink only
   when one alone is wider than the screen. */
.gl-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.65rem;padding:.15rem 0;min-width:0}
.gl-row::-webkit-scrollbar{display:none}
.gl-row>*{flex:none;max-width:100%}
/* Phone: the controls are a two-column grid (photo search | map, place, budget | room) and the ideas wrap; on a phone two
   of the eight ideas show (plus the sample photo), so the first photos still start above the fold. */
@media (max-width:759px){
  #controls{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
  #controls>.btn,#controls>select{grid-column:1/-1;width:100%;max-width:none;min-width:0}
  #controls>#f-budget,#controls>#f-room,#controls>.btn{grid-column:auto}
  #controls>#photo-btn,#controls>#map-btn{order:-1}
  #controls>.btn{padding-inline:.6rem;white-space:normal;line-height:1.2;text-align:center}
  .gl-ideas{gap:.45rem}
  .gl-ideas .chip:not(.gl-sample):not([data-q="cozy wooden cabin"]):not([data-q="beach"]){display:none}
  .gl-map .cm-regions{flex-wrap:wrap;overflow:visible;margin-inline:0;padding-inline:0}
}
.gl-row select{width:auto;max-width:min(15rem,100%);border-radius:999px;padding:.45rem 2.3rem .45rem .95rem;font-size:max(16px,1rem);font-weight:600;color:var(--ink-2)} /* 16 px or iPhone zooms the page on focus */
.gl-row select.on{border-color:var(--teal);background-color:var(--teal-soft);color:var(--teal-2)}
.gl-photo-btn{gap:.45rem}
.gl-photo-btn svg{flex:none}
.gl-ideas{margin-top:.55rem}
.gl-ideas .chip{font-weight:600}
.gl-ideas-label{font-size:.82rem;color:var(--ink-3);font-weight:600;padding-right:.1rem}
.gl-ideas .gl-sample{border-style:dashed}
.gl-map-btn{gap:.45rem}
.gl-map-btn[aria-expanded="true"]{border-color:var(--teal);background:var(--teal-soft);color:var(--teal-2)}
/* The map picker's panel (shared/citymap.js) lives under the rows; its own toggle is hidden, #map-btn opens it. */
.gl-map{max-width:760px}
.gl-map .cm-toggle{display:none}
.gl-map .cm-panel{margin-top:.8rem}

/* ---- photo search: the panel that explains the download, its progress and errors --------------- */
.gl-panel{margin-top:.8rem;max-width:760px;display:grid;grid-template-columns:auto 1fr;gap:.9rem;align-items:start;padding:.9rem;background:var(--card);border:1px solid var(--line);border-left:4px solid var(--sea);border-radius:var(--radius);box-shadow:var(--shadow)}
.gl-panel.bad{border-left-color:var(--bad)}
.gl-panel img{width:84px;height:84px;object-fit:cover;border-radius:var(--radius-s);background:var(--line-2)}
.gl-panel h2{font-family:var(--body);font-size:1rem;font-weight:700;margin:0 0 .2rem}
.gl-panel p{font-size:.9rem;color:var(--ink-2)}
.gl-panel .gl-panel-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.65rem}
.gl-bar{height:8px;border-radius:999px;background:var(--line-2);overflow:hidden;margin-top:.6rem}
.gl-bar i{display:block;height:100%;width:0;background:var(--sea);border-radius:inherit;transition:width .2s}
.gl-bar.wait i{width:35%;animation:gl-wait 1.3s ease-in-out infinite}
@keyframes gl-wait{0%{transform:translateX(-100%)}100%{transform:translateX(290%)}}
.gl-drop{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:color-mix(in srgb,var(--paper) 82%,transparent);border:3px dashed var(--sea);font-weight:700;font-size:1.2rem;color:var(--ink)}

/* ---- status, the active search, the fee line ---------------------------------------------------- */
.gl-status{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .8rem;margin:.9rem 0 .15rem;min-height:44px}
#status:focus{outline:none}
.gl-status h2{font-family:var(--body);font-size:1.02rem;font-weight:700;margin:0;line-height:1.3}
.gl-status .gl-you{display:inline-flex;align-items:center;gap:.5rem}
.gl-status .gl-you img{width:44px;height:44px;border-radius:10px;object-fit:cover}
.gl-status .gl-status-act{display:flex;gap:.4rem;margin-left:auto}
.gl-status .btn{flex:none}
.gl-share.done{border-color:var(--ok);color:var(--ok)}
.gl-share-fallback{display:flex;gap:.4rem;flex-basis:100%;margin-top:.2rem}
.gl-share-fallback input{flex:1;min-width:0;font-size:.86rem}
.gl-words{font-size:.86rem;color:var(--ink-3);margin-bottom:.15rem}
.gl-words b{color:var(--ink-2);font-weight:600}
.gl-fees{font-size:.84rem;color:var(--ink-3);margin-bottom:.8rem}

/* ---- the photo wall: tiles are placed by gallery.js (shortest column first), so nothing moves as photos load */
.gl-wall{position:relative;min-height:60vh;margin-top:.4rem}
.gl-tile{position:absolute;top:0;left:0}
.gl-ph{position:relative} /* the photo with its two buttons; the caption sits under it */
.gl-open{display:block;width:100%;padding:0;border:0;background:var(--line-2);border-radius:var(--radius);overflow:hidden;cursor:zoom-in;position:relative}
.gl-open img{width:100%;height:auto;display:block;color:transparent;font-size:0;opacity:0;transition:transform .35s ease,opacity .45s ease}
.gl-open img.ld{opacity:1}
.gl-open:hover img{transform:scale(1.03)}
.gl-open:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* The first page of a view rises into place, one tile after the other (transform and opacity only: no layout shift). */
.gl-tile.in{animation:gl-in .42s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * 45ms)}
@keyframes gl-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.gl-heart,.gl-like{position:absolute;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#343a40;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.gl-heart{top:.4rem;right:.4rem}
.gl-like{bottom:.4rem;right:.4rem}
.gl-heart svg,.gl-like svg{width:20px;height:20px}
.gl-heart svg path{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round}
.gl-like svg *{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;stroke-linecap:round}
.gl-heart[aria-pressed="true"]{color:#c2320f}
.gl-heart[aria-pressed="true"] svg path{fill:currentColor}
.gl-heart:focus-visible,.gl-like:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.gl-heart:hover,.gl-like:hover{background:#fff;color:#111}
/* With a mouse the "More like this" button waits for a hover or focus; on touch screens it is always there. */
@media (hover:hover) and (pointer:fine){.gl-like{opacity:0;transition:opacity .15s}.gl-tile:hover .gl-like,.gl-tile:focus-within .gl-like{opacity:1}}
.gl-cap .gl-ll{font-size:.78rem;color:var(--ink-3);white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3}
.gl-cap .gl-ll b{font-weight:600;color:var(--ink-2)}
.gl-badge{position:absolute;left:.45rem;bottom:.45rem;padding:.15rem .55rem;border-radius:999px;font-size:.74rem;font-weight:700;background:var(--rose-soft);color:var(--rose);pointer-events:none}
.gl-cap{display:grid;padding:.4rem .2rem 0;line-height:1.3}
.gl-cap b,.gl-cap span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gl-cap b{font-size:.9rem;font-weight:700;color:var(--ink)}
.gl-cap span{font-size:.82rem;color:var(--ink-3)}
.gl-cap span i{font-style:normal;color:var(--amber-ink);font-weight:700}
.gl-sk{position:absolute;border-radius:var(--radius)}
.gl-more{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.4rem 0 .5rem}
.gl-more p{font-size:.86rem;color:var(--ink-3);text-align:center}
.gl-wall-wrap .empty{margin-top:.5rem}
.gl-wall-wrap .empty .chips{justify-content:center}

/* ---- the lightbox (a native <dialog>: focus stays inside, Escape closes, the page behind is inert) ---- */
html.gl-lock,html.gl-lock body{overflow:hidden}
.gl-lb{padding:0;border:0;margin:0;width:100%;max-width:100%;height:100%;max-height:100%;background:var(--paper);color:var(--ink)}
.gl-lb::backdrop{background:rgba(20,16,12,.7)}
.gl-lb[open]{display:flex;flex-direction:column}
.gl-lb-inner{display:flex;flex-direction:column;height:100%;overflow-y:auto;overscroll-behavior:contain}
.gl-lb-stage{position:relative;flex:none;background:#14110f;display:grid;place-items:center;height:min(62vh,calc(100vw * var(--ar,.75)));height:min(62dvh,calc(100vw * var(--ar,.75)));touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}
.gl-lb-stage img{-webkit-user-drag:none;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.gl-lb-stage .gl-lb-img{position:absolute;inset:0;margin:auto}
.gl-lb-count{position:absolute;left:.75rem;bottom:.6rem;padding:.15rem .6rem;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:.8rem;font-weight:700}
.gl-lb-btn{position:absolute;z-index:2;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(255,255,255,.94);color:#343a40;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.gl-lb-btn svg{width:22px;height:22px}
.gl-lb-btn:focus-visible{outline:3px solid #4fb8bc;outline-offset:2px}
.gl-lb-btn[disabled]{opacity:.35;cursor:default}
.gl-lb-close{top:max(.6rem,env(safe-area-inset-top));right:.6rem}
.gl-lb-prev{left:.6rem;top:50%;transform:translateY(-50%)}
.gl-lb-next{right:.6rem;top:50%;transform:translateY(-50%)}
.gl-lb-info{padding:1rem var(--gutter) 1.5rem;width:100%;max-width:640px;margin:0 auto}
.gl-lb-info .where{color:var(--ink-3);font-size:.9rem;margin:.1rem 0 .45rem}
.gl-lb-info h2{font-size:clamp(1.35rem,4.6vw,1.9rem);margin:0}
.gl-lb-info .actions{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.9rem;margin-top:0}
.gl-lb-info .actions .btn:first-child{flex:1 1 12rem}
.gl-strip{display:flex;gap:.45rem;overflow-x:auto;padding:.9rem 0 .2rem;scrollbar-width:thin}
.gl-strip button{flex:none;width:76px;height:57px;padding:0;border:2px solid transparent;border-radius:9px;overflow:hidden;background:var(--line-2);cursor:pointer}
.gl-strip button img{width:100%;height:100%;object-fit:cover;display:block}
.gl-strip button[aria-current="true"]{border-color:var(--teal)}
.gl-strip button:focus-visible{outline:3px solid var(--focus);outline-offset:1px}
.gl-lb-note{font-size:.82rem;color:var(--ink-3);margin-top:.8rem}
.gl-lb-ll{font-size:.86rem;color:var(--ink-3);margin:.5rem 0 0}
.gl-lb-ll b{font-weight:600;color:var(--ink-2)}
.gl-lb-info .actions .gl-share{flex:none}
.gl-lb-info .gl-share-fallback{margin-top:.5rem}
@media (min-width:900px){
  .gl-lb{width:min(1240px,calc(100% - 3rem));height:min(820px,calc(100% - 3rem));margin:auto;border-radius:var(--radius);box-shadow:0 30px 80px rgba(0,0,0,.4)}
  .gl-lb-inner{flex-direction:row;overflow:hidden}
  .gl-lb-stage{flex:1 1 auto;height:auto}
  .gl-lb-info{flex:0 0 380px;overflow-y:auto;padding:1.4rem 1.4rem 1.6rem;max-width:none}
}
@media (prefers-reduced-motion:reduce){.gl-open img{transition:none}.gl-tile.in{animation:none}.gl-like{transition:none}}
