/* 2026-11 host pass: 绯栖 lives in the interface. Her cut-out doodles (assets/feiqi/, made by
   tools/make-cutouts.py) replace generic UI: the cover, the corner tab's face and fox, chapter icons,
   margin whispers and the closing page. Loaded last; remove with host.js to undo. */

/* Cover: she peeks out from behind the sketchbook, and the blank page is the way in. */
#gallery>.gallery-home-intro{position:relative;align-items:center}
.pencil-trace{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
#gallery>.gallery-home-intro>*:not(.pencil-trace){position:relative;z-index:1}
.hero-peek{position:relative;justify-self:end;width:min(430px,100%);margin:-18px 0 -10px}
.hero-peek-art{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}
.hero-open{position:absolute;left:69.5%;top:19%;width:22%;height:68%;display:grid;place-items:center;color:#7d3a48;text-decoration:none;border-radius:3px;transition:background-color .3s ease,transform .3s ease}
.hero-open>span{writing-mode:vertical-rl;font:400 clamp(17px,1.7vw,22px)/1 JournalSerif,'Songti SC',serif;letter-spacing:10px;padding-top:10px}
.hero-open:after{content:'↓';position:absolute;bottom:9%;font-size:15px;color:#9d5158;transition:transform .3s ease}
.hero-open:hover,.hero-open:focus-visible{background:#f3d9dc59;transform:rotate(-1.5deg)}
.hero-open:hover:after{transform:translateY(4px)}
.hero-bubble{position:absolute;left:-6%;top:2%;margin:0;padding:10px 14px;font-size:13px;line-height:1.7;color:#5d4a44;background:#fffaf2;border:1px solid #d9c9b8;border-radius:14px 14px 14px 3px;box-shadow:0 6px 18px #5f4a3512;transform:rotate(-3deg)}
.hero-bubble:after{content:'';position:absolute;right:16px;bottom:-8px;width:12px;height:12px;background:#fffaf2;border-right:1px solid #d9c9b8;border-bottom:1px solid #d9c9b8;transform:rotate(45deg)}
.hero-meet{position:absolute;left:4%;bottom:4%;min-height:40px;padding:6px 2px;border:0;background:none;font:inherit;font-size:13px;color:#8e4755;text-decoration:underline;text-decoration-color:#cfada5;text-underline-offset:5px;cursor:pointer}
@media(hover:hover) and (pointer:fine){.hero-meet:hover{color:#713748}}
@media(max-width:1100px){.hero-peek{width:min(380px,100%)}.hero-bubble{left:-2%;font-size:12px}}
@media(max-width:700px){
 .hero-peek{width:min(330px,88%);margin:18px 0 0 auto}
 .hero-bubble{left:-8%;top:0;font-size:12px;padding:8px 11px}
 .hero-open>span{font-size:16px;letter-spacing:7px}
 .hero-meet{left:0;bottom:0;font-size:13px}
}

/* Margin whispers: a line in her voice under some drawings. */
.gallery-whisper{display:flex;gap:7px;align-items:baseline;margin:10px 0 0;font-size:13px;line-height:1.7;color:#8e4755;transform:rotate(-1deg);transform-origin:left center}
.gallery-whisper:before{content:'';flex:none;width:20px;height:9px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='9'%3E%3Cpath d='M1 6 C 5 2, 9 8, 13 4 S 17 3, 19 5' fill='none' stroke='%23b0727a' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat}
.gallery-piece.is-spread .gallery-whisper{font-size:14px}
.gallery-piece.is-spread[data-tape="1"] .gallery-whisper,.gallery-piece.is-spread[data-tape="3"] .gallery-whisper{justify-content:flex-end;transform-origin:right center}
@media(max-width:700px){.gallery-piece.is-spread[data-tape] .gallery-whisper{justify-content:flex-start;transform-origin:left center}}
.gallery-piece.is-tale .gallery-whisper{color:#7d3a48}

/* Chapter icons sit on the pencil rule at the right. */
.gallery-chapter.is-light{position:relative}
.chapter-icon{position:absolute;right:2%;top:-22px;width:46px;height:auto;transform:rotate(-8deg);pointer-events:none}
.gallery-chapter[data-chapter="日常小物"] .chapter-icon{width:38px;top:-20px;transform:rotate(10deg)}
.gallery-chapter[data-chapter="窗外风景"] .chapter-icon{width:30px;top:-26px}
@media(max-width:700px){.chapter-icon{width:36px;top:-18px}}

/* Corner tab: her face shows her mood; a fox walks along the top edge as you turn pages. */
.chapter-tab{padding-left:8px;overflow:visible}
.tab-face{flex:none;width:38px;height:auto;margin:-14px -2px -10px -6px;filter:drop-shadow(0 0 2px #fffaf2) drop-shadow(0 0 3px #fffaf2)}
.tab-walker{position:absolute;left:46px;right:12px;top:-31px;height:32px;pointer-events:none}
.tab-walker img{position:absolute;left:calc(var(--walk,0) * (100% - 42px));bottom:0;width:42px;height:auto;filter:drop-shadow(0 0 2px #fffaf2) drop-shadow(0 0 4px #fffaf2);transition:left .8s cubic-bezier(.3,.7,.3,1)}
.tab-walker.is-asleep img{width:40px}
.tab-bubble{position:absolute;left:6px;bottom:calc(100% + 36px);max-width:220px;padding:7px 12px;font-size:12px;line-height:1.6;white-space:normal;color:#5d4a44;background:#fffaf2;border:1px solid #d9c9b8;border-radius:12px 12px 12px 3px;box-shadow:0 6px 18px #5f4a3514;opacity:0;transform:translateY(4px);transition:opacity .25s ease,transform .25s ease;pointer-events:none}
.tab-bubble.is-shown{opacity:1;transform:none}
@media(max-width:700px){.tab-walker{left:40px}.tab-bubble{left:50%;transform:translate(-50%,4px)}.tab-bubble.is-shown{transform:translateX(-50%)}}

/* Contents: a fox sits under the list and looks up at it. */
.contents-foot{display:flex;flex-direction:column;align-items:center;gap:2px}
.contents-fox{width:58px;height:auto;margin-top:2px}

/* Closing page: the fox has fallen asleep. */
.afterword-tail{position:relative}
.afterword-tail img{width:170px;padding:0;background:none;border:0;box-shadow:none;transform:none}
.afterword-zz{position:absolute;right:-14px;top:-6px;font:italic 15px/1 Georgia,serif;letter-spacing:4px;color:#b0727a;transform:rotate(-12deg);animation:feiqi-zz 3.2s ease-in-out infinite}
@keyframes feiqi-zz{0%,100%{opacity:.35;transform:rotate(-12deg) translateY(2px)}50%{opacity:1;transform:rotate(-12deg) translateY(-4px)}}
.afterword-whisper{margin:6px 0 0;font-size:13px;color:#8e4755}
@media(max-width:700px){.afterword-tail img{width:140px}}

@media(prefers-reduced-motion:reduce){.afterword-zz{animation:none}.tab-walker img,.tab-bubble,.hero-open{transition:none}}
@media(forced-colors:active),(prefers-contrast:more){.hero-bubble,.tab-bubble{background:Canvas;color:CanvasText;border-color:CanvasText}.gallery-whisper{color:CanvasText}}
