/* =========================================================
   DOTCH? デザインシステム
   旧DOTCHのトーン（ダーク #121212 系 + ゴールド #e6a615、
   対決カラー 青#4169e1 vs 紅#dc143c）をモダン化したもの。
   モバイルファースト。クラス名は旧仮スタイルと互換。
   ========================================================= */

:root {
    --bg: #16161a;
    --surface: #1e1e24;
    --surface-2: #27272f;
    --border: #34343e;
    --text: #e8e8ee;
    --muted: #9a9aa8;
    --gold: #e6a615;
    --gold-bright: #f2b62b;
    --gold-dim: rgba(230, 166, 21, .13);
    --blue: #4169e1;
    --blue-text: #85a0f2;
    --blue-dim: rgba(65, 105, 225, .16);
    --red: #dc143c;
    --red-text: #f4708b;
    --red-dim: rgba(220, 20, 60, .14);
    --ok: #4ec883;
    --ok-dim: rgba(78, 200, 131, .12);
    --err: #f4708b;
    --err-dim: rgba(220, 20, 60, .14);
    --radius: 12px;
    --radius-s: 8px;
    --bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 弾む系イージング */
    --font-body: 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    --font-logo: 'Sigmar One', sans-serif;
}

* { box-sizing: border-box; }

.hidden { display: none; }

/* ---------- モーション ---------- */

/* 一覧カードの入場（少しずつ遅らせて流れ込む） */
@keyframes card-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.vote-grid > *, .oekaki-grid > *, .post-list > li, .feature-grid > * {
    animation: card-in .45s var(--bounce) backwards;
}
.vote-grid > *:nth-child(1), .oekaki-grid > *:nth-child(1), .post-list > li:nth-child(1), .feature-grid > *:nth-child(1) { animation-delay: .04s; }
.vote-grid > *:nth-child(2), .oekaki-grid > *:nth-child(2), .post-list > li:nth-child(2), .feature-grid > *:nth-child(2) { animation-delay: .08s; }
.vote-grid > *:nth-child(3), .oekaki-grid > *:nth-child(3), .post-list > li:nth-child(3), .feature-grid > *:nth-child(3) { animation-delay: .12s; }
.vote-grid > *:nth-child(4), .oekaki-grid > *:nth-child(4), .post-list > li:nth-child(4), .feature-grid > *:nth-child(4) { animation-delay: .16s; }
.vote-grid > *:nth-child(5), .oekaki-grid > *:nth-child(5), .post-list > li:nth-child(5), .feature-grid > *:nth-child(5) { animation-delay: .20s; }
.vote-grid > *:nth-child(6), .oekaki-grid > *:nth-child(6), .post-list > li:nth-child(6), .feature-grid > *:nth-child(6) { animation-delay: .24s; }
.vote-grid > *:nth-child(n+7), .oekaki-grid > *:nth-child(n+7), .post-list > li:nth-child(n+7), .feature-grid > *:nth-child(n+7) { animation-delay: .28s; }

/* 数字がポンと跳ねる（投票直後などにJSが .pop を付ける） */
@keyframes count-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.pop { display: inline-block; animation: count-pop .45s var(--bounce); }

/* VSバッジの光波（投票直後にJSが .flash を付ける） */
@keyframes vs-flash {
    from { box-shadow: 0 0 0 0 rgba(230, 166, 21, .75); }
    to { box-shadow: 0 0 0 26px rgba(230, 166, 21, 0); }
}
.vote-card-vsmark.flash, .vs-wrap.flash::after { animation: vs-flash .6s ease-out; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    /* 旧DOTCH伝統の斜めストライプをごく薄く敷く（旧: #1a1a1a/#242424 の45度縞） */
    background:
        repeating-linear-gradient(45deg, transparent 0 30px, rgba(255, 255, 255, .01) 30px 60px),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}
main.main-wide { max-width: 976px; } /* 投票一覧など3カラムを使うページ */

h2, h3 { line-height: 1.4; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--gold-bright); }
a:hover { color: var(--gold); }

/* ---------- ヘッダー ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(22, 22, 26, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 16px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo { margin: 0; font-size: 1.5rem; line-height: 1; }
.logo a {
    font-family: var(--font-logo);
    font-weight: 400;
    text-decoration: none;
    letter-spacing: .5px;
    /* ゴールドの箔感（上が明るく下が沈むグラデーションをテキストにクリップ） */
    background: linear-gradient(180deg, #f8cd55 0%, var(--gold) 55%, #c98d0e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 9px rgba(230, 166, 21, .35));
}
.logo a:hover { filter: drop-shadow(0 0 12px rgba(230, 166, 21, .55)) brightness(1.12); }

