/* UG-UI-20261015-11: chest browns are sampled from UU; the environment stays light blue. */
/* Homepage chest entry. */
.treasure-chest-art { display:block; width:100%; height:auto; overflow:visible; }
.home-treasure { position:absolute; z-index:3; isolation:isolate; right:clamp(24px,calc(50% - 310px),300px); bottom:194px; width:155px; padding:0; border:0; background:none; color:#6e373c; font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.home-treasure::before { content:''; position:absolute; z-index:-1; inset:8% -18% -8%; border-radius:50%; background:radial-gradient(ellipse at 50% 56%,#fff5d47a 0%,#fff6e145 35%,#bbdfff38 58%,transparent 75%); filter:blur(9px); opacity:.82; pointer-events:none; animation:treasure-aura-breathe 6s ease-in-out infinite; }
.home-treasure .treasure-chest-art { filter:drop-shadow(0 6px 10px #3d52732b); transition:transform .2s ease; }
.home-treasure .treasure-chest-lid { transform-origin:154px 87px; transition:transform .2s ease; }
.treasure-chest-glow { opacity:.78; filter:blur(3px) drop-shadow(0 0 9px #c6e4ff80); pointer-events:none; }
.treasure-chest-light { opacity:.88; filter:drop-shadow(0 0 4px #fff4bf) drop-shadow(0 0 10px #fff1b17a); pointer-events:none; }
.treasure-chest-sparkles { opacity:.74; filter:drop-shadow(0 0 3px #fff7d8b3); pointer-events:none; }
.home-treasure .treasure-chest-glow { animation:treasure-aura-breathe 6s ease-in-out infinite; }
.home-treasure .treasure-chest-light { animation:treasure-seam-breathe 5.6s ease-in-out infinite; }
.home-treasure .treasure-chest-sparkles { animation:treasure-sparkle-breathe 7s ease-in-out infinite; }
.home-treasure:hover .treasure-chest-lid { transform:translateY(-3px) rotate(-2deg); }
.home-treasure:active .treasure-chest-art { transform:scale(.97); }
.home-treasure:focus-visible { outline:3px solid #7b4044; outline-offset:5px; border-radius:22px; }
@keyframes treasure-aura-breathe { 0%,100% { opacity:.68; } 50% { opacity:.88; } }
@keyframes treasure-seam-breathe { 0%,100% { opacity:.74; } 50% { opacity:.96; } }
@keyframes treasure-sparkle-breathe { 0%,100% { opacity:.54; } 50% { opacity:.82; } }

/* Open chest and three unruled sheets, matching the warm-lit paper held by UU. */
.phone #appMain>.screen.treasure-screen { max-width:940px; margin:0 auto; padding:38px 28px 50px; background:transparent; }
.treasure-intro { display:flex; align-items:center; gap:28px; margin:0 0 32px; padding:18px 0 22px; }
.treasure-intro>.treasure-chest-art { width:142px; flex:0 0 142px; }
.treasure-intro .treasure-chest-lid { transform-origin:154px 87px; transform:translateY(-8px) rotate(-12deg); }
.treasure-intro h2 { margin:0 0 12px; font-size:25px; font-weight:650; color:#314d74; letter-spacing:.02em; }
.treasure-intro p { margin:0; color:#7b8fa8; font-size:14px; line-height:1.8; }
.treasure-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; padding:14px 7px 24px; align-items:center; }
.treasure-card {
  --paper-turn:-3deg;
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:24px;
  min-width:0;
  min-height:282px;
  padding:38px 20px;
  text-align:center;
  font:inherit;
  color:#69494f;
  border:2px solid #ffffffdc;
  border-radius:7px 12px 8px 11px;
  background:radial-gradient(ellipse at 49% 70%,#fffbc6a6,transparent 58%),radial-gradient(ellipse at 92% 8%,#f4dce7a6,transparent 47%),linear-gradient(145deg,#fcfdfff7,#fffef3 58%,#f4f1f9);
  box-shadow:inset 0 0 18px #fff9,0 14px 25px #6882a519,0 2px 3px #687d9214;
  transform:rotate(var(--paper-turn));
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease;
}
.treasure-card:nth-child(2) { --paper-turn:2deg; border-radius:12px 7px 10px 8px; }
.treasure-card:nth-child(3) { --paper-turn:-1.5deg; }
.treasure-card::before { content:''; position:absolute; inset:7px 10px; border-radius:8px; box-shadow:inset 0 8px 12px -12px #fff; pointer-events:none; }
.treasure-card:hover { transform:translateY(-7px) rotate(0); box-shadow:0 18px 28px #62799c29; }
.treasure-card:focus-visible { outline:3px solid #9c6967; outline-offset:4px; }
.treasure-card-icon { display:grid; place-items:center; width:48px; height:48px; border:0; border-radius:0; color:#9c6967; background:none; }
.treasure-card-icon svg { width:36px; height:36px; }
.treasure-card-copy { display:grid; gap:15px; padding:0; }
.treasure-card-copy strong { font-family:'Kaiti SC','STKaiti','KaiTi',serif; font-size:25px; font-weight:600; letter-spacing:.1em; }
.treasure-card-copy small { color:#9a8b87; font-size:12px; line-height:1.7; }
.treasure-card-arrow { position:absolute; top:auto; bottom:22px; right:22px; color:#b59d98; font-size:19px; }

/* Narrow screens keep the three sheets stacked and fully clickable. */
@media(max-width:599px) {
  .home-treasure { right:16px; bottom:195px; width:108px; }
  .original-home.questions-open .home-treasure { width:82px; right:18px; bottom:153px; }
  .phone #appMain>.screen.treasure-screen { padding:20px 20px 32px; }
  .treasure-intro { gap:17px; margin-bottom:16px; padding:6px 0 18px; }
  .treasure-intro>.treasure-chest-art { width:100px; flex-basis:100px; }
  .treasure-intro h2 { font-size:19px; margin-bottom:8px; }
  .treasure-intro p { font-size:12px; }
  .treasure-grid { grid-template-columns:1fr; gap:22px; padding:10px 15px 25px; }
  .treasure-card { flex-direction:row; justify-content:flex-start; gap:20px; min-height:145px; padding:30px 24px; text-align:left; }
  .treasure-card-icon { flex:0 0 36px; width:36px; height:42px; }
  .treasure-card-icon svg { width:32px; height:32px; }
  .treasure-card-copy { gap:12px; }
  .treasure-card-copy strong { font-size:23px; }
  .treasure-card-copy small { font-size:11px; }
  .treasure-card-arrow { bottom:13px; right:16px; font-size:16px; }
}
@media(max-width:350px) {
  .home-treasure { width:90px; right:12px; }
  .treasure-intro { gap:12px; }
  .treasure-intro>.treasure-chest-art { width:78px; flex-basis:78px; }
  .treasure-intro h2 { font-size:17px; }
  .treasure-grid { padding-inline:9px; }
  .treasure-card { gap:14px; padding-inline:18px; }
  .treasure-card-copy strong { font-size:21px; }
}

/* Honour both system and in-app motion preferences. */
@media(prefers-reduced-motion:reduce) {
  .home-treasure .treasure-chest-art,.home-treasure .treasure-chest-lid,.treasure-card { transition:none; transform:none!important; }
  .home-treasure::before,.home-treasure .treasure-chest-glow,.home-treasure .treasure-chest-light,.home-treasure .treasure-chest-sparkles { animation:none; }
}
.phone.reduce-motion .home-treasure .treasure-chest-art,.phone.reduce-motion .home-treasure .treasure-chest-lid,.phone.reduce-motion .treasure-card { transition:none; transform:none!important; }
.phone.reduce-motion .home-treasure::before,.phone.reduce-motion .home-treasure .treasure-chest-glow,.phone.reduce-motion .home-treasure .treasure-chest-light,.phone.reduce-motion .home-treasure .treasure-chest-sparkles { animation:none; }
