/* Existing Styles remain... adding Studio Specifics */
/* ... (Existing styles from previous steps - I will append to them by rewriting the whole file to ensure integrity if I had the full content, but since I cannot see it all, I will use append logic if I could. Wait, I must overwrite the whole file or risk losing data if I just put new stuff? I should View File first? No, I viewed it before. I will try to use REPLACEMENT but since the file is large, I'll assume I need to ADD.
Actually, I should just APPEND the new CSS to the end. But `write_to_file` overwrites. 
I will read `style.css` first to ensure I don't delete everything, then append.) 
Wait, I already viewed `style.css` in step 281. It has 427 lines.
I should use `replace_file_content` to append? No, `replace_file_content` replaces a chunk.
I will read the file again to be safe, then rewrite. */
:root {
    --color-primary: #1f8ce6;
    --color-primary-dark: #1273c4;
    --color-accent: #6c5ce7;
    --color-text-main: #1a1b1c;
    --color-text-sub: #525458;
    --color-text-hint: #888d95;
    --bg-main: #ffffff;
    --bg-secondary: #f7f7fa;
    --bg-line: #ececec;

    --header-h: 56px;
    /* Reduced slightly for mobile feel */
    --nav-h: 56px;
    --max-w: 1080px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    list-style: none;
    outline: none;
}

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-size: 15px;
    letter-spacing: -0.03em;
    line-height: 1.5;
    /* CRITICAL SPACING FIXES */
    padding-top: var(--header-h);
    /* Prevent Header Overlap */
    padding-bottom: var(--nav-h);
    /* Prevent Bottom Nav Overlap */
    overflow-y: scroll;
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
        padding-top: 70px;
    }

    :root {
        --header-h: 70px;
    }
}

a {
    color: inherit;
    cursor: pointer;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-only {
    display: flex !important;
}

.desktop-only {
    display: none !important;
}

@media (min-width: 1024px) {
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }
}

/* INNER LAYOUT */
.inner {
    width: 100%;
    margin: 0 auto;
    max-width: var(--max-w);
    position: relative;
    /* No padding here, handled by sections or body */
}

/* HEADER */
header {
    height: var(--header-h);
    border-bottom: 1px solid var(--bg-line);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
}

.header-inner {
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
}

@media (min-width: 1024px) {
    .header-inner {
        padding: 0;
        max-width: var(--max-w);
        margin: 0 auto;
    }
}

.brand {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    margin-right: 40px;
}

.nav-pc {
    display: flex;
    gap: 32px;
    flex: 1;
}

.nav-pc a {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-hint);
    transition: 0.2s;
    white-space: nowrap;
}

.nav-pc a.active {
    color: var(--color-text-main);
}

.nav-pc a:hover {
    color: var(--color-primary);
}

