/* ============================================
   ぷるってぁー - メインスタイルシート
   水色ベースの優しい落ち着いたデザイン
   ============================================ */

/* ── リセット & ベース ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* メインカラーパレット */
    --primary: #5bb8d4;
    --primary-light: #7ecbe6;
    --primary-lighter: #a8ddf0;
    --primary-pale: #d4f0fa;
    --primary-ghost: #eaf7fc;
    --primary-deep: #3a9abd;

    /* アクセントカラー */
    --accent-pink: #f0a0b8;
    --accent-pink-light: #fce4ec;
    --accent-yellow: #ffe8a0;
    --accent-green: #a8e6cf;

    /* テキスト（視認性向上済み） */
    --text-primary: #1e3a4a;
    --text-secondary: #4a7588;
    --text-tertiary: #7a9aaa;
    --text-on-primary: #ffffff;

    /* 背景 */
    --bg-main: #f0f8fc;
    --bg-card: #ffffff;
    --bg-hover: #f5fbfe;
    --bg-input: #f8fcfe;
    --bg-sidebar: #fafeff;

    /* ボーダー */
    --border-light: #e0eff5;
    --border-medium: #c8dfe8;
    --border-focus: #7ecbe6;

    /* シャドウ */
    --shadow-sm: 0 1px 3px rgba(91, 184, 212, 0.08);
    --shadow-md: 0 4px 12px rgba(91, 184, 212, 0.10);
    --shadow-lg: 0 8px 32px rgba(91, 184, 212, 0.15);
    --shadow-xl: 0 16px 48px rgba(91, 184, 212, 0.18);

    /* レイアウト */
    --header-height: 56px;
    --sidebar-width: 275px;
    --main-width: 600px;
    --right-sidebar-width: 340px;

    /* アニメーション */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* 角丸 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ── SVGアイコン ── */
.si {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    pointer-events: none;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', Meiryo, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-deep);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ── スクロールバー ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-lighter);
}

/* ============================================
   ランディングページ
   ============================================ */
.landing-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(160deg, #e0f4ff 0%, #f0faff 30%, #ffffff 60%, #eaf7fc 100%);
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(91, 184, 212, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.landing-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.landing-brand {
    text-align: center;
    margin-bottom: 40px;
}

.landing-logo {
    margin-bottom: 16px;
    color: var(--primary);
}

.landing-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(91, 184, 212, 0.15);
}

.landing-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    line-height: 1.8;
}

.landing-features {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-feature {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    min-width: 130px;
    transition: transform var(--transition-normal);
}

.landing-feature:hover {
    transform: translateY(-3px);
}

.landing-feature-icon {
    margin-bottom: 8px;
    color: var(--primary);
}

.landing-feature-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.landing-right {
    width: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.landing-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(126, 203, 230, 0.15), rgba(91, 184, 212, 0.05));
    animation: float 20s ease-in-out infinite;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 15%;
    animation-delay: -5s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 25%;
    animation-delay: -10s;
}

.bubble:nth-child(4) {
    width: 40px;
    height: 40px;
    top: 70%;
    left: 40%;
    animation-delay: -15s;
}

.bubble:nth-child(5) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 50%;
    animation-delay: -8s;
}

.bubble:nth-child(6) {
    width: 50px;
    height: 50px;
    top: 80%;
    left: 60%;
    animation-delay: -3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    33% {
        transform: translateY(-25px) rotate(5deg);
        opacity: 0.8;
    }

    66% {
        transform: translateY(15px) rotate(-3deg);
        opacity: 0.5;
    }
}

/* ── 認証カード ── */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    position: relative;
    z-index: 1;
}

.auth-card h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
}

