/* The scene supplies the one real book. All writing sits directly on its paper. */
.so{--so-wine:#702537;--so-ink:#482c31;margin:0 0 4rem;scroll-margin-top:2rem}
.so [hidden]{display:none!important}.so *{box-sizing:border-box}
.so-intro{display:flex;align-items:center;justify-content:space-between;gap:2rem;margin-bottom:1.6rem}.so-intro>div{max-width:680px}.so-intro h2{font-size:clamp(1.8rem,3vw,2.55rem);line-height:1.2;margin:.25rem 0 .8rem}.so-intro p{margin:.4rem 0;max-width:62ch}.so-intro .so-hand{flex:0 0 auto;font:1.8rem/1.25 var(--hand);color:var(--so-wine);transform:rotate(-4deg)}
.so-scene{position:relative;isolation:isolate;border-radius:18px;background:#b89a76;box-shadow:0 18px 35px #633b241c;container-type:inline-size}.so-scene-image{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:inherit}
.so-book{position:absolute;left:39.2%;top:46%;width:53.3%;height:42%;color:var(--so-ink)}.so-book-content{position:absolute;inset:0}
.so-left-page{position:absolute;inset:0 auto 0 0;width:43%;padding:1% 3%;transform:rotate(-1deg)}
.so .so-page-kicker{font:600 clamp(.58rem,.9vw,.7rem)/1.4 var(--sans);text-transform:uppercase;letter-spacing:.08em;color:#835346;margin:0}
.so .so-book-name{font:clamp(1.8rem,3.5vw,3.1rem)/1.05 var(--hand);color:var(--so-wine);margin:8% 0 0}.so-flourish{display:block;color:#92523f;font:2rem/1 var(--hand);margin:8% 0}
.so .so-left-note{font:clamp(.9rem,1.65vw,1.4rem)/1.3 var(--hand);margin:0;color:#733e42}.so-left-note span{display:block;margin-top:.6rem;font-size:1.2em}.so .so-register-hint{position:absolute;bottom:0;font:.65rem/1.4 var(--sans);color:#856658;margin:0}
.so-tabs{position:absolute;left:105%;top:0;width:11.5%;height:100%;display:flex;flex-direction:column;justify-content:space-between;z-index:2}
.so-tabs button{min-height:38px;flex:0 0 18%;padding:.25rem .2rem .25rem .1rem;border:1px solid #aa7b50;border-left:0;border-radius:0 7px 7px 0;color:#533b35;background:linear-gradient(90deg,#d9b48a,#ebd0ac 20%,#e8c9a1);box-shadow:3px 3px 4px #613a2330;font:600 clamp(.62rem,1vw,.82rem)/1.25 var(--sans);cursor:pointer;transition:transform .18s,filter .18s;transform-origin:left center}
.so-tabs button:nth-child(2){background:linear-gradient(90deg,#c2a29c,#e0c0bc 24%)}.so-tabs button:nth-child(3){background:linear-gradient(90deg,#b7b69a,#d7d5b7 24%)}.so-tabs button:nth-child(4){background:linear-gradient(90deg,#c6ab79,#efdab2 24%)}
.so-tabs button[aria-selected=true]{color:#fff4db;background:linear-gradient(90deg,#572333,#873c50 24%);border-color:#5a2233;transform:translateX(3px)}.so-tabs button:hover{filter:brightness(1.06)}
.so-page{position:absolute;left:56.5%;top:1%;width:43.5%;height:98%;display:flex;flex-direction:column;gap:5%;min-width:0;color:var(--so-ink);padding-right:2%}
.so-page h3{font:clamp(1.2rem,2.05vw,1.75rem)/1.17 var(--hand);color:var(--so-wine);margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.so-page .so-line{font:clamp(.76rem,1.15vw,.96rem)/1.45 var(--heading);margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.so-page .so-meta{font:clamp(.64rem,.96vw,.76rem)/1.4 var(--sans);color:#76594e;margin:0;overflow-wrap:anywhere}.so-page .so-line-small{font-size:clamp(.72rem,1.05vw,.86rem)}
.so-edit{margin-top:auto;align-self:flex-start;font:600 clamp(.69rem,1.05vw,.86rem)/1.3 var(--sans);color:var(--so-wine)!important;border-bottom:1px solid #af7e50;padding:.4rem 0;text-decoration:none!important;max-width:100%;min-height:34px;overflow-wrap:anywhere}.so-edit:hover{border-bottom-color:var(--so-wine);background:#b85e5410}
.so-totals{display:grid;gap:.5rem;margin:1% 0;color:var(--so-ink);padding:.35rem 0;border-block:1px solid #cbb78c55}.so-totals div{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;min-width:0}.so-totals dt{font:clamp(.6rem,.9vw,.72rem)/1.3 var(--sans);flex:0 1 45%}.so-totals dd{margin:0;font:600 clamp(.85rem,1.4vw,1.15rem)/1.2 var(--heading);overflow-wrap:anywhere;text-align:right;flex:0 1 55%}.so-totals .so-over{color:#a51d35}
.so-moments{list-style:none;margin:0;padding:0;display:grid;gap:.5rem;font:clamp(.76rem,1.15vw,.94rem)/1.35 var(--heading)}.so-moments li{overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;border-bottom:1px solid #c4ad8755;padding-bottom:.3rem}.so-moments time{font:.8em var(--sans);color:#895744;margin-right:.5em}
.so-under{display:flex;align-items:center;justify-content:space-between;gap:2rem;margin:1rem .4rem 0;padding:.4rem 0 .3rem;border-bottom:1px solid #c0a77b55}.so-under .so-note{font:1.45rem/1.35 var(--hand);color:var(--so-wine);margin:0;max-width:53ch}.so-under-hint{font:.75rem/1.5 var(--sans);color:#705e57;max-width:29ch;flex:0 0 auto}.so :is(button,a):focus-visible,.so [role=tabpanel]:focus-visible{outline:3px solid #ca8a24;outline-offset:4px}.so button{-webkit-tap-highlight-color:transparent}
@media(min-width:761px){.so-tabs{left:103.5%;width:10%}.so-tabs button{font-size:clamp(.6rem,1.1cqw,.85rem);min-height:32px}.so-page{gap:4%}.so-page h3{font-size:clamp(1.1rem,2.55cqw,1.9rem)}.so-page .so-line{font-size:clamp(.72rem,1.5cqw,1rem)}.so .so-page-kicker{font-size:clamp(.56rem,1cqw,.75rem)}.so-page .so-meta{font-size:clamp(.6rem,1.1cqw,.8rem)}}
/* On a phone, focus the same illustrated right-hand page so its writing stays readable. */
@media(max-width:760px){
.so-intro{display:block}.so-intro .so-hand{font-size:1.6rem;margin:1rem 0 1.2rem;transform:rotate(-2deg)}
.so-scene{background-image:url('sofie-organizer/scene.webp');background-size:340% auto;background-position:99% 94%;border-radius:12px;min-height:430px}
.so-scene-image{display:none}.so-book{position:relative;inset:auto;width:100%;height:auto;min-height:430px;padding:2.1rem 1.9rem 2.4rem 1.9rem}.so-book-content{position:static}.so-left-page{display:none}
.so-tabs{position:relative;inset:auto;width:100%;height:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin:0 0 1.3rem}.so-tabs button{border:1px solid #aa7b50;border-radius:5px 5px 0 0;padding:.6rem .1rem;font-size:.72rem;min-height:42px;box-shadow:1px 2px 3px #613a2320}.so-tabs button[aria-selected=true]{transform:translateY(-2px)}
.so-page{position:relative;inset:auto;width:100%;height:auto;min-height:280px;gap:.85rem;padding:0}.so .so-page-kicker{font-size:.65rem}.so-page h3{font-size:1.85rem}.so-page .so-line{font-size:1rem;-webkit-line-clamp:4}.so-page .so-line-small{font-size:.9rem}.so-page .so-meta{font-size:.77rem}.so-edit{font-size:.82rem;min-height:40px}.so-totals dt{font-size:.74rem}.so-totals dd{font-size:1.25rem}.so-moments{font-size:.95rem}
.so-under{display:block;margin:1.2rem .3rem 0}.so-under .so-note{font-size:1.35rem}.so-under-hint{display:block;font-size:.75rem;margin:.6rem 0 .8rem;max-width:40ch}}
@media(max-width:370px){.so-book{padding:1.8rem 1.5rem 2.4rem}.so-page h3{font-size:1.65rem}.so-tabs button{font-size:.66rem}.so-scene{background-size:390% auto;background-position:96% 93%}}
@media(prefers-reduced-motion:reduce){.so *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media print{.so{display:none!important}}
/* The tabs are part of the illustration, tucked behind the paper. Only ink is overlaid. */
@media(min-width:761px){
 .so-tabs{left:54.6%;top:-10.3%;width:44%;height:6.5%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;z-index:2}
 .so-tabs button,.so-tabs button:nth-child(n),.so-tabs button[aria-selected=true]{position:relative;display:flex;align-items:flex-start;justify-content:center;height:44px;min-height:0;flex:none;padding:3px 0 0;background:none;border:0;border-radius:0;box-shadow:none;transform:none;color:#532f27;font:600 clamp(.53rem,1.05cqw,.82rem)/1.25 var(--hand);filter:none}
 .so-tabs button[aria-selected=true]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;color:#431b28}
 .so-tabs button:hover{color:#892f47;text-decoration:underline;text-underline-offset:2px}
 .so-tabs button:focus-visible{outline:2px solid #702537;outline-offset:2px;border-radius:10px 10px 0 0;height:100%}
 .so-page{top:3%;height:96%}
}
/* The narrow layout is a close-up of the paper, with controls outside the scene. */
@media(max-width:760px){
 .so-scene{max-width:460px;margin-inline:auto;background-image:url('sofie-organizer/scene-registers.png');background-size:auto 1160px;background-position:84% 75%;min-height:465px}
 .so-book{min-height:465px;padding:1.7rem 2rem 2.3rem}
 .so-tabs{margin-bottom:1.5rem}
 .so-page{min-height:300px}
}
@media(max-width:760px){
 .so-tabs button,.so-tabs button:nth-child(n),.so-tabs button[aria-selected=true]{background-image:url('sofie-organizer/scene-registers.png');background-color:transparent;background-size:1745.45% 3413.33%;background-position:72.4% 43.1%;border:0;border-radius:16px 16px 0 0;box-shadow:0 2px 2px #68432c25;transform:none;color:#533126;font:600 .95rem/1.2 var(--hand);padding:.5rem .1rem}
 .so-tabs button:nth-child(2){background-position:78.7% 43.1%}.so-tabs button:nth-child(3){background-position:84.9% 43.1%}.so-tabs button:nth-child(4){background-position:91.2% 43.1%}
 .so-tabs button[aria-selected=true]{text-decoration:underline;text-underline-offset:3px;color:#702537}
}
/* Phone: the right half of the actual illustrated book, including rings and clasp. */
@media(max-width:760px){
 .so-scene{width:100%;max-width:460px;aspect-ratio:536/624;min-height:0;background:none;overflow:hidden;border-radius:12px}
 .so-scene-image{display:block;position:absolute;max-width:none;width:286.567%;height:164.103%;left:-186.567%;top:-64.103%;object-fit:fill;aspect-ratio:auto;border-radius:0}
 .so-book{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0}.so-book-content{position:absolute;inset:0}
 .so-tabs{position:absolute;left:9.14%;top:4.49%;width:67.16%;height:4.17%;margin:0;gap:0}
 .so-tabs button,.so-tabs button:nth-child(n),.so-tabs button[aria-selected=true]{display:flex;align-items:flex-start;justify-content:center;background:none;box-shadow:none;border:0;border-radius:0;height:36px;min-height:0;transform:none;padding:0;font:600 clamp(.58rem,3.1cqw,.86rem)/1.2 var(--hand);color:#533126}
 .so-tabs button[aria-selected=true]{text-decoration:underline;text-underline-offset:2px}.so-tabs button:focus-visible{outline-offset:0;outline-width:2px;border-radius:8px 8px 0 0;height:100%}
 .so-page{position:absolute;left:10%;top:14%;width:66%;height:66%;min-height:0;padding:0;gap:4%;}
 .so .so-page-kicker{font-size:clamp(.5rem,2.4cqw,.7rem);line-height:1.4;letter-spacing:.05em}
 .so-page h3{font-size:clamp(.94rem,6cqw,1.8rem);line-height:1.15;-webkit-line-clamp:2}
 .so-page .so-line{font-size:clamp(.68rem,3.8cqw,1.1rem);line-height:1.4;-webkit-line-clamp:3}.so-page .so-line-small{font-size:clamp(.66rem,3.5cqw,1rem)}
 .so-page .so-meta{font-size:clamp(.55rem,2.7cqw,.8rem);line-height:1.4}
 .so-edit{font-size:clamp(.59rem,3cqw,.9rem);padding:.25rem 0;min-height:0;line-height:1.3}
 .so-totals{gap:.3rem;padding:.3rem 0}.so-totals dt{font-size:clamp(.57rem,2.8cqw,.82rem)}.so-totals dd{font-size:clamp(.8rem,4.4cqw,1.3rem)}
 .so-moments{font-size:clamp(.67rem,3.7cqw,1.1rem);gap:.35rem}.so-moments li{padding-bottom:.2rem}
}
