/* おさるの寄り道ノート。本文の可読サイズは readability.css から維持する。 */
#course-dialog{border:2px solid #9b8764;border-radius:15px 24px 22px 14px;background:#fff8e8;box-shadow:0 5px 0 #e6d9b9,0 7px 0 #a18d6a,0 11px 0 #f1e4c7,0 13px 0 #a18d6a,0 28px 65px #203e4566;max-height:calc(100dvh - 68px)}
#course-dialog[open]{grid-template-columns:minmax(0,1fr) minmax(0,1fr);animation:open-notebook .4s cubic-bezier(.2,.8,.25,1)}
#course-dialog::backdrop{background:#203e4577;backdrop-filter:blur(5px)}
.book-toolbar{grid-column:1 / -1;display:flex;align-items:center;gap:20px;padding:12px 16px 12px 32px;background:#fff8e8;border-bottom:1px solid #cab994;position:sticky;top:0;z-index:5;min-width:0}
.book-toolbar p{margin:0;font-size:16px;letter-spacing:.08em}.book-toolbar p span{margin-left:6px;font-size:20px}
#book-page{margin-left:auto;color:#65766a;font-size:15px;white-space:nowrap;letter-spacing:.08em}
#course-dialog .close{position:static;width:48px;height:48px;background:#fff9ea;border:1.5px solid #99876b;box-shadow:2px 3px 0 #d9cbaa;flex-shrink:0}
#course-dialog .course-art{position:relative;justify-content:flex-start;padding:34px 36px 22px;gap:24px;min-height:0;border-radius:0 0 0 12px;border-right:1px solid #bfac83;background:linear-gradient(90deg,transparent 96%,#b4a07424),radial-gradient(ellipse at 25% 5%,color-mix(in srgb,var(--roof) 17%,#fff7e2),#fff4da 78%)}
.course-art:after{content:'';position:absolute;right:5px;top:0;bottom:0;width:1px;background:#bdac852e;pointer-events:none}
.story-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;color:#3b584b}
#story-title{font-size:30px;line-height:1.65;margin:0;white-space:pre-line;letter-spacing:.025em;text-wrap:balance}
.story-icon{display:grid;place-items:center;width:74px;height:74px;flex-shrink:0;transform:rotate(9deg);border:2px solid var(--roof);border-radius:40% 52% 45% 48%;color:var(--ink);background:#fff8e4;box-shadow:3px 4px 0 color-mix(in srgb,var(--roof) 30%,transparent)}
.story-icon svg{width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.course-postcard{margin:2px 7px 0;width:calc(100% - 14px);position:relative;padding:9px 9px 13px;background:#fffcf3;box-shadow:0 3px 9px #72644929;transform:rotate(-2deg);border:1px solid #dbcdb0}
.course-postcard:before,.course-postcard:after{content:'';position:absolute;z-index:1;top:-10px;width:68px;height:24px;background:#decf9ebd;border-left:2px dotted #fff8e075;border-right:2px dotted #fff8e075;transform:rotate(-12deg)}
.course-postcard:before{left:6px}.course-postcard:after{right:3px;transform:rotate(21deg)}
#course-dialog .course-art img{border:0;border-radius:0;box-shadow:none;width:100%;height:auto;aspect-ratio:auto}
#course-dialog .image-note{font-size:14px;line-height:1.6;margin:10px 0 0;color:#617264;letter-spacing:.02em}
.osaru-note{position:relative;display:flex;align-items:center;width:100%;margin-top:5px;min-height:154px}
.note-mascot{flex-shrink:0;width:146px;height:146px;margin-left:-20px;margin-right:-1px;position:relative;z-index:2;transform:rotate(-5deg);filter:drop-shadow(0 5px 2px #725c5120)}
.note-balloon{position:relative;flex:1;min-width:0;background:#fffdf5;border:2px solid #a6926f;border-radius:32px 28px 32px 11px;padding:19px 22px;box-shadow:3px 5px 0 #c2ae812d}
.note-balloon:before{content:'';width:18px;height:18px;background:#fffdf5;position:absolute;left:-11px;top:44%;border-left:2px solid #a6926f;border-bottom:2px solid #a6926f;transform:rotate(45deg) skew(9deg,9deg)}
.note-speaker{font-size:14px;color:#7b613f;display:block;margin-bottom:6px}
#course-quote{font-size:20px;line-height:1.8;margin:0;position:relative}
.page-foot{font-size:13px;letter-spacing:.1em;margin-top:auto;color:#69745f}
#course-dialog .course-details{padding:36px 40px 26px;justify-content:center;background:linear-gradient(90deg,#c4b49622,transparent 16px);position:relative}
#course-dialog .course-details .eyebrow{font-size:15px;color:#4a6252;margin-bottom:20px;padding-bottom:12px;border-bottom:2px dashed color-mix(in srgb,var(--roof) 50%,#e6dcc4)}
#course-title{font-size:34px;line-height:1.5;margin-bottom:18px;text-wrap:pretty}
#course-dialog #course-teacher{font-size:18px;line-height:1.7;margin-bottom:28px}
.course-description-wrap{position:relative;border-left:3px solid color-mix(in srgb,var(--roof) 70%,#fff3d9);padding-left:18px;margin-bottom:30px}
#course-dialog #course-description{font-size:22px;line-height:1.85;margin-bottom:0}
#course-dialog .primary{border-radius:5px 14px 14px 5px;box-shadow:4px 4px 0 #d9c9a1;position:relative;padding:18px 23px;font-size:20px;min-height:62px}
#course-dialog .primary:before{content:'';position:absolute;left:-4px;top:10px;bottom:10px;border-left:1px solid #fff8e466}
#course-dialog .back-button{margin-top:19px}
#course-dialog .course-details small{margin-top:12px}
#toast.course-greeting{width:min(540px,calc(100vw - 56px));max-width:none;left:auto;right:28px;bottom:146px;transform:none;background:none;border:0;border-radius:0;padding:0;box-shadow:none;display:flex;align-items:flex-end;text-align:left;pointer-events:none;animation:greeting-in .38s cubic-bezier(.15,.8,.3,1)}
.greeting-mascot{width:110px;height:110px;flex-shrink:0;position:relative;z-index:2;margin-right:-5px;filter:drop-shadow(0 4px 1px #4d57452e);transform:rotate(-7deg)}
.greeting-balloon{position:relative;min-width:0;flex:1;padding:18px 22px 20px;background:#fffbed;border:2px solid #8e805f;border-radius:27px 24px 26px 6px;box-shadow:4px 6px 0 #586d4733}
.greeting-balloon:before{content:'';position:absolute;left:-11px;bottom:34px;width:18px;height:18px;transform:rotate(45deg);background:#fffbed;border-left:2px solid #8e805f;border-bottom:2px solid #8e805f}
.greeting-heading{display:flex;gap:9px;align-items:center;color:#486450;font-size:15px;line-height:1.55;border-bottom:1px dashed #c7b590;padding-bottom:9px;margin-bottom:9px}
.greeting-heading svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.greeting-balloon p{font-size:20px;line-height:1.75;margin:0}
@keyframes open-notebook{from{opacity:0;transform:translateY(18px) rotate(-.7deg) scale(.97)}to{opacity:1;transform:none}}
@keyframes greeting-in{from{opacity:0;translate:0 12px;scale:.96}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:1050px) and (min-width:701px){
 #course-dialog .course-art{padding:28px 24px 20px}#course-dialog .course-details{padding:30px 27px 24px}
 #story-title{font-size:25px}.story-icon{width:56px;height:56px}.story-icon svg{width:34px;height:34px}
 .osaru-note{align-items:flex-end}.note-mascot{width:98px;height:98px;margin-left:-16px}.note-balloon{padding:16px}#course-quote{font-size:19px}
}
@media(max-width:700px){
 #course-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 44px);border-radius:12px 18px 18px 12px}
 #course-dialog[open]{display:block}
 .book-toolbar{padding:9px 10px 9px 17px;gap:9px;min-height:64px}.book-toolbar p{font-size:13px;letter-spacing:0}.book-toolbar p span{font-size:17px;display:block;margin:1px 0 0}
 #book-page{font-size:12px;letter-spacing:0}#course-dialog .close{width:44px;height:44px;font-size:28px}
 #course-dialog .course-art{padding:23px 21px 22px;gap:23px;border-right:0;border-bottom:1px solid #cab58e;border-radius:0;background:radial-gradient(ellipse at 20% 5%,color-mix(in srgb,var(--roof) 17%,#fff7e2),#fff4da)}
 .course-art:after{display:none}.story-heading{gap:10px}#story-title{font-size:25px;line-height:1.6;letter-spacing:0}.story-icon{width:56px;height:56px;border-width:1.5px}.story-icon svg{width:32px;height:32px}
 .course-postcard{margin:0 4px;width:calc(100% - 8px);padding:7px 7px 10px}.course-postcard:before,.course-postcard:after{width:51px;height:19px;top:-8px}
 #course-dialog .image-note{font-size:12px;margin-top:8px}
 .osaru-note{min-height:0;margin-top:0;align-items:flex-end}.note-mascot{width:92px;height:92px;margin-left:-18px;margin-right:-1px;margin-bottom:2px}
 .note-balloon{padding:16px 17px;border-radius:25px 24px 25px 8px;border-width:1.5px}.note-balloon:before{border-width:1.5px;left:-10px;width:17px;height:17px;top:auto;bottom:36px}
 .note-speaker{font-size:13px;margin-bottom:5px}#course-quote{font-size:19px;line-height:1.8}.page-foot{display:none}
 #course-dialog .course-details{padding:26px 24px 24px;background:#fff8e8}
 #course-dialog .course-details .eyebrow{font-size:14px;margin-bottom:17px;padding-bottom:11px}
 #course-dialog #course-title{font-size:28px;line-height:1.5;margin-bottom:16px}
 #course-dialog #course-teacher{font-size:16px;margin-bottom:22px}
 .course-description-wrap{padding-left:15px;margin-bottom:26px}#course-dialog #course-description{font-size:19px;line-height:1.85}
 #course-dialog .primary{font-size:18px;line-height:1.6;padding:16px 18px;min-height:60px}#course-dialog .back-button{margin-top:17px}
 #toast.course-greeting{width:calc(100vw - 26px);left:13px;right:auto;bottom:140px;align-items:flex-end}
 .greeting-mascot{width:76px;height:76px;margin-left:-7px;margin-right:-1px;margin-bottom:4px}
 .greeting-balloon{padding:14px 16px 16px;border-width:1.5px;border-radius:23px 22px 24px 7px}.greeting-balloon:before{left:-10px;border-width:1.5px;width:17px;height:17px;bottom:26px}
 .greeting-heading{font-size:13px;gap:7px;margin-bottom:7px;padding-bottom:7px}.greeting-heading svg{width:21px;height:21px}.greeting-balloon p{font-size:18px;line-height:1.75}
}
@media(max-width:360px){
 #course-dialog .course-art{padding-left:17px;padding-right:17px}#story-title{font-size:23px}.story-icon{width:46px;height:46px}.story-icon svg{width:28px;height:28px}
 .note-mascot{width:70px;height:70px;margin-left:-14px}.note-balloon{padding:14px 15px}#course-quote{font-size:18px}
 #course-dialog .course-details{padding-left:21px;padding-right:21px}#course-dialog #course-title{font-size:27px}
 .greeting-mascot{width:60px;height:60px}.greeting-balloon{padding:13px 14px}.greeting-balloon p{font-size:17px}
}
@media(max-height:650px){#toast.course-greeting{bottom:98px}.greeting-mascot{width:66px;height:66px}.greeting-balloon{padding:12px 16px}.greeting-heading{padding-bottom:5px;margin-bottom:6px}.greeting-balloon p{font-size:17px}}
@media(prefers-reduced-motion:reduce){#course-dialog[open],#toast.course-greeting{animation:none}}