.auth-card h2 span {
    color: var(--primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(91, 184, 212, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: 0 4px 12px rgba(91, 184, 212, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 6px 20px rgba(91, 184, 212, 0.4);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: var(--primary-ghost);
    color: var(--primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--primary-pale);
    border-color: var(--primary-lighter);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary-lighter);
}

.btn-outline:hover {
    background: var(--primary-ghost);
    border-color: var(--primary);
}

.btn-danger {
    background: #fee;
    color: #e55;
    border: 1px solid #fcc;
}

.btn-danger:hover {
    background: #fdd;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link a {
    font-weight: 600;
}

.auth-error {
    background: var(--accent-pink-light);
    color: #c44;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

.auth-success {
    background: #e8f8f0;
    color: #2d8a5e;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

/* ============================================
   メインレイアウト (3カラム)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}

/* ── 左サイドバー (ナビゲーション) ── */
.sidebar-left {
    width: var(--sidebar-width);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
    background: var(--bg-sidebar);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    text-decoration: none;
}

.sidebar-logo-icon {
    font-size: 28px;
}

.sidebar-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    background: var(--primary-ghost);
    color: var(--primary);
}

.nav-link.active {
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-ghost);
}

.nav-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    position: absolute;
    top: 8px;
    left: 32px;
    background: var(--accent-pink);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.sidebar-post-btn {
    margin-top: 16px;
    padding: 14px;
    font-size: 16px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-top: auto;
}

.sidebar-user:hover {
    background: var(--primary-ghost);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
}

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

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

.sidebar-user-handle {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── メインコンテンツ ── */
.main-content {
    flex: 1;
    max-width: var(--main-width);
    min-width: 0;
    border-right: 1px solid var(--border-light);
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 248, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0 16px;
}

.main-header-title {
    padding: 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-header-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.main-header-back:hover {
    background: var(--primary-ghost);
}

/* タブ */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.tab-item:hover {
    background: var(--primary-ghost);
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--text-primary);
    font-weight: 700;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* ── 投稿フォーム ── */
.post-composer {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
}

.post-composer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary-pale);
}

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

.post-composer-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 17px;
    line-height: 1.6;
    resize: none;
    min-height: 60px;
    max-height: 300px;
    color: var(--text-primary);
    background: transparent;
    padding: 8px 0;
}

.post-composer-textarea::placeholder {
    color: var(--text-tertiary);
}

.post-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

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

.composer-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    transition: background var(--transition-fast);
}

.composer-action-btn:hover {
    background: var(--primary-ghost);
}

.post-char-count {
    font-size: 13px;
    color: var(--text-tertiary);
}

.post-char-count.warn {
    color: var(--accent-pink);
}

.post-char-count.over {
    color: #e44;
}

.post-submit-btn {
    padding: 8px 20px;
    font-size: 14px;
}

/* ── 投稿カード ── */
.post-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.post-card:hover {
    background: var(--bg-hover);
}

.post-repost-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px 0 68px;
    padding-top: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.post-repost-label+.post-card {
    padding-top: 8px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary-pale);
    cursor: pointer;
    transition: filter var(--transition-fast);
}

.post-avatar:hover {
    filter: brightness(0.92);
}

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

.post-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.post-display-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
}

.post-display-name:hover {
    text-decoration: underline;
}

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

.post-time {
    font-size: 14px;
    color: var(--text-tertiary);
}

.post-time::before {
    content: '·';
    margin-right: 6px;
}

.post-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
    margin-bottom: 8px;
}

.post-original-toggle {
    font-size: 12px;
    color: var(--text-tertiary);
    cursor: pointer;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--primary-ghost);
    transition: all var(--transition-fast);
}

.post-original-toggle:hover {
    background: var(--primary-pale);
    color: var(--text-secondary);
}

.post-original-content {
    display: none;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-pale);
    white-space: pre-wrap;
}

.post-original-content.show {
    display: block;
}

/* スレッド表示 */
.thread-ancestor {
    position: relative;
}

.thread-ancestor::after {
    content: '';
    position: absolute;
    left: 32px;
    top: 52px;
    bottom: 0;
    width: 2px;
    background: var(--border-medium);
    z-index: 1;
}

.thread-ancestor .post-avatar {
    position: relative;
    z-index: 2;
}

.thread-ancestor .post-card {
    border-bottom: none;
    padding-bottom: 4px;
}

.thread-target .post-card {
    background: var(--primary-ghost);
}

/* ネストされた返信ツリー - アバター接続線 */
.reply-thread-item .post-card {
    border-bottom: 1px solid var(--border-light);
}

.has-replies {
    position: relative;
}

.has-replies .post-avatar {
    position: relative;
    z-index: 2;
}

