/* 微信发现 · 游戏手札（独立样式） */

.game-handbook-page,
.game-handbook-note-page {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 13;
    flex-direction: column;
    background: linear-gradient(180deg, #edf1f7 0%, #e3e8f1 100%);
    color: #182033;
}

.game-handbook-page.show,
.game-handbook-note-page.show {
    display: flex;
}

.game-handbook-head {
    flex: 0 0 auto;
    min-height: 58px;
    padding: 9px 12px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 8px;
    background: rgba(246, 248, 252, 0.9);
    border-bottom: 1px solid rgba(116, 128, 152, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.game-handbook-head h2 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: #1b2437;
}

.game-handbook-back,
.game-handbook-delete {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #4d5a73;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(83, 96, 124, 0.1);
    cursor: pointer;
    font-weight: 900;
}

.game-handbook-back {
    font-size: 30px;
    line-height: 1;
}

.game-handbook-delete {
    font-size: 13px;
    color: #b33a32;
}

.game-handbook-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.game-handbook-intro,
.game-handbook-empty {
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.72);
    color: #637089;
    font-size: 13px;
    line-height: 1.55;
    box-shadow: 0 10px 24px rgba(77, 96, 130, 0.08);
}

.game-handbook-friend-list,
.game-handbook-note-list {
    display: grid;
    gap: 9px;
}

.game-handbook-friend-row,
.game-handbook-note-row,
.game-handbook-space-card {
    width: 100%;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 30px rgba(77, 96, 130, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.54);
    display: grid;
    align-items: center;
    gap: 11px;
    color: inherit;
}

.game-handbook-friend-row,
.game-handbook-note-row {
    cursor: pointer;
}

.game-handbook-friend-row {
    grid-template-columns: auto 1fr auto;
    text-align: left;
}

.game-handbook-note-row {
    grid-template-columns: 1fr auto;
    text-align: left;
}

.game-handbook-friend-row:active,
.game-handbook-note-row:active {
    transform: translateY(1px);
}

.game-handbook-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #7d89a9, #b9c5dc);
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

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

.game-handbook-friend-main,
.game-handbook-note-row span {
    min-width: 0;
}

.game-handbook-friend-main strong,
.game-handbook-note-row strong,
.game-handbook-space-card strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1d2638;
    font-size: 15px;
    font-weight: 900;
}

.game-handbook-friend-main small,
.game-handbook-note-row small,
.game-handbook-space-card small {
    display: block;
    margin-top: 4px;
    color: #78839a;
    font-size: 12px;
    line-height: 1.35;
}

.game-handbook-chevron {
    color: #a9b1c2;
    font-size: 24px;
    line-height: 1;
}

.game-handbook-space-card {
    grid-template-columns: auto 1fr;
    margin-bottom: 12px;
}

.game-handbook-game-title {
    margin: 0 2px 8px;
    color: #47536a;
    font-size: 13px;
    font-weight: 900;
}

.game-handbook-note-detail {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 16px 24px;
}

.game-handbook-note-detail header {
    margin-bottom: 13px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.36);
    box-shadow: 0 10px 26px rgba(77, 96, 130, 0.1);
}

.game-handbook-note-meta {
    color: #78839a;
    font-size: 12px;
    font-weight: 800;
}

.game-handbook-note-detail h1 {
    margin: 6px 0 0;
    color: #1d2638;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 900;
}

.game-handbook-note-content {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #263044;
    font-size: 15px;
    line-height: 1.78;
    word-break: break-word;
    box-shadow: 0 12px 32px rgba(77, 96, 130, 0.11);
}

html[data-appearance="dark"] .game-handbook-page,
html[data-appearance="dark"] .game-handbook-note-page {
    background: linear-gradient(180deg, #171a21 0%, #11141a 100%);
    color: #e9edf5;
}

html[data-appearance="dark"] .game-handbook-head,
html[data-appearance="dark"] .game-handbook-intro,
html[data-appearance="dark"] .game-handbook-empty,
html[data-appearance="dark"] .game-handbook-friend-row,
html[data-appearance="dark"] .game-handbook-note-row,
html[data-appearance="dark"] .game-handbook-space-card,
html[data-appearance="dark"] .game-handbook-note-detail header,
html[data-appearance="dark"] .game-handbook-note-content {
    background: rgba(35, 40, 51, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

html[data-appearance="dark"] .game-handbook-head h2,
html[data-appearance="dark"] .game-handbook-friend-main strong,
html[data-appearance="dark"] .game-handbook-note-row strong,
html[data-appearance="dark"] .game-handbook-space-card strong,
html[data-appearance="dark"] .game-handbook-note-detail h1 {
    color: #f2f4f8;
}

html[data-appearance="dark"] .game-handbook-note-content {
    color: #e1e5ed;
}

@media (max-width: 430px) {
    .game-handbook-body {
        padding: 10px;
    }

    .game-handbook-note-detail {
        padding: 12px 12px 20px;
    }

    .game-handbook-note-detail h1 {
        font-size: 20px;
    }
}
