@font-face {
    font-family: "Authentic";
    src: url("../fonts/disillusionment/AuthenticSans90.otf") format("opentype");
}

@font-face {
    font-family: "Koomik";
    src: url("../fonts/disillusionment/KoomikMono-Regular.otf") format("opentype");
}

:root {
    --header-height: 80px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    font-family: "Koomik", Georgia, serif;
    background: #fff;
    color: #000;
}

body {
    overflow: hidden;
}

.disillusionment-page.has-disclaimer {
    height: 100vh;
    overflow: hidden;
}

.disillusionment-page.has-disclaimer .fixed-header,
.disillusionment-page.has-disclaimer .main-layout,
.disillusionment-page.has-disclaimer .fixed-footer-text {
    pointer-events: none;
    user-select: none;
}

.disclaimer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.88);
}

.disclaimer-overlay.is-hidden {
    display: none;
}

.disclaimer-window {
    width: min(560px, 100%);
    border: 1px solid #000;
    border-radius: 18px;
    background: #f3f3f3;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.disclaimer-window-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-bottom: 1px solid #000;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-align: center;
}

.disclaimer-window-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 22px 22px;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.45;
}

.disclaimer-window-body p {
    margin: 0;
}

.disclaimer-close-button {
    align-self: center;
    padding: 10px 18px;
    border: 1px solid #000;
    border-radius: 999px;
    background: transparent;
    color: #000;
    font-family: "Koomik", Georgia, serif;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.disclaimer-close-button:hover,
.disclaimer-close-button:focus-visible {
    background: #fff;
    outline: none;
}

.fixed-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--header-height);
    padding: 0 40px 0 0;
    pointer-events: none;
}

.fixed-header h1 {
    margin: 1.4em 0 0 1.85em;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 3em;
    font-weight: 400;
    pointer-events: auto;
}

.fixed-footer-text {
    position: fixed;
    bottom: 20px;
    left: 90px;
    z-index: 1000;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 26px;
}

.main-layout {
    display: flex;
    height: 100vh;
}

.left-panel,
.right-panel {
    height: 100vh;
    padding: calc(var(--header-height) + 20px) 25px 25px;
    overflow-y: auto;
    background: #fff;
}

.left-panel {
    position: relative;
    z-index: 1;
    flex: 3;
    overflow-x: hidden;
    padding-right: 120px;
    padding-left: 0;
    border-right: 1px solid #eee;
}

.right-panel {
    flex: 1;
}

.status-message {
    margin: 0 0 24px 40px;
    padding: 14px 16px;
    border: 1px solid #ecc3c7;
    background: #fbeaec;
    color: #721c24;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 0.95rem;
}

.text-content {
    position: relative;
    z-index: 2;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 1.6em;
    line-height: 1.4;
}

.paragraph-block {
    padding-left: 3.5em;
    text-indent: -2.7em;
}

.paragraph-block + .paragraph-block {
    margin-top: 0.7em;
}

.sentence {
    display: inline;
}

.add-button {
    display: inline-block;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #0000ee;
    font-size: 1em;
    cursor: pointer;
    vertical-align: baseline;
    transition: color 0.2s ease, transform 0.2s ease;
}

.add-button:hover {
    color: #000;
    transform: scale(1.1);
}

.contribution-wrapper,
.comment-author-wrapper {
    position: relative;
    display: inline;
}

.media-ref {
    text-decoration: none;
    cursor: pointer;
}

.comment-author,
.user-contribution {
    font-family: "Koomik", Georgia, serif;
    font-weight: 400;
}

.conversation-start {
    position: absolute;
    bottom: 93%;
    left: 70px;
    color: #000;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.external-contribution-link {
    color: inherit;
    text-decoration: underline;
}

.add-form {
    position: relative;
    display: none;
    max-width: 70%;
    margin: 15px 0;
    background: #fff;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 0.9em;
}

.add-form.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.form-row > * {
    flex: 1;
}

.form-input,
.form-textarea {
    width: 100%;
    height: 1.6em;
    margin-bottom: 15px;
    border: 0;
    border-bottom: 1px solid var(--user-color, #ccc);
    background: transparent;
    outline: none;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 0.9em;
}

.form-textarea {
    min-height: 4.5em;
    resize: vertical;
}

.form-color {
    flex: 0 0 40px;
    height: 40px;
    margin-bottom: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.form-buttons {
    text-align: right;
}

.btn,
.btn-secondary {
    padding: 8px 18px;
    font-family: "Authentic", Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.btn {
    margin-right: 10px;
    border: 1px solid var(--user-color, #000);
    background: var(--user-color, #000);
    color: var(--btn-text-color, #fff);
}

.btn-secondary {
    border: 1px solid var(--user-color, #000);
    background: transparent;
    color: var(--user-color, #000);
}

#media-gallery-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.media-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.media-item-index {
    flex-shrink: 0;
    font-size: 1.5em;
    text-decoration: none;
    cursor: pointer;
}

.media-item-content {
    flex-grow: 1;
}

.media-item-preview img {
    display: block;
    width: 86%;
    height: auto;
}

.media-item-meta {
    padding-top: 8px;
    font-size: 12px;
}

.background-image-container {
    position: absolute;
    top: 0;
    left: 2em;
    z-index: -1;
    width: 150px;
    pointer-events: none;
}

.background-image-container img {
    display: block;
    width: 100%;
    height: auto;
}

@media (min-width: 1920px) {
    :root {
        --header-height: 108px;
    }

    .fixed-header h1 {
        margin-left: 2.31em;
        font-size: 4.5em;
    }

    .fixed-footer-text {
        left: 168px;
        font-size: 36px;
    }

    .left-panel {
        padding-right: 256px;
    }

    .left-panel,
    .right-panel {
        padding-top: calc(var(--header-height) + 29px);
    }

    .text-content {
        font-size: 2.33em;
        line-height: 1.33;
    }

    .paragraph-block {
        padding-left: 4.5em;
        text-indent: -3.7em;
    }

    .conversation-start {
        bottom: 92%;
        left: 136px;
        font-size: 19px;
    }

    .media-item-index {
        font-size: 2.33em;
    }

    .media-item-preview img {
        width: 85%;
        padding-top: 5px;
        padding-left: 25px;
    }

    .media-item-meta {
        padding-top: 14px;
        font-size: 17px;
    }
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .fixed-header {
        position: sticky;
        background: #fff;
    }

    .disclaimer-overlay {
        align-items: flex-start;
        padding: 18px;
    }

    .disclaimer-window {
        margin-top: 14vh;
    }

    .disclaimer-window-body {
        gap: 18px;
        padding: 18px;
        font-size: 0.95rem;
    }

    .fixed-header h1 {
        margin: 1.1rem 0 0.6rem 1rem;
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .fixed-footer-text {
        position: static;
        padding: 0 18px 24px;
        font-size: 1.1rem;
    }

    .main-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left-panel,
    .right-panel {
        height: auto;
        overflow: visible;
        padding: 18px;
    }

    .left-panel {
        padding-top: 12px;
        padding-right: 18px;
        border-right: 0;
        border-bottom: 1px solid #eee;
    }

    .right-panel {
        padding-top: 22px;
    }

    .status-message {
        margin-left: 0;
    }

    .text-content {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .paragraph-block {
        padding-left: 2.4rem;
        text-indent: -1.9rem;
    }

    .conversation-start {
        position: static;
        display: block;
        margin-bottom: 0.2rem;
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .add-form {
        max-width: 100%;
    }

    .form-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .media-item-preview img {
        width: 100%;
    }

    .background-image-container {
        display: none;
    }
}
