/* === SatisIsland - Discord Dark Theme === */

:root {
    --bg-primary: #313338;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #1e1f22;
    --bg-accent: #404249;
    --bg-hover: #35373c;
    --bg-active: #404249;
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --text-muted: #949ba4;
    --text-link: #00a8fc;
    --brand-primary: #5865f2;
    --brand-hover: #4752c4;
    --danger: #da373c;
    --success: #23a55a;
    --warning: #f0b232;
    --divider: #3f4147;
    --scrollbar: #1a1b1e;
    --scrollbar-thumb: #555960;

    --sidebar-width: 240px;
    --header-height: 48px;
    --avatar-size: 40px;

    --font-primary: 'gg sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
    height: 100%;
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.375;
}

a {
    color: var(--text-link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

/* === App Container === */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--bg-tertiary);
    box-shadow: 0 1px 0 rgba(0,0,0,.2);
}

.server-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Channel List === */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.channel-category {
    padding: 16px 8px 0;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.category-lock {
    font-size: 10px;
}

.channel-link {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 1px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 15px;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.channel-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}
.channel-link.active {
    background: var(--bg-active);
    color: var(--text-primary);
    font-weight: 500;
}
.channel-link.locked {
    opacity: 0.5;
    cursor: pointer;
}

.channel-lock-icon {
    margin-left: auto;
    font-size: 12px;
    flex-shrink: 0;
}

.channel-count-badge {
    margin-left: auto;
    font-size: 11px;
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

.channel-link .channel-lock-icon + .channel-count-badge {
    margin-left: 4px;
}

.channel-hash {
    margin-right: 6px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
}
.channel-link.active .channel-hash,
.channel-link:hover .channel-hash {
    color: var(--text-secondary);
}

.channel-lock {
    margin-left: auto;
    font-size: 12px;
}

/* === User Panel === */
.user-panel {
    padding: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.user-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-accent);
    font-size: 16px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.user-action-btn {
    padding: 4px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.1s;
}
.user-action-btn:hover {
    opacity: 1;
    text-decoration: none;
}

/* === Main Content === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* === Header === */
.content-header {
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    flex-shrink: 0;
}

.header-channel-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.header-channel-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.header-channel-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    margin-left: auto;
}

.lang-switch {
    padding: 4px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--divider);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.1s;
}
.lang-switch:hover {
    background: var(--bg-hover);
    text-decoration: none;
}


/* === Content Area === */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

/* === Messages === */
.messages-container {
    padding: 0 16px;
}

.message {
    display: flex;
    padding: 4px 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    gap: 16px;
}
.message:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 4px;
}

.message-avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

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

.message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.message-author {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.message-timestamp {
    font-size: 12px;
    color: var(--text-muted);
}

.message-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.message-text {
    font-size: 15px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* === Attachments === */
.message-attachments {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 8px;
    max-width: 804px;
}

.attachment-img {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.1s;
    object-fit: cover;
}
.attachment-img:hover {
    opacity: 0.9;
}

/* === Locked Attachment === */
.attachment-locked {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}
.attachment-locked-preview {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}
.attachment-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
}
.attachment-locked-icon {
    font-size: 1.8rem;
}
.attachment-locked-text {
    font-size: 0.75rem;
    text-align: center;
    padding: 0 12px;
    opacity: 0.9;
}

/* === Banner (daily-poster) === */
.message-banner {
    display: block;
    max-width: 120px;
    max-height: 80px;
    border-radius: 6px;
    object-fit: contain;
    margin-bottom: 6px;
}

/* === Spoiler === */
.spoiler {
    position: relative;
    cursor: pointer;
}
.spoiler img,
.spoiler .series-thumbnail {
    filter: blur(44px);
    transition: filter 0.3s;
}
.spoiler.revealed img,
.spoiler.revealed .series-thumbnail {
    filter: none;
}

.spoiler-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    z-index: 2;
}
.spoiler.revealed .spoiler-overlay {
    display: none;
}