.has-replies::after {
    content: '';
    position: absolute;
    left: 32px;
    top: 52px;
    bottom: 0;
    width: 2px;
    background: var(--border-medium);
    z-index: 1;
}

/* 返信ラベル */
.post-reply-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.post-reply-label:hover {
    color: var(--primary);
}

.post-reply-label-user {
    color: var(--primary);
}

.post-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    margin-left: -8px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    min-width: 60px;
}

.post-action:hover {
    background: var(--primary-ghost);
}

.post-action.reply:hover {
    color: var(--primary);
}

.post-action:active {
    transform: scale(0.85);
    /* 押したときの凹み効果 */
}

/* リポスト: 緑 */
.post-action.repost:hover {
    color: #00ba7c;
    background: rgba(0, 186, 124, 0.1);
}

.post-action.repost.active {
    color: #00ba7c;
    background: rgba(0, 186, 124, 0.2);
    /* 背景を濃く */
}

.post-action.repost.active .post-action-icon {
    animation: bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* いいね: ピンク/赤 */
.post-action.like:hover {
    color: #f91880;
    background: rgba(249, 24, 128, 0.1);
}

.post-action.like.active {
    color: #f91880;
    background: rgba(249, 24, 128, 0.2);
    /* 背景を濃く */
}

.post-action.like.active .post-action-icon {
    animation: bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ブックマーク: 青 */
.post-action.bookmark:hover {
    color: var(--primary);
    background: var(--primary-ghost);
}

.post-action.bookmark.active {
    color: var(--primary);
    background: var(--primary-pale);
}

.post-action.bookmark.active .post-action-icon {
    animation: bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

.post-action-icon {
    font-size: 17px;
}

.post-action-count {
    font-size: 13px;
}

/* ── リプライスレッド ── */
.reply-line {
    position: absolute;
    left: 38px;
    top: 60px;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

/* ── 引用リポスト ── */
.quoted-post {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    transition: background var(--transition-fast);
}

.quoted-post:hover {
    background: var(--bg-hover);
}

.quoted-post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.quoted-post-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.quoted-post-name {
    font-weight: 600;
    font-size: 13px;
}

.quoted-post-handle {
    font-size: 13px;
    color: var(--text-secondary);
}

.quoted-post-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ── 右サイドバー ── */
.sidebar-right {
    width: var(--right-sidebar-width);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(91, 184, 212, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.sidebar-card-title {
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.trend-item {
    padding: 12px 16px;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.trend-item:hover {
    background: var(--bg-hover);
}

.trend-category {
    font-size: 12px;
    color: var(--text-tertiary);
}

.trend-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2px 0;
}

.trend-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

.follow-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    transition: background var(--transition-fast);
}

.follow-suggest-item:hover {
    background: var(--bg-hover);
}

.follow-suggest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
}

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

.follow-suggest-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.follow-suggest-handle {
    font-size: 13px;
    color: var(--text-secondary);
}

.sidebar-card-more {
    padding: 14px 16px;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-card-more:hover {
    background: var(--bg-hover);
}

.sidebar-footer {
    padding: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.8;
}

.sidebar-footer a {
    color: var(--text-tertiary);
    margin-right: 8px;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   プロフィールページ
   ============================================ */
.profile-header-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-pale));
    object-fit: cover;
    position: relative;
}

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

.profile-info {
    padding: 0 16px;
    position: relative;
}

.profile-avatar-wrap {
    margin-top: -44px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    object-fit: cover;
    background: var(--primary-pale);
}

.profile-edit-btn {
    margin-bottom: 12px;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 12px;
}

.profile-handle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    font-size: 14px;
}

.profile-stat {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.profile-stat:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.profile-stat-count {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 4px;
}

/* ============================================
   通知
   ============================================ */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--primary-ghost);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-icon.like {
    background: rgba(240, 160, 184, 0.15);
    color: var(--accent-pink);
}

.notification-icon.repost {
    background: rgba(168, 230, 207, 0.15);
    color: var(--accent-green);
}

.notification-icon.follow {
    background: var(--primary-ghost);
    color: var(--primary);
}

.notification-icon.reply {
    background: var(--primary-ghost);
    color: var(--primary);
}

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

.notification-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.notification-text strong {
    font-weight: 600;
}

.notification-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.notification-post-preview {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   モーダル
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 74, 90, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 580px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary-ghost);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-body {
    padding: 16px;
}

/* ============================================
   設定ページ
   ============================================ */
.settings-section {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.settings-item-label {
    font-size: 15px;
    color: var(--text-primary);
}

.settings-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================
   ユーティリティ
   ============================================ */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    margin-bottom: 12px;
    color: var(--primary-light);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    line-height: 1.6;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-light);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* トースト通知 */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: var(--primary-deep);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    white-space: nowrap;
}

@keyframes toastIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        transform: translateY(-10px);
        opacity: 0;
    }
}