.user-menu {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: .9rem;
    min-width: 0;
}
.user-menu-name {
    color: var(--text);
    text-decoration: none;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 10em;
}
.user-menu-name:hover { color: var(--gold-bright); }

.global-nav {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    padding: 0 8px;
}
.global-nav a {
    flex: 1;
    text-align: center;
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    padding: 8px 4px 10px;
    border-bottom: 3px solid transparent;
}
.global-nav a:hover { color: var(--text); }
.global-nav a.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
    font-weight: bold;
}

/* ---------- フッター ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
    padding: 20px 16px 32px;
}
.site-footer p { margin: 4px 0; }

/* ---------- ボタン ---------- */

.btn {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .95rem;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s, transform .15s var(--bounce);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.97); }
.btn:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
    background: var(--gold-dim);
}
.btn:disabled {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}
.btn-s { padding: 4px 12px; font-size: .8rem; }
.btn-gold {
    background: linear-gradient(180deg, #f2bb33, var(--gold));
    border-color: var(--gold);
    color: #1a1a1a;
    font-weight: bold;
    box-shadow: 0 3px 0 rgba(0, 0, 0, .35); /* ステッカー風の落ち影 */
}
.btn-gold:hover {
    background: linear-gradient(180deg, #f8cd55, var(--gold-bright));
    border-color: var(--gold-bright);
    color: #1a1a1a;
}
.btn-gold:active { box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn-following {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue-text);
}
.btn-muted { color: var(--muted); }
.btn-muted:hover {
    background: var(--surface);
    border-color: var(--muted);
    color: var(--text);
}
.btn-danger { border-color: rgba(220, 20, 60, .5); color: var(--red-text); }
.btn-danger:hover {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red-text);
}

/* ---------- フォーム ---------- */

label { display: block; margin: 14px 0 4px; font-size: .95rem; }

input[type=text], input[type=search], input[type=password], input[type=date], textarea, select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px; /* iOSのフォーカス時ズームを防ぐ */
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
}
input[type=text]:focus, input[type=search]:focus, input[type=password]:focus, input[type=date]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
}
select { width: auto; }
input[type=date] { width: auto; color-scheme: dark; }
form.inline { display: inline; }
.errors { color: var(--err); font-size: .9rem; }

input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 18px; height: 18px; }

input[type=file] { color: var(--muted); font-family: var(--font-body); }
input[type=file]::file-selector-button {
    padding: 6px 14px;
    margin-right: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font-body);
    cursor: pointer;
}

/* ---------- フラッシュメッセージ ---------- */

.flash-success {
    background: var(--ok-dim);
    border: 1px solid rgba(78, 200, 131, .4);
    color: var(--ok);
    border-radius: var(--radius-s);
    padding: 10px 14px;
    margin-bottom: 16px;
}
.flash-error {
    background: var(--err-dim);
    border: 1px solid rgba(220, 20, 60, .4);
    color: var(--err);
    border-radius: var(--radius-s);
    padding: 10px 14px;
    margin-bottom: 16px;
}

/* ---------- ホーム（ヒーロー） ---------- */

.hero { text-align: center; padding: 28px 0 8px; }
.hero-logo {
    font-family: var(--font-logo);
    font-size: 3rem;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(180deg, #f8cd55 0%, var(--gold) 55%, #c98d0e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(230, 166, 21, .4));
}
.hero-tagline { color: var(--muted); margin: 8px 0 20px; }
.hero-mascots {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
}
.hero-mascots img { width: 76px; height: auto; }
@media (min-width: 480px) {
    .hero-mascots img { width: 96px; }
    .hero-mascots { gap: 14px; }
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
}
@media (min-width: 480px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s;
}
.feature-card:hover { border-color: var(--gold); color: var(--text); }
.feature-icon { font-size: 1.8rem; display: block; }
.feature-title { font-weight: bold; color: var(--gold-bright); display: block; margin: 4px 0 2px; }
.feature-desc { font-size: .8rem; color: var(--muted); display: block; line-height: 1.5; }

/* ---------- リスト（カード化） ---------- */

.post-list { list-style: none; padding: 0; margin: 16px 0; }
.post-list li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
}
.post-list li > a {
    font-weight: bold;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.post-list li > a:hover { text-decoration: underline; }
.post-list li.empty { background: none; border: none; box-shadow: none; padding: 0; }
.post-meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
/* 名前の横の小アイコン */
.uicon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-2) center/cover no-repeat;
    vertical-align: -5px;
    margin-right: 2px;
}
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--gold-bright); }

.badge-private {
    background: var(--red-dim);
    border: 1px solid rgba(220, 20, 60, .5);
    color: var(--red-text);
    font-size: .75rem;
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 6px;
    display: inline-block;
}

.pager { display: flex; gap: 20px; justify-content: center; margin: 24px 0; }
.pager .disabled { color: var(--muted); opacity: .5; }

