:root {
 --brand-900:#152a43;--brand-700:#193b68;--brand-500:#1763a6;--accent:#007e87;--surface:#ffffff;--surface-alt:#f0f5fa;--text:#172b43;--text-muted:#566478;--border:#d4dee9;--focus:#1763a6;--success:#147346;--error:#b42318;--warning:#865100;
 --kp-ink:var(--text);--kp-muted:var(--text-muted);--kp-paper:var(--surface);--kp-green:var(--brand-700);--kp-soft:var(--surface-alt);--kp-line:var(--border);--kp-coral:var(--brand-500);--kp-cream:#f6f9fc;--kp-teal:var(--accent);
 --color-green:var(--brand-700);--color-yellow:var(--warning);--color-red:var(--brand-500);--color-text:var(--text);--color-background:#f6f9fc;--color-surface:var(--surface);--color-muted:var(--text-muted);--color-line:var(--border);--color-neutral:var(--surface-alt);
}
body.knigopolka-app-page,body.knigopolka-home {font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--color-background);color:var(--text);}
body.knigopolka-home {--kp-ink:var(--text);--kp-muted:var(--text-muted);--kp-green:var(--brand-700);--kp-teal:var(--accent);--kp-coral:var(--brand-500);}
.knigopolka-app-brand {color:var(--brand-700);gap:10px;}
.knigopolka-app-brand img {border-radius:0;box-shadow:none;object-fit:contain;}
.kp-wordmark {color:var(--brand-700);font-weight:750;letter-spacing:-.035em;line-height:1.15;}
.kp-wordmark small {display:block;font-size:10px;letter-spacing:.01em;font-weight:500;color:var(--text-muted);margin-top:4px;}
.knigopolka-app-footer-brand img {vertical-align:middle;object-fit:contain;margin-right:8px;}
.knigopolka-app-footer-brand strong,.knigopolka-app-footer-brand strong span {color:var(--brand-700);}
.knigopolka-button,.kp-primary-button {background:var(--brand-700);color:#fff;border-color:var(--brand-700);}
.knigopolka-button:hover,.kp-primary-button:hover {background:var(--brand-900);}
.knigopolka-button:focus-visible,.knigopolka-secondary-button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:3px solid var(--focus);outline-offset:3px;}
.knigopolka-form .is-knigopolka-focused {border-color:var(--focus);outline:3px solid var(--focus);background:var(--surface);box-shadow:0 0 0 5px #dbe9f6;}
.knigopolka-unified-search {border-color:var(--border);background:var(--surface);}
.knigopolka-unified-input-row {position:relative;}
.knigopolka-unified-input-row input {padding-left:40px;padding-right:54px;border-radius:24px;min-height:48px;width:100%;}
.knigopolka-input-search-icon {position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-muted);pointer-events:none;}
.knigopolka-unified-input-row .knigopolka-camera-button {position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;min-height:44px;padding:10px;background:var(--surface-alt);color:var(--brand-700);border:0;border-radius:50%;}
.knigopolka-filter-chips {display:flex;gap:8px;overflow-x:auto;padding:4px 0 8px;max-width:100%;}
.kp-filter-chip {display:inline-flex;align-items:center;flex:none;min-height:44px;padding:8px 14px;border-radius:24px;background:var(--surface-alt);color:var(--brand-700);font-size:13px;text-decoration:none;}
.kp-filter-chip.is-active {background:var(--brand-700);color:white;}
.kp-hero {padding:56px 0;background:var(--surface);}
.kp-hero h1 {line-height:1.06;letter-spacing:-.045em;font-size:clamp(2.3rem,4.8vw,4.6rem);}
.kp-hero-grid {gap:32px;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);}
.kp-hero-visual {min-height:300px;}
.kp-brand-animation {position:relative;width:min(100%,400px);aspect-ratio:1;display:grid;place-items:center;}
.kp-hero-visual .kp-brand-animation img {width:100%;height:100%;object-fit:contain;border:0;border-radius:0;box-shadow:none;}
.kp-brand-animation video {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;}
.kp-brand-animation.is-playing video {opacity:1;}
.kp-brand-animation.is-playing img {visibility:hidden;}
.kp-owner-cta {background:var(--brand-700);}
.kp-owner-cta small,.kp-owner-cta p {color:white;}
.kp-how-section,.kp-benefits {background:var(--surface-alt);}
.kp-profile-heading {display:flex;gap:16px;align-items:center;justify-content:space-between;}
.kp-profile-heading h1 {min-width:0;overflow-wrap:anywhere;margin:0;}
.kp-profile-add {display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;font-size:26px;border-radius:12px;text-decoration:none;}
.kp-ai:has(> [data-ai-panel][hidden]) {padding:0;margin:0;border:0;background:none;}
.kp-description-ocr {display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0;}
.kp-description-ocr [data-ocr-options] {display:flex;gap:12px;flex-wrap:wrap;}
.kp-description-ocr [hidden] {display:none;}
.kp-description-ocr button {min-height:44px;display:inline-flex;gap:6px;align-items:center;}
.kp-description-ocr [role=status] {flex-basis:100%;margin:0;font-size:14px;color:var(--text-muted);}
.kp-ocr-dialog {max-width:min(420px,calc(100% - 32px));border:1px solid var(--border);border-radius:16px;padding:20px;color:var(--text);}
.kp-ocr-dialog::backdrop {background:#152a4380;}
.kp-ocr-dialog button {min-height:44px;margin:5px;}
.kp-blog-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;}
.kp-blog-card {background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden;min-width:0;}
.kp-blog-card>a {display:flex;height:100%;flex-direction:column;text-decoration:none;color:var(--text);}
.kp-blog-card img,.kp-blog-placeholder {width:100%;aspect-ratio:16/9;object-fit:cover;display:block;height:auto;}
.kp-blog-placeholder {display:grid;place-items:center;background:var(--surface-alt);color:var(--brand-700);font-size:14px;}
.kp-blog-card>a>div {padding:14px;display:flex;flex-direction:column;flex:1;}
.kp-blog-card h3 {font-size:16px;line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere;}
.kp-blog-card p {font-size:13px;line-height:1.5;color:var(--text-muted);margin:0 0 12px;}
.kp-blog-read {display:flex;align-items:center;min-height:44px;color:var(--brand-700);font-weight:650;font-size:13px;margin-top:auto;}
.kp-book-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
@media(max-width:768px){
 body.knigopolka-app-page,body.knigopolka-home {padding-bottom:calc(76px + env(safe-area-inset-bottom));}
 .knigopolka-app-bottom-nav {height:auto;min-height:64px;padding:8px 6px calc(8px + env(safe-area-inset-bottom));}
 .knigopolka-app-bottom-nav a {min-height:44px;}
 .knigopolka-app-bottom-nav .knigopolka-app-bottom-add>span {background:var(--brand-700);}
 .knigopolka-app-bottom-nav a.is-active {color:var(--brand-700);}
 .kp-hero-grid {grid-template-columns:1fr;gap:16px;}
 .kp-hero {padding:32px 0 22px;}
 .kp-hero-visual {min-height:0;}
 .kp-brand-animation {width:160px;}
 .kp-hero-actions a {min-height:48px;}
 .kp-blog-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
 .kp-blog-card h3 {font-size:14px;}
 .kp-blog-card>a>div {padding:10px;}
 .kp-blog-card p {font-size:12px;}
 .kp-book-row {grid-template-columns:repeat(2,minmax(0,1fr));width:100%;overflow:visible;padding:0;gap:12px;}
 .kp-book-row .knigopolka-book-card {width:auto;min-width:0;}
 .kp-book-row .knigopolka-cover {min-height:0;aspect-ratio:3/4;}
 .kp-book-row .knigopolka-card-body {padding:12px;}
 .kp-book-row .knigopolka-card-body h2 {font-size:15px;line-height:1.4;}
 .kp-book-row .knigopolka-card-body h2 a {overflow-wrap:anywhere;}
 .kp-owner-cta {padding:24px;}
 .kp-wordmark small {font-size:9px;}
}
@media(prefers-reduced-motion:reduce){.kp-brand-animation video {display:none;}.kp-brand-animation.is-playing img {visibility:visible;}}
.knigopolka-cover {position:relative;}
.kp-card-badge {position:absolute;top:auto;bottom:8px;left:8px;right:auto;width:max-content;max-width:calc(100% - 16px);box-sizing:border-box;padding:5px 8px;border-radius:8px;background:var(--surface-alt);color:var(--text);font-size:12px;line-height:1.3;font-weight:650;text-align:center;}
.kp-badge-free {background:#e4f4ec;color:#126247;}.kp-badge-sale {background:#fff1d6;color:#754800;}.kp-badge-exchange {background:#e4effa;color:#193b68;}
.knigopolka-unified-input-row {display:block;}
.knigopolka-unified-input-row.is-search-only input {padding-right:14px;}
.kp-hero h1 {font-weight:700;}
.kp-blog-card h3 {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;}
.kp-blog-card p {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;}
#kp-blog-title,#kp-how {scroll-margin-top:90px;}
.knigopolka-catalog .is-view-tiles .knigopolka-tile-detail {min-height:44px;}
.knigopolka-app-avatar,.knigopolka-profile-avatar {background:var(--surface-alt);color:var(--brand-700);}
.knigopolka-isbn-first {background:var(--surface);border-color:var(--border);}
.knigopolka-confirm-cover {background:var(--surface-alt);}
.knigopolka-app-brand:focus-visible,.knigopolka-app-account:focus-visible {outline:3px solid var(--focus);}
/* 2.0.1: identical collection views and genuine equal-height tiles. */
body.knigopolka-app-page :is(h1,h2,h3,h4),body.knigopolka-home :is(h1,h2,h3,h4) {font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;}
[data-kp-collection] [data-kp-view-grid].is-view-tiles {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:stretch;}
[data-kp-view-grid].is-view-tiles .kp-tile-card {display:flex;flex-direction:column;align-items:stretch;min-width:0;min-height:0;height:100%;box-sizing:border-box;padding:0;gap:0;overflow:hidden;}
[data-kp-view-grid].is-view-tiles .kp-tile-card .kp-tile-cover {display:flex;flex:none;align-self:flex-start;align-items:center;justify-content:center;width:64px;height:88px;min-height:0;aspect-ratio:auto;padding:0;margin:12px 12px 0;background:var(--surface-alt);border-radius:8px;overflow:hidden;}
[data-kp-view-grid].is-view-tiles .kp-tile-cover .knigopolka-cover-image {width:100%;height:100%;object-fit:contain;border-radius:0;}
[data-kp-view-grid].is-view-tiles .kp-tile-cover .kp-card-badge {display:none;}
[data-kp-view-grid].is-view-tiles .kp-tile-cover .knigopolka-cover-placeholder {display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px;line-height:1.25;padding:5px;overflow-wrap:anywhere;}
[data-kp-view-grid].is-view-tiles .kp-tile-body {display:flex;flex:1 0 auto;flex-direction:column;align-items:stretch;box-sizing:border-box;min-width:0;min-height:0;gap:8px;padding:12px;}
[data-kp-view-grid].is-view-tiles .kp-tile-body .kp-tile-title {display:block;order:0;margin:0;font-family:inherit;font-size:14px;line-height:1.4;font-weight:650;overflow-wrap:anywhere;}
[data-kp-view-grid].is-view-tiles .kp-tile-body .kp-tile-author {display:block;order:1;margin:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere;color:var(--text-muted);}
[data-kp-view-grid].is-view-tiles .kp-tile-body .kp-tile-link {display:flex;align-items:center;justify-content:center;order:3;flex:none;margin: auto 0 0;padding:8px;min-height:44px;font-size:13px;line-height:1.25;box-sizing:border-box;white-space:normal;text-align:center;}
[data-kp-view-grid].is-view-tiles .kp-tile-body .knigopolka-deep-link-action {display:block;order:2;}
[data-kp-view-grid].is-view-tiles .kp-shelf-year {display:none;}
/* Shelf details and compact rows retain their status and management controls. */
.knigopolka-shelf-list.is-view-compact {grid-template-columns:1fr;}
.knigopolka-shelf-list.is-view-detailed {grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;}
.knigopolka-shelf-list.is-view-detailed .knigopolka-shelf-card {display:flex;flex-direction:column;gap:14px;}
.knigopolka-shelf-list.is-view-detailed .knigopolka-shelf-cover {width:100%;height:260px;aspect-ratio:auto;}
.knigopolka-shelf-list.is-view-detailed .knigopolka-shelf-cover img {object-fit:contain;}
.knigopolka-shelf-list.is-view-detailed .knigopolka-shelf-card-body {width:100%;}
@media(max-width:820px){[data-kp-collection] [data-kp-view-grid].is-view-tiles {grid-template-columns:repeat(2,minmax(0,1fr));}.knigopolka-shelf-list.is-view-detailed {grid-template-columns:1fr;}}
[data-kp-view-grid].is-view-tiles .kp-tile-body .kp-tile-link {text-decoration:none;}

/* 2.0.2: readable benefit cards and stable two-line headline on mobile. */
.kp-hero h1 > span {display:block;white-space:nowrap;}
.kp-benefits .kp-steps article {display:flex;flex-direction:column;gap:10px;min-width:0;}
.kp-benefits .kp-steps h3,.kp-benefits .kp-steps p {margin:0;min-width:0;align-self:stretch;}
.kp-steps article > :is(h3,p) {min-width:0;overflow-wrap:break-word;}
.kp-reading-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0;}
.kp-reading-fields label {display:block;}
.kp-reading-fields input {width:100%;box-sizing:border-box;}
.kp-reading-help {font-size:13px;line-height:1.5;color:var(--text-muted);}
@media(max-width:768px){
 .kp-hero h1 {font-size:clamp(25px,7.4vw,48px);letter-spacing:-.04em;line-height:1.15;}
 .kp-hero-copy {width:100%;min-width:0;}
 .kp-how-section .kp-steps article {grid-template-columns:42px minmax(0,1fr);}
 .kp-book-row .knigopolka-cover {width:100%;box-sizing:border-box;}
}
@media(max-width:768px){
 .kp-section-heading {flex-direction:column;align-items:flex-start;gap:12px;}
 .kp-section-heading > a {max-width:100%;white-space:normal;overflow-wrap:break-word;}
}
/* 2.0.3: one control system for catalog filters and a balanced footer. */
.knigopolka-catalog .knigopolka-filter-disclosure {border-top:0;padding-top:0;}
.knigopolka-filter-disclosure > summary {justify-content:center;list-style:none;min-height:48px;padding:0;font-size:16px;font-weight:650;gap:10px;}
.knigopolka-filter-disclosure > summary::-webkit-details-marker {display:none;}
.knigopolka-filter-disclosure > summary::marker {content:'';}
.knigopolka-filter-disclosure > summary::after {content:'';width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px;}
.knigopolka-filter-disclosure[open] > summary::after {transform:rotate(225deg);margin-top:4px;}
.knigopolka-filter-disclosure > summary:focus-visible {outline:3px solid var(--focus);outline-offset:3px;border-radius:10px;}
.knigopolka-filter-grid {gap:20px 16px;align-items:end;}
.knigopolka-filter-grid > div {align-content:start;min-width:0;gap:8px;}
.knigopolka-filters .knigopolka-filter-grid label {margin:0;font-family:inherit;font-size:14px;font-weight:600;line-height:20px;}
.knigopolka-filters .knigopolka-filter-grid :is(input,select,button) {box-sizing:border-box;width:100%;height:48px;min-height:48px;margin:0;padding:0 14px;border:1px solid var(--border);border-radius:10px;font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;font-size:14px;font-weight:400;line-height:normal;color:var(--text);background-color:var(--surface);}
.knigopolka-filters .knigopolka-filter-grid select {appearance:none;-webkit-appearance:none;padding-right:40px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23193b68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;}
.knigopolka-filters .knigopolka-filter-grid input::placeholder {color:var(--text-muted);opacity:1;}
.knigopolka-filter-grid .knigopolka-filter-actions {display:grid!important;grid-column:span 2;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px!important;}
.knigopolka-filters .knigopolka-filter-actions .knigopolka-button {background:var(--brand-700);border-color:var(--brand-700);color:white;font-weight:650;}
.knigopolka-filter-actions .knigopolka-filter-reset {display:flex;align-items:center;justify-content:center;height:48px;box-sizing:border-box;padding:0 14px;font-size:14px;}
.knigopolka-app-footer-inner {grid-template-columns:1fr;gap:0;}
.knigopolka-app-footer-brand {display:none;}
.knigopolka-app-footer nav {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 24px;}
.knigopolka-app-footer nav > :is(a,button) {display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:48px;padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--brand-700);font-family:inherit;font-size:14px;font-weight:600;line-height:1.4;text-decoration:none;text-align:center;cursor:pointer;}
.knigopolka-app-footer nav > :is(a,button):hover {background:var(--surface-alt);}
.knigopolka-app-footer nav > .kp-footer-contact {color:var(--accent);border-color:var(--accent);}
.kp-feedback-dialog {width:420px;max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--surface);color:var(--text);font-family:'Inter',system-ui,sans-serif;}
.kp-feedback-dialog::backdrop {background:#152a4366;}
.kp-feedback-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;}
.kp-feedback-heading h2 {margin:0;font-size:20px;line-height:1.3;}
.kp-feedback-close {display:grid;place-items:center;width:40px;height:40px;flex:none;border:0;border-radius:10px;background:var(--surface-alt);font:inherit;font-size:24px;cursor:pointer;color:var(--text);}
.kp-feedback-form {display:grid;gap:14px;}
.kp-feedback-form label {display:grid;gap:6px;font-size:14px;line-height:1.5;font-weight:600;}
.kp-feedback-form :is(input,textarea,button) {box-sizing:border-box;width:100%;font:inherit;font-size:14px;}
.kp-feedback-form :is(input,textarea) {border:1px solid var(--border);border-radius:10px;padding:12px;background:var(--surface);color:var(--text);}
.kp-feedback-form input {height:48px;}
.kp-feedback-form textarea {min-height:120px;resize:vertical;}
.kp-feedback-form .knigopolka-button {height:48px;margin:0;border:0;border-radius:10px;cursor:pointer;}
.kp-feedback-form p {margin:0;font-size:13px;line-height:1.5;color:var(--text-muted);}
.kp-feedback-form [role=status] {color:var(--brand-700);}
.kp-feedback-trap {display:none!important;}
@media(max-width:820px){.knigopolka-filter-grid {grid-template-columns:repeat(2,minmax(0,1fr));}.knigopolka-filter-grid .knigopolka-filter-actions {grid-column:auto;}}
@media(max-width:520px){.knigopolka-filter-grid {grid-template-columns:1fr;}.knigopolka-app-footer nav {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}.kp-feedback-dialog {padding:18px;}}
@media(max-width:520px){.knigopolka-filters .knigopolka-filter-grid :is(input,select,button),.kp-feedback-form :is(input,textarea,button) {font-size:16px;}}
@media(max-width:520px){.knigopolka-app-footer nav > :is(a,button) {min-height:64px;}}