/* ============================================
   投稿メニュー
   ============================================ */
.post-menu {
    position: absolute;
    top: 12px;
    right: 12px;
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    font-size: 16px;
}

.post-menu-btn:hover {
    background: var(--primary-ghost);
    color: var(--primary);
}

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 200px;
    z-index: 50;
    display: none;
    overflow: hidden;
}

.post-menu-dropdown.show {
    display: block;
    animation: menuIn 0.15s ease;
}

@keyframes menuIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.post-menu-item:hover {
    background: var(--bg-hover);
}

.post-menu-item.danger {
    color: #e44;
}

/* ============================================
   レスポンシブ (モバイル)
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    z-index: 200;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
}

.mobile-nav-list {
    display: flex;
    list-style: none;
    justify-content: space-around;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 22px;
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast);
}

.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-pink);
}

.mobile-fab {
    display: none;
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    font-size: 24px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(91, 184, 212, 0.4);
    z-index: 190;
    transition: transform var(--transition-normal);
}

.mobile-fab:hover {
    transform: scale(1.1);
}

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 248, 252, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
    cursor: pointer;
}

.mobile-header-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .sidebar-right {
        display: none;
    }

    .app-layout {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar-left {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-fab {
        display: flex;
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        border: none;
        max-width: 100%;
    }

    .main-header {
        position: sticky;
        top: 53px;
        z-index: 90;
        padding: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .main-header .main-header-title,
    .main-header .search-box {
        display: none;
    }

    .tab-bar {
        background: rgba(240, 248, 252, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-light);
    }

    .post-composer {
        display: none;
    }

    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .landing-page {
        flex-direction: column;
    }

    .landing-left {
        padding: 40px 20px 20px;
    }

    .landing-right {
        width: 100%;
        padding: 20px;
    }

    .landing-title {
        font-size: 32px;
    }

    .landing-features {
        gap: 12px;
    }

    .landing-feature {
        min-width: 100px;
        padding: 14px;
    }

    .auth-card {
        max-width: 100%;
        padding: 24px;
    }

    .profile-avatar {
        width: 88px;
        height: 88px;
    }

    .profile-header-image {
        height: 150px;
    }

    .profile-avatar-wrap {
        margin-top: -30px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .landing-title {
        font-size: 28px;
    }

    .landing-tagline {
        font-size: 14px;
    }

    .post-card {
        padding: 12px;
    }

    .post-actions {
        justify-content: space-between;
    }

    .post-action {
        min-width: unset;
    }
}

/* ============================================
   アニメーション
   ============================================ */
.like-animation {
    animation: likeHeart 0.5s ease;
}