/* ---------- 活動報告（本文・吹き出し） ---------- */

.post-elements { margin-top: 16px; }
.post-text { margin: 12px 0; line-height: 1.8; overflow-wrap: anywhere; }
.post-img img { max-width: 100%; border-radius: var(--radius-s); }

.bubble { display: flex; gap: 8px; margin: 14px 0; align-items: flex-start; }
.bubble.r { justify-content: flex-end; }
.bubble-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-2) center/cover no-repeat;
    flex-shrink: 0;
}
.bubble-body {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    max-width: 75%;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.bubble.l .bubble-body { background: var(--surface-2); border-top-left-radius: 4px; }
.bubble.r .bubble-body {
    background: var(--gold-dim);
    border-color: rgba(230, 166, 21, .35);
    border-top-right-radius: 4px;
}

/* ---------- 投稿編集（ブロックエディタ） ---------- */

.owner-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.block-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 10px;
}
.block-head {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.block-btns { display: flex; gap: 4px; }
.block-img-preview { max-width: 200px; display: block; margin-bottom: 4px; border-radius: var(--radius-s); }
.block-note { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

/* ---------- プロフィール ---------- */

.profile-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
}
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-2) center/cover no-repeat;
    flex-shrink: 0;
}
.avatar-s { width: 40px; height: 40px; }
.profile-name { font-weight: bold; font-size: 1.1rem; }
.profile-uid { color: var(--muted); font-size: .85rem; }
.profile-body { margin-top: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.profile-since { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.avatar-edit { display: flex; gap: 12px; align-items: center; }

.follow-stats { display: flex; gap: 16px; margin-top: 8px; font-size: .9rem; }
.follow-stats a { color: var(--text); text-decoration: none; }
.follow-stats a:hover { color: var(--gold-bright); text-decoration: underline; }

.user-list { list-style: none; padding: 0; }
.user-list li { border-bottom: 1px solid var(--border); }
.user-list a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: var(--text);
}
.user-list a:hover { color: var(--gold-bright); }
.user-list-name { font-weight: bold; margin-right: 8px; }
.user-list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-list-row > a { flex: 1; min-width: 0; }

.recovery-code-box {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 1.6rem;
    letter-spacing: 2px;
    border: 2px dashed var(--gold);
    border-radius: var(--radius);
    background: var(--gold-dim);
    color: var(--gold-bright);
    padding: 16px;
    text-align: center;
    margin: 16px 0;
    user-select: all;
}

/* ---------- お絵描き ---------- */

.oekaki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.oekaki-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s;
}
.oekaki-card:hover { border-color: var(--gold); color: var(--text); }
.oekaki-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius-s);
}
.oekaki-subject {
    font-size: .9rem;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 4px;
}
.oekaki-name {
    font-size: .8rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.oekaki-img img {
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
}
.reaction-total { color: var(--gold-bright); }

.reaction-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.reaction-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    padding: 5px 14px;
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.reaction-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.reaction-btn:active { transform: scale(.88); }
.reaction-btn { transition: border-color .15s, background .15s, transform .15s var(--bounce); }
.reaction-btn.mine { background: var(--gold-dim); border-color: var(--gold); }
.reaction-count { font-size: .85rem; color: var(--muted); }

/* ---------- 投票（どっちが好き？） ---------- */

/* お題テンプレの選択ピル（タップで選ぶラジオボタン） */
.template-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.template-pill { position: relative; margin: 0; }
.template-pill input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.template-pill span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s var(--bounce);
}
.template-pill input:active + span { transform: scale(.96); }
/* 選択時のポップは控えめに（count-popのscale1.4は文字要素には強すぎた） */
@keyframes pill-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.07); }
    100% { transform: scale(1); }
}
.template-pill input:checked + span { animation: pill-pop .25s ease-out; }
.template-pill input:hover + span { border-color: var(--gold); }
.template-pill input:checked + span {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1a1a;
    font-weight: bold;
}
.template-pill input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* 一覧の並び替えタブ（にぎわい/新着/票数/接戦） */
.sort-tabs {
    display: flex;
    gap: 6px;
    margin: 16px 0 0;
    flex-wrap: wrap;
}
.sort-tabs a {
    color: var(--muted);
    text-decoration: none;
    font-size: .85rem;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: color .15s, border-color .15s, transform .2s var(--bounce);
    white-space: nowrap;
}
.sort-tabs a:hover { color: var(--text); border-color: var(--gold); transform: translateY(-1px); }
.sort-tabs a.active {
    color: #1a1a1a;
    background: var(--gold);
    border-color: var(--gold);
    font-weight: bold;
}

