* { box-sizing:border-box; }
:root { color:#533821; background:#f5e9d5; color-scheme:light; font-family:Georgia,'Times New Roman',serif; }
body { margin:0; min-height:100svh; background:linear-gradient(118deg,#fff9ed62,#f2dcc247),url('assets/linen.png') center/cover fixed; }
[hidden] { display:none !important; }
button,a { color:inherit; }
button { font:inherit; cursor:pointer; }
button:focus-visible,a:focus-visible { outline:2px solid #805720; outline-offset:3px; }
#selection { width:min(1050px,100%); margin:auto; min-height:100svh; display:grid; grid-template-columns:1fr 1fr; align-items:center; padding:clamp(26px,7vw,92px); gap:clamp(26px,6vw,85px); }
.eyebrow { font: .68rem/1.5 system-ui,sans-serif; letter-spacing:.2em; text-transform:uppercase; color:#77532b; }
h1 { margin:.35em 0 .28em; font-weight:400; font-size:clamp(3.1rem,7vw,6.1rem); line-height:.92; letter-spacing:-.056em; color:#71502e; }
.intro { max-width:25ch; font-size:1.09rem; line-height:1.55; }
.choices { display:grid; max-width:310px; border-top:1px solid #a5825466; margin-top:1.5rem; }
.choices button { text-align:left; border:0; border-bottom:1px solid #a5825466; padding:12px 8px; min-height:48px; background:#fff8ed29; font-size:1.13rem; }
.choices button::after { content:'↗'; float:right; color:#7a562c; }
.choices button:hover,.controls button:hover { background:#fff9e8; }
.choices button:disabled { cursor:wait; opacity:.65; }
.credit,#loading { font: .72rem/1.55 system-ui,sans-serif; max-width:36ch; margin-top:1.4rem; }
.preview,.print { margin:0; background:#fff9ee; box-shadow:0 3px 7px #42251230,0 15px 32px -8px #4328116b; }
.preview { padding:10px 10px 19px; transform:rotate(4deg); }
.preview img { display:block; width:100%; }
#experience { position:fixed; inset:0; display:grid; grid-template-rows:minmax(0,1fr) auto; padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#stage { position:relative; container-type:size; overflow:hidden; isolation:isolate; }
.scene { position:absolute; inset:0; }
.print { position:absolute; inset:auto; width:min(var(--slot-w),var(--slot-h)); left:var(--x); top:var(--y); transform:translate(-50%,-50%) rotate(var(--angle)); padding:clamp(4px,1.05cqh,9px); }
.print img { display:block; width:100%; height:auto; }
#experience[data-study="B"] .print { padding:clamp(3px,.74cqh,7px); box-shadow:0 8px 35px -8px #442c1980; }
#experience[data-study="C"] .print { padding-bottom:clamp(7px,1.85cqh,15px); }
#experience[data-study="C"] .print::before { content:''; width:27%; height:10px; position:absolute; left:35%; top:-5px; background:#dbc18e97; transform:rotate(-5deg); }
.dedication { position:absolute; left:50%; top:var(--y); width:min(86%,26em); transform:translate(-50%,-50%); margin:0; text-align:center; color:#6d4c2e; font:italic clamp(1.35rem,5.4cqh,2.3rem)/1.18 Georgia,serif; text-wrap:balance; }
.dedication::before { content:''; display:block; width:34px; height:1px; background:#ac8453; margin:0 auto .8em; }
.controls { display:flex; justify-content:space-between; align-items:center; padding:0 clamp(12px,3vw,34px); background:#fffaef42; border-top:1px solid #9f7c462b; }
.controls div { display:flex; gap:6px; }
.controls button,#resume-sound { border:0; background:transparent; border-radius:2px; min-height:44px; min-width:52px; padding:0 10px; font: .76rem/1 system-ui,sans-serif; }
#sound-note { position:absolute; bottom:50px; left:50%; transform:translateX(-50%); margin:0; padding:0 8px; background:#fff7e9; white-space:nowrap; font-size:.8rem; z-index:5; }
#sound-note button { text-decoration:underline; }
@media(max-width:640px) and (orientation:portrait) {
  #selection { display:flex; flex-direction:column-reverse; align-items:stretch; justify-content:center; gap:24px; padding:24px clamp(20px,7vw,36px); }
  .preview { align-self:center; width:min(76%,270px); }
  h1 { font-size:clamp(2.7rem,11vw,4rem); }
  h1 br { display:none; }
  .intro { font-size:.96rem; }
  .choices { max-width:none; margin-top:1rem; }
  .credit { margin-top:.8rem; }
}
@media(orientation:landscape) and (max-height:500px) {
  #selection { padding:14px clamp(24px,8vw,84px); }
  h1 { font-size:clamp(2.4rem,12vh,4.2rem); }
  .intro { font-size:.92rem; margin:.34em 0; }
  .choices { margin-top:.7rem; }
  .choices button { min-height:40px; padding:8px; }
  .credit { margin-top:.5rem; }
  .preview { width:min(100%,310px); justify-self:center; }
}
@media(prefers-reduced-motion:reduce) { .preview { transform:none; } }
