/**
 * Modernizace napříč dev webem — přehlednost, světlý elegantní layout
 */

/* —— Statické / informační stránky —— */
.page-content-narrow {
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--page-section-gap, 3rem);
    padding: 0;
    box-sizing: border-box;
}

.page-prose {
    font-family: var(--font-reading);
    font-size: 1.0625rem;
    line-height: 1.78;
    color: var(--color-ink-soft);
}

.page-prose p {
    margin: 0 0 1.15em;
}

.page-prose p:last-child {
    margin-bottom: 0;
}

.page-prose a {
    font-weight: 500;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.page-placeholder {
    max-width: 100%;
    margin: 0 0 var(--page-section-gap, 2.5rem);
    padding: var(--inset-comfort-lg);
    text-align: left;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-soft);
    background: rgba(38, 35, 32, 0.65);
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
}

.page-actions-center .back-link,
.back-link.list-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    color: var(--color-sage);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.page-actions-center .back-link:hover,
.back-link.list-chip:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--color-ink);
    box-shadow: var(--shadow-sm);
}

/* —— Auth formuláře —— */
.page-main .auth-form {
    width: min(100%, 24rem);
    margin: 0 auto 3rem;
    padding: 1.5rem 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    box-shadow: var(--shadow-sm);
}

.page-main .auth-form label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.page-main .auth-form input[type="email"],
.page-main .auth-form input[type="password"],
.page-main .auth-form input[type="text"],
.page-main .auth-form textarea {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--color-cream);
    color: var(--color-ink);
    font-family: var(--font-body);
}

.page-main .auth-form.contact-form {
    position: relative;
    width: min(100%, 28rem);
}

.page-main .auth-form .auth-form__textarea {
    min-height: 10rem;
    resize: vertical;
    line-height: 1.55;
}

.contact-form__honeypot {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.contact-form__honeypot label,
.contact-form__honeypot input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
}

.page-main .contact-page__email {
    display: block;
    width: min(100%, 28rem);
    margin: 0 auto 3rem;
    padding: 0;
    text-align: center;
    text-align-last: center;
    font-family: var(--font-body);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.page-main .contact-page__email a {
    display: inline-block;
    color: var(--color-ink);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.page-main .contact-form {
    margin-bottom: 1.25rem;
}

.page-main .contact-form .auth-form__actions {
    justify-content: center;
}

.page-main .contact-page + .auth-form-message,
.page-main .auth-form-message + .contact-form {
    margin-top: 1rem;
}

.page-main .auth-form button[type="submit"],
.page-main .auth-form .auth-form__submit {
    border-radius: var(--radius-pill);
    background: var(--color-sage);
    border-color: var(--color-sage);
    color: var(--color-paper);
    font-weight: 600;
}

.account-shell {
    width: min(100%, 40rem);
    margin-inline: auto;
}

body.page-account .page-main {
    padding-top: var(--site-content-offset-desktop, 88px);
}

@media (max-width: 768px) {
    body.page-account .page-main {
        padding-top: var(--site-content-offset-mobile, 1rem);
    }
}

body.page-account .page-heading {
    width: 100%;
    max-width: 100%;
}

body.page-account .account-panel .auth-form {
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

body.page-account .auth-form-message {
    max-width: none;
    margin: 0 0 1rem;
}

.account-hub__greeting {
    margin: -0.35rem 0 1.5rem;
    font-family: var(--font-reading);
    font-size: 1.05rem;
    color: var(--color-ink-soft);
}

.account-hub__grid {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 36rem) {
    .account-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.account-hub-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.15rem 1.2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.account-hub-card:hover,
.account-hub-card:focus-visible {
    border-color: rgba(58, 83, 100, 0.45);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    outline: none;
}

.account-hub-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-ink);
}

.account-hub-card__description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-muted);
}

.account-hub-card__badge {
    align-self: flex-start;
    margin-top: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(58, 83, 100, 0.1);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-sage);
}

.account-nav {
    margin: 0 0 1.5rem;
}

.account-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.account-nav__item {
    margin: 0;
}

.account-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
    background: var(--color-cream);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink-soft);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.account-nav__link:hover,
.account-nav__link:focus-visible {
    border-color: rgba(58, 83, 100, 0.4);
    color: var(--color-ink);
    outline: none;
}

.account-nav__link.is-active {
    border-color: var(--color-sage);
    background: var(--color-sage);
    color: var(--color-paper);
}