/* 一覧の検索窓（並び替えタブの下） */
.search-box { display: flex; gap: 8px; margin: 12px 0 0; }
.search-box input { flex: 1; max-width: 320px; }
.search-box .btn { white-space: nowrap; }

/* 投票一覧のカード: 投票トーク風の縦積み構成（票数ヘッダ→お題→選択肢票数→縦長画像→バー→メタ）。
   左が青、右が紅の対決ビジュアルで、左右がそのまま投票ボタン */
.vote-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
@media (min-width: 560px) {
    .vote-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
    .vote-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.vote-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s, transform .2s var(--bounce);
}
.vote-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.vote-card-side { transition: filter .15s; }
.vote-card-side:active:not(:disabled) { filter: brightness(1.25); }
.vote-card-head {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px 8px;
    font-size: .8rem;
    color: var(--muted);
    background: #333; /* 上下の帯だけカードより一段明るく */
}
.vote-card-head b { font-size: 1.2rem; color: var(--gold-bright); margin-right: 2px; }
/* タイトル・メタは1行に固定してカードの高さを揃える（長い場合は省略） */
.vote-card-title {
    display: block;
    padding: 2px 14px 8px;
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vote-card-title:hover { color: var(--gold-bright); text-decoration: underline; }
.vote-card-counts { display: flex; padding: 0 0 6px; }
.vote-card-count {
    flex: 1;
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
}
.vote-card-count b { font-size: 1.05rem; }
.vote-card-count.c1 b { color: var(--blue-text); }
.vote-card-count.c2 b { color: var(--red-text); }
.vote-card-count .crown { visibility: hidden; margin-right: 2px; display: inline-block; }
@keyframes crown-in {
    from { transform: scale(0) rotate(-30deg); }
    to { transform: none; }
}
.vote-card-count.lead .crown { visibility: visible; animation: crown-in .5s var(--bounce); }
.vote-card-vs { display: flex; position: relative; }
.vote-card-side {
    flex: 1;
    min-width: 0;
    aspect-ratio: 3 / 4; /* 縦長のビジュアルにする（投票トーク風） */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    background-size: cover;
    background-position: center;
    border: none;
    font-family: var(--font-body);
    cursor: pointer;
    position: relative;
}
.vote-card-side:disabled { cursor: default; }
.vote-card-side.side1 { background-color: var(--blue-dim); border-top: 4px solid var(--blue); }
.vote-card-side.side2 { background-color: var(--red-dim); border-top: 4px solid var(--red); }
.vote-card-side:not(.has-img):not(:disabled):hover.side1 { background-color: rgba(65, 105, 225, .3); }
.vote-card-side:not(.has-img):not(:disabled):hover.side2 { background-color: rgba(220, 20, 60, .28); }
/* 投票済みの側は金のリング + チェック */
.vote-card-side.mine { box-shadow: inset 0 0 0 3px var(--gold); }
@keyframes check-in {
    from { transform: scale(0); }
    to { transform: none; }
}
.vote-card-side.mine::after { animation: check-in .4s var(--bounce); }
.vote-card-side.mine::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: #1a1a1a;
    font-weight: bold;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vote-card-name {
    font-weight: bold;
    font-size: 1.05rem;
    text-align: center;
    overflow-wrap: anywhere;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.side1 .vote-card-name { color: var(--blue-text); }
.side2 .vote-card-name { color: var(--red-text); }
/* 画像がある側は名前を下部の帯にして画像を見せる */
.vote-card-side.has-img { justify-content: flex-end; }
.vote-card-side.has-img .vote-card-name {
    background: rgba(0, 0, 0, .65);
    border-radius: 6px;
    padding: 1px 8px;
    max-width: 100%;
    -webkit-line-clamp: 1;
}
.vote-card-vsmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-logo);
    color: var(--gold);
    background: var(--bg);
    border: 2px solid var(--gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    pointer-events: none;
}
.vote-card-bar { display: flex; height: 8px; background: var(--red); }
.vote-card-bar span:first-child { background: var(--blue); transition: width .6s ease; }
.vote-card-body { padding: 8px 14px 10px; background: #333; }
.vote-card-body .post-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vote-card-author {
    display: inline-block;
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* タイトル中の「A VS B」: 左が青、右が紅（旧サイト踏襲） */
.vs-n1 { color: var(--blue-text); }
.vs-n2 { color: var(--red-text); }
.vs-mark {
    font-family: var(--font-logo);
    color: var(--gold);
    font-size: .75rem;
    padding: 0 2px;
}

.vs-wrap { display: flex; gap: 12px; margin: 20px 0 12px; position: relative; }
.vs-wrap::after {
    content: 'VS';
    font-family: var(--font-logo);
    color: var(--gold);
    background: var(--bg);
    border: 2px solid var(--gold);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 16px rgba(230, 166, 21, .3);
    pointer-events: none;
}
.vs-option {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-top: 3px solid var(--blue);
    padding: 12px;
    text-align: center;
}
.vs-option:last-child { border-top-color: var(--red); }
.vs-option .vs-name { color: var(--blue-text); }
.vs-option:last-child .vs-name { color: var(--red-text); }
.vs-option.mine { border-color: var(--gold); border-top-width: 3px; background: var(--gold-dim); }
.vs-option.mine:first-child { border-top-color: var(--blue); }
.vs-option.mine:last-child { border-top-color: var(--red); }
.vs-option img { max-width: 100%; border-radius: var(--radius-s); background: #fff; }
.vs-name { font-weight: bold; margin-bottom: 8px; overflow-wrap: anywhere; }
.vs-count { font-size: 1.1rem; margin: 8px 0; }

/* マスコット（虎=選択肢1側 / 龍=選択肢2側）と台詞の吹き出し */
.mascot-talk { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.mascot-talk .mascot {
    width: 80px;
    height: auto;
    flex-shrink: 0;
    align-self: flex-end;
}
.mascot-bubble {
    position: relative;
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: .92rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.mascot-bubble::before {
    content: '';
    position: absolute;
    top: 50%;
    margin-top: -7px;
    border: 7px solid transparent;
}
.talk-l .mascot-bubble::before { left: -13px; border-right-color: var(--surface-2); }
.talk-r .mascot-bubble::before { right: -13px; border-left-color: var(--surface-2); }
.talk-l .mascot:last-child, .talk-r .mascot:first-child { opacity: .55; }


/* マスコットの案内（空状態・エラーページ用の1匹+吹き出し） */
.mascot-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px auto;
    max-width: 440px;
}
/* グリッド直下の空状態は1マスに収まらず全カラムぶち抜きで中央に出す */
.oekaki-grid > .mascot-note, .vote-grid > .mascot-note { grid-column: 1 / -1; }
.mascot-note img { width: 90px; height: auto; flex-shrink: 0; }
.mascot-note-bubble {
    position: relative;
    flex: 1;
    min-width: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    line-height: 1.7;
    text-align: left;
}
.mascot-note-bubble::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -13px;
    margin-top: -7px;
    border: 7px solid transparent;
    border-right-color: var(--surface-2);
}

/* 一覧カードで投票した瞬間のミニ吹き出し（がお！/ドラ！） */
@keyframes cheer-pop {
    0% { opacity: 0; transform: translate(-50%, 10px) scale(.4); }
    25% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); }
    70% { opacity: 1; transform: translate(-50%, -10px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -22px) scale(.9); }
}
.vote-cheer {
    position: absolute;
    left: 50%;
    top: 22%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gold);
    color: #1a1a1a;
    font-weight: bold;
    font-size: .9rem;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
    pointer-events: none;
    white-space: nowrap;
    animation: cheer-pop 1s var(--bounce) forwards;
}
.vote-cheer img { width: 26px; height: auto; }

/* エラーページ */
.error-page { text-align: center; padding: 24px 0; }
.error-code {
    font-family: var(--font-logo);
    font-size: 4rem;
    margin: 0;
    line-height: 1.1;
    background: linear-gradient(180deg, #f8cd55 0%, var(--gold) 55%, #c98d0e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(230, 166, 21, .35));
}

/* 得票バー: 左（選択肢1）が青、残りが紅 */
.vs-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--red);
}
.vs-bar span:first-child { background: var(--blue); transition: width .6s ease; }
.vs-percent {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    margin-top: 4px;
}
.vs-percent span:first-child { color: var(--blue-text); }
.vs-percent span:last-child { color: var(--red-text); }

