/**
 * ANOTA Digital — presentation defaults.
 * Selectors intentionally use :where() so Elementor controls can override them.
 */
:where(.anota-reader, .anota-hero, .anota-library, .anota-qr, .anota-locked) {
    --anota-navy: #102d49;
    --anota-navy-deep: #081d30;
    --anota-accent: #b28a49;
    --anota-ivory: #f4f1ea;
    --anota-paper: #fffefb;
    --anota-ink: #182430;
    --anota-muted: #6b7782;
    --anota-line: rgba(16, 45, 73, .14);
    --anota-font: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
    font-family: var(--anota-font);
}

:where(.anota-reader, .anota-reader *, .anota-hero, .anota-hero *, .anota-library, .anota-library *, .anota-qr, .anota-qr *) {
    box-sizing: border-box;
}

.anota-icon {
    display: block;
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
}

.anota-editor-message,
.anota-locked {
    border: 1px solid var(--anota-line, #d8dee4);
    border-radius: 14px;
    padding: 28px;
    background: #fff;
    color: var(--anota-ink, #182430);
}

/* Full-width fallback for the ANOTA CPT in themes such as Hello Elementor. */
body.anota-digital-edition #content.site-main {
    width: 100%;
    max-width: none;
    padding: 0;
}

body.anota-digital-edition #content.site-main > .page-header {
    display: none;
}

body.anota-digital-edition #content.site-main > .page-content {
    width: 100%;
    max-width: none;
}

.anota-fallback {
    width: calc(100% - clamp(24px, 4vw, 72px));
    max-width: 1600px;
    margin: clamp(20px, 3vw, 42px) auto clamp(36px, 5vw, 72px);
}

.anota-fallback > .anota-reader {
    margin-top: clamp(18px, 2.4vw, 34px);
}

.anota-editor-message {
    border-left: 4px solid var(--anota-accent, #b28a49);
}

.anota-locked {
    max-width: 720px;
    margin: 36px auto;
    text-align: center;
}

.anota-locked__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--anota-ivory);
    color: var(--anota-navy);
    font-size: 24px;
}

/* Edition hero */
.anota-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(240px, .72fr);
    align-items: center;
    gap: clamp(40px, 7vw, 112px);
    overflow: hidden;
    padding: clamp(42px, 7vw, 96px);
    border: 1px solid rgba(16, 45, 73, .08);
    border-radius: 26px;
    background: var(--anota-ivory);
    color: var(--anota-navy);
}

.anota-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto auto -32% -10%;
    width: 42%;
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--anota-accent) 28%, transparent);
    border-radius: 50%;
}

.anota-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 38%;
    background: linear-gradient(155deg, color-mix(in srgb, var(--anota-accent) 11%, transparent), transparent 60%);
    pointer-events: none;
}

.anota-hero__content {
    position: relative;
    z-index: 2;
    max-width: 740px;
}

