/* ==========================================================================
   Green Agit Platform Stylesheet (Biophilic & Polaroid Photo Essay Theme)
   ========================================================================== */

/* 1. Global Setup & Design Variables */
:root {
    /* Color Palette */
    --color-primary: #2C5E43;      /* Agit Green (Forest) */
    --color-secondary: #8FA89B;    /* Moss Sage (Subtle Green) */
    --color-accent: #8C6239;       /* Maple Oak (Warm Wood) */
    --color-bg-light: #FAF8F5;     /* Linen White (Warm Cream Sand) */
    --color-bg-alt: #F2EFEA;       /* Raw Soil (Slightly darker sand bg) */
    --color-text-dark: #2B2521;    /* Dark Earth (Soil Brown) */
    --color-text-muted: #665F59;   /* Muted Soil */
    --color-white: #FFFFFF;
    --color-danger: #C0392B;
    
    /* Design Tokens */
    --radius-organic-1: 24px 6px 24px 6px;
    --radius-organic-2: 6px 24px 6px 24px;
    --radius-standard: 12px;
    --radius-circle: 50%;
    
    /* Typography */
    --font-heading: 'Nanum Myeongjo', serif;
    --font-body: 'Noto Sans KR', sans-serif;
    --font-handwriting: 'Nanum Pen Script', cursive;
    
    /* Shadows */
    --shadow-soft: 0 8px 30px rgba(43, 37, 33, 0.05);
    --shadow-polaroid: 0 10px 25px rgba(43, 37, 33, 0.08);
    --shadow-hover: 0 15px 35px rgba(44, 94, 67, 0.12);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 10px;
    border: 2px solid var(--color-bg-light);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Base Typo */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font-body);
    background: none;
    border: none;
    cursor: pointer;
}

/* Layout */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Header & GNB */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(44, 94, 67, 0.08);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo .brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.logo .brand-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.25em;
    margin-top: 3px;
}

.header-actions-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-status-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.studio-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.studio-btn:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Ambient Audio Bar & Dropdown */
.ambient-audio-bar {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    position: relative;
    z-index: 101;
    border-bottom: 1px solid var(--color-accent);
}

.ambient-audio-bar .sound-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.asmr-select {
    background-color: rgba(250, 248, 245, 0.12);
    color: var(--color-white);
    border: 1px solid rgba(250, 248, 245, 0.25);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    outline: none;
    font-family: var(--font-body);
    cursor: pointer;
}

.asmr-select option {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.leaf-pulse {
    color: var(--color-secondary);
    animation: pulse 2s infinite ease-in-out;
}

.audio-btn {
    background-color: rgba(250, 248, 245, 0.15);
    color: var(--color-white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.audio-btn:hover {
    background-color: var(--color-accent);
}

.audio-btn.active {
    background-color: var(--color-accent);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 500;
    border-radius: 30px;
    transition: var(--transition-smooth);
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--color-shadow-hover);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.btn-text-link:hover {
    color: var(--color-primary);
}

.btn-text-link.text-danger:hover {
    color: var(--color-danger);
}

/* Library Section & Hero Banner */
.library-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.library-hero .hero-content {
    max-width: 600px;
    margin-left: calc((100vw - 1200px) / 2);
    color: var(--color-white);
}

@media (max-width: 1248px) {
    .library-hero .hero-content {
        margin-left: 5%;
    }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(44, 94, 67, 0.7);
    border: 1px solid var(--color-secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.library-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.library-hero p {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

/* Filter Panel & Feeds */
.filter-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(44, 94, 67, 0.08);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.feed-tabs {
    display: flex;
    gap: 12px;
}

.feed-tab {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.feed-tab:hover {
    background-color: rgba(143, 168, 155, 0.15);
    color: var(--color-primary);
}

.feed-tab.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 12px var(--color-shadow-hover);
}

.platform-stats {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.platform-stats strong {
    color: var(--color-primary);
}

/* Bookshelf Gallery (Polaroid Wooden Shelf Theme) */
.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    position: relative;
}

/* Wooden shelf indicator lines below cards */
.bookshelf-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: var(--color-accent);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(140, 98, 57, 0.2);
}

/* Polaroid Card Style */
.book-card {
    background-color: var(--color-white);
    padding: 16px 16px 24px 16px;
    border-radius: 4px;
    box-shadow: var(--shadow-polaroid);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(43, 37, 33, 0.05);
}

.book-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: var(--shadow-hover);
}

.book-card-img {
    width: 100%;
    aspect-ratio: 1/1; /* Perfect Square Polaroid */
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    margin-bottom: 18px;
    border: 1px solid rgba(43, 37, 33, 0.03);
}

.book-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: keep-all;
}

.book-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px dashed rgba(43, 37, 33, 0.08);
    padding-top: 12px;
}

.book-creator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.book-creator i {
    color: var(--color-primary);
}

.book-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Book Card Comment Toggle Button */
.book-card-comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.2s;
    font-size: 0.8rem;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
}

.book-card-comment-toggle:hover {
    color: var(--color-primary);
}

/* Book Card Comments Section (Accordion) */
.book-card-comments {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    background-color: var(--color-bg-warm);
    border-top: 1px dashed rgba(43, 37, 33, 0.08);
    padding: 0 16px;
}

.book-card-comments.open {
    max-height: 600px;
    padding: 16px;
    overflow-y: auto;
}

.book-card-comments-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card-level comment items */
.card-comment-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(43, 37, 33, 0.06);
}