.vs-field {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 12px 0;
    padding: 8px 14px 14px;
}
.vs-field:first-of-type { border-top: 3px solid var(--blue); }
.vs-field + .vs-field { border-top: 3px solid var(--red); }
.vs-field legend { font-weight: bold; padding: 0 8px; }
.vs-field:first-of-type legend { color: var(--blue-text); }
.vs-field + .vs-field legend { color: var(--red-text); }
/* PCでは選択肢1(左=青)/選択肢2(右=紅)を横並びに（投票カードと同じ配置） */
.vs-field-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 700px) {
    .vs-field-row { grid-template-columns: 1fr 1fr; }
    .vs-field-row .vs-field { margin: 12px 0; }
}
/* 選んだ画像のその場プレビュー */
.vs-field-preview {
    display: block;
    max-width: 100%;
    max-height: 240px;
    margin-top: 10px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border);
}
.vs-field-preview.hidden { display: none; }

/* ---------- 姉妹サイト（TOP） ---------- */

.sister-site { max-width: 640px; margin: 36px auto; }
.sister-site h2 { text-align: center; font-size: 1.05rem; color: var(--muted); }
.sister-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    transition: border-color .15s, transform .2s var(--bounce);
}
.sister-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.sister-card img {
    width: 168px;
    max-width: 40%;
    height: auto;
    border-radius: var(--radius-s);
    flex-shrink: 0;
}
.sister-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sister-title { font-weight: bold; color: var(--gold-bright); }
.sister-desc { font-size: .85rem; color: var(--muted); line-height: 1.6; }
/* ---------- 質感（重ね技: グラデーション・奥行き） ---------- */

