:root{color:#29483e;background:#f8f7f0;font:15px/1.7 'Yu Gothic',Meiryo,sans-serif}*{box-sizing:border-box}body{margin:0}header{padding:18px 4vw;border-bottom:1px solid #d9dfd2;display:flex;align-items:center;justify-content:space-between;background:#fffdf7;gap:15px}header>a{font:25px serif;letter-spacing:.1em}header small{font:10px sans-serif;display:block;letter-spacing:0}a{color:inherit}nav{display:flex;gap:10px;align-items:center;font-size:12px}button,.primary,select,input,textarea{font:inherit;color:inherit}button,a.primary{border:1px solid #cbd5c5;border-radius:5px;background:#fffdf8;padding:10px 16px;cursor:pointer;min-height:44px}button:disabled{opacity:.45;cursor:default}.primary{background:#48654f;color:#fff;border:0}button:hover:not(:disabled){background:#e5ecdc}button.primary:hover{background:#36573f}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #a87949;outline-offset:2px}#notice{position:sticky;top:0;background:#e6eadb;margin:0;padding:0 4vw;z-index:20}#notice:not(:empty){padding:12px 4vw}main{max-width:1450px;margin:auto;padding:30px 4vw 70px}h1,h2{font-family:serif;font-weight:400}h1{font-size:30px}h2{font-size:23px}h1 small,h2 small{font:12px sans-serif}input,textarea,select{display:block;width:100%;padding:10px;border:1px solid #c9d2c0;border-radius:5px;background:white;margin:7px 0 16px}textarea{resize:vertical}label{display:block;font-size:13px}.check{display:flex;align-items:start;gap:10px}.check input{width:auto;margin:7px}.panel{background:#fffdf8;padding:24px;border:1px solid #dce0d4;border-radius:8px;margin:18px 0}.panel p,.panel small{font-size:12px}.panel small{display:block}.login{max-width:500px;margin:40px auto}.eyebrow{font-size:10px;letter-spacing:.2em}.library{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.library button{display:block;margin-top:18px}.stats{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;margin-bottom:25px}.manage{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:30px}.spread{display:flex;justify-content:center;background:#e6eadb;padding:20px;min-width:0;gap:1px}.paper{position:relative;background:#fffef9;aspect-ratio:210/297;width:50%;overflow:hidden;box-shadow:1px 4px 10px #0001;flex-shrink:0}.cover>img{width:100%;height:100%;position:absolute;inset:0;object-fit:fill}.coverText{position:absolute;left:14%;right:14%;top:43%;height:35%;display:flex;flex-direction:column;justify-content:center;text-align:center;font-family:serif;gap:10px}.coverText h2{font-size:clamp(12px,1.5vw,22px);line-height:1.6;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.coverText small{font-size:10px}.inside{display:flex;flex-direction:column;padding:5%;gap:4%}.message{height:48%;display:flex;flex-direction:column;min-height:0}.message>img{width:100%;height:59%;object-fit:contain;background:#eeeee5;flex-shrink:0}.message>p{font-size:clamp(8px,.85vw,12px);line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;margin:7px 0}.message>small{font-size:8px;text-align:right;margin-top:auto}.noPhoto{height:55%;display:flex;justify-content:center;align-items:center;background:#f0f1e6;font:italic 12px serif}.end{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10%;text-align:center}.end h2{font-size:clamp(14px,2vw,26px)}.end img{width:100%;filter:brightness(0)}.pager{display:flex;align-items:center;justify-content:center;gap:20px;margin:15px 0;font-size:12px}.postRow{display:grid;grid-template-columns:42px 90px minmax(80px,1fr) 45px 52px 64px;gap:8px;align-items:center;padding:12px 0;border-bottom:1px solid #dce2d4;font-size:11px}.postRow img{width:40px;height:40px;object-fit:cover}.postRow p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.postRow button{font-size:10px;padding:5px;min-height:38px}.postRow strong{overflow-wrap:anywhere}.adminTable .postRow{grid-template-columns:1fr 1fr 45px 1fr 60px}.adminTable span{overflow-wrap:anywhere}.guestGrid{display:grid;grid-template-columns:1fr 1fr;gap:35px;align-items:start}.guestPreview .paper{width:100%;padding:5%;max-width:520px}.guestPreview .message p{font-size:14px}.guestPreview .message small{font-size:11px}.sample{position:relative}.sample:after{content:'SAMPLE';position:absolute;bottom:0;right:0;font-size:10px;background:#fff9;padding:3px}.guestPreview .message>img{height:60%}dialog{border:1px solid #d7ddce;border-radius:9px;max-width:500px;width:calc(100% - 30px);padding:28px;background:#fffdf8;color:#29483e}dialog::backdrop{background:#20302799}summary{cursor:pointer;min-height:44px}details form{margin-top:20px}.printBook .paper{width:210mm;height:297mm;aspect-ratio:auto;margin:12mm auto;padding:12mm;box-shadow:none}.printBook .cover{padding:0}.printBook .message p{font-size:12pt}.printBook .message small{font-size:10pt}.printBook .coverText h2{font-size:24pt}.printBook .coverText small{font-size:12pt}.sizeB5 .paper{width:182mm;height:257mm}.sizeA5 .paper{width:148mm;height:210mm}.sizeA5 .message p{font-size:10pt}.sizeA5 .message small{font-size:9pt}.sizeA5 .coverText h2{font-size:18pt}@media(max-width:900px){.manage{grid-template-columns:1fr}.manage aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}.library{grid-template-columns:1fr 1fr}.postRow{grid-template-columns:40px 65px minmax(50px,1fr) 40px 48px 54px}.spread{padding:12px}.message>p{font-size:11px}}@media(max-width:600px){header{align-items:start}header>a{font-size:20px}nav{flex-wrap:wrap;justify-content:end;max-width:190px;gap:5px}nav button,nav a{font-size:10px;padding:7px}main{padding:20px 15px 50px}h1{font-size:25px}.library,.guestGrid{grid-template-columns:1fr}.panel{padding:18px}.manage aside{display:block}.guestGrid{gap:10px}.postRow{grid-template-columns:32px 55px minmax(50px,1fr) 40px 44px 48px;gap:4px}.postRow img{width:30px;height:30px}.postRow button{font-size:9px;padding:3px}.spread .message p{font-size:7px}.spread .message small{font-size:6px}.spread .coverText small{font-size:6px}.spread .inside{padding:4%}.printBook{overflow:auto}.printBook .paper{margin:15px 0}.adminTable .postRow{grid-template-columns:1fr 1fr 40px}.guestPreview .message p{font-size:12px}.guestPreview .message small{font-size:9px}}
@page a4{size:216mm 303mm;margin:3mm}@page b5{size:188mm 263mm;margin:3mm}@page a5{size:154mm 216mm;margin:3mm}@media print{html,body{margin:0;background:white}header,#notice,.noPrint,dialog{display:none!important}main{margin:0;padding:0;max-width:none}.printBook .paper{break-after:page;break-inside:avoid;margin:0;box-shadow:none}.sizeA4 .paper{page:a4}.sizeB5 .paper{page:b5}.sizeA5 .paper{page:a5}*{print-color-adjust:exact;-webkit-print-color-adjust:exact}.printBook .message>img{object-fit:contain}.printBook{overflow:visible}}

[hidden]{display:none!important}


.manage .spread .paper{width:min(50%,calc(max(280px,100dvh - 370px)*.7071))}.manage>section>h1{margin:12px 0}.spread{align-items:flex-start}@media(max-width:600px){.manage .spread .paper{width:50%}}

[data-guest-font=sans] p{font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif}[data-guest-font=serif] p{font-family:"Yu Mincho","Hiragino Mincho ProN",serif}[data-guest-font=hand] p{font-family:"UD Digi Kyokasho N-R","Hiragino Maru Gothic ProN","Yu Mincho",serif}
@font-face{font-family:KnYomogi;src:url("studio/assets/yomogi.woff") format("woff");font-style:normal;font-weight:400;font-display:swap}[data-guest-font=hand] p{font-family:KnYomogi,"UD Digi Kyokasho N-R",serif}

.postVideo,#guestVideoPreview{width:100%;max-height:260px;object-fit:contain;background:#eee}.message:has(.postVideo)>img{display:none}.video-editor{padding:14px;border:1px solid #ddd}.video-editor video,.video-editor img{width:100%;max-height:240px;object-fit:contain}.captureButtons{display:flex;gap:12px}.captureLabel{border:1px solid #aab;padding:10px;cursor:pointer}.captureLabel input{max-width:180px}.aiHistoryRow{padding:10px 0;display:flex;justify-content:space-between;gap:10px}@media print{.postVideo{display:none!important}.message:has(.postVideo)>img{display:block!important}}
@media screen and (max-width:600px){.spread>.paper{width:100%;max-width:520px}.spread .message>img,.spread .message>.postVideo{height:50%;max-height:none;flex-shrink:0}.spread .message p{font-size:11px;line-height:1.5;margin:4px 0}.spread .message small{font-size:9px}.spread .coverText small{font-size:10px}.spread .coverText h2{font-size:16px}.postRow{grid-template-columns:32px 55px minmax(0,1fr) 40px 40px 44px;min-width:0}.postRow>p{min-width:0}}
@media print{.printBook .paper:last-child{break-after:auto;page-break-after:auto}body>main{padding:0!important;margin:0!important}.printBook{display:flow-root}}
.pdfDownload{display:inline-block;background:#48654f;color:white;padding:10px 16px;border-radius:5px;margin-top:10px;text-decoration:none;min-height:44px}

.coverText-top{top:8%}.coverText-middle{top:43%}.coverText-bottom{top:60%}.coverText{height:35%;justify-content:space-between;gap:0}.coverText h2{max-height:60%}

/* Keep message thumbnails readable without changing the operations table. */
#postList .postRow{grid-template-columns:72px 90px minmax(0,1fr) 45px 52px 64px}
#postList .postRow>img{width:72px;height:72px;object-fit:contain;background:#eeeee5;border-radius:4px}
@media screen and (max-width:600px){
 #postList .postRow{grid-template-columns:64px minmax(0,1fr) auto auto;gap:3px 10px;padding:12px 0;font-size:12px}
 #postList .postRow>img,#postList .postRow>span:first-child{grid-column:1;grid-row:1 / 4;align-self:center;width:64px;height:64px}
 #postList .postRow>strong{grid-column:2 / 5;grid-row:1;line-height:1.4}
 #postList .postRow>p{grid-column:2 / 5;grid-row:2;line-height:1.5}
 #postList .postRow>small{grid-column:2;grid-row:3;font-size:11px}
 #postList .postRow>[data-edit]{grid-column:3;grid-row:3}
 #postList .postRow>[data-hide]{grid-column:4;grid-row:3}
 #postList .postRow>button{font-size:11px;min-height:44px;padding:5px 8px}
}

/* A single phone page must override the more specific desktop width rule. */
@media screen and (max-width:600px){.manage .spread>.paper,.spread>.paper{width:100%;max-width:none}.spread{padding:8px;gap:0}.manage{gap:16px}.manage>section{min-width:0}header{padding:12px 15px;gap:8px}header nav{gap:4px}header nav button{min-height:36px}main>section>h1{font-size:22px;line-height:1.5;margin:16px 0}.stats{gap:6px 16px;margin-bottom:16px}.pager{gap:14px;margin:10px 0}.spread .paper.inside{padding:4%}.spread .message p{font-size:clamp(11px,3.2vw,15px)}}

#mailBookPreview{display:block;width:100%;height:auto;margin-top:16px}#mailBookPreview[hidden]{display:none}
.libraryBook{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:8px 16px;align-content:start}
.libraryBook>h2,.libraryBook>p,.libraryBook>small,.libraryBook>button{grid-column:1;margin:0;overflow-wrap:anywhere}
.libraryBook>button{justify-self:start;margin-top:10px}
.libraryCover.paper{grid-column:2;grid-row:1 / 7;width:120px;align-self:center;pointer-events:none}
.libraryCover .coverText h2{font-size:8px;line-height:1.4}.libraryCover .coverText small{font-size:5px}
.organizerSteps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:22px 0 14px;width:100%;max-width:none;justify-content:stretch}
.organizerSteps button{font-size:12px;padding:10px 6px}
.organizerSteps [aria-current=step]{background:#48654f;color:#fff}
.organizerStep{padding:18px;border:1px solid #dce0d4;border-radius:8px;background:#fffdf8}
.organizerStep[hidden]{display:none}.organizerStep>h2{font-size:22px;margin:0 0 14px}
.organizerStep>.panel{margin:12px 0}.organizerContinue{display:flex;justify-content:space-between;gap:12px;margin:16px 0}
.organizerBook .spread{position:relative;perspective:1800px;isolation:isolate;overflow:hidden}
.organizerBook .spread>.paper{width:min(50%,calc(max(280px,100dvh - 300px)*.7071))}
.organizerBook .spread>.turningLeaf{position:absolute;top:20px;right:20px;transform-origin:left center;backface-visibility:hidden;z-index:3;pointer-events:none}
@media screen and (max-width:600px){
 .libraryBook{grid-template-columns:minmax(0,1fr) 112px;padding:16px;gap:8px 12px}.libraryCover.paper{width:112px}
 .libraryBook>h2{font-size:19px;line-height:1.5}.libraryBook>p,.libraryBook>small{font-size:12px}
 .organizerSteps{grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0 10px}.organizerSteps button{font-size:11px}
 .organizerStep{padding:14px}.organizerStep>.panel{padding:12px}
 .organizerBook .spread>.paper{width:100%;max-width:none}.organizerBook .spread>.turningLeaf{top:8px;right:8px;width:calc(100% - 16px)}
}

#postList .postOrder{grid-column:2 / -1;display:flex;gap:8px;justify-content:flex-end}#postList .postOrder button{font-size:11px;min-height:40px;padding:5px 10px}@media screen and (max-width:600px){#postList .postOrder{grid-row:4}#postList .postOrder button{min-height:44px}}

.loginMailHelp{padding:12px;border:1px solid #dce0d4;border-radius:6px;background:#edf0e5;margin:16px 0}.loginMailHelp summary{font-size:13px}.loginMailHint{font-size:12px!important;overflow-wrap:anywhere}