@keyframes likeHeart {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.post-card.new {
    animation: slideIn 0.35s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   モバイル投稿モーダル
   ============================================ */
.compose-modal .modal {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
}

@media (min-width: 769px) {
    .compose-modal .modal {
        max-width: 580px;
        max-height: 80vh;
        height: auto;
        border-radius: var(--radius-xl);
    }
}

/* ============================================
   検索結果
   ============================================ */
.search-results-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.user-list-item:hover {
    background: var(--bg-hover);
}

.user-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
    flex-shrink: 0;
}

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

.user-list-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.user-list-handle {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-list-bio {
    font-size: 14px;
    color: var(--text-primary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================
   プロフィール編集モーダル
   ============================================ */
.profile-edit-avatar-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.profile-edit-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
    margin-bottom: 8px;
}

.profile-edit-avatar-btn {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    display: inline-block;
}

/* ============================================
   ブックマークページ
   ============================================ */
.page-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
}

/* ============================================
   フォロー/フォロワーリスト
   ============================================ */
.follow-list-header {
    padding: 16px;
    text-align: center;
}

/* ============================================
   ローディングアニメーション
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-input) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-post {
    padding: 16px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.long {
    width: 90%;
}

/* ユーザーメニュードロップダウン */
.user-dropdown {
    position: absolute;
    bottom: 70px;
    left: 12px;
    right: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    display: none;
    overflow: hidden;
    z-index: 100;
}

.user-dropdown.show {
    display: block;
    animation: menuIn 0.15s ease;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
}

.user-dropdown-item.danger {
    color: #e44;
}

/* リプライモーダル */
.reply-context {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.reply-context::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 48px;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.reply-context-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.reply-context-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.reply-to-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

/* ぷるぷるバッジ */
.pururu-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-ghost);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 4px;
    font-weight: 500;
}

/* 変換インジケーター */
.converting-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-ghost);
    border-radius: var(--radius-full);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.converting-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }
}

/* ============================================
   おすすめユーザー (右サイドバー)
   ============================================ */
.suggested-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.suggested-user:hover {
    background: var(--bg-hover);
}

.suggested-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
    flex-shrink: 0;
}

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

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

.suggested-user-handle {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   設定ページ
   ============================================ */
.settings-section {
    background: var(--bg-card);
    border-bottom: 8px solid var(--bg-main);
    padding: 16px 0;
}

.settings-section-title {
    padding: 0 16px 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.settings-item-label {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.5;
}

.settings-section form {
    padding: 0 16px;
}

/* ============================================
   投稿メニュードロップダウン
   ============================================ */
.post-menu {
    position: absolute;
    top: 12px;
    right: 12px;
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.post-menu-btn:hover {
    background: var(--primary-ghost);
    color: var(--text-secondary);
}

.post-menu-dropdown {
    position: absolute;
    right: 0;
    top: 36px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    display: none;
    min-width: 180px;
    overflow: hidden;
    z-index: 100;
}

.post-menu-dropdown.show {
    display: block;
    animation: menuIn 0.15s ease;
}

@keyframes menuIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    width: 100%;
    text-align: left;
}

.post-menu-item:hover {
    background: var(--bg-hover);
}

.post-menu-item.danger {
    color: #e44;
}

/* ============================================
   ユーティリティ
   ============================================ */
.hidden {
    display: none !important;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 4px 0;
}

/* パーティクルエフェクト */
.particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}

.submit-pulse {
    animation: buttonPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   Googleログインボタン（カスタム）
   ============================================ */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #444;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 40px;
    /* Google標準に合わせる */
    cursor: pointer;
}

.btn-google:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #fbfbfb;
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ライフゲージ
   ============================================ */

/* サイドバーのライフセクション */
.sidebar-life-section {
    margin-top: auto;
    padding: 0 12px;
    margin-bottom: 12px;
}

.life-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.life-section-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.life-section-title .si {
    color: #22c55e;
}

.life-section-desc {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-tertiary);
    text-align: center;
}

/* ゲージ本体 */
.life-gauge-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    cursor: default;
    transition: opacity 0.2s;
    border: 1px solid var(--border-light);
}

/* コンパクト版（コンポーザー & モーダル内） */
.life-gauge-wrapper.life-gauge-compact {
    padding: 4px 10px;
    gap: 8px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.life-gauge-compact .life-bar-container {
    width: 80px;
    height: 10px;
}

.life-gauge-compact .life-count {
    font-size: 13px;
    min-width: 18px;
}

.life-gauge-compact .life-heart {
    transform: none;
}

.life-bar-container {
    flex: 1;
    min-width: 80px;
    max-width: 140px;
    height: 14px;
    background-color: var(--bg-hover, #e8e8e8);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.life-bar {
    height: 100%;
    border-radius: 7px;
    transition: width 0.3s ease;
    background-color: #22c55e;
}

.life-count {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 24px;
    text-align: right;
}

.life-heart {
    color: #22c55e;
    filter: drop-shadow(0 1px 2px rgba(34, 197, 94, 0.3));
    display: flex;
    align-items: center;
    transform: scale(1.1);
    flex-shrink: 0;
}

.life-heart svg {
    display: block;
}

/* コンポーザー内ライフ情報バー */
.composer-life-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border-light);
}

