/* Homepage Styles - FAMICOM Retro Game Portal Theme */

/* ==========================================
   Shared: Section Labels
   ========================================== */
.section-label {
    font-size: 1.3rem;
    color: #ffcc00;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    background: #2c2c54;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border: 3px solid #1a1a3e;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    letter-spacing: 2px;
}

/* ==========================================
   Section A: LOAD GAME (이어읽기)
   ========================================== */
.section-load-game {
    margin-bottom: 2rem;
    background: #1e1e3a;
    border: 4px solid #2c2c54;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
    padding: 1rem;
}

.section-load-game .section-label {
    margin: -1rem -1rem 1rem -1rem;
    border: none;
    box-shadow: none;
}

/* Save Slots */
.save-slots-wrapper {
    overflow: hidden;
}

.save-slots-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.save-slots-track::-webkit-scrollbar { display: none; }
.save-slots-track:active { cursor: grabbing; }

.save-slot-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
    background: #2a2a50;
    border: 3px solid #4488cc;
    padding: 0.8rem;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.15s;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.save-slot-card:hover {
    border-color: #ffcc00;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.3);
}

.save-label {
    font-size: 0.75rem;
    color: #4488cc;
    letter-spacing: 1px;
}

.save-cover {
    width: 100%;
    height: 120px;
    border: 2px solid #444;
    overflow: hidden;
    background: #333;
}

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

.save-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #666;
}

.save-info {
    flex: 1;
}

.save-title {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.save-author {
    font-size: 0.7rem;
    color: #8888aa;
    margin-bottom: 0.4rem;
}

.progress-bar {
    height: 8px;
    background: #1a1a3e;
    border: 2px solid #444;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #44cc44;
    transition: width 0.3s;
}

.save-pct {
    font-size: 0.65rem;
    color: #44cc44;
    text-align: right;
    margin-top: 0.15rem;
}

.save-continue {
    font-size: 0.75rem;
    color: #ffcc00;
    text-align: center;
    padding-top: 0.3rem;
    border-top: 1px dashed #444;
}

/* Save Empty */
.save-empty {
    text-align: center;
    padding: 1.5rem;
    color: #8888aa;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.save-empty-link {
    color: #4488cc;
    text-decoration: none;
    font-size: 0.85rem;
}

.save-empty-link:hover {
    color: #ffcc00;
}

/* Clear Section */
.clear-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #444;
}

.clear-label {
    font-size: 0.8rem;
    color: #44cc44;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.clear-cards {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.clear-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #2a2a50;
    border: 2px solid #44cc44;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.15s;
    position: relative;
}

.clear-card:hover {
    border-color: #ffcc00;
}

.clear-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #44cc44;
    color: #1a1a3e;
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.clear-thumb {
    width: 36px;
    height: 48px;
    border: 2px solid #444;
    overflow: hidden;
    flex-shrink: 0;
    background: #333;
}

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

.clear-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #44cc44;
}

.clear-title {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.clear-endings {
    font-size: 0.65rem;
    color: #8888aa;
}

/* INSERT COIN (Guest) */
.section-load-game.guest {
    background: #1e1e3a;
    border: 4px solid #2c2c54;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.insert-coin {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.coin-text {
    font-size: 1.8rem;
    color: #ffcc00;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    letter-spacing: 4px;
}

.coin-text.blink {
    animation: blink-text 1s step-end infinite;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.coin-btn {
    display: inline-block;
    padding: 0.6rem 2rem;
    background: #e84040;
    border: 3px solid #b02020;
    color: #fff;
    text-decoration: none;
    font-family: 'DungGeunMo', monospace;
    font-size: 1rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
    transition: all 0.1s;
}

.coin-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.4);
    color: #fff;
}


/* ==========================================
   Section B: NOW PLAYING (피처드/추천)
   ========================================== */
.section-now-playing {
    margin-bottom: 2rem;
    background: #1a1a3e;
    border: 4px solid #2c2c54;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
    overflow: hidden;
}

.section-now-playing .section-label {
    margin: 0;
    border: none;
    box-shadow: none;
}

.now-playing-layout {
    display: flex;
    min-height: 360px;
}

/* Main Card Area */
.np-main-card {
    flex: 3;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.np-main-item {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 360px;
}

.np-main-item.active {
    display: block;
}

.np-main-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.2);
    transform: scale(1.15);
}

.np-main-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,62,0.85) 0%, rgba(26,26,62,0.4) 100%);
}

.np-main-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
    padding: 2rem;
}