.card-comment-item:last-child {
    border-bottom: none;
}

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

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

.card-comment-date {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

.card-comment-body {
    font-size: 0.82rem;
    color: var(--color-text-dark);
    line-height: 1.5;
    word-break: keep-all;
}

.card-comment-actions {
    margin-top: 4px;
}

.card-comment-reply-btn {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: var(--font-body);
}

.card-comment-reply-btn:hover {
    color: var(--color-primary);
}

.card-reply-item {
    margin-left: 20px;
    padding: 8px 0 8px 12px;
    border-left: 2px solid rgba(43, 37, 33, 0.08);
}

.card-reply-item .card-comment-body {
    font-size: 0.78rem;
}

/* Card comment form */
.card-comment-form {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.card-comment-form textarea {
    flex: 1;
    height: 40px;
    padding: 8px 10px;
    font-size: 0.8rem;
    border: 1px solid rgba(43, 37, 33, 0.12);
    border-radius: 6px;
    resize: none;
    font-family: var(--font-body);
    background: white;
    color: var(--color-text-dark);
    transition: border-color 0.2s;
}

.card-comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.card-comment-form button {
    padding: 8px 14px;
    font-size: 0.78rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.card-comment-form button:hover {
    background: var(--color-accent);
}

.card-comment-login-msg {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 10px;
    border: 1px dashed rgba(43, 37, 33, 0.12);
    border-radius: 6px;
    margin-top: 12px;
}

.card-comment-login-msg a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
}

/* Card inline reply form */
.card-inline-reply-form {
    margin-left: 20px;
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px dashed rgba(43, 37, 33, 0.1);
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.card-inline-reply-form textarea {
    flex: 1;
    height: 34px;
    padding: 6px 8px;
    font-size: 0.75rem;
    border: 1px solid rgba(43, 37, 33, 0.12);
    border-radius: 4px;
    resize: none;
    font-family: var(--font-body);
    background: white;
    color: var(--color-text-dark);
}

.card-inline-reply-form button {
    padding: 6px 10px;
    font-size: 0.7rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    white-space: nowrap;
}

.card-comments-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    padding: 16px 0;
}

.book-stats .fa-heart {
    color: var(--color-danger);
}

/* Channels Directory */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.channel-profile-card {
    background-color: var(--color-white);
    border-radius: var(--radius-organic-1);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(44, 94, 67, 0.05);
    transition: var(--transition-smooth);
}

.channel-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.channel-avatar-mid {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 16px auto;
    border: 2px solid var(--color-secondary);
}

.channel-profile-card h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.channel-profile-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.channel-card-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(44, 94, 67, 0.06);
    padding-top: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.channel-card-stats strong {
    color: var(--color-primary);
    display: block;
    font-size: 1.1rem;
}

/* 3. Creator Studio Section */
.studio-section {
    background-color: var(--color-bg-alt);
    min-height: calc(100vh - 120px);
}

.studio-header {
    text-align: center;
    margin-bottom: 40px;
}

.studio-header h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.studio-header p {
    color: var(--color-text-muted);
}

.studio-card {
    background-color: var(--color-white);
    border-radius: var(--radius-standard);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(44, 94, 67, 0.04);
}

.setup-card {
    max-width: 600px;
    margin: 0 auto;
}

.setup-card h3 {
    color: var(--color-primary);
    margin-bottom: 12px;
}

.setup-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

/* Studio Grid Details */
.studio-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.profile-stats-card {
    text-align: center;
}

.creator-profile-info {
    border-bottom: 1px solid rgba(44, 94, 67, 0.08);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.creator-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-circle);
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 16px auto;
    border: 3px solid var(--color-secondary);
}

.creator-bio-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 10px;
    line-height: 1.6;
}

.stats-counter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-count-item {
    background-color: var(--color-bg-light);
    padding: 16px;
    border-radius: var(--radius-standard);
}

.stat-count-item .count-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.stat-count-item .count-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--radius-standard);
    border: 1px solid rgba(44, 94, 67, 0.15);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background-color: var(--color-bg-light);
    outline: none;
    transition: var(--transition-fast);
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--color-primary);
    background-color: var(--color-white);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Avatar Selector options */
.avatar-selector {
    display: flex;
    gap: 12px;
}

.avatar-option {
    cursor: pointer;
}

.avatar-option input {
    display: none;
}

.avatar-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.avatar-option input:checked + .avatar-icon {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}

/* Episode Builder Section */
.builder-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    border-bottom: 1px dashed rgba(44, 94, 67, 0.1);
    padding-bottom: 16px;
}

.pages-builder-section {
    margin-top: 30px;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-standard);
    padding: 24px;
    margin-bottom: 30px;
}

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