.life-section-desc-inline {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* モーダル内ライフ情報バー */
.modal-life-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.btn-google-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   リポスト表示ラベル
   ============================================ */
.post-repost-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px 0 56px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.post-repost-label .si {
    color: #22c55e;
}

/* ============================================
   引用リポストカード
   ============================================ */
.quote-post-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
    background: var(--bg-main);
}

.quote-post-card:hover {
    background: var(--bg-hover);
}

.quote-post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.quote-post-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.quote-post-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.quote-post-username {
    font-size: 13px;
    color: var(--text-secondary);
}

.quote-post-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.quote-post-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ============================================
   リポストポップアップメニュー
   ============================================ */
.repost-popup-menu {
    position: fixed;
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 200px;
    overflow: hidden;
    z-index: 500;
    animation: menuIn 0.15s ease;
}

.repost-popup-menu.show {
    display: block;
}

.repost-popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.repost-popup-item:hover {
    background: var(--bg-hover);
}

.repost-popup-item .si {
    color: var(--text-secondary);
}

/* ============================================
   引用プレビューカード (モーダル用)
   ============================================ */
.quote-preview-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background: var(--bg-main);
}

.quote-preview-card .quote-post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.quote-preview-card .quote-post-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.quote-preview-card .quote-post-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.quote-preview-card .quote-post-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* モバイル用リポストラベル */
@media (max-width: 768px) {
    .post-repost-label {
        padding-left: 48px;
    }
}

/* ============================================
   モバイルユーザーシート (ボトムドロワー)
   ============================================ */
.mobile-user-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 74, 0.5);
    z-index: 500;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-user-sheet-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-user-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 32px rgba(91, 184, 212, 0.2);
    z-index: 510;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 0 0 env(safe-area-inset-bottom, 16px);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-user-sheet.show {
    display: block;
    transform: translateY(0);
}

.mobile-user-sheet-handle {
    width: 36px;
    height: 5px;
    background: var(--border-medium);
    border-radius: 3px;
    margin: 12px auto 8px;
    cursor: pointer;
}

.mobile-user-sheet-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 8px;
}

.mobile-user-sheet-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-pale);
    cursor: pointer;
    flex-shrink: 0;
    transition: filter var(--transition-fast);
}

.mobile-user-sheet-avatar:hover {
    filter: brightness(0.92);
}

.mobile-user-sheet-info {
    flex: 1;
    min-width: 0;
}

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

.mobile-user-sheet-username {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user-sheet-life {
    padding: 12px 20px 8px;
}

.mobile-user-sheet-life .life-gauge-wrapper {
    border: none;
    box-shadow: none;
    padding: 4px 0;
    background: transparent;
}

.mobile-user-sheet-life .life-bar-container {
    flex: 1;
    max-width: none;
}

.mobile-user-sheet-life .life-section-desc {
    text-align: left;
    margin-top: 6px;
}

.mobile-user-sheet-divider {
    border-top: 1px solid var(--border-light);
    margin: 4px 16px;
}

.mobile-user-sheet-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.mobile-user-sheet-item:hover,
.mobile-user-sheet-item:active {
    background: var(--primary-ghost);
}

.mobile-user-sheet-item.danger {
    color: #e44;
}

.mobile-user-sheet-item .si {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.mobile-user-sheet-item.danger .si {
    color: #e44;
}

/* モバイルヘッダーアバターにリング装飾 */
@media (max-width: 768px) {
    .mobile-header-avatar {
        border: 2px solid var(--primary-light);
        box-shadow: 0 0 0 1px rgba(91, 184, 212, 0.2);
        transition: transform var(--transition-fast), border-color var(--transition-fast);
    }

    .mobile-header-avatar:active {
        transform: scale(0.9);
        border-color: var(--primary);
    }
}

/* ============================================
   トースト位置修正 (モバイルナビ回避)
   ============================================ */
@media (max-width: 768px) {
    .toast-container {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }
}

/* ============================================

   Magic Post Overlay (붿慕붿붿뿯붿뿯沽뿯ソ)

   ============================================ */

.magic-overlay {

    position: fixed;

    inset: 0;

    background: rgba(255, 255, 255, 0.92);

    backdrop-filter: blur(12px);

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 24px;

    opacity: 0;

    transition: opacity 0.4s ease;

}


.magic-overlay.show {

    display: flex;

    opacity: 1;

}


.magic-container {

    text-align: center;

    width: 100%;

    max-width: 500px;

    position: relative;

    min-height: 180px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

}


.magic-text {

    font-size: 20px;

    font-weight: 700;

    line-height: 1.6;

    color: var(--text-primary);

    white-space: pre-wrap;

    position: absolute;

    width: 100%;

    opacity: 0;

    transform: scale(0.9);

    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    word-break: break-all;

}


#magicTextOriginal {

    color: var(--text-secondary);

    filter: blur(0px);

    transition: all 0.5s ease;

}


#magicTextOriginal.blur-out {

    opacity: 0;

    filter: blur(8px);

    transform: scale(1.1);

}