/* 2.0.6: the existing brand accent, ordinary footer links and a single contact action. */
.knigopolka-app-footer {background:var(--accent);color:var(--surface);border:0;padding:36px 0;}
.knigopolka-app-footer-inner {grid-template-columns:minmax(150px,.8fr) minmax(260px,1.4fr) auto;gap:28px;align-items:start;}
.knigopolka-app-footer-brand {display:block;}
.knigopolka-app-footer-brand img {display:none;}
.knigopolka-app-footer .knigopolka-app-footer-brand strong {color:var(--surface);font-size:20px;}
.knigopolka-app-footer-brand p {color:var(--surface);font-size:14px;margin:8px 0 0;}
.knigopolka-app-footer nav {grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;}
.knigopolka-app-footer nav > a {justify-content:flex-start;min-height:44px;padding:8px 0;border:0;border-radius:0;background:transparent;color:var(--surface);font-size:16px;font-weight:500;}
.knigopolka-app-footer nav > a:is(:hover,:active) {background:transparent;text-decoration:underline;text-underline-offset:5px;}
.knigopolka-app-footer nav > a:visited {color:var(--surface);}
.knigopolka-app-footer nav > a:focus-visible {outline:3px solid var(--surface);outline-offset:3px;}
.kp-footer-contact-area {align-self:end;}
.kp-footer-contact {min-height:48px;box-sizing:border-box;padding:12px 20px;border:2px solid var(--surface);border-radius:12px;background:var(--surface);color:var(--accent);font-family:inherit;font-size:16px;font-weight:650;cursor:pointer;}
.kp-footer-contact:is(:hover,:active) {text-decoration:underline;text-underline-offset:4px;}
.kp-footer-contact:focus-visible {outline:3px solid var(--surface);outline-offset:5px;}
.knigopolka-shelf-tabs {overflow:visible;flex-wrap:wrap;gap:8px;margin-bottom:10px;align-items:stretch;}
.knigopolka-shelf-page .knigopolka-shelf-tabs > a {min-height:48px;padding:8px 10px;box-sizing:border-box;font-size:14px;white-space:nowrap;}
.kp-shelf-more {flex:1 1 100%;min-width:0;}
.kp-shelf-more summary {display:flex;align-items:center;gap:8px;min-height:44px;width:max-content;padding:0 10px;list-style:none;cursor:pointer;font-weight:600;color:var(--brand-700);}
.kp-shelf-more summary::-webkit-details-marker {display:none;}
.kp-shelf-more summary::after {content:'⌄';font-size:18px;}
.kp-shelf-more[open] summary::after {content:'⌃';}
.kp-shelf-more summary:focus-visible {outline:3px solid var(--focus);outline-offset:2px;border-radius:8px;}
.kp-shelf-more > div {display:flex;flex-wrap:wrap;gap:8px;padding:4px 0 8px;}
.knigopolka-shelf-page .kp-shelf-more a {display:flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;box-sizing:border-box;border-radius:10px;color:var(--brand-700);background:var(--surface-alt);font-size:14px;text-decoration:none;}
.kp-shelf-more a.is-active {background:var(--brand-700);color:var(--surface);}
.kp-shelf-slices-help {margin:0 0 16px;}
.knigopolka-shelf-filter-disclosure {border-top:0;padding-top:0;}
.knigopolka-shelf-filter-disclosure > summary {display:flex;justify-content:center;align-items:center;gap:10px;min-height:48px;padding:0;list-style:none;cursor:pointer;font-size:16px;}
.knigopolka-shelf-filter-disclosure > summary::-webkit-details-marker {display:none;}
.knigopolka-shelf-filter-disclosure > summary::after {content:'';width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px;}
.knigopolka-shelf-filter-disclosure[open] > summary::after {transform:rotate(225deg);margin-top:4px;}
.knigopolka-shelf-filter-grid {gap:20px 16px;}
.knigopolka-shelf-search label,.knigopolka-shelf-filter-grid label {font-size:14px;line-height:20px;font-weight:600;}
.knigopolka-shelf-filter-grid :is(select,button),.knigopolka-shelf-search :is(input,button) {height:48px;min-height:48px;box-sizing:border-box;font-family:inherit;font-size:16px;border-radius:10px;}
.knigopolka-shelf-filter-grid select {appearance:none;-webkit-appearance:none;padding:0 40px 0 14px;border:1px solid var(--border);background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23193b68' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;}
.kp-shelf-active-filters {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px;}
.kp-shelf-active-filters a {display:inline-flex;align-items:center;gap:8px;min-height:44px;max-width:100%;box-sizing:border-box;padding:8px 12px;overflow-wrap:anywhere;background:var(--surface-alt);color:var(--brand-700);border-radius:10px;font-size:14px;text-decoration:none;}
.kp-shelf-active-filters .kp-shelf-reset {background:transparent;text-decoration:underline;text-underline-offset:4px;}
.knigopolka-author-chip {max-width:100%;min-height:44px;overflow-wrap:anywhere;}
.knigopolka-author-chip button {flex:none;width:44px;height:44px;min-height:44px;padding:0;}
.knigopolka-photo-order-buttons button {width:44px;height:44px;min-height:44px;}
.knigopolka-active-filters a,.knigopolka-secondary-action,.knigopolka-text-button {min-height:44px;}
.knigopolka-active-filters a {box-sizing:border-box;}
.kp-hero {padding:28px 0 12px;}
.kp-hero h1 {font-size:clamp(1.75rem,3.1vw,2.8rem);line-height:1.15;margin-bottom:14px;}
.kp-hero-grid {grid-template-columns:minmax(0,1fr) 150px;gap:28px;}
.kp-hero-visual {min-height:0;}
.kp-hero-visual .kp-brand-animation {width:150px;}
.kp-hero-text {margin:0 0 18px;}
.kp-hero-actions {display:flex;flex-wrap:wrap;gap:10px;}
.kp-hero-actions > a {min-height:48px;box-sizing:border-box;font-size:16px;padding:10px 16px;}
.kp-search-section {padding-top:18px;}
@media(max-width:820px){.knigopolka-app-footer-inner {grid-template-columns:1fr 1fr;gap:22px;}.kp-footer-contact-area {grid-column:2;justify-self:start;}.knigopolka-app-footer nav {grid-column:2;grid-row:1;}}
@media(max-width:768px){
 .knigopolka-app-footer {padding:28px 0 calc(100px + env(safe-area-inset-bottom));}
 .knigopolka-app-footer-inner {grid-template-columns:1fr;gap:16px;}
 .knigopolka-app-footer nav,.kp-footer-contact-area {grid-column:auto;grid-row:auto;}
 .knigopolka-app-footer nav > a {min-height:44px;}
 .kp-hero {padding:24px 0 8px;}
 .kp-hero-grid {grid-template-columns:1fr;gap:0;}
 .kp-hero-visual {display:none;}
 .kp-hero h1 {font-size:1.75rem;}
 .kp-hero h1 > span {white-space:normal;}
 .kp-hero-actions > a {flex:1;padding:10px 12px;}
 .kp-search-section {padding-top:12px;}
 :is(body.knigopolka-app-page,body.knigopolka-home) :is(input,select,textarea) {font-size:max(16px,1rem);}
 .knigopolka-book-detail {display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px 16px;align-items:start;}
 .knigopolka-book-detail > .knigopolka-cover {grid-column:1;grid-row:1 / span 4;width:96px;height:144px;min-height:0;aspect-ratio:auto;}
 .knigopolka-book-detail > .knigopolka-cover img {width:100%;height:100%;object-fit:contain;}
 .knigopolka-book-detail-content {display:contents;}
 .knigopolka-book-detail-content > :is(h1,.knigopolka-eyebrow,.knigopolka-author,.knigopolka-publisher,.knigopolka-tags) {grid-column:2;min-width:0;margin:0;overflow-wrap:anywhere;}
 .knigopolka-book-detail-content h1 {font-size:1.35rem;line-height:1.3;padding-right:24px;}
 .knigopolka-book-detail-content > :is(.knigopolka-book-offer-summary,.knigopolka-description,.knigopolka-description-toggle) {grid-column:1 / -1;margin-top:8px;}
 .knigopolka-book-detail .knigopolka-book-offer-summary {display:grid;gap:8px;}
 .knigopolka-book-detail .knigopolka-book-offer-summary p {margin:0;}
 .knigopolka-copy-gallery-main {min-height:0;max-height:220px;}
 .knigopolka-copy-gallery-main img,.knigopolka-copy-gallery-fallback img {max-height:220px;object-fit:contain;}
 .knigopolka-copy-detail h1 {font-size:1.5rem;line-height:1.3;overflow-wrap:anywhere;}
}
/* Keep the search surface clear of the hero actions. */
.kp-search-section {margin-top:0;}
.kp-hero-actions {margin-top:18px;}
.knigopolka-secondary-action,.knigopolka-text-button {display:inline-flex;align-items:center;}
@media(max-width:768px){
 .knigopolka-app-login,.knigopolka-app-brand {min-height:44px;}
 .knigopolka-book-detail-content h1 {padding-right:56px;}
 .knigopolka-description-preview {display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;}
}

.kp-feedback-close {width:44px;height:44px;}
.knigopolka-app-account {min-width:44px;min-height:44px;}