.account-panel {
    margin-bottom: 3rem;
    padding: 1.35rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    box-shadow: var(--shadow-sm);
}

.account-panel__header {
    margin-bottom: 1.15rem;
}

.account-panel__title {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-ink);
}

.account-panel__intro {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-muted);
}

.account-panel__form {
    margin-top: 0.5rem;
}

.account-panel__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--color-sage);
    color: var(--color-paper);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.account-empty-state {
    margin: 0;
    font-family: var(--font-reading);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-ink-soft);
}

.account-empty-state__action {
    margin: 1rem 0 0;
}

.account-reading-progress {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.account-reading-progress__chapter--finished {
    color: #22c55e;
}

.account-reading-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.account-reading-section__head {
    margin-bottom: 1.1rem;
}

.account-reading-section__head::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 0.85rem;
    background: var(--border-soft);
}

.account-reading-section__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3.2vw, 1.65rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-ink);
}

.account-reading-section__empty {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-muted);
}

.account-reading-progress__card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: var(--color-cream);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.account-reading-progress__card--has-action .account-reading-progress__body {
    padding-right: 6.75rem;
}

.account-reading-progress__progress {
    width: 100%;
    height: 2px;
    margin: 0;
    background: rgba(58, 83, 100, 0.22);
    overflow: hidden;
    flex-shrink: 0;
}

.account-reading-progress__progress-fill {
    display: block;
    width: calc(var(--story-progress, 0) * 100%);
    max-width: 100%;
    height: 100%;
    background: #3a5364;
    transition: width 0.35s ease;
}

.account-reading-progress__card:has(.account-reading-progress__link:hover),
.account-reading-progress__card:has(.account-reading-progress__link:focus-visible) {
    border-color: rgba(58, 83, 100, 0.45);
    background: var(--color-paper);
    box-shadow: var(--shadow-xs);
}

.account-reading-progress__link {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    color: inherit;
    text-decoration: none;
}

.account-reading-progress__media {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    display: flex;
    align-self: stretch;
}

.account-reading-progress__thumb {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-paper);
}

.account-reading-progress__thumb--placeholder {
    min-height: 4.25rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-soft);
}

.account-reading-progress__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding-top: 0.1rem;
}

.account-reading-progress__actions {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    max-width: calc(100% - 5.5rem);
}

.account-reading-progress__mark-read {
    width: auto;
    max-width: 100%;
    padding: 0.28rem 0.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-ink-soft);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.account-reading-progress__mark-read:hover,
.account-reading-progress__mark-read:focus-visible {
    border-color: rgba(34, 197, 94, 0.55);
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    outline: none;
}

.account-reading-progress__mark-read:disabled {
    opacity: 0.6;
    cursor: wait;
}

.account-reading-progress__mark-in-progress {
    width: auto;
    max-width: 100%;
    padding: 0.28rem 0.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-ink-soft);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.account-reading-progress__mark-in-progress:hover,
.account-reading-progress__mark-in-progress:focus-visible {
    border-color: rgba(230, 126, 34, 0.55);
    color: #e67e22;
    background: rgba(230, 126, 34, 0.08);
    outline: none;
}

.account-reading-progress__mark-in-progress:disabled {
    opacity: 0.6;
    cursor: wait;
}

.account-reading-progress__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-reading-progress__item {
    margin: 0;
}

.account-reading-progress__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-ink);
}

.account-reading-progress__chapter {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-sage);
}

.account-reading-progress__meta,
.account-reading-progress__date {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--color-muted);
}

/* —— Postavy — archiv —— */
.page-characters-archive .page-heading,
.page-gallery-archive .page-heading {
    letter-spacing: -0.02em;
}

.page-characters-archive .page-list-intro {
    font-family: var(--font-reading);
    line-height: 1.82;
    color: var(--color-ink-soft);
    max-width: 100%;
    width: 100%;
    text-align: left;
    margin-inline: 0;
}

