/* === 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;
    gap: 16px;
}
.message:first-child {
    margin-top: 0;
}

.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-text {
    font-size: 15px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* === Attachments === */
.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.attachment-img {
    max-width: 400px;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.1s;
}
.attachment-img:hover {
    opacity: 0.9;
}

/* === Locked Attachment === */
.attachment-locked {
    position: relative;
    width: 400px;
    max-width: 100%;
    max-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;
}

/* === 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;
}

.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-gravure { background: linear-gradient(135deg, #2d8a4e, #1b6e3a); 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-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 {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.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="GRAVURE"] {
    background: #2d8a4e;
    border-color: #2d8a4e;
}
.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: 500;
}
.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-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;
}

.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-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;
}

/* 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; }

/* Guide steps */
.settings-guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.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: 1000;
    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;
}

/* === 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-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;
}

/* === 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;
    }

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

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

/* 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-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;
}

/* 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-pending {
    background: rgba(250, 166, 26, 0.2);
    color: #faa61a;
}

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

.request-status-fulfilled {
    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;
}
