/* The gallery changes only the illustration layout; the original reading stays below. */
#relationship-result{width:100%}.relationship-gallery{height:auto;min-height:490px;padding:24px 0;position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:center;margin-bottom:24px}.relationship-gallery[hidden]{display:none}.gallery-halo{position:absolute;inset:30px 8% 10px;border-radius:50%;background:radial-gradient(ellipse,#e9d4b64d,transparent 70%);z-index:-1}.gallery-own{width:292px;padding:15px 15px 20px;background:#fffdf7;border:1px solid #cbb294;border-radius:20px;box-shadow:0 20px 45px #79554722,0 4px 12px #7955470d;position:relative;z-index:5;overflow:hidden;flex:none}.gallery-card-top{display:flex;justify-content:space-between;gap:12px;font:8px/1.4 var(--sans);letter-spacing:.14em;color:#a08465;padding:2px 3px 13px}.gallery-own .relationship-art-frame{width:100%;margin:0;padding:0;border:0;border-radius:12px;overflow:hidden;transform:none;box-shadow:none;background:#faf2e3}.gallery-own .relationship-art{width:100%;aspect-ratio:1;mix-blend-mode:normal}.gallery-own figcaption{display:none}.gallery-caption{text-align:center;padding-top:17px}.gallery-kicker{font-size:10px;letter-spacing:.15em;color:#a28666}.gallery-mode-title{font:400 28px/1.4 var(--serif);letter-spacing:.06em;color:var(--wine);margin:7px 0 10px;overflow-wrap:anywhere}.gallery-people{font:12px/1.5 var(--serif);letter-spacing:.08em;color:var(--wine);margin:0 18px;overflow-wrap:anywhere}.gallery-corner{position:absolute;bottom:15px;right:17px;color:#bca178;font-size:22px}.gallery-side{position:absolute;left:50%;top:50%;width:220px;height:315px;padding:12px;border:1px solid #ddcbb4;border-radius:16px;background:#f7f0e3;box-shadow:0 6px 18px #79554712;z-index:2;pointer-events:none;filter:saturate(.66);opacity:.64;overflow:hidden}.gallery-side img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:9px;opacity:.8}.gallery-side>span{display:block;width:46%;padding-top:15px;border-top:1px solid #c9b391;margin:25px auto 0;text-align:center;color:#bda078}.gallery-side.near.left{transform:translate(calc(-50% - 205px),-47%) rotate(-8deg)}.gallery-side.near.right{transform:translate(calc(-50% + 205px),-47%) rotate(8deg)}.gallery-side.far{width:190px;height:272px;opacity:.33;z-index:1;filter:blur(.8px) saturate(.5)}.gallery-side.far.left{transform:translate(calc(-50% - 365px),-43%) rotate(-13deg)}.gallery-side.far.right{transform:translate(calc(-50% + 365px),-43%) rotate(13deg)}.gallery-star{position:absolute;left:13%;top:13%;color:#b89b72;font-size:35px;z-index:3}#relationship-result>.relationship-card{display:block}#relationship-result>.relationship-card:before{display:none}.gallery-enter .gallery-own{animation:relationship-gallery-in .65s cubic-bezier(.2,.7,.2,1) both}.gallery-enter .gallery-side{animation:relationship-gallery-sides .8s .08s both}@keyframes relationship-gallery-in{from{opacity:0;translate:0 15px;scale:.96}to{opacity:1;translate:0 0;scale:1}}@keyframes relationship-gallery-sides{from{opacity:0;translate:0 10px}to{translate:0 0}}@media(max-width:640px){.relationship-gallery{min-height:410px;margin:0 -18px 20px;width:calc(100% + 36px)}.gallery-own{width:236px;padding:12px 12px 16px;border-radius:17px}.gallery-card-top{font-size:6.5px;padding-bottom:10px}.gallery-caption{padding-top:13px}.gallery-mode-title{font-size:24px;margin:7px 0 9px}.gallery-kicker{font-size:9px}.gallery-people{font-size:11px}.gallery-side{width:174px;height:250px;padding:9px;opacity:.5}.gallery-side.near.left{transform:translate(calc(-50% - 144px),-46%) rotate(-9deg)}.gallery-side.near.right{transform:translate(calc(-50% + 144px),-46%) rotate(9deg)}.gallery-side.far{width:150px;height:215px;opacity:.2}.gallery-side.far.left{transform:translate(calc(-50% - 230px),-42%) rotate(-15deg)}.gallery-side.far.right{transform:translate(calc(-50% + 230px),-42%) rotate(15deg)}.gallery-star{left:10%;top:6%;font-size:26px}}@media(prefers-reduced-motion:reduce){.relationship-gallery *{animation:none!important}}
/* An open, centered reading beneath the relationship gallery. */
#relationship-result>.relationship-card{background:none;border:0;border-radius:0;box-shadow:none;padding:30px 24px 44px;overflow:visible;text-align:center}
#relationship-result .relationship-copy{max-width:780px;margin:0 auto}
#relationship-result .relationship-copy h2{margin:0 0 25px;text-align:center}
#relationship-result .relationship-summary{max-width:720px;margin:0 auto;line-height:1.95;text-align:center;text-wrap:pretty}
#relationship-result .relationship-basis{max-width:680px;margin:30px auto 26px;padding-top:22px;justify-content:center;text-align:center;gap:12px}
#relationship-result .relationship-basis p{margin:0;line-height:1.9}
#relationship-result .relationship-basis>span{flex:none}
#relationship-result .save-card{margin:0 auto;display:inline-flex;align-items:center;justify-content:center}
#relationship-result #save-status{text-align:center}
@media(max-width:640px){#relationship-result>.relationship-card{padding:19px 6px 30px}#relationship-result .relationship-copy h2{margin-bottom:18px}#relationship-result .relationship-summary{font-size:17px;line-height:1.95}#relationship-result .relationship-basis{margin:24px auto;padding-top:19px;gap:9px}#relationship-result .relationship-basis p{font-size:12px;line-height:1.85}}
/* A browsing rail; viewing an illustration never changes the report. */
.relationship-gallery{display:block;min-height:0;height:auto;padding:20px 0 4px;overflow:hidden;margin-bottom:0}
.relationship-gallery .gallery-own[hidden]{display:none!important}
.gallery-viewport{position:relative;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y;cursor:ew-resize;mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
.gallery-viewport::-webkit-scrollbar{display:none}.gallery-viewport.is-following{scroll-snap-type:none}
.gallery-track{position:relative;display:flex;align-items:center;gap:22px;padding:36px max(0px,calc(50% - 156px)) 40px;width:max-content;min-width:100%;padding-inline:calc((100vw - 96px - 312px)/2)}
@media(min-width:1500px){.gallery-track{padding-inline:calc((var(--gallery-width,1200px) - 312px)/2)}}
.gallery-slide{display:block;flex:none;width:312px;aspect-ratio:1;padding:11px;border:1px solid #d7c2a6;border-radius:20px;background:#fffdf6;box-shadow:0 10px 25px #79554710;scroll-snap-align:center;opacity:.45;transform:scale(.82) rotate(3deg);transition:transform .35s,opacity .35s,box-shadow .35s;cursor:pointer}
.gallery-slide:nth-child(even){transform:scale(.82) rotate(-3deg)}.gallery-slide.is-selected{opacity:1;transform:scale(1);box-shadow:0 18px 35px #79554720}.gallery-slide img{display:block;width:100%;height:100%;object-fit:contain;border-radius:12px;pointer-events:none}.gallery-slide.is-own{border-color:#a68564}.gallery-controls{display:flex;align-items:center;justify-content:center;gap:18px;min-height:40px;margin:0 0 25px;font:11px/1.5 var(--sans);color:#9a8168}.gallery-controls button{border:0;border-bottom:1px solid #ba9e80;background:none;font:inherit;color:var(--wine);padding:4px 0;cursor:pointer}
@media(max-width:640px){.relationship-gallery{min-height:0;padding:6px 0 0;margin-bottom:0}.gallery-track{gap:14px;padding:28px calc((100vw - 252px)/2) 32px}.gallery-slide{width:252px;padding:9px;border-radius:17px}.gallery-controls{font-size:10px;gap:14px;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){.gallery-slide{transition:none}}