.page-characters-archive .page-list-intro-section {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.page-characters-archive .char-grid:not(.char-catalog__track) {
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

.page-characters-archive .char-grid:not(.char-catalog__track) .obr-card {
    aspect-ratio: auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: var(--color-paper);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    user-select: text;
    -webkit-user-select: text;
}

.page-characters-archive .char-grid:not(.char-catalog__track) .obr-card:hover,
.page-characters-archive .char-grid:not(.char-catalog__track) .obr-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(61, 92, 74, 0.28);
    box-shadow: var(--shadow-md);
}

.page-characters-archive .char-grid .card-image {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    opacity: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.page-characters-archive .char-grid .card-content-wrapper {
    position: relative;
    padding: 1rem 1.1rem 1.15rem;
    background: transparent !important;
    align-items: flex-start;
}

.page-characters-archive .nature-tag {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    border-right: none;
    padding: 0;
    margin: 0 0 0.35rem;
    text-align: left;
}

.page-characters-archive .card-name-group {
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.page-characters-archive .char-grid .card-title {
    font-family: var(--font-heading);
    color: var(--color-ink);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 500;
    text-align: left;
    line-height: 1.2;
}

.page-characters-archive .char-grid .card-occupation {
    font-family: var(--font-body);
    color: var(--color-muted);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    text-align: left;
    margin: 0.2rem 0 0;
}

.page-characters-archive .card-character-title,
.page-characters-archive .card-subtitle {
    display: none;
}

.page-characters-archive .char-grid .card-description {
    font-family: var(--font-reading);
    color: var(--color-ink-soft);
    max-height: none;
    opacity: 1;
    margin: 0.65rem 0 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    position: static;
}

.page-characters-archive .char-grid .char-read-more {
    position: static;
    display: inline-block;
    width: auto;
    margin-top: 0.65rem;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-sage) !important;
}

.page-characters-archive .char-grid .obr-card:hover .card-image,
.page-characters-archive .char-grid .obr-card.mobile-active .card-image {
    transform: none;
    opacity: 1;
}

/* —— Domovská stránka Obrlobus —— */
.obrlobus-home-page .obrlobus-hero__title {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    text-shadow: none;
}

.obrlobus-home-page .obrlobus-promo__viewport {
    background: var(--color-cream);
    border-block-color: var(--border-soft);
}

.obrlobus-home-page .obrlobus-promo__nav {
    border-color: var(--border-soft);
    background: rgba(20, 20, 20, 0.88);
    color: var(--color-ink);
    box-shadow: var(--shadow-xs);
}

.obrlobus-home-page .obrlobus-promo__nav:hover,
.obrlobus-home-page .obrlobus-promo__nav:focus-visible {
    background: var(--color-paper);
    border-color: rgba(255, 255, 255, 0.22);
}

.obrlobus-home-page .obrlobus-promo__dot {
    background: rgba(255, 255, 255, 0.18);
}

.obrlobus-home-page .obrlobus-promo__dot.is-active {
    background: var(--color-ink);
}

.obrlobus-home-page .obrlobus-section__title {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-ink);
    letter-spacing: -0.01em;
}

.obrlobus-home-page .obrlobus-dashboard .list-chip--signpost {
    border-radius: var(--radius-md);
    background: var(--color-paper);
    border-color: var(--border-soft);
    color: var(--color-ink-soft);
    box-shadow: var(--shadow-xs);
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: 0.02em;
}

.obrlobus-home-page .obrlobus-dashboard .list-chip--signpost.is-active,
.obrlobus-home-page .obrlobus-dashboard .list-chip--signpost:hover {
    background: var(--color-sage-muted);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--color-ink);
    box-shadow: var(--shadow-sm);
}

/* —— Rozcestník (index) —— */
body:not(.page-stories-archive):not(.page-characters-archive) .banner-content h2 {
    letter-spacing: -0.01em;
    font-weight: 500;
}

/* —— Patička — jemnější —— */
footer {
    padding: 2.5rem 1.25rem;
    background: var(--color-night);
}

footer p {
    max-width: none;
    margin-inline: auto;
    line-height: 1.5;
    opacity: 0.88;
}

.site-footer__line {
    margin: 0;
}

/* —— Mobil —— */
@media (max-width: 768px) {
    .page-characters-archive .char-grid:not(.char-catalog__track) {
        grid-template-columns: 1fr;
    }

    .page-characters-archive .char-grid:not(.char-catalog__track) .obr-card {
        flex-direction: row;
        align-items: stretch;
    }

    .page-characters-archive .char-grid:not(.char-catalog__track) .card-image {
        width: min(34%, 8.5rem);
        flex: 0 0 min(34%, 8.5rem);
        aspect-ratio: 3 / 4;
        border-radius: var(--radius-md) 0 0 var(--radius-md);
    }

    .page-characters-archive .char-grid:not(.char-catalog__track) .card-content-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 0.85rem 0.9rem;
    }

    .page-characters-archive .char-grid:not(.char-catalog__track) .card-description {
        -webkit-line-clamp: 2;
    }
}