.header-right-pc {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.search-wrap-pc {
    width: 240px;
    height: 36px;
    background: #f2f4f5;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: 0.2s;
}

.search-wrap-pc:focus-within {
    background: #fff;
    box-shadow: 0 0 0 1px var(--color-primary) inset;
    width: 300px;
}

.search-wrap-pc input {
    border: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
    margin-left: 8px;
}

/* SEARCH OVERLAY */
.mobile-search-btn {
    background: none;
    border: none;
    padding: 8px;
    margin-right: -8px;
    cursor: pointer;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 16px;
}

.search-overlay-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.search-overlay-input {
    flex: 1;
    border: none;
    font-size: 18px;
    font-weight: 700;
    outline: none;
    margin-right: 12px;
}

.search-recent {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-tag {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

/* HERO */
.hero-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    background: #eee;
}

@media (min-width: 1024px) {
    .hero-wrap {
        aspect-ratio: 2.5/1;
        border-radius: 12px;
        margin-top: 24px;
    }
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 40%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

/* SECTIONS */
.section {
    margin-bottom: 48px;
    /* Padding handling for cleaner mobile margins */
    padding-left: 0;
    padding-right: 0;
}

.section-head {
    padding: 0 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

@media (min-width: 1024px) {
    .section-head {
        padding: 0 0 16px;
    }
}

.sec-title {
    font-size: 19px;
    font-weight: 800;
    color: #000;
}

.sec-more {
    font-size: 13px;
    color: var(--color-text-hint);
}

/* GRID & CARDS */
.h-scroll-view {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 0 16px;
    padding-bottom: 20px;
    margin-bottom: -20px;
    scrollbar-width: none;
}

.h-scroll-view::-webkit-scrollbar {
    display: none;
}

.item {
    flex: 0 0 108px;
    cursor: pointer;
}

.wide-item {
    flex: 0 0 280px;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .h-scroll-view {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 24px;
        overflow: visible;
        padding: 0;
    }

    .item {
        width: auto;
        flex: none;
    }

    .wide-item {
        width: auto;
        flex: none;
        grid-column: span 2;
    }
}

.book-cover {
    width: 100%;
    aspect-ratio: 1/1.48;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f0f0f0;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.wide-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #eee;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.book-cover img,
.wide-cover img {
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.item:hover .book-cover img,
.wide-item:hover .wide-cover img {
    transform: scale(1.08);
}

.book-title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-meta {
    font-size: 12px;
    color: var(--color-text-hint);
}

.book-num {
    font-weight: 900;
    color: var(--color-primary);
    font-size: 14px;
}

/* MY PAGE SPECIFIC */
.my-header {
    text-align: center;
    padding: 40px 16px 30px;
    background: #fff;
    border-bottom: 8px solid #f2f4f5;
    margin-bottom: 30px;
}

.my-profile-img {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    width: 100%;
    max-width: 280px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* RANKING & TAGS */
.rank-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .rank-list {
        padding: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 40px;
    }
}

.rank-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.rank-item:hover {
    background: #fafafa;
}

.rank-num {
    font-size: 18px;
    font-weight: 900;
    color: #000;
    width: 32px;
    text-align: center;
    margin-right: 4px;
    margin-top: 4px;
}

.rank-thumb {
    width: 60px;
    height: 88px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-right: 16px;
}

.rank-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000;
}

.rank-desc {
    font-size: 13px;
    color: var(--color-text-hint);
    margin-bottom: 6px;
}

.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.tag-sm {
    font-size: 11px;
    background: #f0f0f5;
    color: #555;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #eaeaef;
}

/* TAGS WRAP */
.tags-wrap {
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

@media (min-width: 1024px) {
    .tags-wrap {
        padding: 0;
    }
}

.tag-lg {
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    background: white;
    color: #444;
    transition: 0.2s;
    cursor: pointer;
    font-weight: 600;
}

.tag-lg:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #f0f7ff;
}

/* STUDIO */
.studio-option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 16px 40px;
}

@media (min-width: 1024px) {
    .studio-option-grid {
        margin: 0 0 40px;
        gap: 24px;
    }
}

.studio-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
    cursor: pointer;
    transition: 0.2s;
}

.studio-card:hover {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #ebebef;
    z-index: 100;
    display: flex;
    justify-content: space-around;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ccc;
    cursor: pointer;
}

.nav-btn.active {
    color: #000 !important;
    font-weight: 700;
}

/* Strict Override */
.nav-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.nav-btn span {
    font-size: 10px;
    font-weight: 500;
}

/* STUDIO COMMON (NEW) */
.studio-body {
    background: #1e1e1e;
    /* Dark theme for professional feel */
    color: #e0e0e0;
    overflow: hidden;
    /* App interaction feel */
    height: 100vh;
    padding: 0 !important;
    /* Override global body padding */
    font-size: 14px;
}

.studio-header {
    height: 48px;
    background: #252526;
    border-bottom: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    position: relative;
}

.studio-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-toolbar {
    display: flex;
    gap: 4px;
}

.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-btn:hover {
    background: #3e3e42;
    color: #fff;
}

.tool-btn.primary {
    background: #007acc;
    color: white;
}

.tool-btn.primary:hover {
    background: #0062a3;
}

/* STUDIO LAYOUTS */
.studio-layout {
    display: flex;
    height: calc(100vh - 48px);
    width: 100vw;
}

.panel-left {
    width: 260px;
    background: #252526;
    border-right: 1px solid #000;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.panel-right {
    width: 300px;
    background: #252526;
    border-left: 1px solid #000;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.panel-center {
    flex: 1;
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* PANELS */
.panel-header {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #333;
    background: #2d2d30;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
}

/* NOVEL EDITOR SPECIFIC */
.chapter-list-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    color: #bbb;
    font-size: 13px;
}

.chapter-list-item:hover {
    background: #2a2d2e;
    color: #fff;
}

.chapter-list-item.active {
    background: #37373d;
    border-left-color: #007acc;
    color: #fff;
}

.novel-editor-area {
    width: 100%;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    color: #333;
    padding: 60px 80px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    outline: none;
    font-size: 16px;
    line-height: 1.8;
}

.novel-editor-area.dark-paper {
    background: #1e1e1e;
    color: #ccc;
    box-shadow: none;
}

.memo-card {
    background: #333;
    padding: 10px;
    margin: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #ccc;
}

/* VISUAL NOVEL SPECIFIC */
.stage-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    overflow: hidden;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
}

.stage-canvas {
    width: 960px;
    height: 540px;
    background: #000;
    position: relative;
    box-shadow: 0 0 0 1px #444;
    overflow: hidden;
}

.timeline-area {
    height: 250px;
    background: #1e1e1e;
    border-top: 1px solid #000;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.timeline-track {
    display: flex;
    height: 40px;
    border-bottom: 1px solid #333;
}

.track-header {
    width: 100px;
    border-right: 1px solid #333;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 12px;
    color: #888;
    background: #2d2d30;
}

.track-content {
    flex: 1;
    position: relative;
    background: #252526;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
}

.asset-item {
    aspect-ratio: 1;
    background: #333;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    text-align: center;
    overflow: hidden;
}

.asset-item:hover {
    border-color: #007acc;
    background: #37373d;
}

.asset-thumb {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    opacity: 0.7;
    background: #555;
    border-radius: 2px;
}

.asset-name {
    font-size: 10px;
    color: #aaa;
    padding: 0 4px;
    word-break: break-all;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* UTILS */
.resizer {
    width: 4px;
    cursor: col-resize;
    background: #111;
}

.prop-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 12px;
}

.prop-label {
    width: 80px;
    font-size: 11px;
    color: #888;
}

.prop-input {
    flex: 1;
    background: #3c3c3c;
    border: 1px solid #555;
    color: #fff;
    padding: 4px;
    font-size: 12px;
    border-radius: 2px;
}

/* SCROLLBAR CUSTOM */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}