/* カード類にわずかな落ち影で奥行きを */
.vote-card, .post-list li, .oekaki-card, .profile-card, .feature-card, .vs-option, .vs-field, .block {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

/* VSバッジに斜めのハイライトで丸みを */
.vote-card-vsmark, .vs-wrap::after {
    background: radial-gradient(circle at 32% 28%, #2d2d35, var(--bg) 72%);
}

/* 得票バーを箔調のグラデーションに */
.vs-bar, .vote-card-bar { background: linear-gradient(180deg, #ea3a5e, var(--red)); }
.vs-bar span:first-child, .vote-card-bar span:first-child {
    background: linear-gradient(180deg, #5b83f0, var(--blue));
}

/* ---------- コメント ---------- */

.comment-list { list-style: none; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--border); padding: 12px 0; }
.comment-body { margin-top: 4px; line-height: 1.7; overflow-wrap: anywhere; }

/* ---------- 質問箱 ---------- */

/* Q./A. の飾りマーク（ロゴと同じ飾りフォント） */
.q-mark {
    font-family: var(--font-logo);
    color: var(--gold-bright);
    margin-right: 6px;
}
.q-mark.a { color: var(--blue-text); }
.q-list .q-body { display: block; font-weight: bold; overflow-wrap: anywhere; }
.q-deleted { color: var(--muted); }
.q-count { color: var(--gold-bright); }
/* 答えた質問一覧: 自分の回答の引用ボックス */
.q-my-answer {
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    font-size: .9rem;
    overflow-wrap: anywhere;
}
.q-show h2 { line-height: 1.5; overflow-wrap: anywhere; }
/* ベストアンサー: 質問直下に金枠でピン留め */
.best-answer {
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 12px 14px;
    margin: 16px 0;
    box-shadow: 0 2px 12px rgba(230, 166, 21, .15);
}
.best-answer-label {
    color: var(--gold-bright);
    font-weight: bold;
    margin-bottom: 4px;
}
.badge-best {
    display: inline-block;
    background: var(--gold);
    color: #1a1a1a;
    font-size: .72rem;
    font-weight: bold;
    border-radius: 999px;
    padding: 1px 8px;
    vertical-align: 1px;
}
.q-my-answer.best { border: 1px solid var(--gold); }

/* ---------- 雑談チャット ---------- */

.room-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 20px;
}
@media (min-width: 700px) {
    .room-grid { grid-template-columns: repeat(4, 1fr); }
}
.room-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 12px 14px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    transition: transform .2s var(--bounce), box-shadow .15s;
}
.room-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(230, 166, 21, .18); }
.room-name { font-weight: bold; color: var(--gold-bright); }
.room-meta { font-size: .78rem; color: var(--muted); }

.chat-box {
    height: 60vh;
    min-height: 320px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 4px;
    margin: 12px 0 8px;
}
.chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 10px;
    border-radius: 8px;
}
.chat-msg:hover { background: rgba(255, 255, 255, .03); }
.chat-msg.mine { background: rgba(230, 166, 21, .06); }
.chat-msg .uicon { flex: none; margin-top: 2px; }
.chat-msg-main { min-width: 0; flex: 1; }
.chat-msg-head { font-size: .75rem; color: var(--muted); }
.chat-msg-name { font-weight: bold; color: var(--text); text-decoration: none; }
a.chat-msg-name:hover { text-decoration: underline; }
.chat-msg-body { overflow-wrap: anywhere; line-height: 1.6; }
/* 削除×/通報⚐（ホバー時だけ浮かぶ控えめボタン） */
.chat-msg-act { flex: none; }
.chat-msg-act button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: .9rem;
    padding: 2px 6px;
    opacity: 0;
    transition: opacity .15s;
}
.chat-msg:hover .chat-msg-act button { opacity: 1; }
.chat-msg-act button:hover { color: var(--text); }

.chat-input { display: flex; gap: 8px; margin: 0 0 12px; }
.chat-input input { flex: 1; min-width: 0; }

/* 通報ミニモーダル（display:flex が hidden属性のUAスタイルに勝ってしまうため明示的に隠す） */
.chat-report[hidden] { display: none; }
.chat-report {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.chat-report form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    width: min(320px, 90vw);
}
.chat-report select { width: 100%; margin: 8px 0; }
.chat-report-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 通報 ---------- */