#magicTextConverted {

    color: var(--primary-dark);

    text-shadow: 0 4px 12px rgba(91, 184, 212, 0.4);

}


#magicTextOriginal.visible,

#magicTextConverted.visible {

    opacity: 1;

    transform: scale(1);

    filter: blur(0);

}


.magic-wand-area {

    position: absolute;

    bottom: -80px;

    font-size: 48px;

    opacity: 0;

    transition: opacity 0.3s;

    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));

}


.magic-wand-area.show {

    opacity: 1;

    animation: wandFloat 2s infinite ease-in-out;

}


.magic-sparkles {

    position: absolute;

    top: -20px;

    right: -20px;

    font-size: 24px;

    animation: sparkleSpin 1.5s infinite linear;

}


@keyframes wandFloat {


    0%,

    100% {

        transform: translateY(0) rotate(-10deg);

    }


    50% {

        transform: translateY(-10px) rotate(5deg);

    }

}


@keyframes sparkleSpin {

    0% {

        transform: scale(0.8) rotate(0deg);

        opacity: 0.5;

    }


    50% {

        transform: scale(1.2) rotate(180deg);

        opacity: 1;

    }


    100% {

        transform: scale(0.8) rotate(360deg);

        opacity: 0.5;

    }

}


/* JS縺붿붿뿯溽뿯ソ縺吶붿繝뿯亽뿯ソ繝뿯ソぅ繧붿繝붿 */

.magic-particle {

    position: fixed;

    pointer-events: none;

    background: radial-gradient(circle, #fff 20%, var(--primary) 100%);

    border-radius: 50%;

    width: 12px;

    height: 12px;

    z-index: 10000;

    opacity: 0;

}


@keyframes particlePop {

    0% {

        transform: translate(0, 0) scale(0);

        opacity: 1;

    }


    100% {

        transform: translate(var(--dx), var(--dy)) scale(0);

        opacity: 0;

    }

}
/* ============================================
   Conversion Animation System
   ============================================ */

/* Conversion Overlay */
.conversion-overlay {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(91, 184, 212, 0.2);
    border: 2px solid rgba(91, 184, 212, 0.3);
    overflow: hidden;
    min-height: 80px;
}

.conversion-text-display {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-break: break-all;
    position: relative;
    z-index: 1;
}

/* Conversion Characters */
.conversion-char {
    display: inline;
    opacity: 0;
    animation: conversion-char-in 0.3s ease forwards;
    transition: all 0.3s ease;
}

@keyframes conversion-char-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.conversion-char-same {
    animation: conversion-wobble 2s ease-in-out infinite;
}

@keyframes conversion-wobble {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px); }
    75% { transform: translateY(2px); }
}

.conversion-char-morphing {
    animation: conversion-morph 0.4s ease;
    color: #5bb8d4;
    text-shadow: 0 0 8px rgba(91, 184, 212, 0.5);
}