.np-main-cover {
    flex-shrink: 0;
    width: 180px;
    height: 250px;
    border: 4px solid #fff8e8;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    overflow: hidden;
    background: #4488cc;
}

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

.np-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
}

.np-main-info {
    flex: 1;
    color: #fff;
    min-width: 0;
}

.np-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #e84040;
    border: 2px solid #b02020;
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.np-main-title {
    font-size: 1.6rem;
    color: #ffcc00;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-main-author {
    font-size: 0.9rem;
    color: #8888aa;
    margin-bottom: 0.6rem;
}

.np-main-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #8888aa;
    margin-bottom: 0.8rem;
}

.np-main-stats .stars {
    color: #ffcc00;
}

.np-main-desc {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-main-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.np-tag {
    padding: 0.15rem 0.5rem;
    background: rgba(228,64,64,0.3);
    border: 2px solid #e84040;
    color: #ffcccc;
    font-size: 0.7rem;
}

.np-start-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #e84040;
    border: 3px solid #b02020;
    color: #fff;
    text-decoration: none;
    font-family: 'DungGeunMo', monospace;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
    transition: all 0.1s;
}

.np-start-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.4);
    color: #fff;
}

/* Sidebar */
.np-sidebar {
    flex: 2;
    max-width: 360px;
    background: #16163a;
    border-left: 3px solid #2c2c54;
    display: flex;
    flex-direction: column;
}

.np-sidebar-header {
    padding: 0.6rem 1rem;
    background: #2c2c54;
    color: #4488cc;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.np-sidebar-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: #4488cc #16163a;
}

.np-sidebar-list::-webkit-scrollbar { width: 5px; }
.np-sidebar-list::-webkit-scrollbar-track { background: #16163a; }
.np-sidebar-list::-webkit-scrollbar-thumb { background: #4488cc; border-radius: 3px; }

.np-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border: none;
    border-bottom: 1px solid #2c2c54;
    background: transparent;
    color: #ccc;
    font-family: 'DungGeunMo', monospace;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.1s;
}

.np-sidebar-item:hover {
    background: rgba(68,136,204,0.15);
}

.np-sidebar-item.active {
    background: rgba(68,136,204,0.25);
    border-left: 3px solid #4488cc;
}

.np-sidebar-num {
    font-size: 1.1rem;
    color: #4488cc;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.np-sidebar-thumb {
    width: 40px;
    height: 55px;
    border: 2px solid #444;
    overflow: hidden;
    flex-shrink: 0;
    background: #333;
}

.np-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-sidebar-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
}

.np-sidebar-info {
    flex: 1;
    min-width: 0;
}

.np-sidebar-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.np-sidebar-author {
    font-size: 0.65rem;
    color: #8888aa;
}


/* ==========================================
   SELECT YOUR QUEST (ALL GAMES 내 태그 필터)
   ========================================== */
.quest-track-wrapper {
    overflow: hidden;
    margin-bottom: 1rem;
}

.quest-track {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.3rem 0;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.quest-track::-webkit-scrollbar { display: none; }
.quest-track:active { cursor: grabbing; }

.quest-cartridge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 1.2rem;
    background: #fff8e8;
    border: 3px solid #2c2c54;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    text-decoration: none;
    color: #2c2c54;
    transition: all 0.15s;
    min-width: 100px;
}