.anota-eyebrow,
.anota-card__kicker {
    margin: 0 0 14px;
    color: var(--anota-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.anota-hero__title {
    margin: 0;
    color: var(--anota-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 6.3vw, 86px);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: .98;
}

.anota-hero__meta {
    display: flex;
    align-items: center;
    margin: 24px 0 0;
    color: var(--anota-navy);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
}

.anota-hero__summary {
    max-width: 620px;
    margin: 25px 0 0;
    color: color-mix(in srgb, var(--anota-navy) 76%, white);
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.72;
}

.anota-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.anota-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.anota-button:hover { transform: translateY(-1px); }
.anota-button--primary { background: var(--anota-navy); color: #fff; }
.anota-button--primary:hover { background: var(--anota-navy-deep); color: #fff; }
.anota-button--quiet { border-color: var(--anota-line); background: transparent; color: var(--anota-navy); }
.anota-button--quiet:hover { border-color: var(--anota-accent); background: rgba(255, 255, 255, .55); }

.anota-hero__cover {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 390px;
    margin: 0;
    perspective: 1200px;
}

.anota-hero__cover img,
.anota-hero__cover .anota-cover-placeholder {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    aspect-ratio: .72;
    border-radius: 3px 9px 9px 3px;
    box-shadow: -16px 22px 48px rgba(8, 29, 48, .25), 0 3px 8px rgba(8, 29, 48, .18);
    object-fit: cover;
    transform: rotateY(-3deg) rotateZ(1deg);
    transform-origin: left center;
}

.anota-hero__cover-back {
    position: absolute;
    z-index: 1;
    inset: 5px -9px 5px 7px;
    border-radius: 4px 12px 12px 4px;
    background: #d7d1c5;
    box-shadow: 12px 12px 24px rgba(8, 29, 48, .12);
    transform: rotate(2.5deg);
}

.anota-cover-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 54px);
    background: linear-gradient(145deg, var(--anota-navy), var(--anota-navy-deep));
    color: #fff;
}

.anota-cover-placeholder > span { font-family: Georgia, serif; font-size: clamp(38px, 6vw, 64px); letter-spacing: .08em; }
.anota-cover-placeholder > small { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.34); font-size: 16px; line-height: 1.45; }

/* Library */
.anota-library { width: 100%; color: var(--anota-ink); }
.anota-library__toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 34px; }
.anota-library__search,
.anota-library__year,
.anota-library__sort {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--anota-line);
    border-radius: 999px;
    background: #fff;
    color: var(--anota-navy);
}
.anota-library__search { flex: 1 1 420px; max-width: 620px; padding: 0 19px; }
.anota-library__search input,
.anota-library__year select,
.anota-library__sort select {
    width: 100%;
    height: 48px;
    margin: 0;
    border: 0 !important;
    outline: 0;
    background: transparent;
    box-shadow: none !important;
    color: var(--anota-ink);
    font: inherit;
    font-size: 15px;
}
.anota-library__search input { padding: 0 0 0 11px; }
.anota-library__year { flex: 0 0 210px; padding: 0 13px; }
.anota-library__sort { flex: 0 0 190px; padding: 0 13px; }
.anota-library__selects { display: flex; flex: 0 0 auto; gap: 10px; }
.anota-library__grid {
    display: grid;
    grid-template-columns: repeat(var(--anota-grid-columns, 3), minmax(0, 1fr));
    gap: clamp(24px, 3vw, 44px);
}
.anota-card {
    overflow: hidden;
    border: 1px solid var(--anota-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(8, 29, 48, .07);
    transition: transform .28s ease, box-shadow .28s ease;
}
.anota-card:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(8, 29, 48, .13); }
.anota-card[hidden] { display: none; }
.anota-card__cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: .82;
    background: var(--anota-ivory);
}
.anota-card__cover > img,
.anota-card__cover > .anota-cover-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.anota-card:hover .anota-card__cover > img { transform: scale(1.025); }
.anota-card__overlay {
    position: absolute;
    inset: auto 18px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    border-radius: 999px;
    background: rgba(8, 29, 48, .92);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}
.anota-card:hover .anota-card__overlay,
.anota-card__cover:focus-visible .anota-card__overlay { opacity: 1; transform: none; }
.anota-card__body { padding: 24px 24px 26px; }
.anota-card__kicker { margin-bottom: 8px; font-size: 10px; }
.anota-card h3 { margin: 0; font-family: Georgia, serif; font-size: clamp(23px, 2vw, 31px); font-weight: 400; line-height: 1.14; }
.anota-card h3 a { color: var(--anota-navy); text-decoration: none; }
.anota-card__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--anota-navy); font-size: 13px; font-weight: 700; }
.anota-card__link .anota-icon { width: 17px; transition: transform .2s ease; }
.anota-card:hover .anota-card__link .anota-icon { transform: translateX(3px); }
.anota-library__empty { padding: 40px; border: 1px dashed var(--anota-line); border-radius: 14px; text-align: center; color: var(--anota-muted); }
.anota-library__footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; }
.anota-library__count { margin: 0; color: var(--anota-muted); font-size: 13px; }
.anota-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.anota-pagination[hidden] { display: none; }
.anota-pagination__button {
    appearance: none;
    display: inline-grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 11px;
    border: 1px solid var(--anota-line);
    border-radius: 999px;
    background: #fff;
    color: var(--anota-navy);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}