/* === Series Card (Gallery) === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 16px;
    padding-bottom: 70px;
}

.series-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.1s;
    cursor: pointer;
}
.series-card:hover {
    background: var(--bg-hover);
}

.series-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.series-card-body {
    padding: 12px;
}

.series-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.series-type {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
/* Premium type badges — royal/luxury palette */
.type-r15 { background: linear-gradient(135deg, #2d8a4e, #1b6e3a); color: #fff; }
.type-oppaidrop { background: linear-gradient(135deg, #EB459E, #c2185b); color: #fff; }
.type-ex { background: linear-gradient(135deg, #c4547a, #a83460); color: #fff; }
.type-sp { background: linear-gradient(135deg, #d4882a, #b86d15); color: #fff; }
.type-dx { background: linear-gradient(135deg, #7b52ab, #5e3d8f); color: #fff; }

.series-card-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 32px;
}

/* Blurred thumbnail for locked series */
.series-card--locked {
    opacity: 0.85;
}
.series-card--locked:hover {
    opacity: 1;
}
.series-card--expired {
    opacity: 0.5;
    filter: grayscale(0.6);
}
.series-card--expired:hover {
    opacity: 0.7;
}
.series-card-expired-badge {
    background: var(--text-muted);
    color: var(--bg-primary);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}
.series-card-countdown {
    background: linear-gradient(135deg, #7b52ab, #9b6fcf);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    animation: countdown-pulse 2s ease-in-out infinite;
}
.series-card-countdown.countdown-expired {
    background: var(--text-muted);
    animation: none;
}
.series-detail-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(123, 82, 171, 0.15), rgba(155, 111, 207, 0.1));
    border: 1px solid rgba(123, 82, 171, 0.3);
    border-radius: 8px;
    font-size: 15px;
}
.series-detail-countdown .countdown-icon {
    font-size: 20px;
}
.series-detail-countdown .countdown-label {
    color: var(--text-secondary);
}
.series-detail-countdown .countdown-timer {
    font-weight: 700;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    color: #b388ff;
    letter-spacing: 1px;
}
@keyframes countdown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}
.series-card-thumb-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.series-card-blurred img {
    filter: blur(20px);
    transform: scale(1.1);
}
.series-card-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}
.series-card-lock-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.series-card-tier {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

/* Gallery filter bar */
.gallery-filter {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    z-index: 150;
}
.gallery-type-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.gallery-type-chip {
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}
.gallery-type-chip:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}
.gallery-type-chip.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
.gallery-type-chip.active[data-type="R15"] {
    background: #2d8a4e;
    border-color: #2d8a4e;
}
.gallery-type-chip.active[data-type="OppaiDrop"] {
    background: #EB459E;
    border-color: #EB459E;
}
.gallery-type-chip.active[data-type="EX"] {
    background: #c4547a;
    border-color: #c4547a;
}
.gallery-type-chip.active[data-type="SP"] {
    background: #d4882a;
    border-color: #d4882a;
}
.gallery-type-chip.active[data-type="DX"] {
    background: #7b52ab;
    border-color: #7b52ab;
}
.gallery-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.gallery-filter-label input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 16px;
    height: 16px;
}

/* Upgrade prompt modal */
.upgrade-prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}
.upgrade-prompt-dialog {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.upgrade-prompt-icon {
    font-size: 48px;
}
.upgrade-prompt-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.upgrade-prompt-steps {
    text-align: left;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
}
.upgrade-prompt-steps-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}
.upgrade-prompt-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.upgrade-prompt-step:last-child {
    margin-bottom: 0;
}
.upgrade-prompt-step-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary, #5865f2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upgrade-prompt-step-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.upgrade-prompt-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.upgrade-link {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.15s;
}
.upgrade-link:hover {
    opacity: 0.85;
}
.upgrade-link-patreon {
    background: #ff424d;
}
.upgrade-link-subscribestar {
    background: #4cc3a0;
}
.upgrade-link-kofi {
    background: #13C3FF;
}
.upgrade-prompt-settings {
    margin-top: 12px;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 10px 16px;
}
.upgrade-prompt-close {
    margin-top: 4px;
}

/* === Series Detail === */
.series-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.series-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.series-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.series-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.thumbnail-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 380px;
}

.series-thumbnail {
    width: 100%;
    border-radius: 8px;
}

.series-content {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.series-download {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.series-password {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.series-password.tap-to-copy {
    cursor: pointer;
    transition: background 0.2s;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 8px 0;
}

.series-password.tap-to-copy:hover {
    background: var(--bg-tertiary);
}

.series-password.tap-to-copy:active {
    background: var(--bg-secondary);
}

.password-value {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: monospace;
    user-select: all;
    transition: background 0.2s, color 0.2s;
}

.tap-to-copy.copied .password-value {
    background: #43b581;
    color: #fff;
}

.tap-to-copy.copied .password-value::after {
    content: ' Copied!';
    font-family: inherit;
    font-size: 12px;
}

.copy-hint {
    font-size: 11px;
    color: var(--text-muted, #72767d);
    opacity: 0.7;
}

/* === Series Notification in Timeline === */
.message-series-link {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-link);
    font-weight: 600;
    transition: background 0.1s;
}
.message-series-link:hover {
    background: var(--bg-accent);
    text-decoration: none;
}

/* === Locked Notice === */
.locked-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 16px;
    text-align: center;
    color: var(--text-muted);
}

.locked-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.locked-notice p {
    font-size: 16px;
    margin-bottom: 16px;
    max-width: 400px;
}

/* === Loading === */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 32px;
}
.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--divider);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-family: var(--font-primary);
}
.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--brand-hover);
}