.btn-add-page {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-add-page:hover {
    background-color: var(--color-primary);
}

.editor-pages-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Page Card in Editor */
.editor-page-node {
    background-color: var(--color-white);
    border-radius: var(--radius-standard);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    position: relative;
    border-left: 4px solid var(--color-secondary);
}

.editor-page-node input[type="file"] {
    display: block;
    margin-top: 10px;
    font-size: 0.75rem;
}

.editor-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.editor-page-header span {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary);
}

.page-node-actions {
    display: flex;
    gap: 8px;
}

.btn-action-small {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
}

.btn-action-small:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-action-small.text-danger:hover {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.custom-file-input {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* YouTube Studio Style Management Content Dashboard */
.my-books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.my-books-header h3 {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.sort-actions {
    display: flex;
    gap: 8px;
}

.btn-sort {
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(44, 94, 67, 0.08);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.btn-sort:hover {
    background-color: rgba(143, 168, 155, 0.15);
    color: var(--color-primary);
}

.btn-sort.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.studio-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.studio-table th, .studio-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(44, 94, 67, 0.08);
    vertical-align: middle;
}

.studio-table th {
    background-color: var(--color-bg-alt);
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-primary);
}

.studio-table tbody tr:hover {
    background-color: rgba(242, 239, 234, 0.3);
}

.table-book-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-cover-mini {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(43, 37, 33, 0.08);
    flex-shrink: 0;
}

.table-book-title {
    font-weight: 700;
    color: var(--color-primary);
    word-break: keep-all;
}

.table-readtime {
    color: var(--color-accent);
    font-weight: 700;
}

/* 4. IMMERSIVE PICTURE BOOK READER OVERLAY */
.reader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0d0c0b;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.reader-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Background image Ken-Burns Layer */
.reader-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.reader-bg-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 0.6s ease-in-out, transform 8s ease-out;
    transform: scale(1.03);
}

/* Apply slow zoom effect on page transition */
.reader-overlay.open .reader-bg-img.animate-zoom {
    transform: scale(1.1);
}

/* Vignette / dark backing for typography readability */
.reader-overlay-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, rgba(13,12,11,0.4) 60%, rgba(13,12,11,0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Top Meta Bar in Reader */
.reader-top-bar {
    position: relative;
    z-index: 2;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-book-info {
    color: var(--color-white);
}

.reader-book-info .category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-secondary);
    display: block;
    margin-bottom: 4px;
}

.reader-book-info h2 {
    font-size: 1.4rem;
    font-weight: 500;
}

.close-reader-btn {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.close-reader-btn span {
    font-size: 0.85rem;
}

.close-reader-btn:hover {
    color: var(--color-white);
}

/* Centered Text Overlay Stage */
.reader-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60%;
    padding: 0 40px;
}

.nav-page-btn {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    background-color: rgba(250, 248, 245, 0.08);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-page-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
}

/* Handwritten Scrapbook Memo Card (Bottom-Right Positioning) */
.reader-content-box {
    position: absolute;
    bottom: 80px;
    right: 80px;
    max-width: 380px;
    width: 85%;
    background-color: rgba(255, 253, 248, 0.94); /* Warm Crumpled paper color */
    border-radius: 6px 16px 4px 14px; /* Organic slightly uneven paper cut */
    padding: 24px 32px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(140, 98, 57, 0.2);
    transform: rotate(-1.5deg); /* Handwritten note tilt */
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    transition: var(--transition-smooth);
}

.reader-text-wrapper {
    width: 100%;
    transition: opacity 0.35s ease;
}

.reader-text-wrapper.fade-out {
    opacity: 0;
}

#reader-story-text {
    font-family: var(--font-handwriting);
    font-size: 2.3rem; /* Handwriting fonts need larger scale */
    color: #1A1D20; /* Dark lead pencil ink */
    line-height: 1.35;
    font-weight: 500;
    word-break: keep-all;
    letter-spacing: -0.01em;
}

/* Bottom Progress Bar */
.reader-bottom-bar {
    position: relative;
    z-index: 2;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pebble-progress-container {
    display: flex;
    gap: 12px;
}

.progress-pebble {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    background-color: rgba(255, 255, 255, 0.25);
    transition: var(--transition-smooth);
}

.progress-pebble.active {
    background-color: var(--color-secondary);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--color-secondary);
}

