/* B / B / B / A: painted physical objects, live readable content on their paper. */
:root{--paper-ink:#4d4738;--paper-muted:#786d58;--paper-green:#52684b;--paper-line:#b5a17a}
.app.room-panel-open .container{padding:66px 20px 35px;overscroll-behavior:contain;scrollbar-color:#ae9a76 #e9dec866;background:radial-gradient(ellipse at center,#443a2744,#2d291f96)}
.app.room-panel-open .card.selected-object-panel{position:relative;width:min(1220px,100%);max-width:1220px;min-height:0;margin:0 auto;padding:0!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;isolation:auto;color:var(--paper-ink)}
.app.room-panel-open .card.selected-object-panel:before,.app.room-panel-open .card.selected-object-panel:after{display:none!important}
.object-stage{position:relative;width:100%;height:clamp(610px,calc(100dvh - 108px),850px);isolation:isolate}
.object-panel-art{position:absolute;z-index:-1;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;filter:drop-shadow(0 20px 22px #23190d55)}
.object-panel-content{position:absolute;inset:15% 9% 17%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10%;min-width:0}
.book-leaf{display:flex;flex-direction:column;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:8px 4px 12px;scrollbar-width:thin;scrollbar-color:#b5a17b transparent;overscroll-behavior:contain}
.object-page-heading{margin:0 0 20px;padding:0 0 13px;border-bottom:1px solid #b7a58166}
.object-eyebrow{margin:0 0 9px;color:var(--paper-muted);font-size:.72rem;letter-spacing:.1em;line-height:1.6}
.object-page-title{margin:0;color:#4e6247;font-family:"STKaiti","KaiTi","Noto Serif SC",serif;font-size:clamp(1.6rem,2.6vw,2.25rem);font-weight:600;letter-spacing:.07em;line-height:1.3}
.app.room-panel-open .selected-object-panel :is(input.input,textarea,select){color:var(--paper-ink);font-size:16px;background:#fff9e84d!important;border:0!important;border-bottom:1px solid #a6926f99!important;border-radius:0!important;box-shadow:none!important;line-height:1.65;padding:10px 5px;min-width:0}
.app.room-panel-open .selected-object-panel :is(input.input,textarea,select):focus{outline:2px solid #7c9166;outline-offset:3px;background:#fffdf399!important}
.app.room-panel-open .selected-object-panel :is(.primary,.secondary){min-height:42px;padding:9px 15px;border-radius:35% 16% 31% 12% / 5% 13% 8% 16%;font-size:.9rem;line-height:1.5;box-shadow:none;transform:none!important}
.app.room-panel-open .selected-object-panel .primary{background:#617853;color:#fffdf0;border:1px solid #49623e}
.app.room-panel-open .selected-object-panel .secondary{background:#f9f1dbb0;color:#526749;border:1px solid #a9b192}
.app.room-panel-open .selected-object-panel :is(.primary,.secondary):hover{filter:brightness(1.07);box-shadow:0 3px 9px #5a4b2926}
.selected-object-panel .empty{margin:15px 0;padding:27px 10px;background:transparent!important;border:0;color:#82725a!important;font-size:.92rem;line-height:1.9;text-align:center;font-family:inherit!important}

/* B notebook. Left leaf composes; right leaf reads. */
.stage-notebook .form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0}
.stage-notebook .book-leaf-left{padding-left:12%}.stage-notebook .book-leaf-left>.object-page-heading{padding-left:25%;min-height:104px}.stage-notebook .book-leaf-right{padding-bottom:100px}.stage-album .book-leaf-left>.object-page-heading{padding-left:25%;min-height:100px}.stage-album .book-leaf-right{padding-bottom:100px}
.stage-notebook .form-grid textarea{min-height:175px;height:clamp(155px,24vh,240px);grid-column:auto;resize:vertical;background-image:repeating-linear-gradient(transparent 0 30px,#ab99724d 31px,transparent 32px)!important;background-size:100% 32px!important;line-height:32px!important}
.stage-notebook #messageName{width:100%}
.stage-notebook #sendMessage{justify-self:start;margin-top:8px}
.stage-notebook #messages{max-height:none;overflow:visible;padding:4px 1px;gap:15px}
.stage-notebook .toggle{order:2;margin:10px 0;text-align:left}
.stage-notebook .toggle button{font-size:.75rem!important;min-height:34px!important;padding:5px 10px!important}
.stage-notebook #messages{order:1}
.app.room-panel-open .stage-notebook .chat{width:fit-content;max-width:95%;margin:0 0 4px!important;padding:13px 14px!important;border:1px solid #c9b48b77!important;border-radius:2px 9px 3px 6px!important;background:#f3e6bfcc!important;box-shadow:1px 3px 5px #73604020!important;transform:none!important}
.app.room-panel-open .stage-notebook .chat.right{background:#dce3c5c9!important;color:#3c4f34}
.stage-notebook .chat .name{font-size:.8rem!important;color:#516544!important}
.stage-notebook .chat .time{color:#7c705b!important;font-size:.62rem}
.stage-notebook .chat .content{font-size:.94rem;line-height:1.85;margin:7px 0 0}

/* B calendar. A floral wooden crown above the actual calendar sheet. */
.stage-calendar{height:auto;min-height:870px;aspect-ratio:1.36}
.stage-calendar .object-panel-content{inset:24% 12% 12%;display:flex;flex-direction:column;gap:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#b5a17b transparent}
.stage-calendar .object-page-heading{flex:0 0 auto;text-align:center;margin:0 0 13px;padding:0 0 9px;border:0}
.stage-calendar .object-page-title{font-size:1.75rem}.stage-calendar .object-eyebrow{font-size:.65rem;margin-bottom:5px}
.stage-calendar .room-calendar-tabs{justify-content:center;margin:0 0 12px!important;gap:20px;flex:0 0 auto}
.stage-calendar .room-calendar-tabs button{position:relative;min-height:35px;padding:3px 5px 7px;border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent!important;color:#817258;font-size:.86rem;box-shadow:none!important;font-weight:500}
.stage-calendar .room-calendar-tabs button[aria-selected=true]{border-color:#5e7452;color:#4c623f;font-weight:700}
.stage-calendar .room-calendar-view,.stage-calendar .room-calendar-record{flex:1 0 auto;min-height:0;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.stage-calendar .calendar-rings{display:none}
.stage-calendar .calendar-toolbar{margin:0 0 6px}.stage-calendar .calendar-toolbar h3{font-family:"STKaiti","KaiTi",serif;font-size:1.45rem;font-style:normal}
.stage-calendar .calendar-toolbar button{width:35px;height:35px;border:1px solid #b8a27a;border-radius:50%;background:transparent;color:#6a7252}
.stage-calendar .calendar-weekdays{border:0}.stage-calendar .calendar-weekdays span{font-size:.7rem;padding:7px 0;color:#796c53}
.stage-calendar .calendar-grid{border:1px solid #a9956e88;border-top:0}
.stage-calendar .calendar-day{min-height:63px;padding:5px;background:transparent!important;border-top:1px solid #a9956e88;border-right:1px solid #a9956e88;color:#5d513a}
.stage-calendar .calendar-day.empty{cursor:default;opacity:.35}.stage-calendar .calendar-day time{font-size:.7rem;font-weight:500;color:#6c5d45}
.stage-calendar .calendar-day strong{font-size:.65rem;color:#586d48}
.stage-calendar .calendar-day.selected{background:#cad7b488!important;box-shadow:inset 0 0 0 1px #82936d}
.stage-calendar .calendar-day.has-record{background:#f0dea66b!important}
.stage-calendar .calendar-details{position:static;min-height:50px;margin-top:10px;padding:9px 12px;border:0;border-left:2px solid #94a27b;border-radius:0;background:#e5e6ce66;box-shadow:none;font-size:.8rem;color:#665c46}
.stage-calendar .calendar-details p{font-size:.83rem}.stage-calendar .calendar-details h4{font-size:.85rem}
.stage-calendar .date-form{display:grid;grid-template-columns:1fr 1fr;gap:19px 24px;padding:8px 5px;margin:0}
.stage-calendar .paper-field{display:flex;flex-direction:column;gap:6px;min-width:0}.paper-field-label{color:#74674d;font-size:.76rem}
.stage-calendar .paper-field:has(#place),.stage-calendar .paper-field:has(#note),.stage-calendar #addDate{grid-column:1/-1}
.stage-calendar #note{min-height:60px}.stage-calendar #addDate{justify-self:center;order:10;margin-top:4px}

/* B album. The upload page and real photos are independent HTML leaves. */
.stage-album .toolbar{display:flex;flex-direction:column;align-items:stretch;gap:17px;margin:0;padding:0!important;border:0!important;background:transparent!important;border-radius:0}
.stage-album .toolbar .tip{margin:0 0 7px;color:#7a6f59;font-size:.86rem;line-height:1.8}
.stage-album #photoName,.stage-album #photoCaption{min-width:0;width:100%;flex:none}
.stage-album .toolbar label[for=photoInput]{order:4;align-self:start;margin:9px 0 0}
.stage-album #photos{display:block;columns:2;column-gap:16px;overflow:visible;padding:12px 8px;min-height:170px}
.app.room-panel-open .stage-album .photo{display:inline-block;width:100%;margin:0 0 24px;padding:6px 6px 12px!important;vertical-align:top;border:0!important;border-radius:1px!important;background:#fffdf7!important;box-shadow:1px 3px 7px #4e3d2540!important;transform:rotate(-1deg)}
.app.room-panel-open .stage-album .photo:nth-child(even){transform:rotate(1deg)}
.stage-album .photo:before{width:42px;height:15px;top:-7px;left:31%;background:#c8d1a8aa!important}
.stage-album .photo div{min-height:60px}.stage-album .photo img{max-height:none;height:auto}
.stage-album .photo figcaption{padding:6px 1px 0}.stage-album .photo figcaption p{margin:3px 0 7px;font-size:.78rem;color:#5d5a48;line-height:1.6}
.stage-album .photo small{color:#827a68;font-size:.57rem}.stage-album .caption-edit{min-height:30px!important;margin-top:6px;padding:3px 6px!important;font-size:.62rem!important}
.stage-album #photos .empty{display:block;column-span:all;padding-top:35px}
.stage-album .upload-state{margin-top:15px;color:#526b43;font-size:.8rem;line-height:1.8}.stage-album .photo-pagination{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 18px;padding:8px 0;border-top:1px dashed #b7a58166;color:#75694f;font-size:.72rem}.stage-album .photo-pagination button{min-height:34px!important;padding:5px 9px!important;font-size:.7rem!important}.stage-album .photo-pagination button:disabled{opacity:.45;cursor:not-allowed}

/* A music box. Live controls sit on its front, the untouched iframe is in a paper drawer. */
.stage-music{height:clamp(340px,46vw,580px);max-width:950px;margin:auto}
.stage-music .object-panel-content{inset:0;display:block}
.music-lid-copy{position:absolute;inset:17% 20% auto;text-align:center}.music-lid-copy .object-page-heading{border:0;margin:0;padding:0}.music-lid-copy .object-page-title{font-size:clamp(1.7rem,3vw,2.6rem)}.music-lid-copy .object-eyebrow{font-size:.75rem}.music-lid-note{color:#827051;font-family:"STKaiti","KaiTi",serif;font-size:1rem;line-height:1.8;margin:12px 0 0}
.music-object-controls{position:absolute;left:20%;right:20%;top:64%;bottom:17%;display:grid;place-items:center}
.music-object-controls .toolbar{display:flex;align-items:center;justify-content:center;gap:18px;margin:0;padding:0!important;border:0!important;background:transparent!important}.music-object-controls .tip{font-size:.8rem;color:#6d5b40}.music-object-controls #playMusic{background:#efe0bc!important;border-color:#a68d5f!important;color:#5b573c!important}
.music-playlist-tray{position:relative;max-width:950px;margin:0 auto 20px;padding:20px 25px 24px;background:#f5ecd7;border:1px solid #cdb891;border-bottom:6px solid #ba986c;border-radius:16px 11px 25px 15px;box-shadow:0 12px 22px #31220e45}
.music-full-playlist{display:table;margin:14px auto 0;padding:8px 16px;border:1px solid #9aa683;border-radius:999px;background:#f9f5e9;color:#536b4f;font-weight:700;text-align:center;text-decoration:none}.music-full-playlist:hover{background:#e8eedc}.music-full-playlist:focus-visible{outline:3px solid #728257;outline-offset:3px}
.playlist-heading{margin:0 0 13px;color:#61734c;font-family:"STKaiti","KaiTi",serif;font-size:1.3rem;font-weight:500;text-align:center}
.app.room-panel-open .selected-object-panel .music-frame{display:block;width:100%;height:452px;min-height:430px;background:#fffdf6;border:1px solid #d7c49f!important;border-radius:6px}
.selected-object-panel .music-note{color:#81725b;font-size:.75rem;line-height:1.7}
.art-unavailable{background:#f4ecd8;border-radius:20px}.art-unavailable .object-panel-content{inset:30px 35px}
.object-page-title:focus-visible,.selected-object-panel :focus-visible{outline-color:#728257!important}
.app.room-panel-open #notice.show{display:block;position:sticky;top:0;z-index:9;width:min(900px,100%);margin:0 auto 12px;padding:12px 16px;color:#7b452d;background:#fff2db;border:1px solid #d4af7b;border-radius:9px;box-shadow:0 5px 16px #30231330;font-size:.9rem}

@media(max-width:900px) and (min-width:701px){.object-panel-content{inset:14% 8% 17%;gap:9%}.object-stage{height:680px}.object-page-title{font-size:1.6rem}.stage-calendar{height:880px}.stage-album #photos{columns:1}.stage-music{height:430px}}
@media(max-width:700px){
  .app.room-panel-open .container{padding:63px 10px max(30px,env(safe-area-inset-bottom));scroll-padding-top:20px}
  .app.room-panel-open .card.selected-object-panel{width:100%;margin:0 auto}
  .app.room-panel-open .room-panel-close{font-size:.85rem;min-height:40px;top:max(10px,env(safe-area-inset-top))}
  .object-stage{height:auto;min-height:0}
  .stage-notebook>.object-panel-art,.stage-album>.object-panel-art{position:relative;display:block;width:100%;height:auto;aspect-ratio:1.5;object-fit:contain;margin-bottom:-35px}
  .stage-notebook>.object-panel-content,.stage-album>.object-panel-content{position:relative;inset:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:0 13px}
  .book-leaf,.stage-notebook .book-leaf-left,.stage-notebook .book-leaf-right,.stage-album .book-leaf-right{overflow:visible;max-height:none;padding:26px 22px;background:radial-gradient(ellipse at top,#fff9e8,#eee1bf);border:1px solid #d4c19b;border-radius:4px 17px 8px 22px;box-shadow:0 8px 19px #2e221b45}.stage-notebook .book-leaf-left>.object-page-heading,.stage-album .book-leaf-left>.object-page-heading{padding-left:0;min-height:0}
  .object-page-heading{margin-bottom:17px}.object-page-title{font-size:1.8rem}.object-eyebrow{font-size:.7rem}
  .stage-notebook .form-grid textarea{height:170px;min-height:150px}.stage-notebook #messages{overflow:visible}.stage-album #photos{columns:2;min-height:140px}
  .stage-album .photo figcaption p{font-size:.83rem}.stage-album .photo small{font-size:.6rem}.stage-album .photo-pagination{gap:6px;font-size:.66rem}.stage-album .photo-pagination button{padding:5px 7px!important}
  .stage-calendar{min-height:860px;aspect-ratio:auto}
  .stage-calendar>.object-panel-art{height:330px;object-fit:fill;object-position:top}
  .stage-calendar>.object-panel-content{position:relative;inset:auto;display:flex;overflow:visible;padding:27px 15px 25px;margin:0 14px;top:190px;background:#f7eed8;border:1px solid #d0ba92;border-bottom:5px solid #aa8655;border-radius:2px 8px 3px 5px;box-shadow:0 10px 18px #33271355}
  .stage-calendar .object-page-title{font-size:1.7rem}.stage-calendar .object-eyebrow{font-size:.64rem}
  .stage-calendar .calendar-day{min-height:57px;padding:5px 3px}.stage-calendar .calendar-day strong{font-size:.6rem}.stage-calendar .calendar-day time{font-size:.7rem}
  .stage-calendar .date-form{gap:17px 13px;padding:8px 0}.stage-calendar .calendar-toolbar h3{font-size:1.35rem}
  .stage-calendar .calendar-details{padding:10px;margin-top:12px;line-height:1.7}
  .stage-music{height:320px;margin:0 -2px;width:calc(100% + 4px)}
  .music-lid-copy{inset:18% 15% auto}.music-lid-copy .object-page-title{font-size:1.6rem}.music-lid-copy .object-eyebrow{font-size:.6rem}.music-lid-note{font-size:.83rem;margin-top:8px}
  .music-object-controls{left:17%;right:17%;top:63%;bottom:15%}.music-object-controls .toolbar{gap:5px;flex-direction:column}.music-object-controls .tip{font-size:.65rem}.music-object-controls #playMusic{min-height:35px!important;padding:4px 13px!important;font-size:.8rem!important}
  .music-playlist-tray{margin:0 9px 15px;padding:17px 9px 20px;border-radius:8px 14px 18px 10px}.app.room-panel-open .selected-object-panel .music-frame{height:452px;min-height:430px}
  .art-unavailable>.object-panel-content{inset:auto}
}
.stage-album .photo-actions{gap:5px;margin-top:6px}.stage-album .photo-actions .caption-edit,.stage-album .photo-actions .photo-delete{min-height:30px!important;margin:0;padding:3px 6px!important;font-size:.62rem!important}

/* Album book: the upload leaf stays at page 1; later photos turn as real paired leaves. */
.stage-album #photos{display:block;columns:unset;min-height:0;padding:8px 0;overflow:visible}
.stage-album .album-photo-single,.stage-album .album-photo-spread{width:100%}
.stage-album .album-photo-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.stage-album .album-photo-page{position:relative;min-height:395px;padding:28px 15px 22px;background:radial-gradient(ellipse at 24% 18%,#fffdf5,#f3e6c9);border:1px solid #c9b183;border-radius:4px 12px 8px 15px;box-shadow:inset 0 0 20px #a48a5930,3px 6px 13px #4f3d2640}
.stage-album .album-photo-single .album-photo-page{min-height:420px}
.stage-album .album-page-number{margin:0 0 15px;color:#9a7e56;font-family:"STKaiti","KaiTi",serif;font-size:.82rem;letter-spacing:.17em;text-align:right}
.stage-album .album-page-grid{display:grid;grid-template-columns:1fr;gap:15px}
.stage-album .album-page-grid .photo{display:block;width:100%;margin:0!important;break-inside:avoid}
.stage-album .album-page-empty{display:grid;min-height:235px;place-items:center;margin:0;padding:22px;color:#9b896c;font-family:"STKaiti","KaiTi",serif;font-size:.92rem;line-height:1.8;text-align:center;border:1px dashed #cdb88e;background:#fffdf566}
.stage-album.album-showing-spread .object-panel-content{grid-template-columns:minmax(235px,.34fr) minmax(0,1.66fr);gap:17px}
.stage-album.album-showing-spread .book-leaf-right{padding-left:8px;padding-right:8px}
@media (prefers-reduced-motion:no-preference){.stage-album .album-photo-single,.stage-album .album-photo-spread{animation:albumLeafTurn .34s cubic-bezier(.2,.75,.25,1)}@keyframes albumLeafTurn{from{opacity:.18;transform:perspective(900px) rotateY(-5deg) translateX(10px)}to{opacity:1;transform:none}}}
/* One turning photo leaf: page 1 stays as the upload leaf, the right leaf changes one paper page at a time. */
.stage-album .book-leaf-right{position:relative;overflow:visible}
.stage-album .album-photo-single{width:100%;animation:albumLeafTurn .34s cubic-bezier(.2,.75,.25,1)}
.stage-album .album-photo-page{min-height:440px;padding:28px 24px 44px;background:radial-gradient(ellipse at 24% 18%,#fffdf5,#f3e6c9);border:1px solid #c9b183;border-radius:4px 12px 8px 15px;box-shadow:inset 0 0 20px #a48a5930,3px 6px 13px #4f3d2640}
.stage-album .album-page-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:16px}
.stage-album .album-page-grid .photo,.stage-album .album-photo-slot{display:block;width:100%;min-width:0;margin:0!important;break-inside:avoid}
.stage-album .album-page-grid .photo{padding:7px 7px 11px!important;background:#fffdf7!important;box-shadow:1px 3px 7px #4e3d2540!important}
.stage-album .album-page-grid .photo:nth-child(odd){transform:rotate(-1.5deg)}
.stage-album .album-page-grid .photo:nth-child(even){transform:rotate(1.2deg)}
.stage-album .album-page-grid .photo div{min-height:0;aspect-ratio:.84;background:#f4ead6}
.stage-album .album-photo-empty{display:grid;min-height:180px;place-items:center;padding:16px;color:#9b896c;font-family:"STKaiti","KaiTi",serif;font-size:.86rem;line-height:1.8;text-align:center;border:1px dashed #cdb88e;background:#fffdf566}
.stage-album .photo-pagination{position:absolute;z-index:5;inset:0 -56px 0 -42px;display:block!important;margin:0!important;padding:0!important;border:0!important;pointer-events:none}
.stage-album .photo-pagination span{position:absolute;left:50%;bottom:13px;transform:translateX(-50%);min-width:max-content;color:#8b7757;font-size:.72rem;pointer-events:none}
.stage-album .photo-pagination .photo-page-turn{position:absolute;top:50%;width:38px;min-width:38px!important;height:52px;min-height:52px!important;padding:0!important;font-family:Georgia,serif;font-size:2.25rem!important;line-height:1!important;border-radius:52% 10% 10% 52% / 50% 13% 13% 50%!important;box-shadow:2px 4px 9px #3f2d1840!important;pointer-events:auto;transform:translateY(-50%)!important}
.stage-album .photo-pagination .photo-page-turn-prev{left:0;border-radius:10% 52% 52% 10% / 13% 50% 50% 13%!important}
.stage-album .photo-pagination .photo-page-turn-next{right:0}
.stage-album .photo-pagination .photo-page-turn:disabled{opacity:.35;cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.stage-album .album-photo-single{animation:none}}
/* Keep the right photo leaf inside the illustrated album, with compact real controls. */
.stage-album .object-panel-content{align-items:stretch}
.stage-album .book-leaf-right{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:visible}
.stage-album .book-leaf-right>#photos{height:100%;min-height:0;overflow:hidden;padding:0!important}
.stage-album .book-leaf-right .album-photo-single{height:100%;min-height:0}
.stage-album .book-leaf-right .album-photo-page{height:100%;min-height:0;max-height:100%;padding:17px 17px 35px;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.stage-album .book-leaf-right .album-page-number{margin:0 0 8px;font-size:.74rem}
.stage-album .book-leaf-right .album-page-grid{min-height:0;height:100%;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;overflow:hidden}
.stage-album .book-leaf-right .album-page-grid .photo{display:grid;grid-template-rows:minmax(0,1fr) auto;min-width:0;max-height:100%;padding:6px 6px 8px!important;overflow:hidden}
.stage-album .book-leaf-right .album-page-grid .photo div{min-height:0;height:clamp(112px,13vw,175px);aspect-ratio:auto;overflow:hidden}
.stage-album .book-leaf-right .album-page-grid .photo img{width:100%;height:100%;object-fit:cover}
.stage-album .book-leaf-right .photo figcaption{min-width:0;padding:5px 1px 0}
.stage-album .book-leaf-right .photo figcaption p{display:-webkit-box;max-height:2.75em;margin:2px 0 3px;overflow:hidden;font-size:.67rem;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.stage-album .book-leaf-right .photo small{display:block;overflow:hidden;font-size:.54rem;white-space:nowrap;text-overflow:ellipsis}
.stage-album .book-leaf-right .photo-actions{display:flex!important;align-items:center!important;gap:4px!important;margin-top:5px!important}
.stage-album .book-leaf-right .photo-actions .caption-edit,.stage-album .book-leaf-right .photo-actions .photo-delete{display:inline-flex!important;flex:1 1 0!important;align-items:center!important;justify-content:center!important;width:auto!important;height:30px!important;min-height:30px!important;max-height:30px!important;margin:0!important;padding:2px 4px!important;font-size:.6rem!important;line-height:1!important;white-space:nowrap}
.stage-album .book-leaf-right .album-photo-empty{min-height:0;height:clamp(112px,13vw,175px);padding:10px;font-size:.72rem}
.stage-album .book-leaf-right .photo-pagination{inset:0 -45px 0 -29px}
.stage-album .book-leaf-right .photo-pagination span{bottom:9px;font-size:.64rem}
.stage-album .book-leaf-right .photo-pagination .photo-page-turn{width:32px;min-width:32px!important;height:43px;min-height:43px!important;font-size:1.75rem!important;background:#edf0d9e8;border-color:#86917388;box-shadow:1px 2px 6px #3f2d1833!important}
@media (max-width:700px){
  .stage-album .book-leaf-right{height:auto;display:block}
  .stage-album .book-leaf-right>#photos,.stage-album .book-leaf-right .album-photo-single{height:auto;overflow:visible}
  .stage-album .book-leaf-right .album-photo-page{height:auto;max-height:none;min-height:0;display:block;padding:18px 12px 15px;overflow:visible}
  .stage-album .book-leaf-right .album-page-grid{height:auto;overflow:visible;gap:9px}
  .stage-album .book-leaf-right .album-page-grid .photo div{height:clamp(108px,31vw,155px)}
  .stage-album .book-leaf-right .album-photo-empty{height:clamp(108px,31vw,155px)}
  .stage-album .book-leaf-right .photo-pagination{inset:auto;margin:12px 0 0!important}
}
/* Photos stay fully visible by default; controls sit below the image, never over it. */
.stage-album .book-leaf-right .album-page-grid .photo{display:flex!important;flex-direction:column!important;grid-template-rows:none!important;align-self:start!important;height:auto!important;max-height:none!important;overflow:visible!important}
.stage-album .book-leaf-right .album-page-grid .photo div{flex:0 0 122px!important;height:122px!important;min-height:122px!important;overflow:hidden!important;background:#f4ead6!important}
.stage-album .book-leaf-right .album-page-grid .photo .photo-open{display:block!important;width:100%!important;height:100%!important;padding:0!important;background:transparent!important}
.stage-album .book-leaf-right .album-page-grid .photo img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;object-position:center!important;background:#f4ead6!important;transform:none!important;filter:none!important}
.stage-album .book-leaf-right .album-page-grid .photo:hover img{transform:none!important;filter:none!important}
.stage-album .book-leaf-right .photo figcaption{display:block!important;flex:none!important;padding:6px 1px 0!important}
.stage-album .book-leaf-right .photo figcaption p{max-height:2.7em;margin:0 0 4px!important}
.stage-album .book-leaf-right .photo small{margin:0 0 6px!important}
.stage-album .book-leaf-right .photo-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:center!important;gap:5px!important;margin:0!important}
.stage-album .book-leaf-right .photo-actions .caption-edit,.stage-album .book-leaf-right .photo-actions .photo-delete{height:29px!important;min-height:29px!important;max-height:29px!important;padding:2px 3px!important;font-size:.58rem!important}
@media (max-width:700px){
  .stage-album .book-leaf-right .album-page-grid .photo div{flex-basis:clamp(96px,28vw,130px)!important;height:clamp(96px,28vw,130px)!important;min-height:clamp(96px,28vw,130px)!important}
}
/* Desktop leaf: reserve a visible control row beneath each complete photo. */
@media (min-width:701px){
  .stage-album .book-leaf-right .album-photo-page{padding-bottom:34px!important;overflow:visible!important}
  .stage-album .book-leaf-right .album-page-grid{height:auto!important;min-height:0!important;overflow:visible!important;align-items:start!important}
  .stage-album .book-leaf-right .album-page-grid .photo{overflow:visible!important;align-self:start!important}
  .stage-album .book-leaf-right .album-page-grid .photo div{flex-basis:104px!important;height:104px!important;min-height:104px!important}
  .stage-album .book-leaf-right .photo figcaption{overflow:visible!important}
  .stage-album .book-leaf-right .photo-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;visibility:visible!important;opacity:1!important;overflow:visible!important}
  .stage-album .book-leaf-right .photo-actions .caption-edit,.stage-album .book-leaf-right .photo-actions .photo-delete{display:inline-flex!important;visibility:visible!important;opacity:1!important}
}
/* The desktop book leaf must not crop the real action row below each photo. */
@media (min-width:701px){
  .stage-album .book-leaf-right{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important}
  .stage-album .book-leaf-right>#photos,.stage-album .book-leaf-right .album-photo-single{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important}
  .stage-album .book-leaf-right .album-photo-page{display:block!important;height:auto!important;min-height:420px!important;max-height:none!important;overflow:visible!important;padding-bottom:46px!important}
  .stage-album .book-leaf-right .album-page-grid{display:grid!important;height:auto!important;min-height:0!important;overflow:visible!important;align-items:start!important}
  .stage-album .book-leaf-right .album-page-grid .photo{display:flex!important;height:auto!important;max-height:none!important;overflow:visible!important}
  .stage-album .book-leaf-right .photo-actions{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;height:auto!important;min-height:29px!important;max-height:none!important;overflow:visible!important}
}