/* Section 3: a complete, uncropped scene with proportional hit areas. */
.room-hunt { padding-block: clamp(56px, 6.2vw, 96px); background: #f4f7f6; border-top: 1px solid var(--line); }
.hunt-heading { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 80px); align-items: end; margin-bottom: 34px; }
.room-hunt .eyebrow { color: var(--brand-dark); margin-bottom: 18px; }
.room-hunt h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.22; letter-spacing: -.035em; margin-bottom: 20px; }
.hunt-lead { max-width: 650px; font-size: 18px; line-height: 1.75; color: var(--muted); }
.hunt-case { border-left: 2px solid var(--brand); padding-left: 22px; }
.hunt-case-label, .hunt-card-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 12px; }
.hunt-case p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.hunt-toolbar, .hunt-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.hunt-toolbar { margin-bottom: 18px; }
.hunt-progress p { font-size: 13px; }
.hunt-progress strong { font-size: 18px; font-weight: 600; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.hunt-progress progress { display: block; appearance: none; width: 180px; height: 3px; border: 0; background: #dbe5e2; border-radius: 3px; overflow: hidden; margin-top: 7px; color: var(--brand); }
.hunt-progress progress::-webkit-progress-bar { background: #dbe5e2; }
.hunt-progress progress::-webkit-progress-value { background: var(--brand); transition: width 300ms ease; }
.hunt-progress progress::-moz-progress-bar { background: var(--brand); }
.hunt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.hunt-control { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 14px; border: 1px solid #cbd8d5; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background 180ms ease, border-color 180ms ease; }
.hunt-control .icon { width: 17px; height: 17px; }
.hunt-control[aria-pressed="true"] { background: #dfefec; border-color: var(--brand-dark); }
.hunt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.hunt-visual, .hunt-card { min-width: 0; }
.hunt-viewport { overflow: hidden; border-radius: 6px; background: #e5e7e3; }
.hunt-stage { position: relative; isolation: isolate; width: 100%; aspect-ratio: 3 / 2; }
.hunt-image { width: 100%; height: 100%; object-fit: contain; }
.hunt-spot { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); min-width: 32px; min-height: 32px; transform: translate(-50%, -50%); border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hunt-spot:focus-visible { outline: 3px solid white; outline-offset: 0; box-shadow: 0 0 0 5px var(--brand-dark); z-index: 3; }
.hunt-marker { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid white; border-radius: 50%; background: var(--brand-dark); color: white; box-shadow: 0 2px 10px #0003; opacity: 0; transform: scale(.8); transition: opacity 180ms, transform 220ms var(--ease); pointer-events: none; }
.hunt-marker::before { content: '+'; font: 400 22px/1 Arial, sans-serif; }
.hunt-show-hints .hunt-marker, .hunt-spot:hover .hunt-marker, .hunt-spot:focus-visible .hunt-marker, .hunt-spot.is-selected .hunt-marker, .hunt-spot.is-found .hunt-marker, .hunt-show-solutions .hunt-spot[data-kind="risk"] .hunt-marker { opacity: 1; transform: scale(1); }
.hunt-spot.is-found .hunt-marker::before { content: '✓'; font-size: 16px; }
.hunt-spot.is-selected { border-color: #ffffffcf; background: #ffffff12; z-index: 2; }
.hunt-show-solutions .hunt-spot[data-kind="risk"]:not(.is-found) .hunt-marker { background: #855319; }
.hunt-show-solutions .hunt-spot[data-kind="risk"]:not(.is-found) .hunt-marker::before { content: '!'; font-size: 18px; }
.hunt-spot-call { --x: 96.3%; --y: 45.5%; --w: 3%; --h: 10%; }
.hunt-spot-medicine { --x: 90.7%; --y: 34.5%; --w: 3.5%; --h: 5.5%; }
.hunt-spot-sensor { --x: 86.3%; --y: 55.4%; --w: 9%; --h: 9%; }
.hunt-spot-cleaning { --x: 24%; --y: 23.4%; --w: 4%; --h: 10%; }
.hunt-spot-walker { --x: 9.5%; --y: 35%; --w: 18%; --h: 32%; }
.hunt-spot-water { --x: 86.7%; --y: 27.4%; --w: 7%; --h: 14%; }
.hunt-spot-shoes { --x: 50%; --y: 88%; --w: 14%; --h: 16%; }
.hunt-spot-aids { --x: 95.3%; --y: 30.3%; --w: 5%; --h: 4.5%; }
.hunt-spot-records { --x: 73.5%; --y: 87.8%; --w: 17%; --h: 21%; }
.hunt-spot-notes { --x: 91.3%; --y: 87.5%; --w: 16%; --h: 23%; }
.hunt-spot-bed { --x: 55.5%; --y: 31%; --w: 25%; --h: 28%; }
.hunt-spot-case { --x: 38.7%; --y: 27.3%; --w: 11%; --h: 14%; }
.hunt-image-meta { margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: right; }
.hunt-card { padding: 25px; background: white; border: 1px solid #e0e7e4; border-radius: 6px; }
.hunt-card h3 { font-size: 23px; line-height: 1.3; letter-spacing: -.025em; margin-bottom: 18px; }
.hunt-card h3:focus { outline: none; }
.hunt-card p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.hunt-card-note { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.8; color: var(--muted); }
.hunt-card .text-link { margin-top: 14px; }
.hunt-return { display: inline-flex; align-items: center; gap: 12px; padding: 12px 0 0; min-height: 44px; color: var(--brand-dark); background: none; border: 0; font-size: 12px; font-weight: 600; cursor: pointer; }
.hunt-return .icon { width: 17px; }
.hunt-object-list { margin-top: 18px; border-top: 1px solid #dbe4e0; }
.hunt-object-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; min-height: 44px; font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; }
.hunt-object-list summary::-webkit-details-marker { display: none; }
.hunt-object-list summary::after { content: '+'; color: var(--brand-dark); font-size: 20px; }
.hunt-object-list[open] summary::after { content: '−'; }
.hunt-object-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-bottom: 8px; }
.hunt-object { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); text-align: left; font-size: 11px; cursor: pointer; }
.hunt-object-state { flex: none; color: var(--brand-dark); }
.hunt-object.is-selected { border-color: var(--brand-dark); }
.hunt-object.is-found { background: var(--brand-soft); }
.hunt-bottom { margin-top: 16px; }
.hunt-bottom p { font-size: 12px; color: var(--muted); }
.hunt-text-button { min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 4px; font-size: 12px; cursor: pointer; }
.hunt-solutions { padding-top: 28px; margin-top: 24px; border-top: 1px solid #dbe4e0; }
.hunt-solutions h3 { font-size: 23px; margin-bottom: 10px; }
.hunt-solutions > p { font-size: 14px; color: var(--muted); }
.hunt-solution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.hunt-solution { position: relative; padding: 18px 40px 18px 18px; border: 1px solid #d9e3df; background: white; border-radius: 5px; text-align: left; cursor: pointer; color: var(--ink); }
.hunt-solution strong { display: block; font-size: 13px; font-weight: 600; }
.hunt-solution span { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; }
.hunt-solution .icon { position: absolute; right: 12px; top: 18px; width: 18px; color: var(--brand-dark); }
.hunt-mobile-open { display: none; }
.hunt-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hunt-image-error { padding: 18px; background: white; border: 1px solid var(--line); font-size: 14px; }
.hunt-visual.is-image-error .hunt-viewport { display: none; }
.hunt-fallback { margin-top: 25px; }
.hunt-fallback details { margin-top: 12px; padding: 16px; background: white; border: 1px solid var(--line); }
.hunt-fallback summary { cursor: pointer; font-weight: 500; }
.hunt-fallback p { margin-top: 12px; font-size: 16px; }

/* Native dialog supplies focus containment, inert background and Escape support. */
body.hunt-view-open { overflow: hidden; }
.hunt-dialog { width: min(1680px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #dbe4e0; border-radius: 10px; background: #f4f7f6; color: var(--ink); overflow: hidden; }
.hunt-dialog[open] { display: flex; flex-direction: column; }
.hunt-dialog:not([open]) { display: none; }
.hunt-dialog::backdrop { background: #172b2bc2; backdrop-filter: blur(4px); }
.hunt-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px 12px; background: white; }
.hunt-dialog-header h3 { font-size: 19px; line-height: 1.4; }
.hunt-dialog-header p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.hunt-close { flex: none; }
.hunt-close span { font-size: 22px; line-height: 1; }
.hunt-dialog-tools { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 24px; }
.hunt-dialog-body { overflow: auto; padding: 0 24px 24px; overscroll-behavior: contain; }
.hunt-dialog .hunt-viewport { overflow: auto; max-height: 63dvh; overscroll-behavior: contain; scrollbar-color: var(--brand) #dbe5e2; scrollbar-width: auto; }
.hunt-dialog .hunt-viewport:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.hunt-dialog.is-zoomed .hunt-stage { width: max(100%, 1200px); }
.hunt-dialog .hunt-spot { min-width: 44px; min-height: 44px; }
.hunt-dialog .hunt-object-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hunt-dialog .hunt-card { padding: 22px; }
@media (hover: hover) {
    .hunt-control:hover { background: #e4efeb; border-color: var(--brand-dark); }
    .hunt-object:hover, .hunt-solution:hover { border-color: var(--brand-dark); background: var(--brand-soft); }
}
@media (prefers-reduced-motion: no-preference) {
    .hunt-card article:not([hidden]) { animation: hunt-detail-enter 240ms ease-out; }
    .hunt-dialog[open] { animation: hunt-detail-enter 220ms ease-out; }
}
@keyframes hunt-detail-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) {
    .hunt-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
    .hunt-card { padding: 20px; }
    .hunt-heading { gap: 32px; }
}
@media (max-width: 900px) {
    .hunt-heading, .hunt-grid { grid-template-columns: 1fr; }
    .hunt-heading { gap: 26px; }
    .hunt-lead { max-width: none; }
    .hunt-case { max-width: 720px; }
    .hunt-card { padding: 24px; }
    .hunt-dialog .hunt-grid { grid-template-columns: 1fr; }
    .hunt-dialog .hunt-viewport { max-height: 45dvh; }
    .hunt-dialog .hunt-card { padding: 20px; }
}
@media (max-width: 700px) {
    .hunt-heading { margin-bottom: 25px; }
    .hunt-lead { font-size: 16.8px; }
    .hunt-case p { font-size: 15px; }
    .hunt-toolbar { align-items: flex-start; gap: 14px; }
    .hunt-toolbar > .hunt-actions { width: 100%; gap: 8px; }
    .hunt-toolbar > .hunt-actions > button { flex: 1; padding-inline: 8px; }
    .hunt-toolbar > .hunt-actions > [data-hunt-open] { display: none; }
    [data-hunt-region="main"] .hunt-spots { display: none; }
    .hunt-mobile-open { display: grid; place-items: end center; position: absolute; inset: 0; width: 100%; padding: 14px 10px; border: 0; background: linear-gradient(transparent 60%, #10272755); color: var(--ink); cursor: zoom-in; }
    .hunt-mobile-open > span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; min-height: 44px; background: #fffffff5; border: 1px solid #ffffffb3; border-radius: 4px; font-size: 11px; font-weight: 600; box-shadow: 0 2px 12px #0001; }
    .hunt-mobile-open .icon { width: 16px; height: 16px; }
    .hunt-object-grid, .hunt-dialog .hunt-object-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hunt-solution-grid { grid-template-columns: 1fr; }
    .hunt-bottom { gap: 8px; }
    .hunt-card h3 { font-size: 22px; }
    .hunt-image-meta { font-size: 10px; }
    .hunt-dialog { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
    .hunt-dialog-header { padding: max(12px, env(safe-area-inset-top)) 14px 12px; gap: 10px; }
    .hunt-dialog-header h3 { font-size: 15px; }
    .hunt-dialog-header p { font-size: 11px; }
    .hunt-close { padding: 7px 10px; font-size: 11px; }
    .hunt-dialog-tools { padding: 10px 14px; gap: 8px; }
    .hunt-dialog-tools .hunt-control { font-size: 11px; padding-inline: 10px; }
    .hunt-dialog-body { padding: 0 14px max(18px, env(safe-area-inset-bottom)); }
    .hunt-dialog:not(.is-zoomed) .hunt-spots { display: none; }
    .hunt-dialog .hunt-object-list { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .room-hunt *, .room-hunt *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
    .hunt-toolbar, .hunt-bottom, .hunt-spots, .hunt-mobile-open, .hunt-object-list, .hunt-dialog { display: none !important; }
    .hunt-grid { display: block; }
    .hunt-card { margin-top: 16px; }
}

.hunt-spot-sensor-mat { --x: 68.5%; --y: 73.5%; --w: 18%; --h: 20%; }

.room-hunt { scroll-margin-top: calc(var(--header-height) + 16px); }
.hunt-card { scroll-margin-top: calc(var(--header-height) + 24px); }
.hunt-card h3 { scroll-margin-top: calc(var(--header-height) + 24px); }
.hunt-dialog .hunt-card, .hunt-dialog .hunt-card h3 { scroll-margin-top: 12px; }