.page-number-indicator {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

/* 5. Reader Closing Overlay (Final slide) */
.reader-closing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: rgba(13, 12, 11, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.reader-closing-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.closing-card {
    max-width: 580px;
    width: 90%;
    background-color: var(--color-bg-light);
    border-radius: var(--radius-organic-1);
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leaf-icon-decor {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.closing-card h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.closing-quote {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.creator-support-box {
    width: 100%;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-standard);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    margin-bottom: 24px;
    border: 1px solid rgba(44, 94, 67, 0.05);
}

.support-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    background-color: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.creator-support-box h4 {
    color: var(--color-primary);
    font-size: 0.95rem;
}

.creator-support-box p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.closing-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.closing-actions button, .closing-actions a {
    flex: 1;
    font-size: 0.85rem;
}

.btn-outline-dark {
    border: 2px solid var(--color-text-dark);
    color: var(--color-text-dark);
}

.btn-outline-dark:hover {
    background-color: var(--color-text-dark);
    color: var(--color-white);
}

.btn-primary-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary-dark:hover {
    background-color: var(--color-accent);
}

.closing-ad-panel {
    background-color: var(--color-bg-alt);
    border: 1px dashed var(--color-secondary);
    border-radius: var(--radius-standard);
    padding: 12px 18px;
    width: 100%;
    text-align: left;
    margin-bottom: 24px;
}

.ad-tag-small {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 4px;
}

.closing-ad-panel p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.btn-text-dark {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.btn-text-dark:hover {
    color: var(--color-primary);
}

/* 6. Footer */
.main-footer {
    background-color: var(--color-text-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 30px 24px;
    border-top: 2px solid var(--color-accent);
    text-align: center;
}

.footer-brand h3 {
    color: var(--color-secondary);
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.footer-brand p {
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.footer-bottom-text {
    font-size: 0.75rem;
}

/* 7. Responsive adjustments */
@media (max-width: 992px) {
    .bookshelf-grid, .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .studio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bookshelf-grid, .channels-grid, .my-books-grid {
        grid-template-columns: 1fr;
    }
    .reader-stage {
        padding: 0 4px;
    }
    
    /* Mobile memo: much smaller, semi-transparent so photo shows through */
    .reader-content-box {
        position: absolute;
        bottom: 60px;
        right: auto;
        left: 10px;
        width: auto;
        max-width: 200px;
        transform: rotate(0);
        padding: 8px 12px;
        min-height: auto;
        background-color: rgba(254, 241, 180, 0.82) !important;
        box-shadow: 1px 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    #reader-story-text {
        font-size: 1.05rem;
        line-height: 1.3;
    }
    
    /* Smaller washi tape */
    .reader-content-box::before {
        width: 44px;
        height: 12px;
        top: -6px;
    }
    
    .nav-page-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        z-index: 5;
    }
    
    .close-reader-btn {
        font-size: 1.1rem;
    }
    .close-reader-btn span {
        font-size: 0.75rem;
    }
    
    /* Reader top bar compact */
    .reader-top-bar {
        padding: 10px 12px;
    }
    
    /* Reader bottom bar compact */
    .reader-bottom-bar {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .pebble-progress-container {
        gap: 6px;
    }
    
    .progress-pebble {
        width: 6px;
        height: 6px;
    }
    
    .library-hero h1 {
        font-size: 2rem;
    }
    .form-group-row {
        grid-template-columns: 1fr;
    }
    
    /* Mobile buttons: smaller */
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn-add-page {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Comments drawer: bottom sheet on mobile */
    .reader-comments-drawer {
        top: auto;
        bottom: -100%;
        right: 0;
        left: 0;
        width: 100%;
        height: 55%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 16px 16px 0 0;
        transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reader-comments-drawer.open {
        bottom: 0;
        right: 0;
    }
    
    .toggle-comments-btn {
        position: fixed;
        left: auto;
        right: 12px;
        bottom: 12px;
        top: auto;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        z-index: 110;
    }
    
    .comments-drawer-content {
        padding: 16px;
    }
    
    .comments-drawer-content h3 {
        font-size: 0.9rem;
    }
    
    /* Section container compact */
    .section-container {
        padding: 30px 16px;
    }
    
    /* Studio cards */
    .studio-card {
        padding: 16px;
    }
    
    /* Book card compact */
    .book-card {
        padding: 10px 10px 16px 10px;
    }
    
    .book-card-content h3 {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    
    .book-card-meta {
        font-size: 0.72rem;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 480px) {
    .reader-content-box {
        max-width: 160px;
        padding: 6px 10px;
        bottom: 50px;
    }
    
    #reader-story-text {
        font-size: 0.9rem;
    }
    
    .reader-content-box::before {
        width: 36px;
        height: 10px;
        top: -5px;
    }
    
    .nav-page-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .library-hero h1 {
        font-size: 1.6rem;
    }
    
    .library-hero p {
        font-size: 0.85rem;
    }
    
    .filter-panel {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .book-card-comments.open {
        max-height: 400px;
    }
}

/* ==========================================
   8. Custom Success Modal & Card Glow
   ========================================== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.custom-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 12, 11, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content-wrapper {
    position: relative;
    z-index: 2;
    background-color: var(--color-bg-light);
    max-width: 480px;
    width: 90%;
    padding: 36px 30px;
    border-radius: var(--radius-organic-1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--color-primary);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
    }
    to {
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 16px;
    animation: iconScaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes iconScaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content-wrapper h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    word-break: keep-all;
}

.modal-book-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-organic-2);
    padding: 18px 24px;
    margin-bottom: 24px;
    width: 100%;
    border: 1px solid rgba(44, 94, 67, 0.08);
}

.modal-cover-preview {
    width: 120px;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-organic-1);
    box-shadow: var(--shadow-medium);
    margin-bottom: 12px;
}

#success-modal-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text-dark);
    margin: 0;
    font-weight: 700;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.modal-buttons button {
    flex: 1;
    font-weight: 500;
}

/* Glowing effect for newly published card */
.book-card.newly-published {
    animation: cardGlow 2.0s ease-in-out infinite alternate;
    border: 2px solid var(--color-secondary) !important;
}

@keyframes cardGlow {
    from {
        box-shadow: 0 4px 15px rgba(0,0,0,0.1), 0 0 0px var(--color-secondary);
    }
    to {
        box-shadow: 0 4px 20px rgba(44, 94, 67, 0.3), 0 0 20px var(--color-secondary);
    }
}

/* GNB Auth Button */
.btn-auth-header {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    height: auto !important;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-auth-header:hover {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
}

/* Modal Close X button */
.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-x:hover {
    color: var(--color-primary);
}

/* Auth Card and Form styles */
.auth-card {
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.auth-form {
    width: 100%;
}

.auth-form .form-group {
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(44, 94, 67, 0.2);
    background-color: var(--color-white);
    color: var(--color-text-dark);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 94, 67, 0.1);
}

.auth-switch-text {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.auth-switch-text a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

.auth-switch-text a:hover {
    color: var(--color-accent);
}

.label-wrapper-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.auth-forgot-link {
    font-size: 0.75rem;
    color: var(--color-primary);
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.auth-forgot-link:hover {
    color: var(--color-accent);
}

/* Custom Profile Photo & Edit Modal styling */
.profile-photo-type-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    margin-top: 6px;
}

.photo-type-option {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.profile-photo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-remove-photo {
    font-family: var(--font-body);
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-remove-photo:hover {
    color: var(--color-accent);
}

/* Custom avatar image elements style */
.channel-avatar-mid img,
.creator-avatar-large img,
.support-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.book-creator img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
}

/* Bulk Upload Page Row Layout */
.editor-page-layout-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-top: 10px;
}

.editor-page-preview-col {
    width: 140px;
    flex-shrink: 0;
}

.editor-page-preview-box {
    width: 100%;
    height: 100px;
    border-radius: var(--radius-standard);
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid rgba(44, 94, 67, 0.1);
    overflow: hidden;
    background-color: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-change-node-img {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 6px 0;
    font-size: 0.7rem;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-change-node-img:hover {
    background: rgba(0, 0, 0, 0.8);
}

.editor-page-text-col {
    flex-grow: 1;
    display: flex;
}

.editor-page-text-col textarea.page-text {
    width: 100%;
    height: 100%;
    min-height: 100px;
    resize: none;
    border: 1px solid rgba(44, 94, 67, 0.12);
    border-radius: var(--radius-standard);
    padding: 10px;
    font-size: 0.85rem;
    color: var(--color-text-dark);
    font-family: var(--font-body);
}

/* Post-it / Sticky Note styling in Reader */
.reader-content-box {
    position: absolute;
    bottom: 80px;
    right: 80px;
    max-width: 380px;
    width: 85%;
    background-color: rgba(254, 241, 180, 0.96) !important; /* Pastel Yellow Sticky Note */
    border-radius: 2px !important;
    padding: 32px 24px 24px 24px !important;
    box-shadow: 2px 10px 25px rgba(0, 0, 0, 0.28) !important;
    border: none !important;
    transform: rotate(-1.5deg);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    transition: var(--transition-smooth);
}

/* Washi/Sticky tape look */
.reader-content-box::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(1deg);
    width: 90px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.45); /* Semi-transparent washi tape */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
    border-right: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Collapsible Comments Drawer */
.reader-comments-drawer {
    position: absolute;
    top: 80px;
    right: -320px; /* Hidden by default */
    width: 320px;
    height: calc(100% - 160px);
    background-color: rgba(25, 30, 26, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.35);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
}

.reader-comments-drawer.open {
    right: 0;
}

.toggle-comments-btn {
    position: absolute;
    left: -54px;
    top: 30px;
    width: 54px;
    height: 54px;
    background-color: rgba(25, 30, 26, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: -5px 2px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

.toggle-comments-btn:hover {
    background-color: rgba(25, 30, 26, 0.85);
}

.comments-count-badge {
    font-size: 0.65rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    margin-top: 3px;
    font-weight: 700;
}

.comments-drawer-content {
    flex-grow: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.comments-drawer-content h3 {
    margin-top: 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
    margin-bottom: 16px;
    color: #f1f3f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-list-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.comments-list-container::-webkit-scrollbar {
    width: 4px;
}

.comments-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.comment-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-standard);
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: #a4b3a6;
    margin-bottom: 6px;
}

.comment-date {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
}

.comment-body {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #e2e8e3;
    word-break: break-all;
    font-family: var(--font-body);
}

.comment-submit-form {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.btn-reply-comment {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: #a4b3a6;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 6px;
    padding: 0;
    transition: color 0.2s;
}

.btn-reply-comment:hover {
    color: var(--color-primary-light);
}

.comment-reply-item {
    margin-left: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    padding-left: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--radius-standard) var(--radius-standard) 0;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: -4px;
    margin-bottom: 10px;
}

.inline-reply-form {
    margin-left: 24px;
    margin-top: 6px;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 2px dashed rgba(255, 255, 255, 0.2);
}

.inline-reply-form textarea {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 4px;
    padding: 6px;
    font-size: 0.75rem;
    resize: none;
    font-family: var(--font-body);
}

.inline-reply-form textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-primary-light);
    outline: none;
}

.inline-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

.inline-reply-actions button {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    border: none;
}

.btn-inline-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #a4b3a6;
}

.btn-inline-submit {
    background: var(--color-primary);
    color: white;
}

.comments-disabled-overlay {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-standard);
    padding: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #a4b3a6;
}

.comments-disabled-overlay a {
    color: var(--color-primary-light);
    text-decoration: underline;
    font-weight: 700;
}


/* ==============================================
   MOBILE-FIRST REDESIGN
   ============================================== */

/* ── Visibility Helpers ── */
.desktop-only { display: flex; }
.mobile-only  { display: none; }

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only  { display: flex !important; }
}

/* ── Bottom Navigation Bar ── */
.bottom-nav {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 300;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(44, 94, 67, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(43, 37, 33, 0.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 0;
    color: var(--color-text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    font-family: var(--font-body);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}

.bottom-nav-item.active {
    color: var(--color-primary);
}

.bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.1);
}

/* Active dot indicator */
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-primary);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    /* Body needs padding so content doesn't hide behind bottom nav */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* Header: slimmer on mobile */
    .main-header {
        padding: 0;
    }

    .header-container {
        padding: 10px 16px;
    }

    .logo .brand-text {
        font-size: 1.2rem;
    }

    .logo .brand-sub {
        font-size: 0.65rem;
    }

    /* Section container compact */
    .section-container {
        padding: 20px 14px;
    }

    /* Library hero compact */
    .library-hero {
        min-height: 30vh;
    }

    .library-hero h1 {
        font-size: 1.6rem;
    }

    .library-hero p {
        font-size: 0.85rem;
    }

    /* Bookshelf grid: 2 columns on mobile */
    .bookshelf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Book card smaller */
    .book-card {
        padding: 8px 8px 14px 8px;
    }

    .book-card-content h3 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .book-card-meta {
        font-size: 0.68rem;
    }

    .book-card:hover {
        transform: none; /* Disable tilt on mobile */
    }

    /* Feed tabs scrollable */
    .feed-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .feed-tabs::-webkit-scrollbar { display: none; }

    .feed-tab {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Filter panel stacked */
    .filter-panel {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }

    .platform-stats {
        font-size: 0.75rem;
    }

    /* Channels grid 1-column */
    .channels-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Studio: full width */
    .studio-grid {
        grid-template-columns: 1fr;
    }

    /* Ambient bar compact */
    .ambient-audio-bar {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .asmr-select {
        max-width: 140px;
        font-size: 0.72rem;
    }

    .audio-btn .btn-text {
        display: none; /* Icon only on mobile */
    }
}

/* ── Reader: Mobile Caption Panel ── */
.reader-caption-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(15, 20, 15, 0.88) 30%);
    padding: 48px 20px 70px 20px; /* top fade area + bottom nav space */
    z-index: 15;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    /* Hidden on desktop */
    display: none;
}

.reader-caption-panel.collapsed {
    transform: translateY(calc(100% - 44px));
}

.caption-drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    margin: 0 auto 12px auto;
}

.reader-caption-text {
    font-family: var(--font-handwriting);
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    word-break: keep-all;
}

/* Desktop: keep classic floating memo */
.desktop-reader-memo {
    display: flex; /* shown on desktop */
}

@media (max-width: 768px) {
    /* Hide floating memo on mobile */
    .desktop-reader-memo {
        display: none !important;
    }

    /* Show caption panel on mobile */
    .reader-caption-panel {
        display: block;
    }

    /* Nav arrows: hide on mobile (use swipe) */
    .nav-page-btn {
        display: none;
    }

    /* Reader top bar compact */
    .reader-top-bar {
        padding: 8px 14px;
    }

    .reader-book-info h2 {
        font-size: 0.85rem;
    }

    .category-tag {
        font-size: 0.6rem;
    }

    /* Reader bottom bar: sit above caption panel */
    .reader-bottom-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 20;
        padding: 8px 16px;
        background: transparent;
        pointer-events: none;
    }

    .pebble-progress-container {
        gap: 6px;
        pointer-events: auto;
    }

    .progress-pebble {
        width: 6px;
        height: 6px;
    }

    .page-number-indicator {
        font-size: 0.7rem;
    }

    /* Comments drawer: full-width bottom sheet on mobile */
    .reader-comments-drawer {
        top: auto;
        bottom: -100%;
        right: 0;
        left: 0;
        width: 100%;
        height: 60%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 16px 16px 0 0;
        transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reader-comments-drawer.open {
        bottom: 0;
        right: 0;
    }

    .toggle-comments-btn {
        position: fixed;
        left: auto;
        right: 14px;
        bottom: 76px; /* above bottom nav */
        top: auto;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        z-index: 310;
    }

    /* Reader overlay: fill screen edge-to-edge */
    .reader-overlay {
        padding: 0;
    }

    /* Close / share button size */
    .close-reader-btn {
        font-size: 0.95rem;
    }
    .close-reader-btn span {
        display: none;
    }
}

/* Very small (iPhone SE, etc.) */
@media (max-width: 380px) {
    .bookshelf-grid {
        grid-template-columns: 1fr;
    }

    .bottom-nav-item span {
        font-size: 0.58rem;
    }

    .reader-caption-text {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Creator Studio Diary Theme Styles
   ========================================================================== */

/* Diary Binder Container */
.diary-binder {
    display: flex;
    position: relative;
    background: #503d33; /* Leather cover border color */
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 18px;
    margin: 45px 0 20px 0; /* Add top margin for tabs space */
    min-height: 650px;
    gap: 10px;
    font-family: 'Nanum Myeongjo', serif;
}

/* Notebook paper page styling */
.diary-page {
    flex: 1;
    background: #fbfbf2; /* Warm paper color */
    background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 100% 28px; /* Ruled notebook lines */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 30px 25px;
    color: #2b2521;
    position: relative;
    overflow-y: auto;
    max-height: 700px;
}

/* Left page specific padding and rings margin */
.diary-left-page {
    border-right: 2px dashed rgba(0,0,0,0.1);
    padding-right: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Right page specific padding and rings margin */
.diary-right-page {
    padding-left: 35px;
}

/* Metal rings detail down the center */
.diary-rings {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translateX(-50%);
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 10;
    pointer-events: none;
}

.diary-ring {
    width: 24px;
    height: 38px;
    background: linear-gradient(90deg, #999, #eee 40%, #ccc 60%, #888);
    border-radius: 12px;
    box-shadow: 4px 4px 6px rgba(0,0,0,0.3);
}

/* Sticky Index Tabs on the side/top */
.diary-tabs {
    position: absolute;
    left: 10px;
    top: -42px; /* Tab alignment on top */
    display: flex;
    gap: 6px;
    z-index: 5;
}

.diary-tab {
    background: #b2a496;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.diary-tab.active {
    background: #fbfbf2;
    color: #503d33;
    padding-top: 14px;
    margin-top: -4px;
    box-shadow: 0 -3px 8px rgba(0,0,0,0.2);
}

.diary-tab:nth-child(1) { border-top: 4px solid #8fa89b; } /* Soft green */
.diary-tab:nth-child(2) { border-top: 4px solid #ccaf9b; } /* Soft peach */
.diary-tab:nth-child(3) { border-top: 4px solid #b8a3b5; } /* Soft purple */
.diary-tab:nth-child(4) { border-top: 4px solid #d2c095; } /* Soft gold */

/* Sub-page sections */
.diary-sub-page {
    display: none;
}

.diary-sub-page.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.diary-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #503d33;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.diary-sub-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #503d33;
}

/* PROFILE LEFT PAGE ACTION BUTTONS */
.diary-profile-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-top: 25px;
    border-top: 1px dashed rgba(0,0,0,0.15);
    padding-top: 18px;
}

.diary-profile-actions .btn-text-link {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    font-size: 0.85rem;
    color: #503d33;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diary-profile-actions .btn-text-link:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(3px);
}

.diary-profile-actions .btn-text-link.text-danger {
    color: #9c4c43;
}

/* ==========================================
   1장: 책장 달력 (Calendar View Styles)
   ========================================== */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cal-nav {
    background: none;
    border: none;
    color: #503d33;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-cal-nav:hover {
    background: rgba(0,0,0,0.06);
}

#calendar-month-year {
    font-weight: 700;
    font-size: 1rem;
    color: #503d33;
    min-width: 90px;
    text-align: center;
}

.calendar-view-toggle {
    display: flex;
    background: rgba(0,0,0,0.05);
    border-radius: 15px;
    padding: 2px;
}

.btn-view-toggle {
    background: none;
    border: none;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #666;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-view-toggle.active {
    background: #503d33;
    color: #fff;
}

.calendar-container {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 10px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    color: #666;
}

.calendar-weekdays .weekday.sun { color: #b85c5c; }
.calendar-weekdays .weekday.sat { color: #5c7cb8; }

.calendar-grid-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(75px, auto);
    margin-top: 5px;
}

.calendar-day-cell {
    border: 1px solid rgba(0,0,0,0.04);
    padding: 4px;
    font-size: 0.8rem;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    position: relative;
    background: rgba(255,255,255,0.3);
}

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    background: rgba(143, 168, 155, 0.15);
    box-shadow: inset 0 0 0 1px rgba(143, 168, 155, 0.4);
}

.calendar-day-num {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 0.75rem;
    color: #666;
}

.calendar-day-cell.sun .calendar-day-num { color: #b85c5c; }
.calendar-day-cell.sat .calendar-day-num { color: #5c7cb8; }

/* Book Thumbnail inside calendar day */
.calendar-book-thumb {
    width: 100%;
    height: 38px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.calendar-book-thumb:hover {
    transform: scale(1.05);
    z-index: 5;
}

.calendar-book-thumb::after {
    content: attr(data-title);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #2b2521;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.calendar-book-thumb:hover::after {
    opacity: 1;
}

/* ==========================================
   2장: 일정 & 예약 발행 (Planner View Styles)
   ========================================== */
.planner-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 25px;
}

/* To-Do Section */
.planner-todo-section, .planner-schedule-section {
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 18px;
    border: 1px solid rgba(0,0,0,0.06);
}

.planner-todo-section h4, .planner-schedule-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #503d33;
    border-bottom: 1px dashed rgba(0,0,0,0.15);
    padding-bottom: 8px;
    font-weight: 700;
}

.todo-form {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.todo-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.7);
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-add-todo {
    background: #503d33;
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-add-todo:hover {
    background: #6a5346;
}

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

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    border-left: 3px solid #8fa89b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.todo-item.completed {
    opacity: 0.55;
    text-decoration: line-through;
    border-left-color: #ccc;
}

.todo-left {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.todo-left input[type="checkbox"] {
    cursor: pointer;
}

.btn-delete-todo {
    background: none;
    border: none;
    color: #9c4c43;
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-delete-todo:hover {
    opacity: 1;
}

/* Scheduled Books List */
.scheduled-books-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scheduled-book-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.scheduled-book-cover {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.1);
}

.scheduled-book-info {
    flex: 1;
    min-width: 0;
}

.scheduled-book-info h5 {
    margin: 0 0 3px 0;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduled-book-date {
    font-size: 0.72rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scheduled-actions {
    display: flex;
    gap: 4px;
}

.btn-sched-action {
    background: none;
    border: 1px solid rgba(0,0,0,0.15);
    padding: 4px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-sched-action.publish-now {
    background: #8fa89b;
    border-color: #8fa89b;
    color: white;
}

.btn-sched-action.publish-now:hover {
    background: #7ca18d;
}

.btn-sched-action.cancel-sched {
    color: #9c4c43;
    border-color: rgba(156,76,67,0.2);
}

.btn-sched-action.cancel-sched:hover {
    background: rgba(156,76,67,0.05);
}

/* ==========================================
   3장: 사진 일기장 (Photo Diary View Styles)
   ========================================== */
.diaries-editor-section {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 18px;
}

.diaries-editor-section h4, .diaries-list-section h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #503d33;
    border-bottom: 1px dashed rgba(0,0,0,0.15);
    padding-bottom: 6px;
    font-weight: 700;
}

.diary-entry-form select, 
.diary-entry-form input[type="date"], 
.diary-entry-form input[type="text"], 
.diary-entry-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.7);
    font-family: inherit;
    font-size: 0.85rem;
}

/* Image selection thumbnails */
.diary-photo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.03);
    border-radius: 6px;
    margin-bottom: 10px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.diary-photo-thumb {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.diary-photo-thumb:hover {
    transform: scale(1.04);
}

.diary-photo-thumb.selected {
    border-color: #503d33;
    box-shadow: 0 0 8px rgba(80,61,51,0.5);
    transform: scale(1.02);
}

/* Polaroid Card rendering list */
.diaries-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.polaroid-card {
    background: #fff;
    padding: 12px 12px 24px 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.3s;
    position: relative;
    border-radius: 2px;
}

.polaroid-card:hover {
    transform: scale(1.03) rotate(0deg) !important;
    z-index: 5;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.polaroid-photo {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 12px;
}

.polaroid-caption {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 1.2rem;
    line-height: 1.25;
    color: #332d29;
    text-align: center;
}

.polaroid-date {
    font-size: 0.7rem;
    color: #777;
    text-align: right;
    margin-top: 8px;
    font-family: inherit;
}

.polaroid-content {
    font-size: 0.8rem;
    color: #555;
    margin-top: 6px;
    line-height: 1.4;
    text-align: left;
    font-family: inherit;
}

.btn-delete-diary {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.8);
    color: #9c4c43;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.2s;
}

.polaroid-card:hover .btn-delete-diary {
    opacity: 1;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES (Mobile Bind layout)
   ========================================== */
@media (max-width: 768px) {
    .diary-binder {
        flex-direction: column;
        padding: 10px;
        min-height: auto;
        background: #503d33;
        margin-top: 15px; /* compact margin */
    }
    
    .diary-left-page {
        display: none; /* Hide left page / profile on mobile by default to fit screen */
    }
    
    .diary-right-page {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .diary-rings {
        display: none; /* Hide rings on mobile */
    }
    
    .diary-tabs {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        margin-bottom: 6px;
    }
    
    .diary-tab {
        padding: 8px 4px;
        font-size: 0.75rem;
        border-radius: 6px 6px 0 0;
        justify-content: center;
    }
    
    .diary-tab span {
        display: none; /* Hide text on mobile tabs to fit icons */
    }
    
    .diary-tab i {
        font-size: 1.1rem;
    }
    
    .planner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Hover overlay for profile avatar editing */
.creator-avatar-large:hover .avatar-change-overlay {
    opacity: 1 !important;
}

/* Video Play Overlay in Reader */
.reader-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(26, 29, 32, 0.45);
    padding: 20px 30px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    user-select: none;
}

.reader-video-play-overlay:hover {
    background: rgba(26, 29, 32, 0.6);
    transform: translate(-50%, -50%) scale(1.05);
    border-color: var(--color-primary-light);
}

.reader-play-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(107, 142, 35, 0.4);
    transition: all 0.3s ease;
}

.reader-play-button i {
    margin-left: 5px; /* offset play icon slightly to align center */
}

.reader-video-play-overlay:hover .reader-play-button {
    background-color: var(--color-primary-light);
    transform: scale(1.1);
}

.reader-play-label {
    font-family: 'Noto Sans KR', sans-serif;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Video Player Wrapper in Reader */
.reader-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-video-player iframe,
.reader-video-player video {
    width: 100%;
    height: 100%;
    border: none;
}