@keyframes conversion-morph {
    0% { transform: scale(1) rotateY(0); opacity: 0.5; }
    50% { transform: scale(1.3) rotateY(90deg); opacity: 0.3; }
    100% { transform: scale(1) rotateY(0); opacity: 1; }
}

.conversion-char-done {
    opacity: 1;
    color: #333;
    text-shadow: none;
}

/* Conversion Status */
.conversion-status {
    text-align: center;
    padding: 12px 24px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.conversion-status-icon {
    font-size: 20px;
    animation: status-icon-bounce 1s ease infinite;
}

@keyframes status-icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.conversion-status-done {
    color: #5bb8d4;
    font-weight: bold;
    animation: status-done-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes status-done-bounce {
    0% { transform: scale(0.8); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Conversion Overlay Entrance */
@keyframes conversion-overlay-in {
    0% { 
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Flash Effect */
.conversion-flash {
    animation: conversion-flash-anim 0.8s ease;
}

@keyframes conversion-flash-anim {
    0% { box-shadow: 0 8px 32px rgba(91, 184, 212, 0.2); }
    50% { box-shadow: 0 0 60px rgba(91, 184, 212, 0.5), 0 0 120px rgba(91, 184, 212, 0.2); }
    100% { box-shadow: 0 8px 32px rgba(91, 184, 212, 0.2); }
}

/* Conversion Bubbles */
.conversion-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(91, 184, 212, 0.3), 
        rgba(91, 184, 212, 0.1));
    animation: conversion-bubble-float linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes conversion-bubble-float {
    0% { 
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 0.6;
        transform: translateY(60%) scale(1);
    }
    80% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20%) scale(0.5);
        opacity: 0;
    }
}

/* Conversion Sparkle */
.conversion-sparkle {
    position: absolute;
    color: #ffd700;
    pointer-events: none;
    z-index: 2;
}

/* Conversion Droplet */
.conversion-droplet {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(91, 184, 212, 0.6), 
        rgba(91, 184, 212, 0.2));
    pointer-events: none;
    z-index: 0;
}

/* Magic Wand Area */
.magic-wand-area {
    text-align: center;
    font-size: 32px;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
}

.magic-wand-area.show {
    opacity: 1;
    animation: wand-wave 1.5s ease-in-out infinite;
}

@keyframes wand-wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.magic-sparkles {
    position: absolute;
    top: -5px;
    right: calc(50% - 30px);
    font-size: 16px;
    animation: sparkle-twinkle 0.8s ease infinite;
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* Post Card Glow Effect */
.post-card-glow {
    animation: post-glow 2s ease-out;
}

@keyframes post-glow {
    0% { box-shadow: 0 0 20px rgba(91, 184, 212, 0.6); }
    50% { box-shadow: 0 0 40px rgba(91, 184, 212, 0.3); }
    100% { box-shadow: none; }
}

/* New Post Slide-in Animation */
.post-card.new,
.reply-thread-item.new {
    animation: new-post-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes new-post-slide-in {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(4px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ============================================
   User Type Badge System
   ============================================ */

.user-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.user-badge-premium {
    filter: drop-shadow(0 0 3px rgba(29, 155, 240, 0.3));
}

.user-badge-admin {
    filter: drop-shadow(0 0 3px rgba(245, 183, 49, 0.4));
}

/* Badge hover animation */
.post-header .user-badge,
.profile-name .user-badge,
.user-list-name .user-badge,
.quote-post-name .user-badge {
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: default;
}

.post-header .user-badge:hover,
.profile-name .user-badge:hover,
.user-list-name .user-badge:hover {
    transform: scale(1.2);
}

.user-badge-premium:hover {
    filter: drop-shadow(0 0 6px rgba(29, 155, 240, 0.5));
}

.user-badge-admin:hover {
    filter: drop-shadow(0 0 6px rgba(245, 183, 49, 0.6));
}

/* ── おえかき画像（投稿内） ── */
.post-drawing-image {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-top: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.post-drawing-image:hover {
    opacity: 0.9;
}

/* おえかき選択モーダル */
.draw-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}
.draw-picker-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}
.draw-picker-item:hover {
    transform: scale(1.03);
}
.draw-picker-item.selected {
    border-color: var(--primary);
}
.draw-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
