/* The reference supplies only interface ornamentation. The scene keeps the
   game's original 16:9 artwork, sprites and percentage coordinates. */
.hunt.inn-search{background:#211008}
.inn-search .hunt-stage>.scene-layer>img{object-fit:contain}
/* The painting sits inside the frame: same 16:9 ratio, narrower than the stage, starting below the top border.
   The bottom slice is hidden by the dock, as before. Percent coordinates stay relative to this box. */
.inn-search>.hunt-stage{inset:auto;left:1.12cqw;top:1.12cqw;width:97.76cqw;height:54.99cqw;overflow:hidden;box-shadow:0 0 0 1px #e6b867,0 0 8px 2px #000a}
.inn-search>.hunt-stage::after{content:"";position:absolute;inset:0;z-index:9;pointer-events:none;box-shadow:inset 0 0 14px #000a}
.inn-search .hunt-item{background:transparent;border:0;cursor:pointer}
.inn-search .hunt-item:hover:not(:disabled){background:transparent;box-shadow:none;filter:none}
.inn-search .hunt-item:focus-visible{outline:2px solid #f4da8a;outline-offset:3px;background:#e5b65833}
.inn-search .hunt-item:disabled{opacity:1}
/* The object shown by the lens has a single mark, the breathing ring of style.css: no frame of its own. */
.inn-search .hunt-item.revealed{border:0;box-shadow:none}
.inn-search .hunt-miss b{position:absolute;left:16px;top:-24px;color:#ffb391;font:bold 24px Georgia;text-shadow:0 2px 3px #000}
/* No fill: the reference painting is never drawn in the centre. */
.inn-frame-art{position:absolute;inset:-1.25cqw 0 0;z-index:1;pointer-events:none;border-style:solid;border-width:2.37cqw 1.12cqw 1.12cqw;border-image:url('../assets/ui/inn-frame.webp') 42 20 20 20 / 2.37cqw 1.12cqw 1.12cqw / 0 stretch}
.inn-top-shield{position:absolute;inset:0 0 auto;height:2%;z-index:2}
.inn-side-shield{position:absolute;top:0;bottom:0;width:.8%;z-index:2}
.inn-side-shield.left{left:0}.inn-side-shield.right{right:0}
.inn-top-controls{position:absolute;inset:0;pointer-events:none;z-index:4}
.inn-search .inn-button{padding:0;border:0;background-color:transparent;color:#f5dfb1;border-radius:0;box-shadow:none;text-shadow:0 1px 2px #000;cursor:pointer}
.inn-search .inn-button:hover:not(:disabled){background-color:#f9d27712;filter:brightness(1.12)}
.inn-search .inn-button:focus-visible,.inn-resize-handle:focus-visible{outline:2px solid #fff0b6;outline-offset:-3px}
.inn-search .inn-button:disabled{cursor:default;filter:grayscale(.65);opacity:.6}
.inn-top-controls .inn-button{position:absolute;pointer-events:auto;background-image:url('../assets/ui/inn-reference.webp');background-repeat:no-repeat}
.inn-energy-control{left:75.0846%;top:2.2548%;width:14.7689%;aspect-ratio:262/68}
.inn-top-controls .inn-button.inn-energy-control{background-image:url('../assets/ui/inn-energy.webp')!important;background-size:100% 100%;background-position:0 0}
.inn-menu-control{left:89.3%;top:.6%;width:4.9%;aspect-ratio:1;border-radius:50%!important;clip-path:circle(49%)}
.inn-exit-control{left:94.45%;top:.6%;width:4.9%;aspect-ratio:1;border-radius:50%!important;clip-path:circle(49%)}
.inn-energy-meter{position:absolute;left:27.86%;top:35.29%;width:58.4%;height:35.29%;border-radius:0 .65cqw .65cqw 0;overflow:hidden;box-shadow:inset 0 2px 5px #0009;pointer-events:none}
.inn-energy-meter i{position:absolute;inset:0 auto 0 0;width:var(--energy);background:linear-gradient(#b2f072 0%,#6aca3b 20%,#39a72d 58%,#267c20 100%);box-shadow:inset 0 1px 1px #f1ffc3,0 0 9px #63b33644;transition:width .25s ease-out}
.inn-energy-meter span{position:absolute;inset:0;display:grid;place-items:center;font:bold clamp(11px,1.03cqw,19px)/1 Georgia;color:#fff0c1;text-shadow:0 1px 2px #000,1px 0 2px #000,-1px 0 2px #000;font-variant-numeric:tabular-nums}
.inn-search .search-drawer{position:absolute;inset:auto 0 0;z-index:3;filter:none;pointer-events:none}
.inn-search .search-drawer-body{--dock-min:12cqh;display:block;position:relative;height:clamp(12cqh,var(--drawer-height,12cqh),26cqh);max-height:none;padding:0;border:0;border-radius:0;box-shadow:none;background:#211008;overflow:visible;pointer-events:auto}
.inn-search .search-drawer-body[hidden]{display:none}
/* Sample starts BELOW the reference's room: this is just the green/gold tray. */
.inn-dock-art{position:absolute;inset:0;background-image:url('../assets/ui/inn-reference.webp');background-repeat:no-repeat;pointer-events:none;clip-path:inset(0 0 0 14.66%)}
/* The lens's ornate seat keeps the size it has in the lowest bar and stays at the bottom: raising the bar stretches only the strip of objects,
   so the seat is never drawn out into an empty oval and the lens never floats above it. */
.inn-dock-cap{position:absolute;left:0;bottom:0;width:14.66%;height:var(--dock-min);background-image:url('../assets/ui/inn-reference.webp');background-repeat:no-repeat;pointer-events:none}
.inn-search .inn-resize-handle{position:absolute;left:46.73%;top:-3.9cqh;width:6.54%;height:4.2cqh;min-height:16px;padding:0;pointer-events:auto;touch-action:none;cursor:ns-resize;background:none;border:0;box-shadow:none;z-index:4;color:transparent}
.inn-tab-art{clip-path:polygon(0 100%,7% 85%,16% 50%,20% 20%,32% 0,68% 0,80% 20%,84% 50%,93% 85%,100% 100%);position:absolute;inset:0;background-image:url('../assets/ui/inn-reference.webp');background-repeat:no-repeat;pointer-events:none}
.inn-search .search-drawer:not(.is-open){height:3cqh;background:linear-gradient(transparent 55%,#6c421f 59%,#f3c974 64%,#45200f 71%,#1f0d06 90%)}
.inn-search .search-drawer:not(.is-open) .inn-resize-handle{height:4.2cqh;top:-2.5cqh}
.inn-search .search-drawer:not(.is-open) .inn-tab-art{transform:scaleY(-1)}
/* Closed, the bar is only its ^ tab: every few seconds it rises twice, like a nudge, so it is clear it opens upward. */
.inn-search .search-drawer:not(.is-open) .inn-resize-handle{animation:drawer-nudge 4.5s ease-in-out var(--nudge-delay,0ms) infinite}
.inn-search .search-drawer:not(.is-open) .inn-tab-art{filter:drop-shadow(0 0 6px #f3c56a99)}
@keyframes drawer-nudge{0%,70%,100%{translate:0 0}76%{translate:0 -7px}82%{translate:0 0}88%{translate:0 -4px}94%{translate:0 0}}
@media(prefers-reduced-motion:reduce){.inn-search .search-drawer:not(.is-open) .inn-resize-handle{animation:none}}
.inn-search .search-objects{list-style:none;position:absolute;left:12.4%;top:10.19%;width:83.77%;height:56.05%;min-height:0;margin:0;padding:0;display:flex;gap:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;background:linear-gradient(#002d25,#001b16);scroll-behavior:smooth}
.inn-search .search-objects::-webkit-scrollbar{display:none}
/* A card is as wide as its name needs, within bounds: a long word («segnalazione», «attaccapanni») never runs into the next card. */
.inn-search .search-objects li{display:flex;flex:1 0 auto;min-width:max(150px,10.6cqw);max-width:max(200px,13cqw)}
.inn-search .search-object{position:relative;width:100%;height:100%;margin:0;min-width:0;padding:4px 9px;border:0;border-right:1px solid #c5a05e22;border-radius:0;display:flex;flex-direction:row;align-items:center;justify-content:space-evenly;gap:8px;background:none}
.inn-search .search-object:hover:not(:disabled),.inn-search .search-object[aria-pressed=true]{background:#eac76b12}
.inn-search .search-object:hover:not(:disabled){border-right-color:#c6a56855}
.inn-card-image{flex:0 .4 auto;width:max(54px,4.4cqw);min-width:max(36px,2.8cqw);height:95%;object-fit:contain;filter:drop-shadow(1px 3px 2px #0009)}
.inn-card-name{flex:1 1 auto;overflow-wrap:break-word;font:clamp(12px,1.05cqw,19px)/1.15 Georgia;color:#f3e6ca;text-align:center}
.inn-search .search-object.is-found .inn-card-image{opacity:.4}
.inn-search .search-object.is-found .inn-card-name{color:#8caa95;text-decoration:line-through}
.inn-card-check{position:absolute;z-index:2;left:7%;top:0;font:bold clamp(14px,1.7cqw,28px) Georgia;color:#ffe09a;text-shadow:0 2px 3px #000}
.inn-search .search-object[aria-pressed=true]{outline:1px solid #ebc675;outline-offset:-2px;box-shadow:inset 0 0 15px #e6bc5522}
.inn-search .inn-lens-control{position:absolute;left:1.2%;top:calc(100% - var(--dock-min) - 1.2cqh);width:8.4%;aspect-ratio:1;border-radius:50%;background-image:url('../assets/ui/inn-reference.webp');background-repeat:no-repeat;clip-path:circle(48%)}
/* The arrows are the ones painted in the reference frame: these buttons are only their invisible hit areas, with a soft glow on hover. */
.inn-search .inn-scroll-left,.inn-search .inn-scroll-right{position:absolute;top:23%;width:2.6%;height:41%;font-size:0;color:transparent;background:none;border-radius:50%}
.inn-search .inn-scroll-left:hover:not(:disabled),.inn-search .inn-scroll-right:hover:not(:disabled),.inn-search .inn-scroll-left:focus-visible,.inn-search .inn-scroll-right:focus-visible{background:radial-gradient(closest-side,#f3c56a55,#f3c56a14 65%,transparent)}
.inn-scroll-left{left:9.8%}.inn-scroll-right{left:96.2%}
.inn-scrollbar-bed{position:absolute;left:15.2%;top:66.2%;width:78.1%;height:18.5%;background-image:url('../assets/ui/inn-reference.webp')}
.inn-scrollbar{position:absolute;left:15.2%;top:74%;width:78.1%;height:6.8%;margin:0;appearance:none;border-top:2px solid #ae7935;border-bottom:2px solid #d3a451;border-radius:2px;background:linear-gradient(#071b15,#0a2b22 45%,#000d0b);cursor:ew-resize;box-shadow:0 1px 2px #000}
.inn-scrollbar::-webkit-slider-thumb{appearance:none;width:8px;height:22px;border:2px solid #e4bc68;border-radius:50%;background:linear-gradient(90deg,#684115,#e7bc64,#714017);box-shadow:0 1px 2px #000}
.inn-scrollbar::-moz-range-thumb{width:6px;height:19px;border:2px solid #e4bc68;border-radius:50%;background:#b88643}
.inn-scrollbar:focus-visible{outline:2px solid #fff0b6;outline-offset:4px}
.inn-menu,.inn-energy-info,.inn-object-detail,.inn-energy-block>div{position:absolute;z-index:6;color:#f3dfb6;background:linear-gradient(125deg,#103c30f9,#001d19fa);border:2px solid #c5974e;box-shadow:0 0 0 3px #211308,0 0 0 4px #8f6834,0 8px 30px #000b;border-radius:6px;padding:20px;max-width:calc(100% - 32px);font:16px/1.4 Georgia}
/* Both open below the recharge countdown, which stays readable. */
.inn-menu{top:13.6%;right:5%;width:350px}
.inn-energy-info{top:13.6%;right:11%;width:300px}
.inn-object-detail{bottom:25%;left:50%;transform:translateX(-50%);width:360px}
.inn-detail-image{height:90px;max-width:130px;object-fit:contain;margin:0 auto 12px;filter:drop-shadow(0 3px 3px #0008)}
.inn-search h3{font:22px Georgia;color:#f4d594;margin:0 0 8px}
.inn-search p{margin:8px 0}
.inn-search .inn-text-button{display:inline-block;position:relative;border:1px solid #b48c4e;border-radius:4px;padding:8px 13px;margin:8px 5px 0 0;background:#052820;font:15px Georgia;color:#f4dfb5}
.inn-energy-block{position:absolute;inset:12% 2% 25%;z-index:2;display:grid;place-items:center;background:#070d0b66;pointer-events:auto}
.inn-energy-block[hidden]{display:none}
.inn-energy-block>div{position:relative;z-index:1;text-align:center;width:370px}
.inn-energy-block h2{font:28px Georgia;color:#f0d19a;margin:0 0 12px}
.inn-energy-block strong{font-variant-numeric:tabular-nums}
/* The search is done: a brass plate above the tray, with the way on. It rises once, with the last find. */
.inn-search .inn-complete{position:absolute;left:50%;bottom:calc(100% + 5cqh);transform:translateX(-50%);pointer-events:auto;white-space:nowrap;display:grid;grid-template:'title go' 'count go'/auto auto;align-items:center;gap:.15em 1.6em;padding:.75em .85em .75em 1.3em;text-align:left;font:clamp(13px,1.15cqw,20px)/1.2 Georgia;color:#f3dfb6;text-shadow:none;background:linear-gradient(125deg,#103c30f9,#001d19fa);border:2px solid #c5974e;border-radius:6px;box-shadow:0 0 0 3px #211308,0 0 0 4px #8f6834,0 8px 30px #000b,0 0 36px #f3c56a45}
.inn-search .inn-complete:hover:not(:disabled),.inn-search .inn-complete:focus-visible{background:linear-gradient(125deg,#185443f9,#06302afa);border-color:#e9c676;filter:none}
.inn-complete-title{grid-area:title;font-size:1.3em;color:#f4d594}
.inn-complete-count{grid-area:count;color:#cdbf9c}
.inn-complete-go{grid-area:go;padding:.6em 1.1em;border-radius:4px;background:linear-gradient(#ecca7c,#b98a3e);color:#1c1408;font-weight:bold;box-shadow:inset 0 1px 0 #fff3c4,0 2px 4px #0008}
.inn-search .inn-complete.is-new{animation:inn-complete-in .55s cubic-bezier(.2,.8,.2,1) both}
@keyframes inn-complete-in{from{opacity:0;transform:translateX(-50%) translateY(14px) scale(.95)}}
@media(prefers-reduced-motion:reduce){.inn-search .inn-complete.is-new{animation:none}}
@container search-scene (max-width:1100px){
  .inn-search .search-object{padding:2px 6px;gap:5px}
  .inn-card-name{font-size:12px}
  .inn-menu,.inn-energy-info,.inn-object-detail{font-size:14px;padding:12px;max-height:65cqh;overflow:auto}
  .inn-search .inn-text-button{font-size:14px;padding:7px 10px}
  .inn-search .inn-object-detail{bottom:26%}
}
/* A landscape phone: narrower cards with names on up to two short lines, so the strip shows four or five objects instead of three. */
@container search-scene (max-width:900px){
  .inn-search .search-objects li{min-width:126px;max-width:150px}
  .inn-card-image{width:30px;min-width:26px}
  .inn-search .search-object{gap:4px;padding:1px 5px}
  .inn-card-name{font-size:11.5px;line-height:1.05;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
}
@media(prefers-reduced-motion:reduce){.inn-energy-meter i{transition:none}.inn-search .search-objects{scroll-behavior:auto}}

/* The object in flight from the painting to its card (collect-fx.js). */
.collect-fly{position:fixed;width:var(--s);height:var(--s);object-fit:contain;pointer-events:none;z-index:60;transform-origin:50% 50%}
/* The card lights once when its object lands. */
.inn-card-image.collect-land{animation:card-land .7s ease-out}
@keyframes card-land{0%{transform:scale(1)}35%{transform:scale(1.35);opacity:1;filter:brightness(1.5) drop-shadow(0 0 12px #f3dca4)}100%{transform:scale(1)}}
.inn-found-count.collect-count{animation:count-land .5s ease-out}
@keyframes count-land{0%{transform:scale(1)}40%{transform:scale(1.25);color:#ffe09a}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.inn-card-image.collect-land,.inn-found-count.collect-count{animation:none}}
/* A found card closes up and leaves the strip (collect-fx.js). */
.inn-search .search-objects li.collect-out{animation:card-out .38s ease-in forwards;overflow:hidden}
@keyframes card-out{to{opacity:0;flex:0 0 0;min-width:0;max-width:0;padding-left:0;padding-right:0;margin:0}}

/* Painted buttons behave like the title-screen ones: they grow, catch a light sweep and sink when pressed.
   The artwork is re-stated on every state because the global button:hover shorthand would otherwise clear it. */
.inn-top-controls .inn-button,.inn-search .inn-lens-control{overflow:hidden;transition:transform .28s cubic-bezier(.34,1.56,.64,1),filter .28s}
.inn-top-controls .inn-button:hover:not(:disabled),.inn-top-controls .inn-button:focus-visible,.inn-top-controls .inn-button:active:not(:disabled),
.inn-search .inn-lens-control:hover:not(:disabled),.inn-search .inn-lens-control:focus-visible,.inn-search .inn-lens-control:active:not(:disabled){background-image:url('../assets/ui/inn-reference.webp');background-color:transparent}
.inn-top-controls .inn-button:hover:not(:disabled),.inn-top-controls .inn-button:focus-visible,.inn-search .inn-lens-control:hover:not(:disabled),.inn-search .inn-lens-control:focus-visible{z-index:1;transform:scale(1.07);filter:brightness(1.14) saturate(1.08) drop-shadow(0 0 7px #f3c56a66)}
.inn-top-controls .inn-button:active:not(:disabled),.inn-search .inn-lens-control:active:not(:disabled){transform:scale(1.01) translateY(2px);filter:brightness(.82) saturate(1.05);transition-duration:.06s}
.inn-top-controls .inn-button:focus-visible,.inn-search .inn-lens-control:focus-visible{outline:0}
.inn-top-controls .inn-button::after,.inn-search .inn-lens-control::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,transparent 38%,#fff1c830 46%,#fff8e050 50%,#fff1c830 54%,transparent 62%) 100% 0/300% 100% no-repeat}
.inn-top-controls .inn-button:hover:not(:disabled)::after,.inn-search .inn-lens-control:hover:not(:disabled)::after{background-position:0 0;transition:background-position .8s ease-out}

@media(prefers-reduced-motion:reduce){.inn-top-controls .inn-button,.inn-search .inn-lens-control{transition:none}.inn-top-controls .inn-button::after,.inn-search .inn-lens-control::after{display:none}}
/* Recharge countdown: always visible under the bar, no panel behind it. */
.inn-energy-timer{position:absolute;left:75.0846%;top:5.7cqw;width:14.7689%;text-align:center;pointer-events:none;font:bold clamp(11px,1.1cqw,20px)/1 Georgia;letter-spacing:.03em;color:#fff0c1;text-shadow:0 1px 2px #000,0 0 4px #000,1px 0 2px #000,-1px 0 2px #000;font-variant-numeric:tabular-nums}
.inn-energy-timer[hidden]{display:none}
/* How many objects are found, mirrored on the left of the frame: the bar below shows only a few names at a time. */
.inn-found-count{position:absolute;left:10.15%;top:2.6%;padding:.35em .8em;border:1px solid #c5a56c99;border-radius:4px;background:#04160fd9;box-shadow:0 2px 6px #000a;pointer-events:none;font:bold clamp(11px,1.1cqw,19px)/1 Georgia;color:#fff0c1;letter-spacing:.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
/* The sweep on the energy plate follows its silhouette. The mask stays still and the light slides inside it (background-position): a translated pseudo-element would carry its mask along. */
.inn-top-controls .inn-energy-control::after{-webkit-mask:url('../assets/ui/inn-energy.webp') 0 0/100% 100% no-repeat;mask:url('../assets/ui/inn-energy.webp') 0 0/100% 100% no-repeat}
/* Zoom (search-zoom.js): the painting, its objects and its rain scale together; the stage keeps the gesture for itself. */
.hunt-stage{touch-action:none}
/* Only while zoomed: at 1× the painting keeps its usual stacking with the frame's shading. */
.hunt-stage.is-zoomed>.scene-layer{transform-origin:0 0;transform:translate(var(--zx,0),var(--zy,0)) scale(var(--zs,1))}
.hunt-stage.is-zoomed{cursor:grab}
/* The zoom button shows only on a phone, where a pinch is the natural gesture but not an obvious one. */
.inn-search .inn-zoom-control{display:none}
/* The miss mark keeps its size on a zoomed painting. */
.hunt-stage>.scene-layer .hunt-miss{scale:calc(1 / var(--zs,1))}
/* Compact (a phone held sideways), as for the scene in kit.css: the search keeps its painting, frame and bar in the
   middle, and its main controls go to the edges of the screen, at a thumb's size: leave and the menu on the right,
   zoom on the left. Count and energy stay on the painting, larger. The bar stays above the home strip. */
@media (max-height:500px) and (min-aspect-ratio:3/2){
  .hunt.inn-search{--rail:62px;--btn:48px;
    --pw:min(100vw - var(--safe-l,0px) - var(--safe-r,0px) - var(--rail) * 2,(100dvh - var(--safe-b,0px)) * 16 / 9);--ph:calc(var(--pw) * 9 / 16);
    --pl:calc((100vw - var(--pw)) / 2);--pt:calc((100dvh - var(--safe-b,0px) - var(--ph)) / 2);
    --edge-l:calc(var(--safe-l,0px) + 8px - var(--pl));--edge-r:calc(var(--safe-r,0px) + 8px - var(--pl));--edge-t:calc(8px - var(--pt));--edge-b:calc(6px - var(--pt));
    width:var(--pw);height:var(--ph);margin-bottom:var(--safe-b,0px);overflow:visible}
  .inn-search .inn-top-controls .inn-button:is(.inn-exit-control,.inn-menu-control){width:var(--btn);height:var(--btn);left:auto;right:var(--edge-r)}
  .inn-search .inn-top-controls .inn-exit-control{top:var(--edge-t)}
  .inn-search .inn-top-controls .inn-menu-control{top:calc(var(--edge-t) + var(--btn) + 8px)}
  .inn-search .inn-top-controls .inn-zoom-control{display:grid;place-items:center;position:absolute;left:var(--edge-l);top:var(--edge-t);width:var(--btn);height:var(--btn);pointer-events:auto;border-radius:50%;background:url('../assets/ui/kit/ui-v2-medaglione.webp') center/100% 100% no-repeat!important;box-shadow:0 3px 10px #000a;color:#f5dfb1;font:600 28px/1 Georgia}
  .inn-search .inn-top-controls .inn-zoom-control[aria-pressed="true"]{filter:brightness(1.2) drop-shadow(0 0 6px #f3d38b)}
  /* The lens stays where the bar paints it, at a thumb's size. */
  .inn-search .inn-lens-control{width:max(8.4%,44px)}
  .inn-search .inn-top-controls .inn-energy-control{left:auto;right:6px;top:6px;width:132px}
  .inn-search .inn-energy-meter span{font-size:13px}
  .inn-search .inn-energy-timer{left:auto;right:6px;top:44px;width:132px;font-size:12px}
  .inn-search .inn-found-count{left:6px;top:6px;font-size:14px}
  /* A taller bar at its lowest: the names on two lines are not cut. */
  .inn-search .search-drawer-body{--dock-min:16cqh;height:clamp(16cqh,var(--drawer-height,16cqh),26cqh)}
}
