.ilst-library, .ilst-reader { --ilst-ink: #193d36; --ilst-sub: #4d655c; color: var(--ilst-ink); }
.ilst-home, .ilst-toolbar button { display: inline-flex; align-items: center; min-height: 44px; color: var(--ilst-ink); font-weight: 900; }
.ilst-home { text-decoration: underline; text-decoration-color: #bccab9; text-underline-offset: 4px; }
.ilst-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 12px 0 24px; }
.ilst-header h1, .ilst-text h1 { font-weight: 1000; line-height: 1.07; letter-spacing: -.045em; text-wrap: balance; }
.ilst-header h1 { font-size: clamp(2.25rem, 5.5vw, 4.1rem); }
.ilst-header p { color: var(--ilst-sub); margin-top: 8px; font-size: 1.08rem; }
.ilst-count { flex: none; color: var(--ilst-sub); font-size: .94rem; }
.ilst-shelf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.1vw, 26px); }
.ilst-shelf li { min-width: 0; }
.ilst-book { border-radius: 16px; height: 100%; width: 100%; padding: 0; display: flex; flex-direction: column; text-align: start; overflow: hidden; color: var(--ilst-ink); border: 1px solid #cbd8c9; background: #fffdf6; box-shadow: 0 4px 0 #dce3d4; transition: transform .15s; }
.ilst-book:hover { transform: translateY(-3px); }
.ilst-book-copy { width: 100%; flex: 1; padding: 13px 18px 17px; display: flex; flex-direction: column; align-items: start; gap: 5px; }
.ilst-location { color: var(--ilst-sub); font-size: .87rem; font-weight: 850; }
.ilst-book-copy strong { font-weight: 1000; font-size: clamp(1.2rem, 2.2vw, 1.65rem); line-height: 1.18; letter-spacing: -.025em; margin-bottom: 6px; }
.ilst-book-action { color: #28604b; font-weight: 950; margin-top: auto; }
.ilst-storage { color: var(--ilst-sub); font-size: .88rem; margin-top: 22px; }
.ilst-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-bottom: 14px; }
.ilst-toolbar span { color: var(--ilst-sub); font-size: .94rem; }
.ilst-toolbar button, .ilst-turn button, .ilst-choices button { min-height: 46px; border: 1px solid #b6c8b4; background: #fffef7; border-radius: 12px; color: var(--ilst-ink); padding: 9px 16px; font-weight: 850; }
.ilst-toolbar button:hover, .ilst-turn button:hover:enabled, .ilst-choices button:hover:enabled { background: #edf4e4; }
.ilst-spread { display: grid; grid-template-columns: 1fr 1.06fr; overflow: hidden; background: #fffcf2; border: 1px solid #cbd8c9; border-radius: 21px; box-shadow: 0 5px 0 #dce3d4; }
.ilst-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(23px, 3.7vw, 50px); }
.ilst-text h1 { margin: 12px 0 14px; font-size: clamp(1.9rem, 3.8vw, 3.35rem); }
.ilst-prose { font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 650; line-height: 1.55; }
.ilst-word { margin: 20px 0 0; padding: 0 12px; background: #eaf1db; color: #375445; border-radius: 10px; align-self: start; }
.ilst-word summary { padding: 10px 0; font-size: .94rem; }
.ilst-word p { padding: 0 0 12px; }
.ilst-turn { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: clamp(20px, 4vw, 40px); }
.ilst-turn .ilst-primary { background: #245b46; color: #fffdf6; border-color: #245b46; }
.ilst-turn .ilst-primary:hover:enabled { background: #194732; }
.ilst-turn button:disabled { color: #6c776e; background: #f0f0e7; border-color: #dce1d4; }
.ilst-ending .ilst-text h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
.ilst-choices { display: grid; gap: 9px; }
.ilst-choices button { text-align: start; }
.ilst-choices [data-result="retry"] { background: #fff2d2; border-color: #a77822; }
.ilst-choices [data-result="correct"] { background: #e1f3d8; border-color: #609265; }
.ilst-feedback { color: var(--ilst-ink); font-weight: 800; margin-top: 14px; }
.ilst-feedback:empty { margin: 0; }

.ilst-art { position: relative; width: 100%; overflow: hidden; isolation: isolate; container-type: inline-size; background: var(--scene, #bddfd7); }
.ilst-book .ilst-art { aspect-ratio: 1.95; border-bottom: 1px solid #263b361c; }
.ilst-spread .ilst-art { min-height: 360px; }
.ilst-setting, .ilst-cast, .ilst-props, .ilst-props i { pointer-events: none; position: absolute; }
.ilst-setting { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ilst-cast { bottom: -7%; left: 3%; width: 63%; height: 101%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 3px 6px #25342233); }
.ilst-river .ilst-cast, .ilst-postcard .ilst-cast { left: -2%; width: 51%; height: 79%; }
.ilst-river[data-ilst-scene="1"] .ilst-cast { left: 53%; }
.ilst-postcard .ilst-cast { left: 49%; }
.ilst-postcard[data-ilst-scene="1"] .ilst-cast { left: 0; }
.ilst-props { inset: 0; }
.ilst-rain { --scene: linear-gradient(155deg,#b1d2c8,#548e86 75%); }
.ilst-rain::before, .ilst-moon::before { content: ''; position: absolute; left: 64%; top: 8%; width: 23%; height: 30%; background: #75a477; box-shadow: inset 0 -5px 0 #477856; border-radius: 82% 2% 82% 2%; transform: rotate(12deg); }
.ilst-rain::after { content: ''; position: absolute; left: 62%; bottom: 9%; width: 24%; height: 7%; border: .65cqw solid #dbf4e7; border-radius: 50%; box-shadow: 0 0 0 1.1cqw #66a69e, 0 0 0 1.5cqw #b6dccc; }
.ilst-rain .ilst-props i { width: 3.5%; aspect-ratio: 3/4; background: #c7eff0; border-radius: 2% 70% 55% 70%; transform: rotate(38deg); top: 39%; left: 72%; }
.ilst-rain .ilst-props i:nth-child(2) { top: 51%; left: 22%; }
.ilst-rain .ilst-props i:nth-child(3) { top: 66%; left: 73%; }
.ilst-moon { --scene: radial-gradient(ellipse at 66% 85%,#7d8fb2,#425681 56%,#273759); }
.ilst-moon::before { left: 68%; top: 12%; width: 16%; aspect-ratio: 1; height: auto; border-radius: 50%; background: #f9eabb; box-shadow: 0 0 6cqw #f5dfa75b; }
.ilst-moon .ilst-props::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 9% 14%,#fff6ce 0 .35%,transparent .6%),radial-gradient(circle at 88% 8%,#fff6ce 0 .28%,transparent .55%),radial-gradient(circle at 64% 45%,#fff6ce 0 .34%,transparent .6%),radial-gradient(circle at 45% 22%,#fff6ce 0 .33%,transparent .55%); }
.ilst-moon .ilst-props i:first-child { width: 24%; height: 21%; left: 60%; bottom: 13%; background: #dc956e; border-radius: 10% 12% 40% 36%; transform: rotate(-5deg); }
.ilst-moon .ilst-props i:nth-child(2) { width: 24%; height: 6%; left: 60%; bottom: 31%; background: radial-gradient(ellipse at 62% 45%,#f9eabb 0 11%,transparent 13%), #879eb1; border-radius: 50%; transform: rotate(-5deg); border: 2px solid #f3c5a3; }
.ilst-moon[data-ilst-scene="1"] .ilst-props i:nth-child(2) { background: #879eb1; }
.ilst-bridge { --scene: linear-gradient(166deg,#f1c781 0 49%,#bc8d64 49.5% 56%,#8ab9ba 56.5% 77%,#b78259 77.5%); }
.ilst-bridge .ilst-props i:first-child { left: 60%; top: 53%; width: 32%; height: 6%; border-radius: 25%; background: repeating-linear-gradient(0deg,#b98959 0 25%,#c99a68 28% 47%,#a77446 52% 60%); transform: rotate(26deg); }
.ilst-bridge[data-ilst-scene="1"] .ilst-props i:first-child { width: 19%; transform: rotate(56deg); }
.ilst-bridge .ilst-props i:nth-child(2) { left: 62%; top: 40%; width: 15%; height: 11%; border-radius: 5% 15% 15% 15%; background: #ae5247; transform: rotate(16deg); box-shadow: inset 0 1.1cqw 0 #d37557; }
.ilst-bridge .ilst-props i:nth-child(2)::before, .ilst-bridge .ilst-props i:nth-child(2)::after { content: ''; width: 26%; aspect-ratio: 1; bottom: -30%; position: absolute; background: #324a44; border: .55cqw solid #506658; border-radius: 50%; }
.ilst-bridge .ilst-props i:nth-child(2)::before { left: 8%; }
.ilst-bridge .ilst-props i:nth-child(2)::after { right: 5%; }
.ilst-bridge[data-ilst-scene="2"] .ilst-props i:nth-child(2) { left: 75%; top: 49%; }
.ilst-mango { --scene: linear-gradient(153deg,#f8dab0 0 45%,#f0b688 85%); }
.ilst-mango .ilst-props::before { content: ''; position: absolute; right: -10%; bottom: -7%; width: 60%; height: 58%; transform: rotate(-10deg); background-color: #efe5c8; background-image: repeating-linear-gradient(0deg,transparent 0 13px,#ba847a80 14px 18px),repeating-linear-gradient(90deg,transparent 0 13px,#ba847a80 14px 18px); }
.ilst-mango .ilst-props i { width: 13%; aspect-ratio: 1.25; background: radial-gradient(at 30% 25%,#ffdd65,#eda23f 68%,#d48539); border-radius: 75% 28% 67% 45%; transform: rotate(-15deg); left: 57%; bottom: 20%; box-shadow: 0 2px 2px #776b4052; }
.ilst-mango .ilst-props i:nth-child(2) { left: 73%; bottom: 31%; }
.ilst-mango .ilst-props i:nth-child(3) { left: 80%; bottom: 10%; }
.ilst-mango[data-ilst-scene="2"] .ilst-props i:nth-child(3) { width: 7%; border-radius: 80% 10% 2% 35%; box-shadow: 1.3cqw 2cqw 0 #e5a33e; }

@media (max-width: 780px) {
  .ilst-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ilst-spread { grid-template-columns: 1fr; }
  .ilst-spread .ilst-art { min-height: 0; height: clamp(155px, 33vw, 236px); }
  .ilst-spread .ilst-cast { width: 50%; }
}
@media (max-width: 560px) {
  .ilst-header { align-items: start; flex-direction: column; gap: 8px; }
  .ilst-shelf { gap: 12px; }
  .ilst-book-copy { padding: 10px; }
  .ilst-book .ilst-art { aspect-ratio: 1.5; }
  .ilst-book-copy strong { font-size: 1.12rem; }
  .ilst-location, .ilst-book-action { font-size: .85rem; }
  .ilst-toolbar { justify-content: start; }
}
@media (max-width: 335px) {
  .ilst-shelf { grid-template-columns: 1fr; }
  .ilst-book .ilst-art { aspect-ratio: 2.2; }
}
@media (prefers-reduced-motion: reduce) {
  .ilst-book { transition: none; }
  .ilst-book:hover { transform: none; }
}