.btn-secondary {
    background: var(--bg-accent);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-mega {
    background: #d9272e;
    color: #fff;
}
.btn-mega:hover {
    background: #b71c1c;
}

.btn-google {
    background: #4285f4;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}
.btn-google:hover {
    background: #3367d6;
}

.btn-discord {
    background: #5865f2;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}
.btn-discord:hover {
    background: #4752c4;
}

.btn-login {
    width: 100%;
    text-align: center;
    padding: 8px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 4px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* === Age Gate === */
/* === Splash === */
.splash-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-tertiary);
}

.splash-container {
    text-align: center;
    padding: 16px;
}

.splash-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
}

.splash-logo {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.splash-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.splash-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.splash-lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    min-width: 160px;
    border-radius: 8px;
    background: var(--bg-accent);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.splash-lang-btn:hover {
    background: var(--brand-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.splash-lang-flag {
    font-size: 36px;
    line-height: 1;
}

.splash-lang-label {
    font-size: 18px;
    font-weight: 600;
}

/* === Age Gate / Login / Error === */
.age-gate-body, .login-body, .error-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-tertiary);
}

.age-gate-container, .login-container, .error-container {
    text-align: center;
    padding: 16px;
}

.age-gate-card, .login-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
}

.age-gate-logo, .login-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.age-gate-description, .login-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.age-gate-lang {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-skip {
    display: block;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* === Login Guide === */
.login-guide {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 440px;
    width: 100%;
    margin-top: 16px;
    text-align: left;
}

.login-guide-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.login-membership-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.login-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.login-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.login-step-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 3px;
}

.login-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.login-service {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-accent);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === Error === */
.error-code {
    font-size: 72px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.error-message {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* === Settings === */
.settings-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
}

.settings-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.welcome-section {
    background: linear-gradient(135deg, var(--bg-secondary), #2d2f5e);
    border: 1px solid var(--brand-primary);
    text-align: center;
    padding: 32px 20px;
}
.welcome-section .settings-heading {
    font-size: 20px;
    text-transform: none;
    color: var(--text-primary);
}
.welcome-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.settings-value-muted {
    color: var(--text-muted);
}
.welcome-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.welcome-tier-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}
.tier-badge-lg {
    font-size: 18px;
    padding: 8px 24px;
}

.settings-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}
.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.settings-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.tier-refresh-form {
    margin-left: 8px;
}
.tier-refresh-btn {
    font-size: 16px;
    padding: 2px 8px;
    line-height: 1;
}
.settings-refresh-notice {
    font-size: 13px;
    color: var(--brand-primary);
    padding: 4px 0;
}

.settings-form {
    margin-top: 12px;
}

.tier-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}
/* Premium tier badges — royal/luxury palette */
.tier-guest { background: var(--bg-secondary); color: var(--text-muted); }
.tier-free { background: var(--bg-accent); color: var(--text-primary); }
.tier-essential { background: linear-gradient(135deg, #2d8a4e, #1b6e3a); color: #fff; }
.tier-fragrant { background: linear-gradient(135deg, #c4547a, #a83460); color: #fff; }
.tier-glorious { background: linear-gradient(135deg, #d4882a, #b86d15); color: #fff; }
.tier-heavenly { background: linear-gradient(135deg, #7b52ab, #5e3d8f); color: #fff; }
.tier-invention { background: linear-gradient(135deg, #4a7fb5, #35628e); color: #fff; }

/* Tier required banner (lock redirect) */
.tier-required-banner {
    background: linear-gradient(135deg, #2d2f5e, var(--bg-secondary)) !important;
    border: 1px solid var(--brand-primary);
    text-align: center;
    padding: 24px 20px !important;
}
.tier-required-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.tier-required-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Discord join banner */
.discord-join-banner {
    background: linear-gradient(135deg, #2d2f5e, var(--bg-secondary)) !important;
    border: 1px solid #5865f2;
    text-align: center;
    padding: 24px 20px !important;
}
.discord-join-text {
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 16px;
}
.discord-join-banner .btn-discord {
    display: inline-block;
    margin-bottom: 12px;
}
.discord-join-hint {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Discord error banner */
.discord-error-banner {
    background: linear-gradient(135deg, #3d2020, var(--bg-secondary)) !important;
    border: 1px solid #ed4245;
    text-align: center;
    padding: 24px 20px !important;
}
.discord-error-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.discord-error-text {
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
}
.discord-error-banner .btn-discord {
    display: inline-block;
    margin-bottom: 16px;
}
.discord-error-contact {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
    margin-top: 4px;
}
.discord-error-contact p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}
.discord-error-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.discord-error-links a {
    color: #5865f2;
    font-size: 13px;
    text-decoration: none;
}
.discord-error-links a:hover {
    text-decoration: underline;
}

/* Settings service blocks */
.settings-service {
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
}
.settings-service:last-child {
    border-bottom: none;
}
.settings-service .btn {
    margin-top: 8px;
}
.settings-inline-form {
    display: inline;
}

.settings-tier-switcher { margin-top: 10px; }
.tier-switcher-form { display: flex; gap: 6px; flex-wrap: wrap; }
.tier-switcher-form .btn-sm { font-size: 12px; padding: 4px 10px; }

/* Membership guide cards */
.membership-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.membership-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-accent);
    border-radius: 8px;
    padding: 16px;
}
.membership-card--highlight {
    border-color: var(--brand-primary);
    border-width: 2px;
    position: relative;
}
.membership-card-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}
.membership-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.membership-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 10px;
    line-height: 1.5;
}
.membership-card .btn {
    margin-top: 4px;
}
/* Guide steps (inside cards) */
.settings-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.guide-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.guide-step-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    padding-top: 3px;
}
.guide-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.guide-service {
    background: var(--bg-accent);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Language buttons */
.settings-lang-buttons {
    display: flex;
    gap: 8px;
}

/* Button variants */
.btn-secondary {
    background: var(--bg-accent);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background: var(--bg-tertiary, #3a3c41);
}
.btn-patreon {
    background: #FF424D;
    color: #fff;
}
.btn-patreon:hover {
    background: #e63b45;
}
.btn-danger {
    background: transparent;
    color: var(--danger, #ED4245);
    border: 1px solid var(--danger, #ED4245);
}
.btn-danger:hover {
    background: var(--danger, #ED4245);
    color: #fff;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* === Load More === */
.load-more-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 16px auto;
    padding: 10px;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-primary);
    transition: background 0.1s;
}
.load-more-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.no-more-messages {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
}
.pagination a {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.pagination a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.pagination .current {
    background: var(--brand-primary);
    color: #fff;
}

/* === Image Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

/* === Reactions === */
.reaction-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.reaction-btn:hover {
    background: var(--bg-secondary);
}
.reaction-btn:active {
    transform: scale(0.92);
}
.reaction-btn:disabled {
    pointer-events: none;
}
.reaction-icon {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.15s;
}
.reaction-btn:hover .reaction-icon {
    transform: scale(1.2);
}
.reaction-count {
    font-size: 13px;
    min-width: 8px;
}
.reaction-pulse .reaction-icon {
    animation: reactionPulse 0.4s ease;
}
@keyframes reactionPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.5); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.reaction-heart--card {
    margin-top: 6px;
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
}
.reaction-heart--card:hover {
    border-color: rgba(237, 69, 69, 0.3);
}
.series-detail-reaction {
    margin-bottom: 16px;
}
.reaction-heart--detail {
    padding: 6px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
}
.reaction-heart--detail .reaction-icon {
    font-size: 20px;
}
.reaction-heart--detail .reaction-count {
    font-size: 15px;
}
.reaction-heart--detail:hover {
    border-color: rgba(237, 69, 69, 0.3);
}
.heart-particle {
    position: fixed;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    animation: heartFloat 0.7s ease-out forwards;
    opacity: 0;
}
@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(calc(var(--tx) * 0.6), calc(var(--ty) * 0.6)) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.8);
    }
}

/* Splash reaction icon */
.splash-icon {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.reaction-btn:hover .splash-icon {
    opacity: 1;
}
.reaction-splash--card {
    margin-top: 6px;
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
}
.reaction-splash--card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}
.reaction-splash--detail {
    padding: 6px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
}
.reaction-splash--detail .splash-icon {
    width: 20px;
    height: 20px;
}
.reaction-splash--detail .reaction-count {
    font-size: 15px;
}
.reaction-splash--detail:hover {
    border-color: rgba(255, 255, 255, 0.3);
}
.reaction-bar--card {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
/* Splash particle (same animation as heart) */
.splash-particle {
    position: fixed;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    animation: heartFloat 0.7s ease-out forwards;
    opacity: 0;
}

/* === Mobile FAB === */
.mobile-fab {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    padding: 0;
}
.mobile-fab:active {
    transform: translateX(-50%) scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.mobile-fab-icon {
    font-size: 24px;
    line-height: 56px;
}
.mobile-fab-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.mobile-fab.sheet-open {
    display: none !important;
}

/* === Bottom Sheet Overlay === */
.bottom-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

/* === Bottom Sheet === */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 16px 16px 0 0;
    z-index: 301;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}
.bottom-sheet.active {
    transform: translateY(0);
}

/* === Bottom Sheet Menu === */
.bottom-sheet-menu {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0 0;
    -webkit-overflow-scrolling: touch;
}

.bottom-sheet-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.1s;
    gap: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-primary);
}
.bottom-sheet-item:hover,
.bottom-sheet-item:active {
    background: var(--bg-hover);
    text-decoration: none;
}
.bottom-sheet-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
    border-left: 3px solid var(--brand-primary);
    padding-left: 17px;
}
.bottom-sheet-item.locked {
    opacity: 0.45;
    cursor: pointer;
}

.bottom-sheet-item-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.bottom-sheet-item-label {
    flex: 1;
    text-align: left;
}

.bottom-sheet-item-tier {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bottom-sheet-item-lock {
    font-size: 14px;
    flex-shrink: 0;
}

.bottom-sheet-divider {
    height: 1px;
    background: var(--divider);
    margin: 8px 20px;
}

/* === Bottom Sheet Close === */
.bottom-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 8px auto 16px;
    border-radius: 50%;
    background: var(--bg-accent);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.bottom-sheet-close:active {
    background: var(--bg-hover);
}

/* === OppaiDrop+ Premium === */
.od-plus-hero {
    padding: 28px 16px 20px;
    background: linear-gradient(135deg, rgba(235, 69, 158, 0.15), rgba(255, 105, 180, 0.05));
    border-bottom: 1px solid rgba(235, 69, 158, 0.3);
    text-align: center;
}
.od-plus-hero-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    background: #EB459E;
    color: #fff;
    margin-bottom: 8px;
}
.od-plus-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0;
}
.od-plus-hero-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.od-year-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.od-year-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.od-year-tab:hover {
    color: var(--text-primary);
}
.od-year-tab--active {
    color: #eb459e;
    border-bottom-color: #eb459e;
}

.od-plus-grid .series-card {
    border-left: 3px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.od-plus-grid .series-card:hover {
    border-left-color: #EB459E;
    box-shadow: 0 0 12px rgba(235, 69, 158, 0.15);
}

.type-od-plus {
    background: #EB459E;
    color: #fff;
}
.type-おまけ {
    background: #E091C0;
    color: #fff;
}

/* OD+ Download List */
.od-list { padding: 0 12px 20px; }
.od-list-section { margin-bottom: 20px; }
.od-list-heading { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 4px; }
.od-list-items { }
.od-list-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.od-list-row:last-child { border-bottom: none; }
.od-list-row-link { cursor: pointer; border-radius: 4px; padding: 8px 8px; }
.od-list-row-link:hover { background: rgba(255,255,255,0.05); }
.od-list-row-link:active { background: rgba(255,255,255,0.08); }
.od-list-title { flex: 1; font-size: 14px; color: var(--text-primary); }
.od-list-dl { flex-shrink: 0; font-size: 13px; color: #EB459E; text-decoration: none; font-weight: 600; white-space: nowrap; }
.od-list-dl:hover { text-decoration: underline; }
.od-list-pw { flex-shrink: 0; font-size: 12px; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.od-list-pw:hover { color: var(--text-primary); }
.od-list-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* Bonus Pack Cards */
.od-list-card { background: var(--bg-secondary); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.od-list-card-link { cursor: pointer; }
.od-list-card-link:hover { background: var(--bg-tertiary); }
.od-list-card-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.od-list-card-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.od-list-card-body { padding: 0 12px 10px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 8px; margin: 0 12px 10px; }

.series-detail--premium .series-download {
    background: linear-gradient(135deg, rgba(235, 69, 158, 0.1), var(--bg-secondary));
    border: 1px solid rgba(235, 69, 158, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.od-plus-exclusive-label {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    background: #EB459E;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* === OppaiDrop Page === */
.od-page { padding: 16px; max-width: 900px; margin: 0 auto; }
.od-page-header { display: flex; gap: 0; margin-bottom: 16px; }
.od-tab { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 6px 18px; cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; user-select: none; }
.od-tab--active { color: #EB459E; border-bottom-color: #EB459E; }
.od-tab:hover:not(.od-tab--active) { color: var(--text-primary); }
.od-panel--hidden { display: none; }
.od-archive-empty { color: var(--text-muted); text-align: center; padding: 48px 0; font-size: 14px; }

/* 3 Slot Row */
.od-slots-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.od-slot-cell { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--bg-secondary); border: 2px solid transparent; transition: border-color 0.2s, transform 0.15s; }
.od-slot-cell:hover { transform: translateY(-2px); }
.od-slot-cell--active { border-color: #EB459E; }

/* Slot Thumbnail */
.od-slot-thumb { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-tertiary); }
.od-slot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-slot-thumb-blurred { filter: blur(12px); transform: scale(1.1); }
.od-slot-thumb-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); font-size: 1.5rem; }
.od-slot-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-muted); }
.od-slot-new { position: absolute; top: 8px; right: 8px; background: #EB459E; color: #fff; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; animation: od-glow 2s ease-in-out infinite; }
@keyframes od-glow { 0%,100% { box-shadow: 0 0 8px rgba(235,69,158,0.4); } 50% { box-shadow: 0 0 20px rgba(235,69,158,0.8); } }

/* Slot Info */
.od-slot-info { padding: 10px 12px; }
.od-slot-title { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.od-slot-progress { font-size: 12px; color: var(--text-muted); }

/* Slot Detail (expanded area) */
.od-slot-detail { margin-bottom: 24px; }
.od-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.od-detail-title { font-size: 1.1rem; font-weight: 700; color: #FFB6C1; }
.od-detail-count { color: var(--text-muted); font-size: 14px; }

/* Caption */
.od-caption { color: rgba(255,182,193,0.7); font-size: 13px; font-style: italic; margin-bottom: 12px; letter-spacing: 0.02em; white-space: pre-wrap; }

/* Heart Progress */
.od-progress { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.od-heart { font-size: 1rem; transition: transform 0.3s; }
.od-heart--filled { animation: od-pulse 0.6s ease; }
.od-heart--empty { opacity: 0.3; filter: grayscale(1); }
@keyframes od-pulse { 0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* 6-column Grid */
.od-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 32px; }
.od-grid-item { aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; cursor: pointer; position: relative; }
.od-grid-img { width: 100%; height: 100%; object-fit: cover; }
.od-grid-img--blurred { filter: blur(12px); transform: scale(1.1); }
.od-grid-item--locked { cursor: pointer; }
.od-grid-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); font-size: 1.5rem; }

/* Empty slots */
.od-grid-empty { background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); position: relative; overflow: hidden; cursor: default; }
.od-grid-empty::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); animation: od-shimmer 2s infinite; }
@keyframes od-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Topless Section */
.od-topless-section { margin-bottom: 32px; }
.od-topless-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.od-topless-badge { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; background: linear-gradient(135deg, #e74c8a, #c2185b); padding: 4px 14px; border-radius: 4px; }

/* Pair View Overlay */
.od-pair-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.92); display: flex; flex-direction: column; opacity: 0; transition: opacity 0.2s ease; }
.od-pair-overlay--active { opacity: 1; }
.od-pair-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; flex-shrink: 0; }
.od-pair-counter { color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 600; }
.od-pair-close { background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; padding: 0 4px; opacity: 0.7; transition: opacity 0.2s; }
.od-pair-close:hover { opacity: 1; }
.od-pair-nav-wrap { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px 24px; min-height: 0; overflow: hidden; }
.od-pair-nav { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 48px; cursor: pointer; padding: 0 8px; transition: color 0.2s; flex-shrink: 0; user-select: none; }
.od-pair-nav:hover { color: #fff; }
.od-pair-container { display: flex; gap: 12px; justify-content: center; align-items: center; flex: 1; min-width: 0; max-height: 100%; }
.od-pair-card { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 45%; min-width: 0; }
.od-pair-img-wrap { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; max-height: calc(100vh - 140px); }
.od-pair-img-wrap--empty { width: 200px; aspect-ratio: 3/4; background: var(--bg-secondary); border-radius: 8px; }
.od-pair-img-wrap--locked { aspect-ratio: 1097/1920; height: calc(100vh - 140px); }
.od-pair-img { display: block; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.od-pair-img--blurred { width: 100%; height: 100%; object-fit: cover; filter: blur(16px); transform: scale(1.1); }
.od-pair-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); font-size: 2rem; gap: 8px; }
.od-pair-lock span { font-size: 12px; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.1em; }
.od-pair-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); }

/* Archives Grid (used in ARCHIVE tab) */
.od-archives-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lang-switch {
        display: none;
    }

    .content-area {
        padding-bottom: 80px;
    }

    .message-attachments {
        max-width: 100%;
    }
    .attachment-img,
    .attachment-locked {
        height: 200px;
    }
    .attachment-locked-preview {
        max-height: 200px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .gallery-filter {
        left: 0;
    }
    body:has(.gallery-filter) .mobile-fab {
        bottom: 60px;
    }

    /* OppaiDrop mobile */
    .od-slots-row { gap: 6px; }
    .od-slot-title { font-size: 11px; }
    .od-slot-info { padding: 8px; }
    .od-grid { grid-template-columns: repeat(3, 1fr); }
    .od-archives-grid { grid-template-columns: repeat(2, 1fr); }

    /* Pair view mobile */
    .od-pair-nav { font-size: 32px; padding: 0 4px; }
    .od-pair-container { gap: 6px; }
    .od-pair-card { max-width: 48%; }
}

/* Desktop: hide bottom sheet elements */
@media (min-width: 769px) {
    .mobile-fab,
    .bottom-sheet,
    .bottom-sheet-overlay {
        display: none !important;
    }
}

/* === Discord Linking Banner === */
.discord-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border-radius: 8px;
    flex-shrink: 0;
}
.discord-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.discord-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.discord-banner-text {
    font-size: 14px;
    color: #fff;
    line-height: 1.3;
}
.discord-banner-btn {
    flex-shrink: 0;
    font-size: 13px;
    padding: 6px 14px;
    background: #fff;
    color: #5865f2;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}
.discord-banner-btn:hover {
    background: #e8e9ec;
    text-decoration: none;
}

@media (max-width: 480px) {
    .discord-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .discord-banner-content {
        justify-content: center;
    }
    .discord-banner-btn {
        text-align: center;
    }
}

/* === Welcome Page === */
.welcome-page {
    padding: 24px 16px 40px;
    max-width: 800px;
    margin: 0 auto;
    overflow-y: auto;
    height: 100%;
}

.welcome-hero {
    text-align: center;
    padding: 40px 0 32px;
}
.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.welcome-cta {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 8px;
}
.welcome-cta:hover {
    background: var(--brand-hover);
    text-decoration: none;
}
.welcome-cta-section {
    text-align: center;
}

.welcome-section {
    margin-bottom: 32px;
}
.welcome-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.welcome-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-accent);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tier table */
.welcome-tier-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.welcome-tier-row {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 4px solid var(--text-muted);
}
.welcome-tier-guest { border-left-color: #72767d; }
.welcome-tier-free { border-left-color: #99aab5; }
.welcome-tier-essential { border-left-color: #43b581; }
.welcome-tier-fragrant { border-left-color: #e91e8c; }
.welcome-tier-glorious { border-left-color: #f57c00; }
.welcome-tier-heavenly { border-left-color: #9b59b6; }
.welcome-tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.welcome-tier-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.welcome-tier-price {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}
.welcome-tier-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Membership cards (welcome) */
.welcome-membership-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* How-to steps */
.welcome-steps {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
}
.welcome-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.welcome-step:last-child {
    margin-bottom: 0;
}
.welcome-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-primary, #5865f2);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.welcome-step-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.welcome-step-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.welcome-browse {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}
.welcome-browse-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 15px;
}

/* Sidebar home link */
.sidebar-home-link {
    margin-bottom: 4px;
}
.sidebar-home-link .channel-hash {
    font-style: normal;
}

/* Blurred gallery preview grid */
.welcome-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.welcome-gallery-item {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.welcome-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) brightness(0.6);
    transform: scale(1.1);
}
.welcome-gallery-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}
.welcome-gallery-lock {
    font-size: 24px;
    opacity: 0.7;
}

/* === Omikuji === */
.omikuji-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px 16px;
    text-align: center;
}

.omikuji-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.omikuji-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.omikuji-title-icon {
    font-size: 28px;
}

.omikuji-greeting {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.omikuji-guest-info {
    background: var(--bg-secondary);
    border: 1px solid var(--divider);
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 24px;
}

.omikuji-guest-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.omikuji-shrine {
    margin-bottom: 24px;
}

.omikuji-draw-btn {
    display: inline-block;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e74c8a 0%, #c2185b 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(231, 76, 138, 0.3);
}

.omikuji-draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(231, 76, 138, 0.4);
}

.omikuji-draw-btn:active {
    transform: translateY(0);
}

.omikuji-draw-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.omikuji-drawing {
    animation: omikujiPulse 0.6s ease-in-out infinite;
}

@keyframes omikujiPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.omikuji-login-msg {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.omikuji-login-btn {
    display: inline-block;
    padding: 12px 32px;
}

/* Result card */
.omikuji-result {
    margin-top: 8px;
}

.omikuji-appear {
    animation: omikujiReveal 0.6s ease-out;
}

@keyframes omikujiReveal {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.omikuji-card {
    background: var(--bg-secondary);
    border: 2px solid var(--divider);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.omikuji-result-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.omikuji-result-type {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 16px;
}

.omikuji-divider {
    height: 1px;
    background: var(--divider);
    margin: 16px 0;
}

.omikuji-fortune-section {
    margin-bottom: 16px;
}

.omikuji-fortune-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.omikuji-fortune-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}

.omikuji-image-wrap {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.omikuji-image {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.omikuji-comeback {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 8px;
}

/* === Request Page === */
.request-page {
    padding: 24px 16px;
    max-width: 640px;
    margin: 0 auto;
}

.request-section-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Locked state */
.request-locked {
    text-align: center;
    padding: 48px 16px;
}

.request-locked-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.request-locked h2 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 8px;
}

.request-locked p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.request-locked-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Rules */
.request-rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.request-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--text-muted);
}

.request-rule-active {
    border-left-color: var(--accent);
    background: rgba(88, 101, 242, 0.1);
}

.request-notice {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.request-rule-tier {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    min-width: 80px;
}

.request-rule-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Form */
.request-form-section {
    margin-bottom: 32px;
}

.request-form-group {
    margin-bottom: 12px;
}

.request-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.request-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.request-textarea::placeholder {
    color: var(--text-muted);
}

.request-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.request-options {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.request-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.request-checkbox {
    accent-color: var(--accent);
}

.request-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-remaining {
    font-size: 13px;
    color: var(--text-muted);
}

.request-submit {
    padding: 8px 24px;
}

.request-limit-reached {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* Request list */
.request-list-section {
    margin-top: 32px;
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.request-date {
    font-size: 12px;
    color: var(--text-muted);
}

.request-status {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.request-status-pre {
    background: rgba(250, 166, 26, 0.2);
    color: #faa61a;
}

.request-status-ok {
    background: rgba(67, 181, 129, 0.2);
    color: #43b581;
}

.request-status-fin {
    background: rgba(88, 101, 242, 0.2);
    color: var(--accent);
}

.request-card-body {
    padding: 12px 14px;
}

.request-content-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.request-tags {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.request-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.request-tag-r18 {
    background: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

.request-tag-fanart {
    background: rgba(153, 102, 204, 0.2);
    color: #9966cc;
}

.request-card-reply {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    background: rgba(88, 101, 242, 0.05);
}

.request-reply-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}

.request-card-reply p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* === Push Notification Toggle === */
.settings-push-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.push-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.push-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.push-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.push-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-accent);
    border-radius: 24px;
    transition: background 0.2s;
}
.push-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.push-toggle-switch input:checked + .push-toggle-slider {
    background: var(--success);
}
.push-toggle-switch input:checked + .push-toggle-slider::before {
    transform: translateX(20px);
}
.push-toggle-switch input:disabled + .push-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}
.push-toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}
.push-status-msg {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== Announcements ===== */
.announcements-page {
    padding: 24px 16px;
    max-width: 640px;
    margin: 0 auto;
}

.announcements-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
}

.announcement-header {
    margin-bottom: 8px;
}

.announcement-date {
    font-size: 12px;
    color: var(--text-muted);
}

.announcement-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.announcement-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.announcement-author {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Category border colors */
.ann-cat-info        { border-left-color: #5865F2; }
.ann-cat-event       { border-left-color: #ED4245; }
.ann-cat-update      { border-left-color: #57F287; }
.ann-cat-maintenance { border-left-color: #FEE75C; }

/* Category badge */
.announcement-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.announcement-category.ann-cat-info        { background: #5865F222; color: #5865F2; }
.announcement-category.ann-cat-event       { background: #ED424522; color: #ED4245; }
.announcement-category.ann-cat-update      { background: #57F28722; color: #57F287; }
.announcement-category.ann-cat-maintenance { background: #FEE75C22; color: #FEE75C; }

/* Test post */
.ann-test { opacity: 0.7; border-style: dashed; }
.ann-test-badge {
    display: inline-block;
    background: #FEE75C;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
}

/* Announcement icon image */
.announcement-icon {
    margin: 8px 0;
}
.announcement-icon img {
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
}

/* Timeline message: category border (reuse for .message) */
.message.ann-cat-info        { border-left: 3px solid #5865F2; }
.message.ann-cat-event       { border-left: 3px solid #ED4245; }
.message.ann-cat-update      { border-left: 3px solid #57F287; }
.message.ann-cat-maintenance { border-left: 3px solid #FEE75C; }
.message.ann-test            { opacity: 0.7; border-style: dashed; }

/* ===== Actor Profiles ===== */

/* Actor List Page */
.actors-page {
    padding: 24px 16px;
    max-width: 900px;
    margin: 0 auto;
}

.actors-intro {
    margin-bottom: 24px;
}

.actors-intro h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.actors-intro-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.actor-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--actor-color, var(--accent));
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.actor-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.actor-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--actor-color, var(--accent));
}

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

.actor-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-accent);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

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

.actor-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.actor-card-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.actor-card-bust {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.actor-card-onafreq {
    font-size: 11px;
    color: #ff6b9d;
    background: rgba(255, 107, 157, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
}

.actors-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

/* Actor Detail Page */
.actor-detail {
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.actor-detail-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
    background: var(--bg-secondary);
}

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

.actor-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
}

.actor-header-content {
    position: absolute;
    bottom: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.actor-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--actor-color, var(--accent));
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

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

.actor-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-accent);
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
}

.actor-detail-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.actor-detail-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 0 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Stats (Libido + Kinks) */
.actor-stats {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.actor-stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actor-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actor-stats-row {
    display: flex;
    gap: 24px;
}

.actor-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Origin Stories Accordion */
.actor-origins {
    padding: 0 20px;
    margin-bottom: 8px;
}

.actor-origins-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.origin-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: hidden;
}

.origin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.origin-toggle:hover {
    background: var(--bg-hover);
}

.origin-toggle-icon {
    font-size: 10px;
    transition: transform 0.2s;
    color: var(--text-muted);
}

.origin-toggle--open .origin-toggle-icon {
    transform: rotate(90deg);
}

.origin-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.origin-body--open {
    max-height: 5000px;
}

.origin-image {
    padding: 0 16px;
    margin-bottom: 12px;
}

.origin-image img {
    width: 100%;
    border-radius: 6px;
}

.origin-text {
    padding: 0 16px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

.actor-kink-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 107, 157, 0.15);
    color: #ff6b9d;
    font-weight: 500;
    border: 1px solid rgba(255, 107, 157, 0.3);
}

/* Tier-gated Sections */
.actor-sections {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.actor-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.actor-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.actor-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.actor-section-tier-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.actor-section-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.actor-section-image img {
    width: 100%;
    height: auto;
    display: block;
}

.actor-section-image--blurred img {
    filter: blur(20px);
    transform: scale(1.1);
}

.actor-section-content {
    padding: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.actor-section--locked .actor-section-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.actor-section-locked {
    position: relative;
}

.actor-section-locked .locked-notice {
    padding: 24px 16px;
}

/* Back button */
.actor-detail .back-btn {
    margin: 24px 20px 0;
    display: inline-block;
}

/* Mobile */
@media (max-width: 768px) {
    .actors-grid {
        grid-template-columns: 1fr;
    }

    .actor-detail-header {
        height: 160px;
    }

    .actor-header-content {
        bottom: 12px;
        left: 14px;
        right: 14px;
        gap: 12px;
    }

    .actor-detail-avatar {
        width: 60px;
        height: 60px;
    }

    .actor-detail-name {
        font-size: 20px;
    }

    .actor-stats {
        padding: 16px;
    }

    .actor-sections {
        padding: 0 16px;
    }
}

/* === Selfie Collection === */

.selfie-collection-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.selfie-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.selfie-stats {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.stat-aspiration {
    width: 100%;
    color: var(--brand-primary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.stat-received {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.selfie-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 0;
}

.selfie-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-primary);
}

.selfie-tab:hover { color: var(--text-primary); }
.selfie-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

.tab-count {
    background: var(--bg-accent);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.selfie-tab.active .tab-count {
    background: var(--brand-primary);
    color: #fff;
}

.selfie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.selfie-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, opacity 0.3s;
    position: relative;
}

.selfie-card:hover { transform: translateY(-2px); }
.selfie-card--removed { opacity: 0; transform: scale(0.9); }
.selfie-card--upgraded { opacity: 0; transform: translateY(-20px); }

.selfie-card-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: pointer;
}

.selfie-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selfie-card-meta {
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.selfie-card-date { color: var(--text-muted); }

.selfie-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.selfie-card:hover .selfie-card-actions { opacity: 1; }

.selfie-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selfie-star-btn { color: #ffd700; }
.selfie-remove-btn:hover { color: var(--danger); }

/* Star reaction button on timeline */
.reaction-star { color: #ffd700; }

/* Toast notification */
.si-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--brand-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
    pointer-events: none;
}

.si-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Empty state */
.selfie-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.selfie-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.selfie-load-more {
    text-align: center;
    padding: 20px;
}

/* Selfie Promo (Discord未連携) */
.selfie-promo {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 12px;
}

.selfie-promo-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.selfie-promo-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.selfie-promo-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.selfie-promo-btn:hover {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .selfie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .selfie-card-actions {
        opacity: 1;
    }

    .selfie-collection-page {
        padding: 12px;
    }
}