.report-box { font-size: .85rem; color: var(--muted); margin: 8px 0; }
.report-box summary { cursor: pointer; }
.report-box summary:hover { color: var(--text); }
.report-box form { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.report-box select { padding: 4px 8px; font-size: .85rem; }

/* ---------- 利用規約ボックス ---------- */

.terms-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 12px;
    height: 200px;
    overflow-y: scroll;
    font-size: .9rem;
}
/* 公開の利用規約ページではスクロールボックスにしない */
.terms-page .terms-box { height: auto; overflow: visible; padding: 16px 20px; }
.terms-box h3 { margin: 16px 0 6px; color: var(--gold-bright); font-size: 1rem; }
.terms-box ul, .terms-box ol { margin: 4px 0; padding-left: 20px; }
.terms-box li { margin: 4px 0; line-height: 1.7; }
/* 冒頭の小学生向けかんたん版は枠で目立たせる */
.terms-simple {
    background: var(--surface-2);
    border: 1px solid var(--gold);
    border-radius: var(--radius-s);
    padding: 4px 16px 10px;
    margin-bottom: 16px;
}
.terms-simple h3 { margin-top: 10px; }

/* ---------- カルマパネル（マイページ） ---------- */

.karma-panel {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    margin: 16px 0;
}
@media (min-width: 720px) {
    .karma-panel { grid-template-columns: 3fr 2fr; }
}
.karma-tile, .karma-ladder {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.karma-tile-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.karma-label { color: var(--muted); font-size: .85rem; }
.karma-value { font-size: 1.9rem; font-weight: 700; color: var(--text); }
.karma-delta { color: var(--ok); font-size: .9rem; }
.karma-delta small { color: var(--muted); font-weight: normal; }
.karma-chart { display: block; width: 100%; height: auto; }
.karma-chart-range { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.karma-table summary { color: var(--muted); font-size: .78rem; cursor: pointer; margin-top: 8px; }
.karma-table table { width: 100%; font-size: .78rem; color: var(--muted); border-collapse: collapse; margin-top: 6px; }
.karma-table td, .karma-table th { padding: 2px 6px; text-align: left; font-variant-numeric: tabular-nums; }
.karma-ladder h4 { margin: 0 0 10px; font-size: .95rem; }
.karma-step { margin-bottom: 10px; }
.karma-step-name { display: block; font-size: .85rem; color: var(--text); margin-bottom: 4px; }
.karma-step:not(.is-unlocked) .karma-step-name { color: var(--muted); }
.karma-meter {
    display: block; height: 8px; border-radius: 4px;
    background: var(--gold-dim); overflow: hidden;
}
.karma-meter-fill { display: block; height: 100%; border-radius: 4px; background: #c98500; }
.karma-note { color: var(--muted); font-size: .75rem; margin: 10px 0 0; }

/* ---------- 未昇格お題のログイン誘導壁 ---------- */

.vote-gate {
    max-width: 480px; margin: 40px auto; text-align: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 20px;
}
.vote-gate h2 { margin-top: 0; }
.vote-gate p { color: var(--muted); }

/* ---------- チャット画像（絵師認定ユーザー限定） ---------- */

.chat-img-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; min-width: 40px; height: 40px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface-2); cursor: pointer; font-size: 1.05rem;
    transition: border-color .15s, background .15s;
}
.chat-img-btn:hover { border-color: var(--gold); background: var(--gold-dim); }
.chat-img-note { color: var(--muted); font-size: .78rem; margin: 4px 0 0; }
.chat-msg-img {
    display: block; max-width: min(260px, 70%); max-height: 260px;
    border-radius: var(--radius-s); border: 1px solid var(--border); margin-top: 4px;
    cursor: zoom-in;
}
.img-lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .82); padding: 24px;
    cursor: zoom-out;
}
.img-lightbox[hidden] { display: none; }
.img-lightbox img {
    max-width: 100%; max-height: 100%;
    border-radius: var(--radius-s);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}

/* ---------- 部屋の管理パネル（部屋主・モデレーター専用） ---------- */