.anota-pagination__button:hover:not(:disabled) { border-color: var(--anota-accent); transform: translateY(-1px); }
.anota-pagination__button[aria-current="page"] { border-color: var(--anota-accent); background: var(--anota-accent); color: #fff; }
.anota-pagination__button:disabled { opacity: .4; cursor: not-allowed; }
.anota-pagination__ellipsis { display: inline-grid; width: 24px; height: 38px; place-items: center; color: var(--anota-muted); }

/* QR */
.anota-qr { --anota-qr-color: var(--anota-navy); display: inline-flex; flex-direction: column; align-items: center; gap: 16px; margin: 0; text-align: center; color: var(--anota-navy); }
.anota-qr__code { width: var(--anota-qr-size, 220px); padding: 12px; border: 1px solid var(--anota-line); border-radius: 12px; background: #fff; }
.anota-qr__code svg { display: block; width: 100%; height: auto; color: var(--anota-qr-color); }
.anota-qr figcaption { display: flex; flex-direction: column; gap: 3px; }
.anota-qr figcaption strong { font-size: 14px; }
.anota-qr figcaption span { color: var(--anota-muted); font-size: 12px; }

/* Reader shell */
.anota-reader {
    --anota-chrome: #102d49;
    --anota-chrome-text: #fff;
    --anota-stage: #e9e5dc;
    --anota-reader-height: clamp(560px, 82vh, 920px);
    --anota-page-turn-duration: 620ms;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    width: 100%;
    height: var(--anota-reader-height);
    min-height: 480px;
    border: 1px solid rgba(8, 29, 48, .16);
    border-radius: 18px;
    background: var(--anota-stage);
    box-shadow: 0 18px 54px rgba(8, 29, 48, .16);
    color: var(--anota-chrome-text);
}

.anota-reader:fullscreen,
.anota-reader.is-pseudo-fullscreen {
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.anota-reader__topbar,
.anota-reader__controls {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    min-height: 58px;
    background: var(--anota-chrome);
    color: var(--anota-chrome-text);
}

.anota-reader__topbar { justify-content: space-between; gap: 18px; padding: 0 15px 0 19px; border-bottom: 1px solid rgba(255,255,255,.1); }
.anota-reader__identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.anota-reader__identity > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.anota-reader__identity strong { font-family: Georgia, serif; font-size: 17px; font-weight: 400; letter-spacing: .12em; line-height: 1.1; }
.anota-reader__identity small { overflow: hidden; max-width: 260px; color: rgba(255,255,255,.64); font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.anota-reader__mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid color-mix(in srgb, var(--anota-accent) 65%, white); border-radius: 50%; color: var(--anota-accent); font-family: Georgia, serif; font-size: 16px; }
.anota-reader__logo { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 34px; }
.anota-reader__logo img { display: block; width: 100%; max-width: 42px; height: 100%; max-height: 34px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.anota-reader__top-actions,
.anota-reader__controls-group { display: flex; align-items: center; gap: 2px; }
.anota-reader__control {
    appearance: none;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.anota-reader__control:hover { background: rgba(255,255,255,.11); color: #fff; }
.anota-reader__control:disabled { opacity: .3; cursor: not-allowed; }
.anota-reader__control[aria-pressed="true"] { background: color-mix(in srgb, var(--anota-accent) 75%, transparent); color: #fff; }
.anota-reader__workspace { position: relative; display: flex; min-height: 0; overflow: hidden; }
.anota-reader__stage { position: relative; display: grid; min-width: 0; flex: 1 1 auto; place-items: center; overflow: hidden; padding: clamp(18px, 3.3vw, 48px) clamp(48px, 5vw, 76px); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--anota-stage) 72%, white), var(--anota-stage) 72%); }

.anota-book {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 20px 22px rgba(8, 29, 48, .22));
    perspective: 1800px;
    touch-action: none;
    user-select: none;
    transform: scale(var(--anota-zoom, 1));
    transition: transform .2s ease;
    transform-origin: center;
}

.anota-book__page {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: var(--anota-page-width, 360px);
    height: var(--anota-page-height, 510px);
    background: var(--anota-paper);
    backface-visibility: hidden;
}
.anota-book__page[hidden] { display: none; }
.anota-book__page--left { border-radius: 5px 1px 1px 5px; box-shadow: inset -18px 0 20px -22px rgba(0,0,0,.5); }
.anota-book__page--right { border-radius: 1px 5px 5px 1px; box-shadow: inset 18px 0 20px -22px rgba(0,0,0,.5); }
.anota-book__page canvas { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.anota-book__gutter { position: absolute; z-index: 6; inset: 0 auto 0 50%; width: 18px; background: linear-gradient(90deg, rgba(0,0,0,.11), rgba(255,255,255,.14) 46%, rgba(0,0,0,.08)); opacity: .55; transform: translateX(-50%); pointer-events: none; }
.anota-book.is-single .anota-book__gutter { display: none; }
.anota-book.is-single .anota-book__page--right { border-radius: 4px 9px 9px 4px; box-shadow: inset 10px 0 12px -16px rgba(0,0,0,.45); }
.anota-page-number { position: absolute; z-index: 5; right: 9px; bottom: 7px; display: grid; place-items: center; min-width: 24px; height: 19px; padding: 0 6px; border-radius: 10px; background: rgba(8,29,48,.66); color: #fff; font-size: 9px; line-height: 1; }
.anota-book__page--left .anota-page-number { right: auto; left: 9px; }

.anota-book__flip {
    position: absolute;
    z-index: 12;
    top: 0;
    width: var(--anota-page-width, 360px);
    height: var(--anota-page-height, 510px);
    overflow: hidden;
    background: #fff;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform, opacity, box-shadow;
}
.anota-book__flip canvas { display: block; width: 100%; height: 100%; }
.anota-book__flip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8,29,48,.24), rgba(8,29,48,.045) 36%, rgba(255,255,255,.12) 72%, transparent);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}
.anota-book__flip.is-next {
    right: 0;
    transform-origin: left center;
    animation: anota-flip-next var(--anota-page-turn-duration) cubic-bezier(.22,.68,.28,1) both;
}
.anota-book__flip.is-prev {
    left: 0;
    transform-origin: right center;
    animation: anota-flip-prev var(--anota-page-turn-duration) cubic-bezier(.22,.68,.28,1) both;
}
.anota-book__flip.is-next::after { animation: anota-page-shade var(--anota-page-turn-duration) ease-in-out both; }
.anota-book__flip.is-prev::after { background: linear-gradient(270deg, rgba(8,29,48,.24), rgba(8,29,48,.045) 36%, rgba(255,255,255,.12) 72%, transparent); animation: anota-page-shade var(--anota-page-turn-duration) ease-in-out both; }
.anota-book.is-turning-next .anota-book__page,
.anota-book.is-turning-prev .anota-book__page { animation: anota-page-settle var(--anota-page-turn-duration) cubic-bezier(.22,.68,.28,1) both; }
@keyframes anota-flip-next {
    0% { transform: translateZ(1px) rotateY(0deg) skewY(0deg); opacity: 1; box-shadow: -2px 1px 4px rgba(8,29,48,.07); }
    38% { transform: translateZ(10px) rotateY(-58deg) skewY(.18deg); opacity: 1; box-shadow: -16px 8px 24px rgba(8,29,48,.20); }
    62% { transform: translateZ(12px) rotateY(-108deg) skewY(-.12deg); opacity: .96; box-shadow: -28px 10px 38px rgba(8,29,48,.26); }
    84% { opacity: .48; }
    100% { transform: translateZ(1px) rotateY(-179deg) skewY(0deg); opacity: 0; box-shadow: -5px 2px 10px rgba(8,29,48,.08); }
}
@keyframes anota-flip-prev {
    0% { transform: translateZ(1px) rotateY(0deg) skewY(0deg); opacity: 1; box-shadow: 2px 1px 4px rgba(8,29,48,.07); }
    38% { transform: translateZ(10px) rotateY(58deg) skewY(-.18deg); opacity: 1; box-shadow: 16px 8px 24px rgba(8,29,48,.20); }
    62% { transform: translateZ(12px) rotateY(108deg) skewY(.12deg); opacity: .96; box-shadow: 28px 10px 38px rgba(8,29,48,.26); }
    84% { opacity: .48; }
    100% { transform: translateZ(1px) rotateY(179deg) skewY(0deg); opacity: 0; box-shadow: 5px 2px 10px rgba(8,29,48,.08); }
}
@keyframes anota-page-shade { 0%, 100% { opacity: 0; } 42%, 62% { opacity: 1; } }
@keyframes anota-page-settle { 0% { transform: scale(.994); } 100% { transform: scale(1); } }

.anota-page-arrow {
    appearance: none;
    position: absolute;
    z-index: 20;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 60px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(8,29,48,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 24px rgba(8,29,48,.1);
    color: var(--anota-navy);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}
.anota-page-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.04); }
.anota-page-arrow:disabled { opacity: .3; cursor: not-allowed; }
.anota-page-arrow--prev { left: 12px; }
.anota-page-arrow--next { right: 12px; }

.anota-reader__loading,
.anota-reader__error {
    position: absolute;
    z-index: 25;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: color-mix(in srgb, var(--anota-stage) 92%, transparent);
    color: var(--anota-navy);
    font-size: 14px;
    font-weight: 600;
}
.anota-reader__loading[hidden], .anota-reader__error[hidden] { display: none; }
.anota-loader { width: 34px; height: 34px; border: 2px solid rgba(16,45,73,.18); border-top-color: var(--anota-accent); border-radius: 50%; animation: anota-spin .8s linear infinite; }
@keyframes anota-spin { to { transform: rotate(360deg); } }
.anota-reader__error .anota-icon { width: 32px; height: 32px; color: var(--anota-accent); }
.anota-reader__error p { margin: 0; }
.anota-reader__error button { padding: 10px 17px; border: 0; border-radius: 999px; background: var(--anota-navy); color: #fff; cursor: pointer; }

.anota-reader__panel {
    position: relative;
    z-index: 35;
    width: min(330px, 84vw);
    flex: 0 0 min(330px, 84vw);
    overflow: auto;
    border-right: 1px solid var(--anota-line);
    background: #fff;
    color: var(--anota-ink);
    box-shadow: 12px 0 30px rgba(8,29,48,.08);
}
.anota-reader__panel[hidden] { display: none; }
.anota-panel-heading { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 55px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--anota-line); background: rgba(255,255,255,.96); color: var(--anota-navy); }
.anota-panel-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.anota-panel-close:hover { background: var(--anota-ivory); }
.anota-thumbnails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.anota-thumbnail { appearance: none; position: relative; min-width: 0; padding: 5px; border: 1px solid var(--anota-line); border-radius: 7px; background: var(--anota-ivory); color: var(--anota-navy); cursor: pointer; }
.anota-thumbnail canvas { display: block; width: 100%; height: auto; background: #fff; }
.anota-thumbnail span { display: block; padding: 5px 0 1px; font-size: 10px; text-align: center; }
.anota-thumbnail[aria-current="page"] { border-color: var(--anota-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--anota-accent) 26%, transparent); }
.anota-search { display: flex; gap: 7px; padding: 15px; border-bottom: 1px solid var(--anota-line); }
.anota-search input { min-width: 0; height: 42px; flex: 1; padding: 0 12px; border: 1px solid var(--anota-line); border-radius: 9px; font: inherit; }
.anota-search button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 9px; background: var(--anota-navy); color: #fff; cursor: pointer; }
.anota-search button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.anota-search__status { margin: 0; padding: 12px 15px; color: var(--anota-muted); font-size: 12px; }
.anota-search__results { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 16px; }
.anota-search-result { appearance: none; display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px; border: 0; border-radius: 9px; background: transparent; color: var(--anota-ink); text-align: left; cursor: pointer; }
.anota-search-result:hover { background: var(--anota-ivory); }
.anota-search-result strong { display: grid; flex: 0 0 30px; place-items: center; height: 30px; border-radius: 50%; background: var(--anota-navy); color: #fff; font-size: 11px; }
.anota-search-result span { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.anota-reader__controls { justify-content: space-between; gap: 12px; padding: 0 12px; border-top: 1px solid rgba(255,255,255,.1); }
.anota-reader__controls .anota-reader__control { width: 36px; height: 36px; }
.anota-reader__zoom { width: 54px !important; color: rgba(255,255,255,.76); font-size: 10px; font-weight: 700; }
.anota-page-input { display: flex; align-items: center; gap: 7px; margin: 0 6px; color: rgba(255,255,255,.58); font-size: 11px; }
.anota-page-input input { width: 44px; height: 30px; padding: 0 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 11px; text-align: center; -moz-appearance: textfield; }
.anota-page-input input::-webkit-inner-spin-button { display: none; }
.anota-progress { flex: 1 1 auto; max-width: 420px; margin: 0 8px; }
.anota-progress input { appearance: none; display: block; width: 100%; height: 3px; margin: 0; border: 0; border-radius: 3px; background: rgba(255,255,255,.18); accent-color: var(--anota-accent); cursor: pointer; }
.anota-progress input::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border: 2px solid var(--anota-chrome); border-radius: 50%; background: var(--anota-accent); }

.anota-reader.is-dark { --anota-stage: #151c22; --anota-paper: #f6f4ed; }
.anota-reader.is-dark .anota-reader__stage { background: radial-gradient(circle at 50% 45%, #26313b, #12181e 74%); }
.anota-reader.is-dark .anota-page-arrow { border-color: rgba(255,255,255,.14); background: rgba(25,34,43,.84); color: #fff; }
.anota-reader.is-dark .anota-page-arrow:hover { background: #26313b; }

.anota-reader :focus-visible,
.anota-hero :focus-visible,
.anota-library :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--anota-accent) 72%, white);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .anota-hero { grid-template-columns: minmax(0, 1fr) minmax(200px, .7fr); gap: 38px; padding: 48px 38px; }
    .anota-library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .anota-progress { display: none; }
    .anota-reader__stage { padding-right: 54px; padding-left: 54px; }
}

@media (max-width: 620px) {
    .anota-fallback { width: 100%; margin-top: 0; }
    .anota-hero { grid-template-columns: 1fr; gap: 44px; padding: 38px 22px 44px; border-radius: 18px; text-align: center; }
    .anota-hero::after { width: 100%; height: 36%; inset: auto 0 0; }
    .anota-hero__content { display: flex; flex-direction: column; align-items: center; }
    .anota-hero__title { font-size: clamp(40px, 14vw, 62px); }
    .anota-hero__summary { font-size: 15px; line-height: 1.65; }
    .anota-hero__actions { width: 100%; }
    .anota-hero__actions .anota-button--primary { flex: 1 1 auto; }
    .anota-hero__cover { max-width: min(76vw, 330px); grid-row: 1; }
    .anota-library__toolbar { flex-direction: column; margin-bottom: 25px; }
    .anota-library__selects { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .anota-library__selects > :only-child { grid-column: 1 / -1; }
    .anota-library__search, .anota-library__year, .anota-library__sort { flex-basis: auto; width: 100%; max-width: none; }
    .anota-library__grid { grid-template-columns: 1fr; gap: 24px; }
    .anota-card { display: grid; grid-template-columns: minmax(118px, 38%) minmax(0, 1fr); border-radius: 14px; }
    .anota-card__cover { height: 100%; min-height: 218px; aspect-ratio: auto; }
    .anota-card__overlay { display: none; }
    .anota-card__body { display: flex; flex-direction: column; justify-content: center; padding: 20px 17px; }
    .anota-card h3 { font-size: 24px; }
    .anota-library__footer { align-items: stretch; flex-direction: column; margin-top: 26px; }
    .anota-pagination { justify-content: center; }
    .anota-pagination__button--previous,
    .anota-pagination__button--next { font-size: 0; }
    .anota-pagination__button--previous::before { content: "‹"; font-size: 20px; }
    .anota-pagination__button--next::before { content: "›"; font-size: 20px; }

    .anota-reader {
        --anota-reader-height: min(88svh, 820px);
        --anota-page-turn-duration: 480ms;
        min-height: 520px;
        border-radius: 13px;
    }
    .anota-reader__topbar { min-height: 52px; padding-right: 7px; padding-left: 12px; }
    .anota-reader__identity { gap: 8px; }
    .anota-reader__mark { width: 28px; height: 28px; }
    .anota-reader__identity small { max-width: 112px; }
    .anota-reader__top-actions .anota-reader__control { width: 36px; height: 36px; }
    .anota-reader__top-actions [data-action="thumbnails"] { display: none; }
    .anota-reader__workspace { overflow: visible; }
    .anota-reader__panel { position: absolute; inset: 0 auto 0 0; width: min(330px, 92vw); }
    .anota-reader__stage { padding: 12px 10px 14px; }
    .anota-page-arrow { display: none; }
    .anota-book__page { border-radius: 4px !important; box-shadow: 0 12px 30px rgba(8,29,48,.22) !important; }
    .anota-book__gutter { display: none; }
    .anota-reader__controls { min-height: 56px; padding: 0 7px; }
    .anota-reader__controls-group { gap: 0; }
    .anota-reader__controls .anota-reader__control { width: 33px; }
    .anota-reader__controls-group--nav [data-action="first"],
    .anota-reader__controls-group--nav [data-action="last"],
    .anota-reader__controls-group--tools [data-action="print"] { display: none; }
    .anota-page-input { gap: 4px; margin: 0 2px; }
    .anota-page-input input { width: 38px; }
    .anota-reader__zoom { width: 44px !important; }
}

@media (max-width: 380px) {
    .anota-reader__identity small { display: none; }
    .anota-reader__top-actions [data-action="theme"] { display: none; }
    .anota-reader__controls-group--tools [data-action="zoom-reset"] { display: none; }
}

@media (orientation: landscape) and (max-height: 560px) {
    .anota-reader { --anota-reader-height: 100svh; min-height: 0; border-radius: 0; }
    .anota-reader__topbar, .anota-reader__controls { min-height: 46px; }
    .anota-reader__stage { padding-top: 8px; padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .anota-reader *, .anota-hero *, .anota-library * { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
