:root {
    --bg-neutral: #eae8e3;
    --sidebar-light: #f7f6f2;
    --sidebar-dark: #373f4d;
    --text-dark: #222222;
    --accent-gold: #c39667;
    --border-color: #e5e3dd;
    --story-font-size: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: auto;
    width: 100%;
    overflow-x: hidden;
    background-color: #d9d9d9;
    max-width: 1234px !important;
}

* {
    box-sizing: border-box;
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-drawer-close {
    display: none;
}

.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
}

.drawer-overlay.show {
    display: block;
}

.laptop-frame {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.web-header {
    background-color: #3e4856;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
}

.header-logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-decoration: none;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-link {
    color: #bcc6d2;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
}

.header-link:hover,
.header-link.active {
    color: #ffffff;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 4px 6px 4px 14px;
    flex: 1;
    max-width: 520px;
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.82rem;
    width: 100%;
}

.header-search input::placeholder {
    color: #c3cad4;
}

.header-search button {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.btn-write {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.profile-btn {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: none;
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
}

.workspace-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-panel {
    width: 220px;
    background-color: #fcfbfa;
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    overflow-y: auto;
}

.section-tag-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.collapsible-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-menu-list {
    list-style: none;
    padding-left: 4px;
    margin: 6px 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-menu-link {
    font-size: 0.8rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 6px 12px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
}

.sub-menu-link:hover,
.sub-menu-link.active {
    background-color: #4a5464;
    color: #ffffff;
}

.simple-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 6px 12px;
    display: block;
    text-transform: uppercase;
}

.simple-link:hover {
    color: var(--accent-gold);
}

.middle-panel {
    flex: 1;
    background-color: #f7f6f1;
    padding: 32px 40px;
    overflow-y: auto;
}

.home-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.home-view-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.home-view-sub {
    font-size: 0.8rem;
    color: #8a8882;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.story-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    display: block;
}

.story-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.story-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #f1efe9;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.story-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.story-card-meta {
    font-size: 0.72rem;
    color: #8a8882;
    font-weight: 600;
    margin-bottom: 10px;
}

.story-card-excerpt {
    font-size: 0.82rem;
    color: #58564f;
    line-height: 1.5;
    margin-bottom: 10px;
}

.story-card-read {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-gold);
}

.no-results {
    font-size: 0.9rem;
    color: #8a8882;
    padding: 20px 0;
}

.story-header {
    border-bottom: 1px solid #e2e0da;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.story-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #8a8882;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.story-main-title {
    font-size: 1.5rem;
    
    color: var(--text-dark);
    margin-bottom: 8px;
}

.story-author {
    font-size: 0.78rem;
    color: #88857e;
    font-weight: 600;
}

.action-icons-box {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #8c8982;
}

.action-icons-box i {
    cursor: pointer;
    font-size: 0.95rem;
}

.action-icons-box i:hover {
    color: var(--text-dark);
}

.font-size-control {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid #e2e0da;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 8px;
}

.font-size-btn {
    background-color: #fdfcf9;
    border: none;
    color: #555;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    line-height: 1;
}

.font-size-btn:first-child {
    font-size: 0.7rem;
    border-right: 1px solid #e2e0da;
}

.font-size-btn:last-child {
    font-size: 0.95rem;
}

.font-size-btn:hover {
    background-color: #f1efe9;
    color: var(--text-dark);
}

.back-to-home {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-gold);
    cursor: pointer;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.back-to-home:hover {
    color: var(--text-dark);
}

.story-body-text {
    font-size: var(--story-font-size);
    line-height: 1.8;
    color: #3c3a35;
    font-weight: 500;
}

.story-body-text p {
    margin-bottom: 20px;
}

.right-panel {
    width: 250px;
    background-color: #fdfcf9;
    border-left: 1px solid var(--border-color);
    padding: 24px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.right-section-title {
    font-size: 14px;
    text-transform: uppercase;
    color: #111;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 4px;
    display: inline-block;
}

.right-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.right-list li {
    font-size: 15px;
}

.right-list a {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
}

.right-list a:hover {
    color: var(--accent-gold);
}

.right-list .muted {
    color: #a9a69f;
    font-size: 0.8rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-tag {
    background-color: #f1efe9;
    color: #444;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.badge-tag:hover,
.badge-tag.active {
    background-color: #e5e3dc;
    color: #111;
}

.site-footer {
    background-color: #3e4856;
    color: #c3cad4;
    padding: 28px 40px 18px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col {
    min-width: 160px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: #bcc6d2;
    text-decoration: none;
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.footer-social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.footer-social a:hover {
    background-color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    font-size: 0.72rem;
    color: #8d97a4;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.pagination-box a,
.pagination-box span {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: #555;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
}

.pagination-box a:hover {
    background-color: #f1efe9;
    color: var(--text-dark);
}

.pagination-box .current {
    background-color: var(--accent-gold);
    color: #ffffff;
    border-color: var(--accent-gold);
}

.pagination-box .disabled {
    color: #c8c6c0;
    cursor: default;
}

.write-form-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 26px;
    max-width: 720px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
    background-color: #fdfcf9;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
}

textarea.form-control {
    resize: vertical;
    min-height: 220px;
    line-height: 1.6;
}

.form-hint {
    font-size: 0.74rem;
    color: #8a8882;
    margin-top: 4px;
}

.btn-submit {
    background-color: var(--accent-gold);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: #ac815a;
}

.alert-box {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.alert-success {
    background-color: #e6f4ea;
    color: #256a3e;
    border: 1px solid #bfe3cb;
}

.alert-error {
    background-color: #fbeaea;
    color: #9c2c2c;
    border: 1px solid #f1c6c6;
}


@media (max-width: 768px) {

    .laptop-frame {
        width: 100vw;
    }

    .web-header {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: 10px 14px;
    }

    .mobile-menu-btn {
        display: flex;
        order: 0;
    }

    .header-logo {
        order: 1;
        font-size: 1rem;
        margin-right: auto;
    }

    .web-header>.header-menu:last-of-type {
        order: 2;
        gap: 10px;
    }

    .btn-write {
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .profile-btn {
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .header-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }

    .web-header>.header-menu:first-of-type {
        order: 4;
        flex-basis: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 18px;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .header-link {
        white-space: nowrap;
        padding: 6px 2px;
    }

    .workspace-body {
        flex-direction: column;
        overflow: visible;
    }

    .left-panel {
        position: fixed;
        top: 0;
        left: -270px;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.25s ease;
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.18);
        padding-top: 60px;
    }

    .left-panel.open {
        left: 0;
    }

    .mobile-drawer-close {
        display: flex;
        position: absolute;
        top: 14px;
        right: 14px;
        background: none;
        border: none;
        font-size: 1.1rem;
        color: #555;
    }

    .middle-panel {
        padding: 22px 18px;
    }

    .font-size-btn {
        padding: 8px 14px;
    }

    .right-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 20px 18px;
    }

    .site-footer {
        flex-direction: column;
        padding: 24px 20px 14px;
        gap: 20px;
    }

    .footer-bottom {
        margin: 10px 20px 0;
    }
}

@media (max-width: 420px) {
    .header-logo {
        font-size: 20px;
    }

    .story-card {
        padding: 14px;
    }

    .home-view-sub {
        font-size: 0.72rem;
    }
}
.comments-section {
    margin-top: 36px;
    border-top: 1px solid #e2e0da;
    padding-top: 24px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.comment-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.comment-author {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.comment-date {
    font-size: 0.72rem;
    color: #a9a69f;
}

.comment-text {
    font-size: 0.85rem;
    color: #4a4842;
    line-height: 1.6;
}

.comment-form-box {
    max-width: 100%;
}

.comment-textarea {
    min-height: 90px;
}
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.comment-body {
    flex: 1;
    min-width: 0;
}
.load-more-box {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.btn-load-more {
    background-color: #ffffff;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 9px 22px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-load-more:hover {
    background-color: var(--accent-gold);
    color: #ffffff;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: default;
}
.rating-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e0da;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.rating-avg-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}

.rating-stars-display {
    color: var(--accent-gold);
    font-size: 1rem;
}

.rating-stars-display .star-empty {
    color: #d8d5cd;
}

.rating-count {
    font-size: 0.8rem;
    color: #8a8882;
}

.rating-vote-label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 6px;
}

.rating-stars-input {
    font-size: 1.6rem;
    color: var(--accent-gold);
    display: flex;
    gap: 6px;
}

.rating-star-btn {
    cursor: pointer;
    transition: transform 0.1s;
}

.rating-star-btn:hover {
    transform: scale(1.15);
}

.rating-thanks {
    font-size: 0.85rem;
    color: #256a3e;
    font-weight: 700;
}