.rescue-page { background: #1e192c; color: #fdf8ff; }
.rescue-shell { width: min(100%, 630px); min-height: 100vh; min-height: 100dvh; margin: auto; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 10px; }
.rescue-bar { display: flex; min-height: 48px; justify-content: space-between; align-items: center; gap: 8px; padding-inline: 4px; }
.rescue-bar .wordmark { white-space: nowrap; font-size: 1rem; gap: 6px; }
.rescue-bar .logo { scale: .86; }
.round-number { border: 1px solid #766686; border-radius: 100px; padding: 6px 9px; white-space: nowrap; font-weight: 700; }
.rescue-secondary { color: #fdf8ff; background: #ffffff0c; border-color: #796a89; }
.rescue-secondary:hover:enabled { background: #ffffff20; }
.rescue-secondary:disabled { opacity: .6; cursor: default; }
.rescue-intro, .rescue-results { border: 1px solid #514263; border-radius: 27px; background: #2d223e; overflow: hidden; }
.rescue-intro { display: grid; align-content: center; flex: 1; padding: clamp(16px, 5vw, 38px); }
.rescue-art { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; background: #e8c6d8 radial-gradient(ellipse at 50% 30%, #ffe8ef, transparent 70%); }
.rescue-intro .rescue-art { border-radius: 22px; min-height: 150px; height: min(33vh, 270px); }
.rescue-art span { position: absolute; width: 46%; aspect-ratio: 1.06; border-radius: 49% 51% 62% 38% / 38% 56% 44% 62%; box-shadow: inset 0 4px 15px #ffffff94, inset 0 -9px 24px #36163629, 0 9px 25px #42273938; }
.rescue-art span:nth-child(1) { background: #e28b7c; translate: -46% -12%; rotate: -25deg; }
.rescue-art span:nth-child(2) { background: #8d9fe3; translate: 49% -17%; rotate: 42deg; }
.rescue-art span:nth-child(3) { background: #eec3c5; translate: 3% 34%; rotate: -9deg; }
.rescue-intro-copy { padding-block: clamp(18px, 4vw, 33px) 0; }
.rescue-intro h1 { font-size: clamp(2.75rem, 10vw, 5rem); }
.rescue-intro p { max-width: 31ch; line-height: 1.4; }
.rescue-primary { padding-inline: 20px; font-size: 1rem; }
.rescue-intro .rescue-rules { max-width: none; margin-bottom: 0; color: #e6d5ef; font-size: .9rem; }
.rescue-work { flex: 1; display: grid; grid-template-rows: minmax(88px, .64fr) minmax(135px, 1fr) auto; gap: 5px; background: #1e192c; }
.rescue-target, .rescue-current { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; padding: 12px; color: var(--ink); background: var(--paint); }
.rescue-target { border-radius: 22px 22px 6px 6px; gap: 3px; overflow: hidden; isolation: isolate; }
.rescue-target.rescue-success::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--matched-paint); transform-origin: bottom; animation: match-color 650ms ease-out both; }
@keyframes match-color { 0% { scale: 1 0; } 50% { scale: 1 1; opacity: 1; } 100% { opacity: 0; } }
.rescue-target strong { display: block; font-size: clamp(1.35rem, 5vw, 2.3rem); line-height: 1; }
.target-threshold { font-size: .88rem; }
.rescue-current { border-radius: 6px 6px 22px 22px; overflow: hidden; }
.current-reading { position: relative; pointer-events: none; }
.rescue-percent { display: block; font-size: clamp(3rem, 14vw, 5.25rem); line-height: .95; letter-spacing: -.075em; }
#rescue-feedback { margin: 9px 0 0; font-weight: 700; }
#rescue-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rescue-controls, .rescue-reveal { display: grid; gap: 8px; padding: 10px 12px; background: #2d223e; border: 1px solid #514263; border-radius: 20px; }
.rescue-attempts { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: .86rem; }
.rescue-attempts span { color: #e6d5ef; text-align: right; }
.pour-history, .rescue-paints { display: grid; gap: 6px; margin: 0; padding: 0; }
.pour-history { grid-template-columns: repeat(5, 1fr); list-style: none; }
.pour-history li { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #665278; border-radius: 9px; min-height: 31px; font-size: .78rem; font-weight: 800; }
.pour-history li:empty::before { content: '–'; color: #d3bfdc; }
.pour-history i { width: 11px; height: 11px; border-radius: 50%; background: var(--paint); border: 1px solid #fffe; }
.rescue-paints { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rescue-paint { min-height: 57px; display: grid; grid-template-rows: 22px auto; align-items: center; padding: 5px 3px; gap: 4px; border: 2px solid transparent; border-radius: 13px; color: #292039; background: #fff5ff; touch-action: none; user-select: none; -webkit-touch-callout: none; font-weight: 800; font-size: .87rem; }
.rescue-paint span { display: block; width: 100%; height: 100%; border-radius: 6px; background: var(--paint); border: 1px solid #271d3840; }
.rescue-paint.is-active { border-color: #d3f487; box-shadow: 0 0 0 2px #d3f48755; }
.rescue-paint:disabled { opacity: .65; cursor: default; }
.rescue-controls > .pill { justify-self: center; }
.rescue-reveal { justify-items: center; text-align: center; }
.rescue-reveal h2, .rescue-reveal p { margin: 0; }
.rescue-current.rescue-success { animation: success-color 380ms ease-out; }
@keyframes success-color { 0% { box-shadow: 0 0 0 0 #e3ffb2; } 100% { box-shadow: 0 0 0 8px transparent; } }
.rescue-results { padding: clamp(12px, 4vw, 24px); text-align: center; }
.rescue-results h2 { margin: 0 0 7px; }
.rescue-overall strong { display: block; font-size: clamp(2.7rem, 11vw, 4.3rem); line-height: 1; letter-spacing: -.07em; }
.rescue-overall span, #rescue-total { color: #e6d5ef; }
.rescue-comparison-labels, .rescue-row-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rescue-comparison-labels { padding-inline: 8px; margin-bottom: 3px; font-size: .88rem; }
.rescue-result-list { display: grid; gap: 6px; }
.rescue-result-row { padding: 6px; background: #1e192c; border-radius: 13px; }
.rescue-row-colors span { height: clamp(27px, 7vh, 48px); border-radius: 8px; background: var(--paint); }
.rescue-result-row p { display: flex; justify-content: space-between; gap: 8px; margin: 5px 3px 1px; text-align: left; font-weight: 700; }
.rescue-result-actions { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.club-home { max-width: 850px; margin: auto; padding: min(10vw, 54px) 14px; }
.club-title { margin-bottom: 30px; font-size: clamp(2rem, 7vw, 3.4rem); }
.club-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.club-card { display: grid; gap: 12px; padding: 8px; border: 1px solid #dfd4ef; border-radius: 22px; background: #fff; color: inherit; text-decoration: none; }
.club-card:hover { border-color: #8056b9; }
.club-card-art { display: grid; place-items: center; overflow: hidden; border-radius: 16px; aspect-ratio: 1.62; }
.clay-card-art { background: #eadcfb; }
.clay-card-art img { width: 60%; height: auto; }
.club-card h2 { margin: 0 5px; font-size: clamp(1.15rem, 4vw, 1.65rem); }
.club-card p { margin: 5px; color: #514663; }
@media (max-height: 650px) { .rescue-intro .rescue-art { min-height: 112px; } .rescue-work { grid-template-rows: minmax(74px, .64fr) minmax(125px, 1fr) auto; } }
@media (max-width: 370px) { .rescue-bar .logo { margin-inline: -3px; } .rescue-bar .pill { padding-inline: 8px; } .round-number { padding-inline: 6px; } .rescue-attempts { font-size: .79rem; } .club-games { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .rescue-current.rescue-success, .rescue-target.rescue-success::before { animation: none; } .rescue-target.rescue-success::before { display: none; } }
