/* Itan Story Store. Generated from itan/prototype/index.html, then extended. Everything is scoped to .itan-home so the theme is untouched. */
.itan-home, .itan-reader-host {
  --ink: #0e1530;        /* adire indigo night */
  --dusk: #19234d;       /* raised surfaces */
  --dusk-2: #222e60;
  --lantern: #f4b942;    /* lamplight gold, the one bold accent */
  --hibiscus: #ef5b7a;
  --firefly: #7fe0bd;
  --paper: #f6ead2;      /* only inside opened books */
  --paper-ink: #2a2140;
  --text: #efe8da;
  --muted: #a9a8c6;
  --line: rgba(239, 232, 218, .14);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
.itan-home * { box-sizing: border-box; }
.itan-home {
  background: var(--ink); color: var(--text);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
}
.itan-home .wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
/* "body" in front outranks theme heading styles (Astra colours h1-h6 in .entry-content), while the more specific Itan rules below still win. */
body .itan-home h1, body .itan-home h2, body .itan-home h3, body .itan-home h4 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; text-wrap: balance; margin: 0; line-height: 1.05; color: inherit; text-transform: none; }
body .itan-home h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 500; }
.itan-home h2 em { color: var(--lantern); font-style: italic; }
body .itan-home p { margin: 0; }
.itan-home .eyebrow { font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--firefly); }
.itan-home .lede { color: var(--muted); max-width: 60ch; }
.itan-home button, .itan-home input, .itan-home select, .itan-home textarea { font: inherit; color: inherit; }
.itan-home button { cursor: pointer; }
.itan-home :focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }
.itan-home section { padding-block: clamp(56px, 9vw, 104px); }
.itan-home .section-head { display: grid; gap: 14px; margin-bottom: 36px; }
.itan-home .hero { position: relative; overflow: hidden; padding-block: clamp(64px, 11vw, 140px) clamp(48px, 8vw, 96px); }
.itan-home #sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.itan-home .hero .wrap { position: relative; display: grid; gap: 26px; }
.itan-home .hero h1 { font-size: clamp(3rem, 9.5vw, 7.4rem); font-weight: 400; letter-spacing: -.02em; max-width: 12ch; }
.itan-home .hero h1 em { font-style: italic; color: var(--lantern); font-weight: 600; }
.itan-home .hero .lede { font-size: 1.15rem; }
.itan-home .call { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.itan-home .call-btn {
  border: 1px solid var(--lantern); background: rgba(244, 185, 66, .1); color: var(--lantern);
  padding: 14px 26px; border-radius: 999px; font: 600 1.25rem var(--display); font-style: italic;
  transition: transform .2s, background .2s;
}
.itan-home .call-btn:hover { transform: translateY(-2px); background: rgba(244, 185, 66, .2); }
.itan-home .reply { font: 600 1.6rem var(--display); font-style: italic; color: var(--firefly); opacity: 0; transform: translateX(-8px); transition: .5s; }
.itan-home .reply.on { opacity: 1; transform: none; }
.itan-home .call-note { font-size: .88rem; color: var(--muted); max-width: 52ch; }
.itan-home .call-btn { position: relative; }
.itan-home .call-btn.waiting::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid var(--lantern); animation: ping 1.8s ease-out infinite; pointer-events: none; }
@keyframes ping { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.itan-home .nudge { display: flex; align-items: flex-end; gap: 6px; margin-bottom: -10px; color: var(--lantern); font: italic 500 1.15rem var(--display); transition: opacity .4s; }
.itan-home .nudge svg { width: 56px; height: 46px; flex: none; margin-left: 30px; animation: bob 1.4s ease-in-out infinite; }
.itan-home .nudge span { padding-bottom: 22px; }
.itan-home .nudge.gone { opacity: 0; pointer-events: none; }
@keyframes bob { 50% { transform: translate(-3px, 5px); } }
.itan-home .hero.lit h1 em { text-shadow: 0 0 28px rgba(244, 185, 66, .65); }
.itan-home .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.itan-home .chip { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: .88rem; transition: .2s; }
.itan-home .chip:hover { color: var(--text); border-color: var(--muted); }
.itan-home .chip[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.itan-home .shelf-scroll { overflow-x: auto; padding-top: 40px; margin-top: 18px; }
.itan-home .shelf { display: flex; align-items: flex-end; gap: 10px; min-height: 340px; padding-inline: 14px; position: relative; min-width: max-content; }
.itan-home .plank { height: 18px; background: linear-gradient(#5a3b26, #3a2618); border-radius: 3px; box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.itan-home .spine {
  --c: var(--hibiscus); --h: 300px;
  width: 64px; height: var(--h); border: 0; border-radius: 4px 4px 2px 2px; position: relative;
  background: var(--c); color: var(--ink);
  writing-mode: vertical-rl; text-orientation: mixed;
  display: flex; align-items: center; justify-content: space-between; padding: 16px 0;
  font: 600 1.02rem var(--display); font-variation-settings: "SOFT" 100;
  box-shadow: inset -8px 0 12px rgba(0,0,0,.22), inset 4px 0 0 rgba(255,255,255,.18);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .3s, filter .3s;
}
.itan-home .spine::before, .itan-home .spine::after { content: ""; position: absolute; left: 8px; right: 8px; height: 3px; background: rgba(14,21,48,.35); }
.itan-home .spine::before { top: 30px; }
.itan-home .spine::after { bottom: 30px; }
.itan-home .spine small { font: 500 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.itan-home .spine:hover, .itan-home .spine:focus-visible { transform: translateY(-26px) rotate(-1.5deg); filter: drop-shadow(0 0 18px color-mix(in srgb, var(--c) 70%, transparent)); }
.itan-home .spine.dim { opacity: .18; filter: grayscale(.6); }
.itan-home .shelf-tip { font-size: .88rem; color: var(--muted); margin-top: 14px; }
.itan-home .ghost-spine { width: 64px; height: 260px; border: 1.5px dashed var(--line); border-radius: 4px; display: grid; place-items: center; writing-mode: vertical-rl; font: .7rem var(--mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.itan-home dialog.book { border: 0; padding: 0; background: transparent; max-width: min(940px, calc(100vw - 32px)); width: 100%; color: var(--paper-ink); }
.itan-home dialog.book::backdrop { background: rgba(6, 9, 22, .78); backdrop-filter: blur(4px); }
.itan-home .spread { display: grid; grid-template-columns: 1fr 1.15fr; background: var(--paper); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: open .6s cubic-bezier(.2,.9,.3,1.1); transform-origin: left center; }
@keyframes open { from { transform: perspective(1400px) rotateY(-70deg); opacity: 0; } to { transform: none; opacity: 1; } }
.itan-home .cover { position: relative; min-height: 440px; padding: 30px 26px; display: flex; flex-direction: column; justify-content: space-between; color: var(--paper); background: var(--c); overflow: hidden; }
.itan-home .cover .pattern { position: absolute; inset: 0; opacity: .35; }
.itan-home .cover > * { position: relative; }
.itan-home .cover h3 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; font-style: italic; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.itan-home .cover .tag { font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.itan-home .page { padding: 30px 30px 26px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.itan-home .page .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.itan-home .page .meta span { font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(42,33,64,.08); }
.itan-home .page p.blurb { font-size: 1.02rem; }
.itan-home .source { font-size: .84rem; color: #5d5374; border-left: 2px solid var(--lantern); padding-left: 12px; }
.itan-home .player { display: flex; align-items: center; gap: 14px; background: var(--paper-ink); color: var(--paper); border-radius: 12px; padding: 12px 14px; }
.itan-home .play { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--lantern); color: var(--paper-ink); display: grid; place-items: center; }
.itan-home .play svg { width: 18px; height: 18px; fill: currentColor; }
.itan-home .wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 34px; min-width: 0; }
.itan-home .wave i { flex: 1; background: rgba(246,234,210,.35); border-radius: 2px; height: 30%; transition: background .2s; }
.itan-home .player.playing .wave i { animation: bar 1s ease-in-out infinite; }
.itan-home .wave i.done { background: var(--lantern); }
@keyframes bar { 50% { height: 100%; } }
.itan-home .player small { font: .7rem var(--mono); color: rgba(246,234,210,.7); white-space: nowrap; }
.itan-home .formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.itan-home .format { text-align: left; border: 1.5px solid rgba(42,33,64,.2); background: transparent; color: var(--paper-ink); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; transition: .2s; }
.itan-home .format b { font: 600 1rem var(--body); }
.itan-home .format small { font-size: .78rem; color: #6d6385; }
.itan-home .format span { font: 600 1.15rem var(--display); margin-top: 4px; }
.itan-home .format[aria-checked="true"] { border-color: var(--hibiscus); background: rgba(239,91,122,.08); box-shadow: 0 0 0 3px rgba(239,91,122,.15); }
.itan-home .format .badge { justify-self: start; font: 500 .62rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--lantern); color: var(--paper-ink); padding: 2px 7px; border-radius: 999px; margin-bottom: 4px; }
.itan-home .deliver { font-size: .82rem; color: #5d5374; }
@media (max-width: 420px) {
.itan-home .formats { grid-template-columns: 1fr; }
}
.itan-home .buy-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px dashed rgba(42,33,64,.2); }
.itan-home .price { font: 600 1.7rem var(--display); }
.itan-home .price small { font: .7rem var(--mono); color: #6d6385; display: block; }
.itan-home .buy { border: 0; background: var(--hibiscus); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.itan-home .close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(42,33,64,.1); color: var(--paper-ink); font-size: 1.2rem; z-index: 2; }
.itan-home .spread { position: relative; }
@media (max-width: 680px) {
.itan-home .spread { grid-template-columns: 1fr; }
.itan-home .cover { min-height: 230px; }
}
.itan-home .oracle { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.itan-home .oracle-form { display: grid; gap: 22px; align-content: start; }
.itan-home .oracle-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.itan-home .oracle-form legend { font: 500 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.itan-home .ask { justify-self: start; border: 0; background: var(--lantern); color: var(--ink); font: 600 1.15rem var(--display); font-style: italic; padding: 13px 26px; border-radius: 999px; }
.itan-home .orb {
  position: relative; border-radius: 24px; min-height: 340px; padding: 28px;
  background: radial-gradient(circle at 50% 38%, rgba(127,224,189,.22), transparent 60%), var(--dusk);
  border: 1px solid var(--line); display: grid; place-items: center; text-align: center; overflow: hidden;
}
.itan-home .orb .glass { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(127,224,189,.25) 35%, rgba(14,21,48,.2) 70%); box-shadow: 0 0 60px rgba(127,224,189,.35), inset 0 0 30px rgba(255,255,255,.15); margin: 0 auto 18px; transition: transform .4s; }
.itan-home .orb.thinking .glass { animation: swirl .9s linear infinite; }
@keyframes swirl { to { transform: rotate(360deg) scale(1.05); } }
.itan-home .orb-text { display: grid; gap: 10px; justify-items: center; }
.itan-home .orb-text h3 { font-size: 1.8rem; font-style: italic; color: var(--lantern); }
.itan-home .orb-text p { color: var(--muted); max-width: 36ch; }
.itan-home .link-btn { border: 1px solid var(--firefly); color: var(--firefly); background: none; border-radius: 999px; padding: 8px 18px; font-size: .9rem; }
@media (max-width: 760px) {
.itan-home .oracle { grid-template-columns: 1fr; }
}
.itan-home .doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.itan-home .door { position: relative; border: 0; text-align: left; padding: 0; background: none; color: var(--text); }
.itan-home .door .arch { height: 230px; border-radius: 120px 120px 6px 6px; background: var(--c); position: relative; overflow: hidden; transition: transform .4s; box-shadow: inset 0 -40px 60px rgba(0,0,0,.25); }
.itan-home .door .arch::after { content: ""; position: absolute; inset: 14px 14px 0; border-radius: 110px 110px 0 0; border: 2px solid rgba(255,255,255,.35); border-bottom: 0; }
.itan-home .door .light { position: absolute; inset: 0; background: radial-gradient(circle at 50% 70%, rgba(255,240,200,.95), transparent 55%); opacity: 0; transition: opacity .5s; }
.itan-home .door:hover .light, .itan-home .door:focus-visible .light { opacity: 1; }
.itan-home .door:hover .arch { transform: translateY(-4px); }
.itan-home .door h3 { font-size: 1.7rem; font-style: italic; margin-top: 16px; }
.itan-home .door p { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.itan-home .door .count { font: .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--firefly); margin-top: 10px; display: block; }
@media (max-width: 760px) {
.itan-home .doors { grid-template-columns: 1fr; }
.itan-home .door .arch { height: 160px; }
}
.itan-home .pass { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; background: var(--dusk); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 4vw, 40px); }
.itan-home .stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.itan-home .stamp { aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: 1.5px dashed var(--line); display: grid; place-items: center; font: 600 1.2rem var(--display); color: var(--muted); transition: .3s; }
.itan-home .stamp.got { border: 0; background: var(--lantern); color: var(--ink); transform: rotate(-8deg); box-shadow: 0 0 22px rgba(244,185,66,.4); }
.itan-home .pass .note { font-size: .88rem; color: var(--muted); }
@media (max-width: 760px) {
.itan-home .pass { grid-template-columns: 1fr; }
}
.itan-home .well { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; }
.itan-home .well form { display: grid; gap: 14px; background: var(--dusk); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3.5vw, 32px); }
.itan-home .field { display: grid; gap: 6px; }
.itan-home .field label { font: 500 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.itan-home .field input, .itan-home .field select, .itan-home .field textarea { background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; }
.itan-home .field textarea { min-height: 96px; resize: vertical; }
.itan-home .send { justify-self: start; border: 0; background: var(--firefly); color: var(--ink); font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.itan-home .thanks { color: var(--firefly); font-family: var(--display); font-style: italic; font-size: 1.3rem; }
.itan-home .well ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.itan-home .well li { padding-left: 26px; position: relative; color: var(--muted); }
.itan-home .well li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--firefly); box-shadow: 0 0 10px var(--firefly); }
@media (max-width: 760px) {
.itan-home .well { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.itan-home *, .itan-home *::before, .itan-home *::after { animation: none !important; transition: none !important; }
}

/* Plugin-only pieces */
.itan-home { overflow-x: clip; }
.itan-home .section-head.flush { margin: 0; }
.itan-home .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.itan-home .transcript { font-size: .88rem; color: #5d5374; }
.itan-home .transcript summary { cursor: pointer; }
.itan-home .transcript p { margin-top: 6px; }
.itan-home .buy { text-decoration: none; display: inline-block; }
.itan-home .deliver a { color: inherit; }
.itan-home .pass-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font: 600 1.4rem var(--display); }
.itan-home a.ask { text-decoration: none; display: inline-block; }
.itan-home .cover img.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.itan-home .cover.has-art > *:not(img) { z-index: 1; }
.itan-home .empty-shelf { color: var(--muted); padding: 40px 0; font-family: var(--display); font-style: italic; font-size: 1.3rem; }

/* Single book page */
.itan-book-extras { --lantern: #f4b942; --paper-ink: #2a2140; --paper: #f6ead2; --hibiscus: #ef5b7a; margin: 18px 0; display: grid; gap: 14px; }
.itan-book-extras .player { display: flex; align-items: center; gap: 14px; background: var(--paper-ink); color: var(--paper); border-radius: 12px; padding: 12px 14px; }
.itan-book-extras .play { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--lantern); color: var(--paper-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.itan-book-extras .play svg { width: 18px; height: 18px; fill: currentColor; }
.itan-book-extras .wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 34px; min-width: 0; }
.itan-book-extras .wave i { flex: 1; background: rgba(246,234,210,.35); border-radius: 2px; height: 30%; }
.itan-book-extras .player.playing .wave i { animation: bar 1s ease-in-out infinite; }
.itan-book-extras .wave i.done { background: var(--lantern); }
.itan-book-extras small { font-size: .75rem; opacity: .8; white-space: nowrap; }
.itan-book-extras .source { font-size: .9rem; border-left: 2px solid var(--lantern); padding-left: 12px; margin: 0; }
.itan-book-extras .credits { font-size: .9rem; margin: 0; }
.itan-format-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.itan-format-pills button { border: 1.5px solid rgba(42,33,64,.25); background: transparent; border-radius: 12px; padding: 10px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.itan-format-pills button[aria-checked="true"] { border-color: #ef5b7a; box-shadow: 0 0 0 3px rgba(239,91,122,.15); }
.itan-deliver-note { font-size: .88rem; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .itan-book-extras .player.playing .wave i { animation: none; } }

/* Share and trailer */
.itan-home .share-row, .itan-book-extras .share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.itan-home .wa, .itan-book-extras .wa { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #0b3d1f; font-weight: 700; font-size: .9rem; padding: 8px 14px; border-radius: 999px; text-decoration: none; border: 0; }
.itan-home .wa svg, .itan-book-extras .wa svg { width: 18px; height: 18px; fill: currentColor; }
.itan-home .trailer, .itan-book-extras .trailer { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid currentColor; color: inherit; font-size: .9rem; padding: 7px 14px; border-radius: 999px; text-decoration: none; }
.itan-home .orb .wa { margin-top: 4px; }

/* Listen and watch */
.itan-library { padding-block: clamp(40px, 6vw, 72px); min-height: 60vh; }
.itan-library .lib-empty { display: grid; gap: 16px; color: var(--muted); max-width: 52ch; }
.itan-library .lib-player { background: var(--dusk); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; position: sticky; top: 12px; z-index: 2; }
.itan-library .lib-now { display: flex; gap: 18px; align-items: center; min-width: 0; }
.itan-library .lib-cover { --c: #ef5b7a; width: 84px; aspect-ratio: 5 / 8; flex: none; border-radius: 6px; background: var(--c) center / cover; box-shadow: inset -6px 0 10px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.4); }
.itan-library .lib-player.playing .lib-cover { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset -6px 0 10px rgba(0,0,0,.25), 0 0 34px rgba(244,185,66,.45); } }
.itan-library .lib-meta { min-width: 0; display: grid; gap: 6px; }
.itan-library .lib-meta h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; }
.itan-library .lib-meta p { color: var(--muted); font-size: .9rem; }
.itan-library .lib-meta .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.itan-library #libSeek { width: 100%; accent-color: var(--lantern); }
.itan-library .lib-times { display: flex; justify-content: space-between; font: .78rem var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -8px; }
.itan-library .lib-controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.itan-library .lib-controls button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; min-width: 46px; height: 46px; font: 500 .9rem var(--mono); }
.itan-library .lib-controls .play { width: 62px; height: 62px; border: 0; background: var(--lantern); color: var(--ink); display: grid; place-items: center; border-radius: 50%; }
.itan-library .lib-controls .play svg { width: 22px; height: 22px; fill: currentColor; }
.itan-library .lib-extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: .85rem; color: var(--muted); }
.itan-library .lib-extras select { margin-left: 6px; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; color: var(--text); }
.itan-library .lib-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 28px; }
.itan-library .lib-book { border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.itan-library .lib-book-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.itan-library .lib-spine { --c: #ef5b7a; width: 12px; height: 40px; border-radius: 3px; background: var(--c); flex: none; }
.itan-library .lib-book h3 { font-size: 1.25rem; font-style: italic; }
.itan-library .lib-book ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; color: var(--muted); }
.itan-library .lib-book li button { background: none; border: 0; color: var(--text); text-align: left; padding: 4px 0; font: inherit; }
.itan-library .lib-book li button:hover { color: var(--lantern); }
.itan-library .lib-book li button[aria-current="true"] { color: var(--lantern); font-weight: 700; }
.itan-library .lib-video-head { margin: 48px 0 18px; }
.itan-library .lib-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 22px; }
.itan-library .lib-video { margin: 0; display: grid; gap: 10px; }
.itan-library .lib-video .frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: #000; }
.itan-library .lib-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.itan-library .lib-video figcaption { font-family: var(--display); font-style: italic; font-size: 1.2rem; }
@media (max-width: 520px) { .itan-library .lib-controls { gap: 8px; } .itan-library .lib-controls button { min-width: 40px; height: 40px; } }
.itan-home .pass-note { font: 400 1rem var(--body); color: var(--muted); flex-basis: 100%; }
/* Themes do not always hide [hidden] elements; make sure empty players and links stay hidden. */
.itan-home [hidden], .itan-book-extras [hidden] { display: none !important; }
.itan-home .cover.has-art { padding: 0; }
/* Book pages: there is only a format to choose, so hide WooCommerce's "Clear" link. */
.single-product .variations_form .reset_variations { display: none !important; }

/* ---------- In-browser reader (0.1.6) ---------- */
.itan-library .lib-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin-bottom: 12px; }
.itan-library .lib-read { background: none; border: 0; padding: 0; color: var(--text); text-align: left; display: grid; gap: 8px; cursor: pointer; font: inherit; }
.itan-library .lib-read-cover { --c: #ef5b7a; display: block; aspect-ratio: 5 / 8; border-radius: 6px; background: var(--c) center / cover; box-shadow: inset -6px 0 10px rgba(0,0,0,.25), 0 10px 26px rgba(0,0,0,.45); transition: transform .25s; }
.itan-library .lib-read:hover .lib-read-cover, .itan-library .lib-read:focus-visible .lib-read-cover { transform: translateY(-4px) rotate(-1deg); }
.itan-library .lib-read-title { font-family: var(--display); font-style: italic; font-size: 1.05rem; line-height: 1.3; }
.itan-library .lib-read-cta { justify-self: start; background: var(--lantern); color: var(--ink); font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 999px; }
html.itan-reading, html.itan-reading body { overflow: hidden; }
.itan-library .reader { --rd-bg: #fffdf8; --rd-fg: #2a2140; position: fixed; inset: 0; z-index: 99999; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); width: 100vw; height: 100%; overflow: hidden; background: var(--rd-bg); color: var(--rd-fg); }
.itan-library .reader[data-theme="sepia"] { --rd-bg: #f6ead2; --rd-fg: #3b2f1e; }
.itan-library .reader[data-theme="night"] { --rd-bg: #0e1530; --rd-fg: #efe8da; }
.itan-library .reader[data-kind="pdf"] { --rd-bg: #1b1b22; --rd-fg: #efe8da; }
.itan-library .reader-bar { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(128,128,128,.25); }
.itan-library .reader-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-style: italic; }
.itan-library .reader-tools { display: flex; gap: 6px; }
.itan-library .reader-btn { background: none; border: 1px solid rgba(128,128,128,.35); color: inherit; min-width: 40px; height: 40px; border-radius: 999px; font: 500 .9rem var(--mono); cursor: pointer; }
.itan-library .reader-stage { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.itan-library .reader-view { position: absolute; inset: 12px 44px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.itan-library .reader[data-kind="epub"] .reader-view { display: block; }
.itan-library .reader-canvas { display: block; margin: auto; box-shadow: 0 6px 24px rgba(0,0,0,.4); background: #fff; }
.itan-library .reader-turn { position: absolute; top: 0; bottom: 0; width: 44px; background: none; border: 0; color: inherit; opacity: .55; font-size: 2rem; cursor: pointer; }
.itan-library .reader-turn:hover { opacity: 1; }
.itan-library .reader-turn.prev { left: 0; }
.itan-library .reader-turn.next { right: 0; }
.itan-library .reader-status { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(300px, 80%); margin: 0; display: grid; gap: 12px; justify-items: center; text-align: center; background: #f6ead2; color: #0e1530; font: 600 .95rem var(--body); padding: 18px 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.itan-library .reader-status[hidden] { display: none; }
.itan-library .reader-bar-track { position: relative; display: block; width: 100%; height: 10px; border-radius: 999px; background: rgba(14,21,48,.15); overflow: hidden; }
.itan-library .reader-bar-track[hidden] { display: none; }
.itan-library .reader-bar-track i { position: absolute; inset: 0 auto 0 0; width: 4%; border-radius: inherit; background: #0e1530; transition: width .25s ease-out; }
.itan-library .reader-bar-track.busy i { width: 35%; animation: itan-busy 1.1s ease-in-out infinite; }
@keyframes itan-busy { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .itan-library .reader-bar-track.busy i { animation: none; left: 0; width: 100%; opacity: .5; } }
.itan-library .reader-mode { display: inline-flex; border: 1px solid rgba(128,128,128,.4); border-radius: 999px; padding: 2px; margin-right: 12px; vertical-align: middle; }
.itan-library .reader-mode button { background: none; border: 0; color: inherit; font: 600 .78rem var(--body); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.itan-library .reader-mode button[aria-pressed="true"] { background: var(--lantern); color: var(--ink); }
.itan-library .reader-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; font: .78rem var(--mono); padding: 6px 12px; padding-bottom: max(6px, env(safe-area-inset-bottom)); min-height: 1.6em; }
.itan-library .reader-foot #rdPos { opacity: .7; }
@media (max-width: 520px) {
  .itan-library .reader-view { inset: 6px 8px; }
  .itan-library .reader-turn { width: 22%; font-size: 0; }
  .itan-library .lib-shelf { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Free preview (0.1.7) ---------- */
.itan-home .itan-preview-btn, .itan-preview-btn { display: inline-flex; align-items: center; gap: 6px; background: #f4b942; color: #0e1530; border: 0; font: 700 .9rem "Figtree", system-ui, sans-serif; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.itan-preview-btn::before { content: "📖"; }
.itan-preview-row { margin: 14px 0 0; }
.itan-reader-host { background: none; height: 0; }
.itan-library .reader-end { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; background: var(--rd-bg); }
.itan-library .reader-end h3 { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 5vw, 2.2rem); margin: 0; text-wrap: balance; }
.itan-library .reader-end p { max-width: 34ch; margin: 0; opacity: .85; }
.itan-library .reader-end .eyebrow { font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lantern); }
.itan-library .reader-buy { background: var(--lantern); color: var(--ink); font-weight: 700; padding: 12px 24px; border-radius: 999px; text-decoration: none; }
.itan-library .reader-back { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; opacity: .8; }
