:root{color-scheme:dark;--ink:#fff7e8;--gold:#dfc49a;--serif:"Hiragino Mincho ProN","Hiragino Mincho Pro","Yu Mincho",YuMincho,"Noto Serif CJK JP",serif;--sans:system-ui,-apple-system,"Hiragino Kaku Gothic ProN",sans-serif}
*{box-sizing:border-box}html,body{margin:0;background:#211b21;color:var(--ink);font-family:var(--serif)}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{color:inherit;background:none;border:0;cursor:pointer;font:inherit}a{color:inherit;text-decoration:none}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #ffdb98;outline-offset:3px}button:active:not(:disabled),a:active{filter:brightness(.81)}[hidden]{display:none!important}
.theater{min-height:100svh;display:grid;place-items:center;isolation:isolate;overflow:hidden;position:relative}
.ambient{position:absolute;inset:-30px;z-index:-1;background-image:linear-gradient(100deg,#21161bc9,#342c2952,#231820dd),url('/assets/theater/wedding/chapel.webp');background-size:cover;background-position:center 42%;filter:blur(22px) saturate(.55);pointer-events:none}
.screen{position:relative;isolation:isolate;width:min(100%,max(540px,77svh));height:100vh;height:100svh;min-height:445px;overflow:hidden;background:#372a2e;box-shadow:0 0 66px #120e14a6}
.scenery,.shade,.still,.still img,.advance{position:absolute;inset:0;width:100%;height:100%}.scenery{z-index:-3;overflow:hidden}.still{opacity:0;transition:opacity 700ms ease;pointer-events:none;overflow:hidden}.still.active,.still:first-child:not(.departed){opacity:1}.still img{display:block;object-fit:cover;object-position:var(--fx,50%) var(--fy,39%);transform:scale(var(--zoom,1));transform-origin:var(--fx,50%) var(--fy,39%);transition:transform 1700ms cubic-bezier(.22,.47,.32,1),object-position 1700ms ease}
.shade{z-index:-2;pointer-events:none;background:linear-gradient(180deg,#201a2270 0%,transparent 22%,transparent 38%,#271a2890 72%,#20141ee8 100%);transition:opacity .45s ease}
.controls{position:absolute;top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 14px);left:clamp(14px,4vw,27px);right:clamp(14px,4vw,27px);display:flex;justify-content:space-between;z-index:8;pointer-events:none}.top-action{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:.42rem;border:1px solid #edd6ab73;border-radius:50px;background:#2b2028;font:500 .83rem/1 var(--sans);padding:0 .81rem;min-height:40px;letter-spacing:.04em}.home-link span{font-size:1.45rem;line-height:.7}.sound svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}.sound-on,.sound[aria-pressed=true] .sound-off{display:none}.sound[aria-pressed=true] .sound-on{display:block}
.cover-page,.end-page{position:absolute;inset:0;display:flex;align-items:flex-end;overflow-y:auto}.cover-page{background:linear-gradient(180deg,transparent 25%,#2a1a2622 40%,#2b192695 57%,#21151fd4 80%,#1a1119f5)}.intro-content{padding:14px clamp(24px,6vw,50px) max(26px,calc(env(safe-area-inset-bottom,0px) + 22px));width:100%;text-shadow:0 2px 14px #1c1217}
.edition{display:flex;align-items:center;gap:.72rem;margin:0;color:#f1daba;font:500 .76rem/1.5 var(--sans);letter-spacing:.14em}.edition i{width:25px;height:1px;background:currentColor;opacity:.8}
h1{font:500 clamp(2.25rem,min(8.9vw,6vh),3.75rem)/1.17 var(--serif);letter-spacing:.055em;margin:.63rem 0 .45rem;font-feature-settings:"palt"}.intro-content h1 span{display:block}.subtitle{font-size:clamp(.88rem,3.9vw,1.12rem);letter-spacing:.1em;line-height:1.65;margin:0;color:#fff3e5}.chapter-title{display:flex;align-items:center;gap:10px;margin:clamp(.7rem,2vh,1.35rem) 0 .28rem;font-size:1.05rem;letter-spacing:.075em}.chapter-title b{color:#edd4a7;font-size:.84rem;font-weight:500}.byline,.book-info{color:#ead8ca;font-size:.81rem;letter-spacing:.065em;margin:0}.cover-actions{display:flex;align-items:center;gap:16px;margin-top:clamp(.65rem,2vh,1.15rem)}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:49px;padding:.6rem 1.8rem;letter-spacing:.08em;border-radius:3px;text-shadow:none;font-weight:600}.primary{background:linear-gradient(110deg,#f7ebd8,#e6cda7);color:#3f2c2e;border:1px solid #f5e4c2;box-shadow:0 4px 15px #160d153b}.primary:disabled{opacity:.72}.secondary{border:1px solid #c1a2799e;background:#33262da8;color:#f0dfc6}.text-button{min-height:44px;text-decoration:underline;text-underline-offset:.28em;color:#f3e3d1;font-size:.88rem}.error,.no-script{font:1rem/1.6 var(--sans)}.error button,.no-script a{text-decoration:underline}.no-script{position:absolute;bottom:0;background:#240f18;padding:1rem}
.reader{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center}.advance{z-index:0;display:block;padding:0;outline-offset:-5px!important}.advance:focus-visible{outline:2px solid #d5b58a80}.caption{position:relative;z-index:3;width:calc(100% - 22px);pointer-events:none;margin-bottom:max(12px,calc(env(safe-area-inset-bottom,0px) + 8px));background:linear-gradient(124deg,#251a24ef,#37232dea 62%,#30222bee);border:1px solid #d2b487a6;border-radius:5px;box-shadow:0 7px 30px #170e1f52,inset 0 0 0 3px #b3996930;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);padding:18px 20px 3px}.caption:before,.caption:after{content:"";position:absolute;width:5px;height:5px;transform:rotate(45deg);background:#cfb188;top:7px}.caption:before{left:7px}.caption:after{right:7px}.speaker{height:1.25rem;margin:0 0 .23rem;color:#f0d6ae;font:600 .87rem/1.25rem var(--serif);letter-spacing:.12em}.line{font:500 clamp(1.03rem,4.35vw,1.22rem)/1.82 var(--serif);letter-spacing:.044em;line-break:strict;overflow-wrap:anywhere;margin:0;min-height:5.5em;text-shadow:0 1px 3px #1c1119}.caption-inner.show .line{animation:words .24s ease-out both}@keyframes words{from{opacity:.2;transform:translateY(3px)}to{opacity:1;transform:none}}
.read-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:.28rem;border-top:1px solid #d7bd992e}.small-action{pointer-events:auto;display:inline-flex;gap:.4em;align-items:center;min-height:43px;padding:0 2px;color:#e3d1bd;font:500 .87rem var(--sans)}.small-action>span[aria-hidden]{font:1.45rem/1 var(--serif)}.small-action:disabled{opacity:.32}.forward{color:#ffedce}.progress{display:flex;gap:8px;align-items:center;color:#dbc9b7;font:400 .73rem var(--sans);font-variant-numeric:tabular-nums}.progress-track{height:2px;width:33px;background:#b4a19055}.progress-track i{display:block;width:0;height:100%;background:#ddba86;transition:width .3s ease}
.theater[data-mode=read] .shade{opacity:.53}
.end-page{align-items:center;justify-content:center;background:#251824b8;padding:65px 21px max(20px,env(safe-area-inset-bottom));z-index:4}.end-panel{width:100%;max-width:410px;padding:24px 21px 8px;text-align:center;border:1px solid #ddbe8f91;box-shadow:inset 0 0 0 4px #d6bb8e17;background:linear-gradient(145deg,#372731ed,#241b25f5);border-radius:4px}.end-panel .edition{justify-content:center}.end-panel h2{font:500 clamp(1.5rem,6.5vw,2rem)/1.45 var(--serif);margin:.7rem 0 1.05rem;letter-spacing:.085em}.book{display:flex;align-items:center;justify-content:center;gap:1.25rem;text-align:left}.book img{width:clamp(84px,25vw,122px);aspect-ratio:5/8;box-shadow:0 4px 13px #0005;object-fit:cover}.next-chapter,.book-title,.book-info{margin:0}.next-chapter{color:#e2c396;font-size:.82rem;letter-spacing:.17em}.book-title{font-size:clamp(1.15rem,4vw,1.45rem);line-height:1.65;margin:.34rem 0 .8rem}.book-info{line-height:1.6}.end-actions{display:grid;gap:8px;margin:1.25rem 0 .2rem}
@media(max-width:380px){.caption{padding:15px 15px 3px}.cover-actions{gap:7px}.primary{padding:.6rem 1.15rem}.intro-content{padding-left:21px;padding-right:18px}}
@media(max-height:630px) and (orientation:portrait){.intro-content{padding-bottom:14px}h1{font-size:2rem}.subtitle br{display:none}.cover-actions{margin-top:8px}.caption{padding-top:10px}.line{line-height:1.65}}
@media(min-width:700px) and (min-height:650px){.screen{border-inline:1px solid #c0a17b55}.caption{width:calc(100% - 40px);padding:19px 25px 5px;margin-bottom:18px}.intro-content{padding-bottom:34px}.line{min-height:5.4em}}
@media(max-height:550px) and (orientation:landscape){.screen{width:100%;height:100svh;min-height:300px}.controls{top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 8px);left:14px;right:14px}.top-action{min-height:34px}.scenery{right:38%;width:62%}.screen:after{content:"";position:absolute;z-index:-2;inset:0;background:linear-gradient(90deg,transparent 39%,#2c2028 64%)}.cover-page{align-items:center;justify-content:flex-end;background:none}.intro-content{width:46%;padding:45px 17px 8px}.edition{font-size:.67rem}h1{font-size:clamp(1.38rem,5.6vh,1.9rem);margin:.3rem 0}.subtitle{font-size:.76rem;line-height:1.35}.subtitle br{display:none}.chapter-title{margin:.44rem 0 .2rem;font-size:.88rem}.cover-actions{margin:.38rem 0 0}.primary,.secondary{min-height:36px;padding:.4rem .75rem}.reader{justify-content:flex-end;align-items:center}.caption{width:46%;margin:32px 12px 0 0;padding:14px 16px 1px}.line{font-size:1rem;min-height:6rem;line-height:1.68}.small-action{min-height:37px}.end-page{padding:48px 12px 8px}.end-panel{max-width:640px;display:grid;grid-template-columns:1fr 1fr;gap:7px 14px;padding:10px 18px}.end-panel .edition,.end-panel h2{grid-column:1/-1;margin:0}.book{grid-column:1;grid-row:3/5}.book img{width:65px}.book-title{font-size:1rem;line-height:1.35}.end-actions{margin:2px}.end-panel .text-button{min-height:30px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.book-link{display:inline-flex;justify-self:center;align-items:center;min-height:38px;text-decoration:underline;text-underline-offset:.25em;font-size:.9rem;color:#f5dfc4}.end-actions{row-gap:7px}.end-panel>.text-button{margin:0 0 4px}.theater[data-letter=true] .scenery{filter:brightness(.7)}.scenery{transition:filter .5s}
@media(max-height:550px) and (orientation:landscape){.end-actions{row-gap:3px}.book-link{min-height:25px}.end-panel>.text-button{margin:0}}
@media(orientation:portrait),(min-height:551px){
  .still.square-plate{background:#4e393b}
  .still.square-plate:before{content:"";position:absolute;inset:-20px;background:var(--plate) center/cover;filter:blur(20px) brightness(.76)}
  .still.square-plate img{top:clamp(43px,7svh,72px);height:auto;aspect-ratio:1;object-fit:contain;mask-image:linear-gradient(transparent,#000 8%,#000 88%,transparent);-webkit-mask-image:linear-gradient(transparent,#000 8%,#000 88%,transparent)}
}


/* Keep both ends of Auguste's handwritten reminder visible on tall phones. */
@media (max-aspect-ratio: 3/5) {
  .still[data-art$="/ch2-8.avif"]::before {
    content: "";
    position: absolute;
    inset: -14px;
    background: var(--plate) center / cover;
    filter: blur(12px);
  }
  .still[data-art$="/ch2-8.avif"] img {
    top: 38%;
    height: min(100%, 156vw);
    object-position: center;
    transform: translateY(-38%);
    -webkit-mask-image: linear-gradient(transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(transparent, black 5%, black 95%, transparent);
  }
}

/* Fit the complete picture when a wide reading frame would crop a portrait plate. */
@media (max-height: 550px) and (orientation: landscape) {
  .still.story-plate { background: #49383d; }
  .still.story-plate::before {
    content: ""; position: absolute; inset: -16px;
    background: var(--plate) center / cover;
    filter: blur(18px) brightness(.62);
  }
  .still.story-plate img { object-fit: contain; object-position: center; transform: none; }
}
@media (min-width: 650px) and (min-height: 551px) {
  .still.narrow-plate { background: #49383d; }
  .still.narrow-plate::before {
    content: ""; position: absolute; inset: -16px;
    background: var(--plate) center / cover;
    filter: blur(18px) brightness(.62);
  }
  .still.narrow-plate img { object-fit: contain; object-position: center; transform: none; }
}

.reader {
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  justify-items: center;
}
.caption { grid-row: 2; }
.letter-stage {
  pointer-events: none;
  position: relative;
  grid-row: 1;
  align-self: stretch;
  justify-self: stretch;
  margin-top: calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 57px);
  container-type: size;
}
.stationery {
  position: absolute;
  left: 50%;
  top: 60%;
  width: min(86cqw, 90cqh, 388px);
  aspect-ratio: 1.31;
  transform: translate(-50%, -50%) rotate(-2.3deg);
  perspective: 1000px;
  opacity: 1;
  filter: drop-shadow(1px 9px 12px #29152685);
  transition: opacity .36s, translate .5s;
}
.stationery[data-side=hidden] { visibility: hidden; opacity: 0; translate: 0 10px; }
.sheet, .paper { position: absolute; inset: 0; }
.sheet { transform-style: preserve-3d; }
.stationery[data-side=back] .sheet { transform: rotateY(180deg); transition: transform .85s cubic-bezier(.28,.61,.24,1); }
.paper {
  border: 1px solid #c9af89;
  background-color: #f5e7cb;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.front {
  background: #f5e7cb url("remy-letter-face.webp?v=47397ce2a47e") center / cover no-repeat;
}
.back {
  transform: rotateY(180deg);
  background-image: linear-gradient(179deg,#eee0c6,#f6ead1 48%,#e8d6b7 50%,#f9eed8 51%,#eee0c8);
}
@media(max-height:550px) and (orientation:landscape) {
  .reader { display: flex; }
  .letter-stage { position:absolute; inset:0 48% 7px 0; margin-top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 46px); }
  .stationery { top:50%; width:min(90cqw,115cqh,370px); }
}

.theater[data-painted-flip=true] .stationery{animation:uncover .95s ease-in forwards}@keyframes uncover{0%,40%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.theater[data-painted-flip=true] .stationery{opacity:0!important}}

/* A focused control must not scroll the decorative, overscanned background. */
.theater, .screen { overflow: clip; }

/* The three lines follow the cadence of the Japanese title. */
.wedding-title {
  --title-gold: #ffdfa2;
  --title-rose: #ff9caa;
  --title-shadow: drop-shadow(0 1px 1px #211019) drop-shadow(0 3px 6px #170c15b8);
  width: fit-content;
  max-width: 100%;
  margin: .62rem 0 .75rem;
  color: var(--title-gold);
  font-family: var(--serif);
  font-size: clamp(2rem, min(10.15vw, 6.25svh), 4rem);
  font-weight: 600;
  line-height: 1.11;
  letter-spacing: .02em;
  font-feature-settings: "palt";
}
.wedding-title > span { white-space: nowrap; }
.intro-content .title-prelude {
  display: flex;
  align-items: center;
  gap: .34em;
  margin-bottom: .25em;
  color: #efd3a1;
  text-shadow: 0 1px 2px #23121c, 0 2px 8px #251523d9;
  font-size: .58em;
  letter-spacing: .13em;
}
.title-vine {
  width: 4.35em;
  height: .85em;
  overflow: visible;
  color: #dfb879;
}
.title-betrayal,
.title-finale {
  color: var(--title-gold);
  text-shadow: 0 1px 2px #2d121e, 0 3px 8px #190c169c;
}
.wedding-title .title-foil { display: inline-block; }
.wedding-title .title-accent { color: var(--title-rose); }
.title-betrayal small {
  margin: 0 .03em;
  color: #f5d5bd;
  font-size: .63em;
  font-weight: 500;
}
.title-finale {
  padding-left: .40em;
  color: #ffe2c4;
  font-size: 1.05em;
  letter-spacing: .045em;
  line-height: .99;
}
.title-finale em {
  display: inline-block;
  margin-right: .015em;
  color: #f56680;
  font-size: 1.5em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -.03em;
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .wedding-title .title-foil {
    background-image: linear-gradient(180deg, #ffedc1 18%, #f5ca85 52%, #ffe5ab 57%, #deb175 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: var(--title-shadow);
    text-shadow: none;
  }
  .wedding-title .title-accent {
    background-image: linear-gradient(180deg, #ffdfc3 13%, #ff899e 52%, #ffd2bc 56%, #ed8e9c 91%);
  }
  .wedding-title .title-statement {
    background-image: linear-gradient(180deg, #ffc7bc 8%, #ef7b92 40%, #c31d48 53%, #e85877 76%, #a91739 98%);
    -webkit-text-stroke: clamp(.55px, .016em, 1px) #ffe2ae;
  }
  .wedding-title .title-ending {
    background-image: linear-gradient(180deg, #fff0da 17%, #ffd6b7 53%, #ffe6ca 59%, #e3aa99 96%);
  }
}
.cover-page .subtitle {
  color: #fff8fc;
  letter-spacing: .075em;
}
@media (max-height: 630px) and (orientation: portrait) {
  .wedding-title { margin-block: .38rem .48rem; }
  .title-finale em { font-size: 1.42em; }
}
@media (max-height: 550px) and (orientation: landscape) {
  .wedding-title { font-size: clamp(1.28rem, min(4.3vw, 6svh), 1.94rem); margin: .25rem 0; }
  .intro-content .title-prelude { margin-bottom: .14em; }
  .title-finale em { font-size: 1.37em; }
}
@media (forced-colors: active) {
  .wedding-title .title-foil {
    background: none;
    -webkit-text-fill-color: CanvasText;
    -webkit-text-stroke: 0;
    filter: none;
  }
}

.byline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.2rem; }
.credit-link { min-height: 36px; padding: 0; color: #d5c1b2; text-decoration: underline; text-decoration-color: #d5c1b280; text-underline-offset: .24em; font: .8125rem/1.5 var(--sans); }
.end-panel .credit-link { margin-inline: .65rem; }
.music-credits { width: min(25rem, calc(100% - 2rem)); max-height: 86svh; overflow: auto; padding: 1.3rem 1.5rem; color: var(--ink); background: #30232c; border: 1px solid #b79b73; border-radius: .4rem; }
.music-credits::backdrop { background: #201921cc; }
.music-credits form { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.music-credits h2 { margin: 0; font: 500 1.25rem var(--serif); }
.music-credits form button { min-height: 40px; padding: 0 .65rem; border: 1px solid #a38a6b; border-radius: 4px; font-size: .875rem; }
.music-credits h3 { margin: 1rem 0 .25rem; color: #f1daba; font-size: 1rem; }
.music-credits h3 a { display: block; font: .84rem/1.7 var(--sans); }
.music-credits ul { list-style: none; margin: .4rem 0; padding: 0; }
.music-credits li { line-height: 1.75; }
.music-credits a { text-decoration: underline; text-underline-offset: .18em; }
.music-credits p { margin: 1rem 0 0; font: .875rem/1.7 var(--sans); }

/* The cover opens onto a contents leaf; the chapter list stays usable even on a short screen. */
.chapter-title i{width:1px;height:.88em;background:#d6b98d8a}
.cover-actions .primary{gap:1.2em}
.cover-actions .primary .chevron{font-size:1.55em;line-height:1}
.cover-actions{flex-wrap:wrap;gap:0 1rem}.cover-actions .primary{padding-inline:1.05rem;gap:.55em}
#return-label{font-size:inherit;line-height:inherit}
.contents-page{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a38665 #f1e7dc;background:linear-gradient(180deg,#35232c 0,#49333e calc(4.6rem + var(--site-header-inset, env(safe-area-inset-top, 0px))),#e7d6c1 calc(4.64rem + var(--site-header-inset, env(safe-area-inset-top, 0px))),#f6eddf 7rem,#f8f1e7 60%,#efe4d4);color:#432f34;padding:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 84px) clamp(16px,5vw,40px) max(22px,calc(env(safe-area-inset-bottom,0px) + 12px))}
.contents-leaf{max-width:525px;margin:auto;position:relative}
.contents-head{display:flex;align-items:baseline;justify-content:space-between;gap:.7rem;margin:.15rem 0 .35rem;padding:0 .2rem .55rem;border-bottom:2px solid #977650}
.contents-head h2{font:500 clamp(1.75rem,5.9vw,2.4rem)/1.25 var(--serif);letter-spacing:.17em;margin:0}
.contents-head>span{font:500 .84rem var(--serif);letter-spacing:.13em;color:#785d59}
.bookmark{display:grid;width:100%;grid-template-columns:1fr auto auto;align-items:center;gap:.65rem;padding:.7rem .9rem;margin:.78rem 0 .45rem;background:#4c3440;color:#fff6e8;border-radius:.14rem;text-align:left;min-height:45px;font:500 .9rem/1.4 var(--serif);box-shadow:inset 3px 0 #bc9261}
.bookmark small{font:500 .7rem/1.45 var(--sans);color:#ebd3ae}
.bookmark b{font-size:1.2rem;color:#ead1a0;font-weight:400}
.chapter-list{padding:0;margin:0;list-style:none}
.chapter-list li{border-bottom:1px solid #aa8a6b63}
.chapter-entry{display:grid;grid-template-columns:5.1em minmax(0,1fr) 2.5em;gap:.28rem;align-items:center;width:100%;min-height:clamp(48px,6.2svh,60px);padding:.66rem 0 .66rem .2rem;text-align:left;color:#38282d;line-break:strict}
.chapter-entry:hover,.chapter-entry:focus-visible{background:#ddcfbd50}
.chapter-entry:focus-visible,.bookmark:focus-visible{outline-color:#9b613e;outline-offset:-2px}
.chapter-entry>small{color:#8b6643;font:600 .75rem/1.3 var(--serif);letter-spacing:.065em}
.chapter-entry>span:nth-child(2){font:500 clamp(.93rem,3.7vw,1.1rem)/1.52 var(--serif);letter-spacing:.015em}
.entry-mark{text-align:right;padding-right:.35rem;color:#a28467;font-size:1.3rem}
.entry-mark.finished{font:500 .67rem var(--sans);color:#6e5b49}
#chapter-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.reader-tools{display:flex;align-items:center;justify-content:space-between;gap:.6rem;color:#d7bd9d;border-bottom:1px solid #d7bd9938;font:500 .7rem/1.35 var(--sans);margin:-7px 0 .45rem;letter-spacing:.025em}
.reader-tools>div{flex:none;display:flex;align-items:center;gap:3px}
.reader-tools button{pointer-events:auto;min-height:36px;padding:2px .26rem;color:#efddc5;font:500 .73rem var(--sans)}
.reader-tools button[aria-pressed=true]{color:#ffe6a7}
#auto span{font:600 .62rem var(--sans)}
.auto-speed-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 39px;
  min-height: 36px;
  pointer-events: auto;
  color: #c6b5a3;
  font: 500 .66rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.auto-speed-control::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.auto-speed-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  appearance: none;
  font-size: 16px;
  cursor: pointer;
}
.auto-speed-control:focus-within { outline: 2px solid #ffdb98; outline-offset: -2px; }
.chapter-heading {
  position: absolute;
  z-index: 1;
  top: calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 62px);
  left: 0;
  max-width: min(94%, 31rem);
  padding: .42rem 1.45rem .58rem clamp(16px, 4.5vw, 29px);
  background: linear-gradient(90deg, #231920dd 4%, #2d2025c9 66%, transparent);
  color: #fff7e7;
  text-shadow: 0 1px 3px #281b22;
  pointer-events: none;
}
.chapter-heading>span {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #efd5aa;
  font: 500 .66rem/1.45 var(--serif);
  letter-spacing: .14em;
}
.chapter-heading>span::after { content: ""; width: 1.55rem; height: 1px; background: #d6b27b; }
.chapter-heading h2 {
  margin: .18rem 0 0;
  font: 500 clamp(.98rem, 3.8vw, 1.3rem)/1.5 var(--serif);
  letter-spacing: .07em;
  text-wrap: balance;
}
.read-controls { position: relative; }
button.progress {
  pointer-events: auto;
  min-height: 43px;
  padding-inline: 8px;
  border-radius: 2px;
}
.page-seek {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  width: min(100%, 24rem);
  padding: .62rem .9rem .3rem;
  pointer-events: auto;
  background: #30232b;
  border: 1px solid #a68a66;
  border-radius: 5px;
  box-shadow: 0 5px 18px #140d1590;
  font: 500 .78rem/1.3 var(--sans);
}
.seek-head, .seek-controls { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.seek-head output { color: #e2c6a3; font-variant-numeric: tabular-nums; }
.seek-controls input { min-width: 0; flex: 1; height: 38px; margin: 0; accent-color: #dbb783; cursor: pointer; }
#seek-go { min-width: 40px; min-height: 38px; padding: 0 .2rem; color: #f1dcbb; font: inherit; }
#chapter-reward { margin-top: .85rem; }
@media(max-height:550px) and (orientation:landscape) {
  .chapter-heading { top: calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 49px); max-width: 49%; }
  .chapter-heading h2 { font-size: .94rem; }
}
[data-mode=end] #end-title{font-size:clamp(1.23rem,5vw,1.58rem);text-wrap:balance}
.reader-notice{position:absolute;left:50%;transform:translateX(-50%);z-index:12;top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 66px);width:max-content;max-width:calc(100% - 26px);padding:.55rem .82rem;border:1px solid #b9966c;border-radius:.25rem;box-shadow:0 4px 16px #25171b55;background:#33232bf5;color:#fff4df;font:500 .83rem/1.5 var(--sans)}
.reader-notice button{margin-left:.5rem;text-decoration:underline;text-underline-offset:.2em;min-height:32px}
.log-dialog{width:min(32rem,calc(100% - 24px));padding:0;overflow:hidden}
.log-dialog form{padding:14px 16px 10px;border-bottom:1px solid #cfb59155}
#log-chapter{margin:0 0 .15rem;color:#e0c29a;font:.74rem var(--sans)}
#log-list{list-style:none;max-height: min(62vh,550px);max-height:min(62svh,550px);overflow:auto;overscroll-behavior:contain;margin:0;padding:0 16px 10px}
#log-list li+li{border-top:1px solid #a78d743d}
#log-list button{display:grid;gap:.25rem;width:100%;padding:.72rem .3rem;text-align:left;color:#f7e9df;line-height:1.75}
#log-list button small{color:#d3b591;font:.72rem/1.5 var(--sans)}
#log-list button[aria-current]{background:#6b4e504f}
.score-list{color:#e3c8a8;line-height:1.85!important}
@media(max-width:380px){
  .chapter-entry{grid-template-columns:4.45em minmax(0,1fr) 1.85em}
  .reader-tools{gap:.25rem;margin-top:-4px}
}
@media(max-height:550px) and (orientation:landscape){
  .contents-page{padding-top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 51px);background:linear-gradient(#3c2934 calc(43px + var(--site-header-inset, env(safe-area-inset-top, 0px))),#f4ecdd calc(46px + var(--site-header-inset, env(safe-area-inset-top, 0px))));padding-bottom:12px}
  .contents-leaf{max-width:735px}
  .contents-head{padding-bottom:.25rem}
  .contents-head h2{font-size:1.28rem}
  .chapter-list{columns:2;column-gap:1.5rem}
  .chapter-list li{break-inside:avoid}
  .chapter-entry{min-height:42px;padding:.35rem .2rem;grid-template-columns:4.5em 1fr 1.8em}
  .chapter-entry>span:nth-child(2){font-size:.87rem}
  .reader-tools{margin-bottom:.2rem}
  .reader-tools button{min-height:31px}
  .end-page .end-panel{display:block;max-height:100%;overflow:auto}
  .end-page #original .book{display:none}
  .end-page #original .end-actions{grid-template-columns:1fr 1fr}
  .end-page #original .book-link{grid-column:1/-1}
}
@media(max-height:610px) and (orientation:portrait){
  .cover-page{align-items:safe flex-end}
  .contents-page{padding-top:calc(var(--site-header-inset, env(safe-area-inset-top, 0px)) + 69px)}
  .reader-tools button{min-height:31px}
}