.room-manage {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 16px; margin: 12px 0;
    font-size: .88rem;
}
.room-manage summary { color: var(--muted); cursor: pointer; }
.room-manage h4 { margin: 10px 0 4px; font-size: .85rem; }
.room-manage ul { list-style: none; margin: 4px 0; padding: 0; }
.room-manage li { padding: 4px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- 投票コメントのアンカーといいね ---------- */

.comment-no { color: var(--muted); font-weight: normal; }
.anchor-link { color: var(--blue-text); text-decoration: none; }
.anchor-link:hover { text-decoration: underline; }
.comment-list li:target { border-left: 3px solid var(--gold); padding-left: 8px; background: var(--gold-dim); }
.comment-actions { display: flex; gap: 2px; align-items: center; margin: 2px 0 0; }
/* ゴースト風: 枠を出さず、ホバーでふわっと赤いウォッシュ。押すとハートがポンと跳ねる */
.comment-like {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; border-radius: 999px;
    color: var(--muted); font-size: .82rem; font-family: var(--font-body);
    padding: 4px 10px; cursor: pointer;
    transition: background .15s, color .15s, transform .15s var(--bounce);
}
.comment-like .heart { font-size: 1.02rem; line-height: 1; display: inline-block; }
.comment-like .count { min-width: 1em; text-align: left; font-variant-numeric: tabular-nums; }
button.comment-like:hover { background: var(--red-dim); color: var(--red-text); }
button.comment-like:active { transform: scale(.88); }
.comment-like.liked { color: var(--red-text); }
.comment-like.static { cursor: default; padding-left: 0; }
.comment-reply {
    background: none; border: none; border-radius: 999px;
    color: var(--muted); font-size: .8rem; font-family: var(--font-body);
    padding: 4px 10px; cursor: pointer;
    transition: background .15s, color .15s;
}
.comment-reply:hover { background: var(--gold-dim); color: var(--gold-bright); }

/* ---------- 管理パネル（管理者にだけ見える） ---------- */

.admin-panel {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    background: var(--surface); border: 1px dashed var(--gold);
    border-radius: var(--radius); padding: 8px 14px; margin: 10px 0;
    font-size: .85rem; color: var(--muted);
}
.admin-panel-label { color: var(--gold-bright); font-weight: bold; }
.admin-badge {
    background: var(--red-dim); color: var(--red-text);
    border-radius: 999px; padding: 2px 10px; font-size: .78rem;
}

/* ユーザー名ホバーのミニプロフィール（layouts/app.blade.php のJSが生成） */
.user-pop {
    position: absolute;
    z-index: 90;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
    padding: 12px;
    font-size: .85rem;
    animation: user-pop-in .12s ease-out;
}
@keyframes user-pop-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.user-pop-head { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.user-pop-head:hover .user-pop-name { color: var(--gold-bright); }
.user-pop-name { display: block; font-weight: bold; }
.user-pop-uid { display: block; color: var(--muted); font-size: .78rem; }
.user-pop-body {
    margin-top: 8px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.user-pop-meta { margin-top: 8px; color: var(--muted); font-size: .78rem; }
@media (prefers-reduced-motion: reduce) {
    .user-pop { animation: none; }
}

/* アンカー（>>N）ホバーのコメントカード（.user-pop の亜種） */
.comment-pop { width: 320px; }
.comment-pop-head .uicon { margin: 0 2px; }
.comment-pop-body {
    margin-top: 6px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* お絵描きカードの分割リンク（作者名リンクを入れ子にしないための構造変更に対応） */
.oekaki-card-link { display: block; text-decoration: none; color: var(--text); }
.oekaki-card-link:hover { color: var(--text); }
.oekaki-name a { color: var(--muted); }
.oekaki-name a:hover { color: var(--gold-bright); }
/* 一覧の作者名リンク（投票カード） */
a.vote-card-author { color: var(--muted); }
a.vote-card-author:hover { color: var(--gold-bright); }

/* ============ 今日の対決（トップ、カルーセル） ============ */
.daily-battle { margin: 26px auto 6px; max-width: 520px; }
.battle-stage { position: relative; }
/* PC（マウス環境）だけ左右の送りボタンを出す。タッチはスワイプで足りる */
.battle-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: border-color .15s, color .15s, opacity .15s;
}
.battle-arrow:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-bright); }
.battle-arrow:disabled { opacity: .25; cursor: default; }
.battle-arrow.prev { left: -16px; }
.battle-arrow.next { right: -16px; }
@media (hover: hover) and (pointer: fine) {
    .battle-arrow { display: block; }
}
/* scroll-snap スライダー。次のカードを少し覗かせて続きがあると伝える */
.battle-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 12px;
    scrollbar-width: none;
}
.battle-carousel::-webkit-scrollbar { display: none; }
.battle-carousel > .vote-card {
    flex: 0 0 88%;
    scroll-snap-align: center;
}
/* 金枠は日替わりの1枚目（今日の対決）だけ。2枚目以降はおまけの接戦 */
.battle-carousel > .vote-card:first-child {
    border-color: var(--gold);
    box-shadow: 0 0 18px var(--gold-dim), 0 4px 14px rgba(0, 0, 0, .35);
}
/* 一覧の縦長ビジュアル（3/4）だとトップでは高すぎるため、横長比率に上書き */
.daily-battle .vote-card-side { aspect-ratio: 3 / 1; }