.quest-cartridge.active {
    background: #e84040;
    color: #fff;
    border-color: #b02020;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

.quest-cartridge.active .cartridge-count {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #ffd0d0;
}

.quest-cartridge:hover {
    background: #4488cc;
    color: #fff;
    border-color: #2c6090;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.25);
}

.cartridge-name {
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.cartridge-count {
    font-size: 0.65rem;
    color: #8888aa;
    background: #e8e0d0;
    padding: 0.1rem 0.4rem;
    border: 1px solid #d0c8b0;
}

.quest-cartridge:hover .cartridge-count {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #ddd;
}


/* ==========================================
   Section D: ADVENTURERS' GUILD (커뮤니티)
   ========================================== */
.section-guild {
    margin-bottom: 2rem;
}

.guild-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.guild-sub-header {
    padding: 0.5rem 0.8rem;
    background: #2c2c54;
    color: #4488cc;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    border: 2px solid #1a1a3e;
}

.guild-empty {
    text-align: center;
    padding: 1.5rem;
    color: #8888aa;
    font-size: 0.85rem;
}

/* Comments Feed */
.guild-comments {
    background: #fff8e8;
    border: 3px solid #2c2c54;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    padding: 0.8rem;
}

.comment-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c2c54 #e8e0d0;
}

.comment-feed::-webkit-scrollbar { width: 5px; }
.comment-feed::-webkit-scrollbar-track { background: #e8e0d0; }
.comment-feed::-webkit-scrollbar-thumb { background: #2c2c54; }

.comment-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem;
    border-bottom: 2px dashed #d0c8b0;
}

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

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #ddd;
    border: 2px solid #2c2c54;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.comment-avatar span {
    font-size: 0.8rem;
    color: #8888aa;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.comment-user {
    font-size: 0.75rem;
    font-weight: bold;
    color: #2c2c54;
}

.comment-book {
    font-size: 0.65rem;
    color: #4488cc;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: inline-block;
}

.comment-book:hover {
    color: #e84040;
}

.comment-text {
    font-size: 0.8rem;
    color: #444;
    line-height: 1.4;
    word-break: break-word;
}

.comment-text.spoiler {
    filter: blur(4px);
    cursor: pointer;
    transition: filter 0.2s;
    user-select: none;
}

.comment-text.spoiler:hover {
    filter: blur(2px);
}

.comment-time {
    font-size: 0.6rem;
    color: #8888aa;
    margin-top: 0.2rem;
}

/* Author Ranking */
.guild-authors {
    background: #fff8e8;
    border: 3px solid #2c2c54;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    padding: 0.8rem;
}

.author-ranking {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c2c54 #e8e0d0;
}

.author-ranking::-webkit-scrollbar { width: 5px; }
.author-ranking::-webkit-scrollbar-track { background: #e8e0d0; }
.author-ranking::-webkit-scrollbar-thumb { background: #2c2c54; }

.author-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-bottom: 2px dashed #d0c8b0;
}

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

.author-rank {
    font-size: 1.2rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.author-rank.rank-1 { color: #ffcc00; }
.author-rank.rank-2 { color: #c0c0c0; }
.author-rank.rank-3 { color: #cd7f32; }
.author-rank.rank-4,
.author-rank.rank-5 { color: #8888aa; font-size: 1rem; }

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #ddd;
    border: 2px solid #2c2c54;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.author-avatar span {
    font-size: 0.8rem;
    color: #8888aa;
}

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

.author-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #2c2c54;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-stats {
    display: flex;
    gap: 0.6rem;
    font-size: 0.7rem;
    color: #8888aa;
    flex-wrap: wrap;
}

.author-stats .stars {
    color: #ffcc00;
}

/* Guild 3-column layout */
.guild-layout-3col {
    grid-template-columns: 1fr 1fr 1fr;
}

.guild-col {
    background: #fff8e8;
    border: 3px solid #2c2c54;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    padding: 0.8rem;
}

/* Reader ranking */
.reader-ranking {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c2c54 #e8e0d0;
}

.reader-ranking::-webkit-scrollbar { width: 5px; }
.reader-ranking::-webkit-scrollbar-track { background: #e8e0d0; }
.reader-ranking::-webkit-scrollbar-thumb { background: #2c2c54; }

/* Reader avatar (initial only, no img) */
.reader-avatar {
    background: #447744;
}

/* TOP 댓글 피드 */
.top-comment-feed {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c2c54 #e8e0d0;
}

.top-comment-feed::-webkit-scrollbar { width: 5px; }
.top-comment-feed::-webkit-scrollbar-track { background: #e8e0d0; }
.top-comment-feed::-webkit-scrollbar-thumb { background: #2c2c54; }

.top-comment-item {
    padding: 0.5rem;
    border-bottom: 2px dashed #d0c8b0;
}

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

.top-comment-book {
    display: block;
    font-size: 0.72rem;
    color: #4488cc;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.top-comment-book:hover { text-decoration: underline; }

.top-comment-text {
    font-size: 0.82rem;
    color: #2c2c54;
    line-height: 1.4;
    word-break: break-word;
}

.top-comment-text.spoiler {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
}

.top-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.2rem;
}

.top-comment-author {
    font-size: 0.7rem;
    color: #8888aa;
}

.top-comment-likes {
    font-size: 0.75rem;
    color: #e84040;
    font-weight: bold;
}


/* ==========================================
   Section E: All Books (전체 작품 탐색)
   ========================================== */
.section-all-books {
    margin-bottom: 2rem;
}

/* Browse Controls */
.browse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.2rem;
    color: #e84040;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.sort-select {
    padding: 0.4rem 0.6rem;
    border: 3px solid #2c2c54;
    background: #fff;
    color: #2c2c54;
    font-size: 0.85rem;
    font-family: 'DungGeunMo', monospace;
}

/* Tag Filters */
.tag-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.3rem;
}

.tag-filters::-webkit-scrollbar { display: none; }

.tag-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #fff8e8;
    color: #2c2c54;
    border: 2px solid #2c2c54;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.1s;
    flex-shrink: 0;
}

.tag-chip:hover {
    background: #4488cc;
    color: white;
    border-color: #2c6090;
}

.tag-chip.active {
    background: #e84040;
    color: white;
    border-color: #b02020;
}

.tag-chip.clear {
    background: #8888aa;
    color: white;
    border-color: #666688;
}

/* Book Grid */
.hp-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.hp-book-card {
    background: #fff8e8;
    border: 3px solid #2c2c54;
    overflow: hidden;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    transition: transform 0.1s, box-shadow 0.1s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.hp-book-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.25);
    border-color: #e84040;
}

.hp-book-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #4488cc;
    display: block;
}

.hp-book-cover.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    height: 200px;
}

.hp-book-info {
    padding: 0.6rem;
    background: #fff8e8;
}

.hp-book-title {
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: #e84040;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-book-author {
    color: #8888aa;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-book-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #8888aa;
}

.hp-book-stats .stars {
    color: #ffcc00;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.pagination a,
.pagination-btn {
    padding: 0.4rem 0.8rem;
    background: #fff8e8;
    border: 3px solid #2c2c54;
    text-decoration: none;
    color: #2c2c54;
    font-family: 'DungGeunMo', monospace;
    font-size: 0.85rem;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
    transition: all 0.1s;
    cursor: pointer;
}

.pagination a:hover,
.pagination-btn:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.15);
}

.pagination a.active,
.pagination span.active {
    background: #4488cc;
    color: white;
    border: 3px solid #2c6090;
    padding: 0.4rem 0.8rem;
    font-family: 'DungGeunMo', monospace;
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #8888aa;
}


/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
    .now-playing-layout {
        flex-direction: column;
        min-height: auto;
    }

    .np-main-item {
        min-height: 320px;
    }

    .np-sidebar {
        max-width: none;
        border-left: none;
        border-top: 3px solid #2c2c54;
    }

    .np-sidebar-list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .np-sidebar-list::-webkit-scrollbar { display: none; }

    .np-sidebar-item {
        min-width: 180px;
        border-bottom: none;
        border-right: 1px solid #2c2c54;
    }

    .np-sidebar-item.active {
        border-left: none;
        border-bottom: 3px solid #4488cc;
    }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
    .section-label {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    /* Now Playing - 세로 레이아웃 */
    .now-playing-layout {
        flex-direction: column;
        min-height: unset;
    }

    .np-main-item {
        min-height: 280px;
    }

    .np-main-content {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        text-align: center;
    }

    .np-main-cover {
        width: 130px;
        height: 180px;
        margin: 0 auto;
    }

    .np-main-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .np-main-title {
        font-size: 1.2rem;
    }

    .np-main-desc {
        display: none;
    }

    .np-main-tags {
        justify-content: center;
    }

    .np-main-stats {
        justify-content: center;
    }

    /* 사이드바 숨김 — 스와이프로 대체 */
    .np-sidebar {
        display: none;
    }

    /* 스와이프 힌트 도트 */
    .np-dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding: 8px 0 4px;
        background: #1a1a3e;
    }

    .np-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #444470;
        transition: background 0.2s;
    }

    .np-dot.active {
        background: #4488cc;
    }

    /* Guild */
    .guild-layout,
    .guild-layout-3col {
        grid-template-columns: 1fr;
    }

    /* Save slots */
    .save-slot-card {
        min-width: 180px;
        max-width: 180px;
    }

    /* Grid */
    .hp-book-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.8rem;
    }

    .hp-book-cover,
    .hp-book-cover.placeholder {
        height: 160px;
    }

    .browse-controls {
        flex-direction: column;
        align-items: stretch;
    }

    /* Quest */
    .quest-cartridge {
        padding: 0.5rem 0.8rem;
        min-width: 80px;
    }

    .cartridge-name {
        font-size: 0.75rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .coin-text {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    /* Save slots */
    .save-slot-card {
        min-width: 160px;
        max-width: 160px;
    }

    .save-cover {
        height: 90px;
    }

    /* Now Playing */
    .np-main-item {
        min-height: auto;
    }

    .np-main-cover {
        width: 100px;
        height: 140px;
    }

    .np-main-title {
        font-size: 1rem;
    }

    /* Grid */
    .hp-book-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .hp-book-cover,
    .hp-book-cover.placeholder {
        height: 140px;
    }

    /* Comments */
    .comment-book {
        max-width: 80px;
    }
}
